From 840f128820200614496caad906bc59922b5fbf0e Mon Sep 17 00:00:00 2001 From: edbmods Date: Thu, 1 Sep 2016 21:05:02 -0700 Subject: [PATCH 1/7] Cleaned up project file. - Removed old deploy.bat reference from the Debug build - Removed code header definition - Removed unused manifest --- EdBPrepareCarefully.csproj | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/EdBPrepareCarefully.csproj b/EdBPrepareCarefully.csproj index 64d5c1b..07132e0 100644 --- a/EdBPrepareCarefully.csproj +++ b/EdBPrepareCarefully.csproj @@ -10,7 +10,6 @@ 0.15.1.1 False v3.5 - ScenPart_PlayerPawnsArriveMethodCarefully.manifest true @@ -21,11 +20,6 @@ prompt 4 false - - - - - full @@ -138,13 +132,4 @@ - - - - - - - - - \ No newline at end of file From 484522cfe8a976228fe330bf9f2a34557e4517e5 Mon Sep 17 00:00:00 2001 From: edbmods Date: Thu, 1 Sep 2016 21:44:28 -0700 Subject: [PATCH 2/7] Rewrote the IDE sentence in the README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0a8f481..434f080 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Building Prepare Carefully -Open the solution file in either Xamarin Studio/MonoDevelop or in Visual Studio. +The solution file was created using Xamarin Studio/MonoDevelop, but it should also work in Visual Studio. Note that the project targets the older 3.5 version of the .NET framework used by the Unity engine on top of which RimWorld is built. Note that the solution has dependencies on the following DLLs: - Assembly-CSharp.dll From a6f301925af78c67bed622dcdfbcacd6109bb286 Mon Sep 17 00:00:00 2001 From: edbmods Date: Fri, 2 Sep 2016 20:41:42 -0700 Subject: [PATCH 3/7] Added dist.bat script to provide an easy way to build the mod distribution directory. --- dist.bat | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 dist.bat diff --git a/dist.bat b/dist.bat new file mode 100644 index 0000000..fbde07b --- /dev/null +++ b/dist.bat @@ -0,0 +1,10 @@ +@echo off +if exist bin\Release\EdBPrepareCarefully.dll ( + robocopy Resources dist\EdBPrepareCarefully\ /e /MIR + xcopy LICENSE dist\EdBPrepareCarefully\ /Y + xcopy bin\Release\EdBPrepareCarefully.dll dist\EdBPrepareCarefully\Assemblies\ /Y + exit /b 0 +) else ( + echo Cannot build mod distribution directory. Release build not found in bin\Release directory. + pause +) From 36b05e662bccc9241d17e8cda5c666ca6a697d95 Mon Sep 17 00:00:00 2001 From: edbmods Date: Fri, 2 Sep 2016 20:47:27 -0700 Subject: [PATCH 4/7] Updated README with information about the dist script. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 434f080..d830777 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,10 @@ Copy those dependencies from the RimWorld game directory into the "Libraries" di The result of the build will be the following DLL: - EdBPrepareCarefully.dll -This DLL should be packaged with the contents of the `Resources` directory, inside a `Resources/Assemblies` directory. +This DLL must be packaged with the contents of the `Resources` directory to create a working mod. The DLL should be placed inside an `Assemblies` directory. + +To automatically build the mod directory for your Release DLL, run the `dist.bat` script. This will copy all of the mod resources and the DLL into a `dist/EdBPrepareCarefully` directory. Copy this `EdBPrepareCarefully` directory into your RimWorld `Mods` folder. -The build does not automate the creation of the mod distribution directory. ## Versioning From 16427a7600ea1230be503e086529d45c67572a86 Mon Sep 17 00:00:00 2001 From: edbmods Date: Sat, 3 Sep 2016 12:46:07 -0700 Subject: [PATCH 5/7] Fix for issue #65 - Fixed a logic flaw that could cause the mod to get stuck in an infinite loop while spawning items into the map. - Changed the code to allow "made from stuff" items with no stuff to be spawned into the map with a default material. Even though this pops up an error in development mode, it matches the vanilla behavior if you fail to assign a material to an item in a scenario. --- Source/GenStep_ScenParts.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Source/GenStep_ScenParts.cs b/Source/GenStep_ScenParts.cs index 390f812..f6d4910 100644 --- a/Source/GenStep_ScenParts.cs +++ b/Source/GenStep_ScenParts.cs @@ -161,12 +161,15 @@ public void SpawnColonistsWithEquipment(ScenPart_PlayerPawnsArriveMethod arriveM Thing thing = null; if (entry.def.MadeFromStuff && entry.stuffDef == null) { + ThingDef defaultStuffDef = null; if (entry.def.apparel != null) { - thing = ThingMaker.MakeThing(entry.def, ThingDef.Named("Synthread")); + defaultStuffDef = ThingDef.Named("Synthread"); } - else { - Log.Warning("Could not add item. Item is \"made from stuff\" but no material was specified and there is no known default."); + if (thing == null) { + Log.Warning("Item " + entry.def.defName + " is \"made from stuff\" but no material was specified. This may be caused by a misconfigured modded item or scenario."); + Log.Warning("The item will be spawned into the map and assigned a default material, if possible, but you will see an error if you are in Development Mode."); } + thing = ThingMaker.MakeThing(entry.def, defaultStuffDef); } else { thing = ThingMaker.MakeThing(entry.def, entry.stuffDef); @@ -174,8 +177,6 @@ public void SpawnColonistsWithEquipment(ScenPart_PlayerPawnsArriveMethod arriveM if (thing != null) { thing.stackCount = stackCount; - count -= stackCount; - if (entry.def.weaponTags != null && entry.def.weaponTags.Count > 0) { weapons.Add(thing); } @@ -189,6 +190,10 @@ public void SpawnColonistsWithEquipment(ScenPart_PlayerPawnsArriveMethod arriveM other.Add(thing); } } + + // Decrement the count whether we were able to add a valid thing or not. If we don't decrement, + // we'll be stuck in an infinite while loop. + count -= stackCount; } } else if (entry.animal) { From f4b935b0d1923bb102492a20729f6499fe73da5d Mon Sep 17 00:00:00 2001 From: edbmods Date: Sun, 4 Sep 2016 10:13:03 -0700 Subject: [PATCH 6/7] Updated version number to 0.15.1.2 for Alpha 15c support --- EdBPrepareCarefully.csproj | 2 +- EdBPrepareCarefully.sln | 2 +- Properties/AssemblyInfo.cs | 2 +- Resources/About/About.xml | 4 ++-- Resources/CHANGELOG.txt | 8 ++++++++ 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/EdBPrepareCarefully.csproj b/EdBPrepareCarefully.csproj index 07132e0..1320a06 100644 --- a/EdBPrepareCarefully.csproj +++ b/EdBPrepareCarefully.csproj @@ -7,7 +7,7 @@ Library EdB.PrepareCarefully EdBPrepareCarefully - 0.15.1.1 + 0.15.1.2 False v3.5 diff --git a/EdBPrepareCarefully.sln b/EdBPrepareCarefully.sln index 3af9268..78f08ed 100644 --- a/EdBPrepareCarefully.sln +++ b/EdBPrepareCarefully.sln @@ -195,6 +195,6 @@ Global $29.IncludeStaticEntities = True $0.VersionControlPolicy = $31 $31.inheritsSet = Mono - version = 0.15.1.1 + version = 0.15.1.2 EndGlobalSection EndGlobal diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index f3515b7..0b42294 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -17,7 +17,7 @@ // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion("0.15.1.1")] +[assembly: AssemblyVersion("0.15.1.2")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Resources/About/About.xml b/Resources/About/About.xml index 8fb56e8..c1e8151 100644 --- a/Resources/About/About.xml +++ b/Resources/About/About.xml @@ -3,11 +3,11 @@ EdB Prepare Carefully EdB - 0.15.1279 + 0.15.1284 Customize your colonists, choose your gear and prepare carefully for your crash landing! If you get a set of starting colonists that you like, save them as a preset so that you can start your game the same way next time. -[Version 0.15.1.1] +[Version 0.15.1.2] \ No newline at end of file diff --git a/Resources/CHANGELOG.txt b/Resources/CHANGELOG.txt index 71e93d4..9643b55 100644 --- a/Resources/CHANGELOG.txt +++ b/Resources/CHANGELOG.txt @@ -1,3 +1,11 @@ + _____________________________________________________________________________ + + Version 0.15.1.2 + _____________________________________________________________________________ + + - Added support for Alpha 15c. + - Fixed item spawn bug (#65). + _____________________________________________________________________________ Version 0.15.1.1 From e348e2cc11d65341ab33a345073e0bb26055bf1f Mon Sep 17 00:00:00 2001 From: edbmods Date: Sun, 4 Sep 2016 10:18:16 -0700 Subject: [PATCH 7/7] Added the dist directory to the ignore list --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d3d9df0..c371b98 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ *.userprefs bin obj +dist Libraries/* !Libraries/README.md \ No newline at end of file