Skip to content

Commit

Permalink
Update to 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
quicksilverfox committed Aug 12, 2020
1 parent 7a4a341 commit 794db41
Show file tree
Hide file tree
Showing 79 changed files with 6,677 additions and 77 deletions.
Binary file added AnimalsLogic/1.2/Assemblies/AnimalsLogic.dll
Binary file not shown.
26 changes: 26 additions & 0 deletions AnimalsLogic/1.2/Patches/patches.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" ?>

<Patch>

<Operation Class="PatchOperationReplace">
<xpath>/Defs/ThinkTreeDef[defName = "Animal"]/thinkRoot/subNodes/li[@Class="ThinkNode_ConditionalHasFaction"]/subNodes/li[@Class="ThinkNode_ChancePerHour_Mate"]/../li[@Class="ThinkNode_ChancePerHour_Constant"]</xpath>
<value>
<li Class="AnimalsLogic.ThinkNode_ChancePerHour_AnimalsHaulConfig">
<subNodes>
<li Class="ThinkNode_ConditionalTrainableCompleted">
<trainable>Haul</trainable>
<subNodes>
<li Class="ThinkNode_Tagger">
<tagToGive>TrainedAnimalBehavior</tagToGive>
<subNodes>
<li Class="JobGiver_Haul" />
</subNodes>
</li>
</subNodes>
</li>
</subNodes>
</li>
</value>
</Operation>

</Patch>
1 change: 1 addition & 0 deletions AnimalsLogic/About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<li>0.19</li>
<li>1.0</li>
<li>1.1</li>
<li>1.2</li>
</supportedVersions>
<modDependenciesByVersion>
<v1.1>
Expand Down
14 changes: 11 additions & 3 deletions AnimalsLogic/Source/AnimalsLogic/AnimalsLogic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Assemblies\</OutputPath>
<OutputPath>..\..\1.2\Assemblies\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -31,8 +31,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony, Version=2.0.0.8, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Lib.Harmony.2.0.0.8\lib\net35\0Harmony.dll</HintPath>
<Reference Include="0Harmony, Version=2.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Lib.Harmony.2.0.2\lib\net35\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp">
Expand All @@ -45,6 +45,14 @@
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Unity.Abstractions, Version=5.11.6.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\Unity.5.11.7\lib\net40\Unity.Abstractions.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Container, Version=5.11.8.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\Unity.5.11.7\lib\net40\Unity.Container.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\..\..\..\..\Games\SteamLibrary\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath>
<Private>False</Private>
Expand Down
2 changes: 2 additions & 0 deletions AnimalsLogic/Source/AnimalsLogic/ForgetMeNot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ static IEnumerable<CodeInstruction> PatchTamenessDecay(IEnumerable<CodeInstructi
for (int i = 0; i < codes.Count; i++)
{
//ldc.r4 0.101
#pragma warning disable CS0252 // Possible unintended reference comparison; left hand side needs cast
if (codes[i].opcode == OpCodes.Call && codes[i].operand == typeof(TrainableUtility).GetMethod(nameof(TrainableUtility.TamenessCanDecay)))
#pragma warning restore CS0252 // Possible unintended reference comparison; left hand side needs cast
{
codes[i].operand = typeof(ForgetMeNot).GetMethod(nameof(TamenessCanDecay));
break;
Expand Down
2 changes: 1 addition & 1 deletion AnimalsLogic/Source/AnimalsLogic/YouSleepHere.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static void Postfix(ref IEnumerable<Gizmo> __result, ref Building_Bed __instance
gizmos.Add(
new Command_Action
{
defaultLabel = "CommandBedSetOwnerLabel".Translate(),
defaultLabel = "CommandThingSetOwnerLabel".Translate(),
icon = ContentFinder<Texture2D>.Get("UI/Commands/AssignOwner", true),
defaultDesc = "CommandBedSetOwnerDesc".Translate(),
action = delegate
Expand Down
3 changes: 2 additions & 1 deletion AnimalsLogic/Source/AnimalsLogic/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Lib.Harmony" version="2.0.0.8" targetFramework="net40" />
<package id="Lib.Harmony" version="2.0.2" targetFramework="net40" />
<package id="Unity" version="5.11.7" targetFramework="net40" />
</packages>
124 changes: 124 additions & 0 deletions Carbon/1.2/Defs/RecipeDefs/Recipes_Production.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<Defs>

<!-- Balanced to have the same efficiency as other food. Hay yields 37% more than corn or rice on normal soil and 22% more on rich soil, so it is a bit more profitable to use hay on normal soil but corn gives a bit more on rich. -->
<RecipeDef>
<defName>MakeChemfuelFromHaygrass</defName>
<label>make chemfuel from hay</label>
<description>Make a batch of chemfuel by extracting biofuel from hay.</description>
<jobString>Refining chemfuel from hay.</jobString>
<effectWorking>Cremate</effectWorking>
<soundWorking>Recipe_Cremate</soundWorking>
<workAmount>2000</workAmount>
<workSpeedStat>GeneralLaborSpeed</workSpeedStat>
<ingredients>
<li>
<filter>
<thingDefs>
<li>Hay</li>
</thingDefs>
</filter>
<count>75</count>
</li>
</ingredients>
<fixedIngredientFilter>
<thingDefs>
<li>Hay</li>
</thingDefs>
</fixedIngredientFilter>
<products>
<Chemfuel>30</Chemfuel>
</products>
</RecipeDef>

<RecipeDef>
<defName>MakeCarbonWeave</defName>
<label>make carbon weave</label>
<description>Make carbon weave from chemfuel.</description>
<jobString>Making carbon weave.</jobString>
<effectWorking>Cremate</effectWorking>
<soundWorking>Recipe_Cremate</soundWorking>
<workAmount>2000</workAmount>
<workSpeedStat>GeneralLaborSpeed</workSpeedStat>
<researchPrerequisite>CarbonResearch</researchPrerequisite>
<ingredients>
<li>
<filter>
<thingDefs>
<li>Chemfuel</li>
</thingDefs>
</filter>
<count>50</count>
</li>
</ingredients>
<fixedIngredientFilter>
<thingDefs>
<li>Chemfuel</li>
</thingDefs>
</fixedIngredientFilter>
<products>
<CarbonWeave>50</CarbonWeave>
</products>
</RecipeDef>

<RecipeDef>
<defName>MakeCarbonFiber</defName>
<label>make carbon composite</label>
<description>Make carbon fiber reinforced polymer from chemfuel.</description>
<jobString>Making carbon composite.</jobString>
<effectWorking>Cremate</effectWorking>
<soundWorking>Recipe_Cremate</soundWorking>
<workAmount>2000</workAmount>
<workSpeedStat>GeneralLaborSpeed</workSpeedStat>
<researchPrerequisite>CarbonResearch</researchPrerequisite>
<ingredients>
<li>
<filter>
<thingDefs>
<li>Chemfuel</li>
</thingDefs>
</filter>
<count>50</count>
</li>
</ingredients>
<fixedIngredientFilter>
<thingDefs>
<li>Chemfuel</li>
</thingDefs>
</fixedIngredientFilter>
<products>
<CarbonFiber>50</CarbonFiber>
</products>
</RecipeDef>

<RecipeDef>
<defName>MakeDiamond</defName>
<label>make diamond</label>
<description>Make diamond from chemfuel.</description>
<jobString>Making diamond.</jobString>
<effectWorking>Cremate</effectWorking>
<soundWorking>Recipe_Cremate</soundWorking>
<workAmount>3500</workAmount>
<workSpeedStat>GeneralLaborSpeed</workSpeedStat>
<researchPrerequisite>CarbonResearch</researchPrerequisite>
<ingredients>
<li>
<filter>
<thingDefs>
<li>Chemfuel</li>
</thingDefs>
</filter>
<count>50</count>
</li>
</ingredients>
<fixedIngredientFilter>
<thingDefs>
<li>Chemfuel</li>
</thingDefs>
</fixedIngredientFilter>
<products>
<Diamond>10</Diamond>
</products>
</RecipeDef>

</Defs>
17 changes: 17 additions & 0 deletions Carbon/1.2/Defs/ResearchProjectDefs/ResearchProjects_Misc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

<ResearchProjectDef>
<defName>CarbonResearch</defName>
<label>carbon</label>
<description>Learn basics of producing and processing carbon, a material of many, many uses.</description>
<baseCost>600</baseCost>
<techLevel>Industrial</techLevel>
<prerequisites>
<li>BiofuelRefining</li>
</prerequisites>
<researchViewX>7</researchViewX>
<researchViewY>2.0</researchViewY>
</ResearchProjectDef>

</Defs>
25 changes: 25 additions & 0 deletions Carbon/1.2/Defs/TerrainDefs/Terrain_Floors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

<TerrainDef ParentName="FloorBase">
<defName>CarbonTile</defName>
<label>carbon tile</label>
<description>Carbon fiber composite tiles for that stylish urbworld look. Very easy to assemble and to keep clean.</description>
<texturePath>Terrain/Surfaces/CarbonTileGrained</texturePath>
<renderPrecedence>230</renderPrecedence>
<statBases>
<Cleanliness>0.2</Cleanliness>
<WorkToBuild>50</WorkToBuild>
<Flammability>0</Flammability>
<Beauty>3</Beauty>
</statBases>
<costList>
<CarbonFiber>3</CarbonFiber>
</costList>
<researchPrerequisites>
<li>CarbonResearch</li>
</researchPrerequisites>
<constructEffect>ConstructWood</constructEffect>
</TerrainDef>

</Defs>
49 changes: 49 additions & 0 deletions Carbon/1.2/Defs/ThingDefs_Buildings/Buildings_Power.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

<ThingDef ParentName="PowerConduit">
<defName>CarbonPowerConduit</defName>
<label>carbon conduit</label>
<description>A set of heavy duty electrical cables for moving power around. Can be placed under walls and other buildings.</description>
<graphicData>
<texPath>Things/Building/Linked/CarbonPowerConduit_Atlas</texPath>
</graphicData>
<uiIconColor>(75,75,75)</uiIconColor>
<statBases>
<MaxHitPoints>750</MaxHitPoints>
<WorkToBuild>70</WorkToBuild>
<Flammability>0.0</Flammability>
<Beauty>0</Beauty>
</statBases>
<researchPrerequisites>
<li>CarbonResearch</li>
</researchPrerequisites>
<costList>
<CarbonFiber>1</CarbonFiber>
</costList>
</ThingDef>

<ThingDef ParentName="PowerConduit">
<defName>UnderwaterCarbonPowerConduit</defName>
<label>waterproof carbon conduit</label>
<description>A set of heavy duty electrical cables for moving power around. Insulated for transmitting power under shallow water.</description>
<graphicData>
<texPath>Things/Building/Linked/CarbonPowerConduitUnderwater_Atlas</texPath>
</graphicData>
<uiIconPath>Things/Building/Linked/WaterproofConduit_MenuIcon</uiIconPath>
<uiIconColor>(75,75,100)</uiIconColor>
<statBases>
<MaxHitPoints>750</MaxHitPoints>
<WorkToBuild>70</WorkToBuild>
<Flammability>0.0</Flammability>
<Beauty>0</Beauty>
</statBases>
<terrainAffordanceNeeded>ShallowWater</terrainAffordanceNeeded>
<researchPrerequisites>
<li>CarbonResearch</li>
</researchPrerequisites>
<costList>
<CarbonFiber>2</CarbonFiber>
</costList>
</ThingDef>
</Defs>
Loading

0 comments on commit 794db41

Please sign in to comment.