Skip to content

Commit

Permalink
big rework
Browse files Browse the repository at this point in the history
  • Loading branch information
notfood committed Nov 26, 2018
1 parent 9b50dc0 commit 7b46a36
Show file tree
Hide file tree
Showing 36 changed files with 465 additions and 908 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.cs filter=spabs
2 changes: 1 addition & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<name>MendAndRecycle</name>
<author>NotFood</author>
<url>https://ludeon.com/forums/index.php?topic=22894.0</url>
<targetVersion>1.0.0</targetVersion>
<targetVersion>1.0.2096</targetVersion>
<description>Repair the durability of items or just recycle them.

Thank You
Expand Down
Binary file modified Assemblies/MendAndRecycle.dll
100755 → 100644
Binary file not shown.
83 changes: 25 additions & 58 deletions Defs/RecipeDefs/Recipes_Misc.xml
Original file line number Diff line number Diff line change
@@ -1,113 +1,80 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

<RecipeDef Abstract="True" Name="MendBase">
<workerClass>MendAndRecycle.RecipeWorkerWithJob_Mend</workerClass>
<workSkill>Crafting</workSkill>
<ingredients/>
<recipeUsers>
<li>TableMending</li>
</recipeUsers>
</RecipeDef>

<RecipeDef>
<workerClass>MendAndRecycle.Worker</workerClass>
<RecipeDef ParentName="MendBase">
<defName>MendSimpleApparel</defName>
<label>mend simple apparel</label>
<description>Mend simple apparel.</description>
<jobString>Mending.</jobString>
<workAmount>100</workAmount>
<workSkill>Crafting</workSkill>
<effectWorking>Tailor</effectWorking>
<soundWorking>Recipe_Tailor</soundWorking>
<ingredients>
<li>
<filter>
<categories>
<li>Apparel</li>
</categories>
</filter>
<count>1</count>
</li>
</ingredients>
<fixedIngredientFilter>
<categories>
<li>Apparel</li>
</categories>
</fixedIngredientFilter>
<skillRequirements>
<Crafting>4</Crafting>
</skillRequirements>
</RecipeDef>

<RecipeDef>
<workerClass>MendAndRecycle.Worker</workerClass>
<RecipeDef ParentName="MendBase">
<defName>MendComplexApparel</defName>
<label>mend complex apparel</label>
<description>Mend armor.</description>
<jobString>Mending.</jobString>
<workAmount>200</workAmount>
<workSkill>Crafting</workSkill>
<effectWorking>Smith</effectWorking>
<soundWorking>Recipe_Smith</soundWorking>
<ingredients>
<li>
<filter>
<categories>
<li>Apparel</li>
</categories>
</filter>
<count>1</count>
</li>
</ingredients>
<effectWorking>Tailor</effectWorking>
<soundWorking>Recipe_Tailor</soundWorking>
<fixedIngredientFilter>
<categories>
<li>Apparel</li>
</categories>
</fixedIngredientFilter>
<skillRequirements>
<Crafting>8</Crafting>
</skillRequirements>
</RecipeDef>

<RecipeDef>
<workerClass>MendAndRecycle.Worker</workerClass>
<RecipeDef ParentName="MendBase">
<defName>MendSimpleWeapon</defName>
<label>repair simple weapon</label>
<description>Repair weapon.</description>
<jobString>Repairing.</jobString>
<workAmount>50</workAmount>
<workSkill>Crafting</workSkill>
<effectWorking>Smith</effectWorking>
<soundWorking>Recipe_Smith</soundWorking>
<ingredients>
<li>
<filter>
<categories>
<li>WeaponsMelee</li>
</categories>
</filter>
<count>1</count>
</li>
</ingredients>
<fixedIngredientFilter>
<categories>
<li>WeaponsMelee</li>
<li>Weapons</li>
</categories>
</fixedIngredientFilter>
<skillRequirements>
<Crafting>4</Crafting>
</skillRequirements>
</RecipeDef>

<RecipeDef>
<workerClass>MendAndRecycle.Worker</workerClass>
<RecipeDef ParentName="MendBase">
<defName>MendComplexWeapon</defName>
<label>repair complex weapon</label>
<description>Repair weapon.</description>
<jobString>Repairing.</jobString>
<workAmount>200</workAmount>
<workSkill>Crafting</workSkill>
<effectWorking>Smith</effectWorking>
<soundWorking>Recipe_Smith</soundWorking>
<ingredients>
<li>
<filter>
<categories>
<li>WeaponsRanged</li>
</categories>
</filter>
<count>1</count>
</li>
</ingredients>
<fixedIngredientFilter>
<categories>
<li>WeaponsRanged</li>
<li>Weapons</li>
</categories>
</fixedIngredientFilter>
<skillRequirements>
Expand All @@ -116,7 +83,7 @@
</RecipeDef>

<RecipeDef>
<workerClass>MendAndRecycle.Worker</workerClass>
<workerClass>MendAndRecycle.RecipeWorkerWithJob_Recycle</workerClass>
<defName>RecycleApparel</defName>
<label>recycle apparel</label>
<description>Recycle apparel into their basic components.</description>
Expand All @@ -143,7 +110,7 @@
<skillRequirements>
<Crafting>2</Crafting>
</skillRequirements>
<requiredGiverWorkType>Crafting</requiredGiverWorkType>
<requiredGiverWorkType>Tailoring</requiredGiverWorkType>
<recipeUsers>
<li>ElectricTailoringBench</li>
<li>HandTailoringBench</li>
Expand Down
14 changes: 8 additions & 6 deletions Defs/RecipeDefs/Recipes_Production.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@
</li>
<li>
<filter>
<thingDefs>
<li>Cloth</li>
</thingDefs>
<categories>
<li>Textiles</li>
</categories>
</filter>
<count>30</count>
</li>
</ingredients>
<fixedIngredientFilter>
<thingDefs>
<li>Steel</li>
<li>Cloth</li>
</thingDefs>
<categories>
<li>Textiles</li>
</categories>
</fixedIngredientFilter>
<products>
<MendingKit>5</MendingKit>
Expand All @@ -42,9 +44,9 @@
</skillRequirements>
<workSkill>Crafting</workSkill>
<recipeUsers>
<li>ElectricTailoringBench</li>
<li>TableMending</li>
<li>CraftingSpot</li>
</recipeUsers>
<researchPrerequisite>Mending</researchPrerequisite>
</RecipeDef>

</Defs>
8 changes: 4 additions & 4 deletions Defs/ThingDefs/Buildings_Base.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<ThingDef Name="BuildingBase" Abstract="True">
<category>Building</category>
<thingClass>Building</thingClass>
Expand All @@ -12,8 +12,8 @@
<leaveResourcesWhenKilled>true</leaveResourcesWhenKilled>
<filthLeaving>Filth_RubbleBuilding</filthLeaving>
<statBases>
<SellPriceFactor>0.70</SellPriceFactor>
<SellPriceFactor>0.70</SellPriceFactor>
</statBases>
</ThingDef>

</Defs>
</Defs>
11 changes: 2 additions & 9 deletions Defs/ThingDefs/Buildings_Production.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

<ThingDef ParentName="BenchBase">
<defName>TableMending</defName>
<label>mending workbench</label>
Expand Down Expand Up @@ -44,13 +44,6 @@
<hasInteractionCell>True</hasInteractionCell>
<interactionCellOffset>(0,0,-1)</interactionCellOffset>
<surfaceType>Item</surfaceType>
<recipes>
<li>MendSimpleApparel</li>
<li>MendComplexApparel</li>
<li>MendSimpleWeapon</li>
<li>MendComplexWeapon</li>
<!--<li>MendProsthetics</li>-->
</recipes>
<inspectorTabs>
<li>ITab_Bills</li>
</inspectorTabs>
Expand Down Expand Up @@ -88,5 +81,5 @@
<li>Mending</li>
</researchPrerequisites>
</ThingDef>

</Defs>
28 changes: 14 additions & 14 deletions Defs/ThingDefs/Items_Resource_Manufactured.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

<ThingDef Name="ResourceBase" Abstract="True">
<ThingDef Name="ResourceBase" Abstract="True">
<thingClass>ThingWithComps</thingClass>
<category>Item</category>
<resourceReadoutPriority>Middle</resourceReadoutPriority>
<useHitPoints>true</useHitPoints>
<selectable>true</selectable>
<altitudeLayer>Item</altitudeLayer>
<stackLimit>75</stackLimit>
<statBases>
<Beauty>-7</Beauty>
</statBases>
<comps>
<li Class="CompProperties_Forbiddable"/>
</comps>
<alwaysHaulable>true</alwaysHaulable>
<drawGUIOverlay>true</drawGUIOverlay>
<rotatable>false</rotatable>
<pathCost>15</pathCost>
</ThingDef>

<statBases>
<Beauty>-7</Beauty>
</statBases>
<comps>
<li Class="CompProperties_Forbiddable"/>
</comps>
<alwaysHaulable>true</alwaysHaulable>
<drawGUIOverlay>true</drawGUIOverlay>
<rotatable>false</rotatable>
<pathCost>15</pathCost>
</ThingDef>
<ThingDef ParentName="ResourceBase">
<defName>MendingKit</defName>
<label>mending kit</label>
Expand Down
20 changes: 10 additions & 10 deletions Defs/WorkGiverDefs/mending_WorkGivers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<WorkGiverDef>
<defName>DoBillsMending</defName>
<label>mend</label>
<giverClass>MendAndRecycle.WorkGiver_Mend</giverClass>
<giverClass>MendAndRecycle.WorkGiver_DoBill</giverClass>
<workType>Crafting</workType>
<priorityInType>95</priorityInType>
<fixedBillGiverDefs>
Expand All @@ -17,20 +17,20 @@
</requiredCapacities>
<prioritizeSustains>true</prioritizeSustains>
</WorkGiverDef>

<WorkGiverDef>
<defName>DoBillsRecycling</defName>
<label>recycle</label>
<giverClass>MendAndRecycle.WorkGiver_Recycle</giverClass>
<workType>Crafting</workType>
<priorityInType>90</priorityInType>
<defName>DoBillsMakeApparel</defName>
<label>make apparel</label>
<giverClass>MendAndRecycle.WorkGiver_DoBill</giverClass>
<workType>Tailoring</workType>
<priorityInType>110</priorityInType>
<fixedBillGiverDefs>
<li>ElectricTailoringBench</li>
<li>HandTailoringBench</li>
</fixedBillGiverDefs>
<verb>recycle</verb>
<gerund>recycling</gerund>
<requiredCapacities>
<verb>tailor</verb>
<gerund>tailoring at</gerund>
<requiredCapacities>
<li>Manipulation</li>
</requiredCapacities>
<prioritizeSustains>true</prioritizeSustains>
Expand Down
14 changes: 14 additions & 0 deletions Languages/English/Keyed/mendandrecycle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<LanguageData>
<MendRecycle>MendAndRecycle</MendRecycle>

<!-- Settings -->
<MendRecycle.RequiresFuel>Requires Fuel</MendRecycle.RequiresFuel>
<MendRecycle.RequiresFuelTooltip>Does the mending table need mending kits? (Needs restart)</MendRecycle.RequiresFuelTooltip>
<MendRecycle.RequiresPower>Requires Power</MendRecycle.RequiresPower>
<MendRecycle.RequiresPowerTooltip>Does the mending table require power? (Needs restart)</MendRecycle.RequiresPowerTooltip>

<MendRecycle.MaxHPCost>Percentage of Max Hit Points in play</MendRecycle.MaxHPCost>
<MendRecycle.FailChances>Fail Chance per Tech Level</MendRecycle.FailChances>

</LanguageData>
14 changes: 0 additions & 14 deletions Languages/English/Keyed/mendandrecycle_Languages.xml

This file was deleted.

7 changes: 0 additions & 7 deletions Languages/Korean/DefInjected/JobDefs/Jobs.xml

This file was deleted.

28 changes: 0 additions & 28 deletions Languages/Korean/DefInjected/RecipeDefs/Recipes.xml

This file was deleted.

Loading

0 comments on commit 7b46a36

Please sign in to comment.