Skip to content

Commit 8158b46

Browse files
authored
Merge pull request #21 from DoctorVanGogh/merged
Merged PR
2 parents 8ef43e4 + 682fe64 commit 8158b46

34 files changed

+766
-46778
lines changed

.gitignore

Lines changed: 295 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,298 @@
11
/Source/*/Source-DLLs/*
22
*Thumbs.db
33
/source/*/Bin/*
4+
5+
6+
# Created by https://www.gitignore.io/api/visualstudio
7+
8+
### VisualStudio ###
9+
## Ignore Visual Studio temporary files, build results, and
10+
## files generated by popular Visual Studio add-ons.
11+
##
12+
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
13+
14+
# User-specific files
15+
*.suo
16+
*.user
17+
*.userosscache
18+
*.sln.docstates
19+
20+
# User-specific files (MonoDevelop/Xamarin Studio)
21+
*.userprefs
22+
23+
# Build results
24+
[Dd]ebug/
25+
[Dd]ebugPublic/
26+
[Rr]elease/
27+
[Rr]eleases/
28+
x64/
29+
x86/
30+
bld/
31+
[Bb]in/
32+
[Oo]bj/
33+
[Ll]og/
34+
35+
# Visual Studio 2015 cache/options directory
36+
.vs/
37+
# Uncomment if you have tasks that create the project's static files in wwwroot
38+
#wwwroot/
39+
40+
# MSTest test Results
41+
[Tt]est[Rr]esult*/
42+
[Bb]uild[Ll]og.*
43+
44+
# NUNIT
45+
*.VisualState.xml
46+
TestResult.xml
47+
48+
# Build Results of an ATL Project
49+
[Dd]ebugPS/
50+
[Rr]eleasePS/
51+
dlldata.c
52+
53+
# .NET Core
54+
project.lock.json
55+
project.fragment.lock.json
56+
artifacts/
57+
**/Properties/launchSettings.json
58+
59+
*_i.c
60+
*_p.c
61+
*_i.h
62+
*.ilk
63+
*.meta
64+
*.obj
65+
*.pch
66+
*.pdb
67+
*.pgc
68+
*.pgd
69+
*.rsp
70+
*.sbr
71+
*.tlb
72+
*.tli
73+
*.tlh
74+
*.tmp
75+
*.tmp_proj
76+
*.log
77+
*.vspscc
78+
*.vssscc
79+
.builds
80+
*.pidb
81+
*.svclog
82+
*.scc
83+
84+
# Chutzpah Test files
85+
_Chutzpah*
86+
87+
# Visual C++ cache files
88+
ipch/
89+
*.aps
90+
*.ncb
91+
*.opendb
92+
*.opensdf
93+
*.sdf
94+
*.cachefile
95+
*.VC.db
96+
*.VC.VC.opendb
97+
98+
# Visual Studio profiler
99+
*.psess
100+
*.vsp
101+
*.vspx
102+
*.sap
103+
104+
# TFS 2012 Local Workspace
105+
$tf/
106+
107+
# Guidance Automation Toolkit
108+
*.gpState
109+
110+
# ReSharper is a .NET coding add-in
111+
_ReSharper*/
112+
*.[Rr]e[Ss]harper
113+
*.DotSettings.user
114+
115+
# JustCode is a .NET coding add-in
116+
.JustCode
117+
118+
# TeamCity is a build add-in
119+
_TeamCity*
120+
121+
# DotCover is a Code Coverage Tool
122+
*.dotCover
123+
124+
# Visual Studio code coverage results
125+
*.coverage
126+
*.coveragexml
127+
128+
# NCrunch
129+
_NCrunch_*
130+
.*crunch*.local.xml
131+
nCrunchTemp_*
132+
133+
# MightyMoose
134+
*.mm.*
135+
AutoTest.Net/
136+
137+
# Web workbench (sass)
138+
.sass-cache/
139+
140+
# Installshield output folder
141+
[Ee]xpress/
142+
143+
# DocProject is a documentation generator add-in
144+
DocProject/buildhelp/
145+
DocProject/Help/*.HxT
146+
DocProject/Help/*.HxC
147+
DocProject/Help/*.hhc
148+
DocProject/Help/*.hhk
149+
DocProject/Help/*.hhp
150+
DocProject/Help/Html2
151+
DocProject/Help/html
152+
153+
# Click-Once directory
154+
publish/
155+
156+
# Publish Web Output
157+
*.[Pp]ublish.xml
158+
*.azurePubxml
159+
# TODO: Comment the next line if you want to checkin your web deploy settings
160+
# but database connection strings (with potential passwords) will be unencrypted
161+
*.pubxml
162+
*.publishproj
163+
164+
# Microsoft Azure Web App publish settings. Comment the next line if you want to
165+
# checkin your Azure Web App publish settings, but sensitive information contained
166+
# in these scripts will be unencrypted
167+
PublishScripts/
168+
169+
# NuGet Packages
170+
*.nupkg
171+
# The packages folder can be ignored because of Package Restore
172+
**/packages/*
173+
# except build/, which is used as an MSBuild target.
174+
!**/packages/build/
175+
# Uncomment if necessary however generally it will be regenerated when needed
176+
#!**/packages/repositories.config
177+
# NuGet v3's project.json files produces more ignorable files
178+
*.nuget.props
179+
*.nuget.targets
180+
181+
# Microsoft Azure Build Output
182+
csx/
183+
*.build.csdef
184+
185+
# Microsoft Azure Emulator
186+
ecf/
187+
rcf/
188+
189+
# Windows Store app package directories and files
190+
AppPackages/
191+
BundleArtifacts/
192+
Package.StoreAssociation.xml
193+
_pkginfo.txt
194+
195+
# Visual Studio cache files
196+
# files ending in .cache can be ignored
197+
*.[Cc]ache
198+
# but keep track of directories ending in .cache
199+
!*.[Cc]ache/
200+
201+
# Others
202+
ClientBin/
203+
~$*
204+
*~
205+
*.dbmdl
206+
*.dbproj.schemaview
207+
*.jfm
208+
*.pfx
209+
*.publishsettings
210+
orleans.codegen.cs
211+
212+
# Since there are multiple workflows, uncomment next line to ignore bower_components
213+
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
214+
#bower_components/
215+
216+
# RIA/Silverlight projects
217+
Generated_Code/
218+
219+
# Backup & report files from converting an old project file
220+
# to a newer Visual Studio version. Backup files are not needed,
221+
# because we have git ;-)
222+
_UpgradeReport_Files/
223+
Backup*/
224+
UpgradeLog*.XML
225+
UpgradeLog*.htm
226+
227+
# SQL Server files
228+
*.mdf
229+
*.ldf
230+
*.ndf
231+
232+
# Business Intelligence projects
233+
*.rdl.data
234+
*.bim.layout
235+
*.bim_*.settings
236+
237+
# Microsoft Fakes
238+
FakesAssemblies/
239+
240+
# GhostDoc plugin setting file
241+
*.GhostDoc.xml
242+
243+
# Node.js Tools for Visual Studio
244+
.ntvs_analysis.dat
245+
node_modules/
246+
247+
# Typescript v1 declaration files
248+
typings/
249+
250+
# Visual Studio 6 build log
251+
*.plg
252+
253+
# Visual Studio 6 workspace options file
254+
*.opt
255+
256+
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
257+
*.vbw
258+
259+
# Visual Studio LightSwitch build output
260+
**/*.HTMLClient/GeneratedArtifacts
261+
**/*.DesktopClient/GeneratedArtifacts
262+
**/*.DesktopClient/ModelManifest.xml
263+
**/*.Server/GeneratedArtifacts
264+
**/*.Server/ModelManifest.xml
265+
_Pvt_Extensions
266+
267+
# Paket dependency manager
268+
.paket/paket.exe
269+
paket-files/
270+
271+
# FAKE - F# Make
272+
.fake/
273+
274+
# JetBrains Rider
275+
.idea/
276+
*.sln.iml
277+
278+
# CodeRush
279+
.cr/
280+
281+
# Python Tools for Visual Studio (PTVS)
282+
__pycache__/
283+
*.pyc
284+
285+
# Cake - Uncomment if you are using it
286+
# tools/**
287+
# !tools/packages.config
288+
289+
# Telerik's JustMock configuration file
290+
*.jmconfig
291+
292+
# BizTalk build output
293+
*.btp.cs
294+
*.btm.cs
295+
*.odx.cs
296+
*.xsd.cs
297+
298+
# End of https://www.gitignore.io/api/visualstudio

Assemblies/ExtendedStorage.dll

2.5 KB
Binary file not shown.

Source/.vs/ExtendedStorage/v14/.suo

-250 KB
Binary file not shown.

Source/DEVELOPMENT-SETUP.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# How to setup local developement
2+
3+
Your local path to the Rimworld game & assemblies is probably not what anybody else is using.
4+
5+
To keep multiple developers from playing ping-pong with the project file(s) and the respective assembly HintPath entries that setting has been externalized.
6+
7+
After cloning the repository just edit `Source\RimworldInstall.props` (it's a plain XML file) and make sure the `RimworldManagedDir`entry resolves to the correct directory for _your_ local Rimworld assemblies. If you're developing on a running Rimworld install, then you can simply edit the `RimworldInstallDir` entry (other variables derive from there by default).
8+
If you're keeping just a copy of the managed assemblies simply make sure the `RimworldManagedDir` resolves correctly to those assemblies. For relative paths starting with `$(SolutionDir)` is a good idea, as well as making sure you end in a `\`.
9+
10+
If you want to be a particularly conscientious developer, run
11+
12+
```bash
13+
git update-index --skip-worktree Source\Rimworldinstall.props
14+
```
15+
16+
after setting up your local version of the file. Then git will never upload your modified version.

Source/ExtendedStorage.sln

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 2013
4-
VisualStudioVersion = 12.0.31101.0
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MorePower", "ExtendedStorage\ExtendedStorage.csproj", "{A36BEEB2-7379-475B-B537-827E34571962}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtendedStorage", "ExtendedStorage\ExtendedStorage.csproj", "{A36BEEB2-7379-475B-B537-827E34571962}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dev settings", "Dev settings", "{97EC7E0A-3DF8-4FB0-8CD1-7115D567C7C0}"
9+
ProjectSection(SolutionItems) = preProject
10+
RimworldInstall.props = RimworldInstall.props
11+
EndProjectSection
712
EndProject
813
Global
914
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ACCESSOR_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
3+
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ACCESSOR_OWNER_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
4+
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
5+
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/CASE_BLOCK_BRACES/@EntryValue">NEXT_LINE</s:String>
6+
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INITIALIZER_BRACES/@EntryValue">NEXT_LINE</s:String>
7+
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INVOCABLE_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
8+
9+
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/OTHER_BRACES/@EntryValue">NEXT_LINE</s:String>
10+
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/TYPE_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
11+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
12+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
13+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

Source/ExtendedStorage/Bootstrap.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using System;
1+
using System;
22
using System.Reflection;
33
using Verse;
44
using RimWorld;
5-
using Harmony;
6-
5+
using Harmony;
6+
77
namespace ExtendedStorage
88
{
99
class Bootstrap : Def
@@ -13,16 +13,15 @@ class Bootstrap : Def
1313
static Bootstrap()
1414
{
1515
{
16-
try
17-
{
18-
MethodInfo method1 = typeof(Thing).GetMethod("SpawnSetup", BindingFlags.Instance | BindingFlags.Public);
19-
MethodInfo transpiler = typeof(Patches).GetMethod("Transpiler");
20-
HarmonyInstance.Create("com.extendedstorage.patches").Patch(method1, null, null, new HarmonyMethod(transpiler));
21-
Log.Message("Extended Storage :: Harmony patch successful (" + method1 + ") Transpiler (gets rid of the unnecessary stack count truncation)");
16+
try
17+
{
18+
HarmonyInstance instance = HarmonyInstance.Create("com.extendedstorage.patches");
19+
instance.PatchAll(Assembly.GetExecutingAssembly());
20+
Log.Message($"Extended Storage :: Harmony patches successful");
2221
}
2322
catch(Exception ex)
24-
{
25-
Log.Error("Extended Storage :: Caught exception: " + ex);
23+
{
24+
Log.Error("Extended Storage :: Caught exception: " + ex);
2625
}
2726
}
2827
}

0 commit comments

Comments
 (0)