Skip to content

Commit

Permalink
Merge pull request #27 from lbmaian/master
Browse files Browse the repository at this point in the history
Further Doors Expanded stability and rebalance
  • Loading branch information
jecrell authored May 7, 2020
2 parents 5de5d4d + d68531c commit c7e961c
Show file tree
Hide file tree
Showing 14 changed files with 129 additions and 74 deletions.
Binary file modified 1.0/Assemblies/DoorsExpanded.dll
Binary file not shown.
10 changes: 7 additions & 3 deletions 1.0/Defs/ThingDef_Building/Heron_Doors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
</damageData>
</graphicData>
<uiIconPath>Things/Building/Door/Curtain_MenuIcon</uiIconPath>
<costStuffCount>50</costStuffCount>
<costStuffCount>25</costStuffCount>
<designationHotKey>Misc2</designationHotKey>
<tempLeakRate>60</tempLeakRate>
<doorType>Stretch</doorType>
Expand Down Expand Up @@ -312,7 +312,8 @@
<DoorsExpanded.DoorExpandedDef ParentName="HeronMetalDoorBase">
<defName>PH_DoorBlastDoor</defName>
<label>blast door (2x1)</label>
<description>A heavy pair of doors that are twice as strong against explosives, and three times more resilient to standard blunt and sharpened weapons.</description>
<description>A heavy pair of doors that are twice as strong against explosives, and three times more resilient to standard blunt and sharpened weapons. Can be opened and closed from a distance with a button or lever.</description>
<thingClass>DoorsExpanded.Building_DoorRemote</thingClass>
<size>(2,1)</size>
<building>
<soundDoorOpenManual>HeronBlastDoorOpen</soundDoorOpenManual>
Expand All @@ -325,6 +326,7 @@
<Mass>100</Mass>
<MaxHitPoints>1000</MaxHitPoints>
<WorkToBuild>4000</WorkToBuild>
<Flammability>0.5</Flammability>
</statBases>
<!-- Same terrain affordance property values as Wall -->
<terrainAffordanceNeeded>Medium</terrainAffordanceNeeded>
Expand Down Expand Up @@ -380,8 +382,9 @@

<DoorsExpanded.DoorExpandedDef ParentName="HeronMetalDoorBase">
<defName>PH_DoorThickBlastDoor</defName>
<description>A heavy pair of doors that are twice as strong against explosives, and three times more resiliant to standard blunt and sharpened weapons.</description>
<label>blast door (3x2)</label>
<description>A heavy pair of doors that are twice as strong against explosives, and three times more resilient to standard blunt and sharpened weapons. Can be opened and closed from a distance with a button or lever.</description>
<thingClass>DoorsExpanded.Building_DoorRemote</thingClass>
<size>(3,2)</size>
<building>
<soundDoorOpenManual>HeronBlastDoorOpen</soundDoorOpenManual>
Expand All @@ -394,6 +397,7 @@
<Mass>200</Mass>
<MaxHitPoints>2000</MaxHitPoints>
<WorkToBuild>8000</WorkToBuild>
<Flammability>0.5</Flammability>
</statBases>
<!-- Same terrain affordance property values as Wall -->
<terrainAffordanceNeeded>Medium</terrainAffordanceNeeded>
Expand Down
16 changes: 2 additions & 14 deletions 1.0/Patches/DoorMassPatch.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<Patch>

<!--
Although doors, including our custom doors, aren't uninstallable (minifiable) by default,
we're defining masses for custom doors, so we might as well define a default for all doors if another mod hasn't already defined one yet.
This way, if another mod like MinifyEverything does make doors uninstallable, they'll have a reasonable mass.
-->
<Operation Class="PatchOperationAdd">
<success>Always</success>
<xpath>/Defs/ThingDef[@Name="DoorBase"]/statBases</xpath>
<value>
<Mass>20</Mass>
</value>
</Operation>

<!-- TODO: Remove this file -->
<!-- Empty file for temporary backwards compatibility (in case users are simply copying over files over old versions) -->
</Patch>
Binary file modified 1.1/Assemblies/DoorsExpanded.dll
Binary file not shown.
10 changes: 7 additions & 3 deletions 1.1/Defs/ThingDef_Building/Heron_Doors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
</damageData>
</graphicData>
<uiIconPath>Things/Building/Door/Curtain_MenuIcon</uiIconPath>
<costStuffCount>50</costStuffCount>
<costStuffCount>25</costStuffCount>
<designationHotKey>Misc2</designationHotKey>
<tempLeakRate>60</tempLeakRate>
<doorType>Stretch</doorType>
Expand Down Expand Up @@ -312,7 +312,8 @@
<DoorsExpanded.DoorExpandedDef ParentName="HeronMetalDoorBase">
<defName>PH_DoorBlastDoor</defName>
<label>blast door (2x1)</label>
<description>A heavy pair of doors that are twice as strong against explosives, and three times more resilient to standard blunt and sharpened weapons.</description>
<description>A heavy pair of doors that are twice as strong against explosives, and three times more resilient to standard blunt and sharpened weapons. Can be opened and closed from a distance with a button or lever.</description>
<thingClass>DoorsExpanded.Building_DoorRemote</thingClass>
<size>(2,1)</size>
<building>
<soundDoorOpenManual>HeronBlastDoorOpen</soundDoorOpenManual>
Expand All @@ -325,6 +326,7 @@
<Mass>100</Mass>
<MaxHitPoints>1000</MaxHitPoints>
<WorkToBuild>4000</WorkToBuild>
<Flammability>0.5</Flammability>
</statBases>
<!-- Same terrain affordance property values as Wall -->
<useStuffTerrainAffordance>true</useStuffTerrainAffordance>
Expand Down Expand Up @@ -381,8 +383,9 @@

<DoorsExpanded.DoorExpandedDef ParentName="HeronMetalDoorBase">
<defName>PH_DoorThickBlastDoor</defName>
<description>A heavy pair of doors that are twice as strong against explosives, and three times more resiliant to standard blunt and sharpened weapons.</description>
<label>blast door (3x2)</label>
<description>A heavy pair of doors that are twice as strong against explosives, and three times more resilient to standard blunt and sharpened weapons. Can be opened and closed from a distance with a button or lever.</description>
<thingClass>DoorsExpanded.Building_DoorRemote</thingClass>
<size>(3,2)</size>
<building>
<soundDoorOpenManual>HeronBlastDoorOpen</soundDoorOpenManual>
Expand All @@ -395,6 +398,7 @@
<Mass>200</Mass>
<MaxHitPoints>2000</MaxHitPoints>
<WorkToBuild>8000</WorkToBuild>
<Flammability>0.5</Flammability>
</statBases>
<!-- Same terrain affordance property values as Wall -->
<useStuffTerrainAffordance>true</useStuffTerrainAffordance>
Expand Down
16 changes: 2 additions & 14 deletions 1.1/Patches/DoorMassPatch.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<Patch>

<!--
Although doors, including our custom doors, aren't uninstallable (minifiable) by default,
we're defining masses for custom doors, so we might as well define a default for all doors if another mod hasn't already defined one yet.
This way, if another mod like MinifyEverything does make doors uninstallable, they'll have a reasonable mass.
-->
<Operation Class="PatchOperationAdd">
<success>Always</success>
<xpath>/Defs/ThingDef[@Name="DoorBase"]/statBases</xpath>
<value>
<Mass>20</Mass>
</value>
</Operation>

<!-- TODO: Remove this file -->
<!-- Empty file for temporary backwards compatibility (in case users are simply copying over files over old versions) -->
</Patch>
15 changes: 11 additions & 4 deletions About/About.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<ModMetaData>
<packageId>jecrell.doorsexpanded</packageId>
<name>Doors Expanded</name>
Expand Down Expand Up @@ -40,9 +40,16 @@ Cade Perkinson, Jay Sacane, John Pahl, Tankok1998 also known as the Shermanlover
========================
Changelog
========================
- More robust patching in case other mods are broken (should no longer fail if another mod has an invalid assembly reference).
- Blast doors can be remote controlled now (remote control tech still required to build remote buttons/levers).
- Blast doors now have half flammability (so half the flammability of the material they're made of).
- Tribal curtains cost halved to 25 fabric or leather as part of RimWorld 1.0/1.1 rebalance.
- Remove obsolete Manifest.xml loadBefore/loadAfter and migrate vanilla door mass patch to code to prevent some warnings.
- This is the last version with changes backported to the RimWorld 1.0 version.

1.3.0.1 (03-14-2020)
========================
Updates from lbmaian: \n- Fix some changelog dates\n- Better way of including non-compiled reference Building_Door.cs\n- Also properly exclude Source folder from !ModFolder virtual folder\n- Invis doors: more/better sanity checks, and more
Improves compatibility with other mods, including recovering from game-breaking errors that can somehow happen. Engineered by lbmaian.

1.3.0.0 (03-07-2020)
========================
Expand All @@ -55,7 +62,7 @@ Scale WorkToBuild linearly like most of vanilla, rebalance thick gate and blast

1.22.1.1 (03-04-2020)
========================
Backport tweaks and fixes to RimWorld 1.0 version. From this point forward, the RimWorld 1.0 version is in feature freeze. Engineered by lbmaian.
Backport tweaks and fixes to RimWorld 1.0 version. Engineered by lbmaian.
"JT_PlaceWorker_OnTopOfWalls" is now translated if JecsTools isn't loaded.

1.22.1.0 (02-29-2020)
Expand All @@ -71,7 +78,7 @@ Also add dependency to the Harmony mod.

1.22.0.0 (02-28-2020)
========================
RimWorld 1.1 compatibility (RimWorld 1.0 still works, but in feature freeze). Engineered by lbmaian.
RimWorld 1.1 compatibility (RimWorld 1.0 still works). Engineered by lbmaian.
No longer requires JecsTools in either RimWorld 1.0 or 1.1.
Also revamp door remote button/lever job so that it consistently respects whether door remote button/lever is enabled throughout the job, and fixes related pathing issues.

Expand Down
13 changes: 10 additions & 3 deletions About/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
- More robust patching in case other mods are broken (should no longer fail if another mod has an invalid assembly reference).
- Blast doors can be remote controlled now (remote control tech still required to build remote buttons/levers).
- Blast doors now have half flammability (so half the flammability of the material they're made of).
- Tribal curtains cost halved to 25 fabric or leather as part of RimWorld 1.0/1.1 rebalance.
- Remove obsolete Manifest.xml loadBefore/loadAfter and migrate vanilla door mass patch to code to prevent some warnings.
- This is the last version with changes backported to the RimWorld 1.0 version.

1.3.0.1 (03-14-2020)
========================
Updates from lbmaian: \n- Fix some changelog dates\n- Better way of including non-compiled reference Building_Door.cs\n- Also properly exclude Source folder from !ModFolder virtual folder\n- Invis doors: more/better sanity checks, and more
Improves compatibility with other mods, including recovering from game-breaking errors that can somehow happen. Engineered by lbmaian.

1.3.0.0 (03-07-2020)
========================
Expand All @@ -13,7 +20,7 @@ Scale WorkToBuild linearly like most of vanilla, rebalance thick gate and blast

1.22.1.1 (03-04-2020)
========================
Backport tweaks and fixes to RimWorld 1.0 version. From this point forward, the RimWorld 1.0 version is in feature freeze. Engineered by lbmaian.
Backport tweaks and fixes to RimWorld 1.0 version. Engineered by lbmaian.
"JT_PlaceWorker_OnTopOfWalls" is now translated if JecsTools isn't loaded.

1.22.1.0 (02-29-2020)
Expand All @@ -29,7 +36,7 @@ Also add dependency to the Harmony mod.

1.22.0.0 (02-28-2020)
========================
RimWorld 1.1 compatibility (RimWorld 1.0 still works, but in feature freeze). Engineered by lbmaian.
RimWorld 1.1 compatibility (RimWorld 1.0 still works). Engineered by lbmaian.
No longer requires JecsTools in either RimWorld 1.0 or 1.1.
Also revamp door remote button/lever job so that it consistently respects whether door remote button/lever is enabled throughout the job, and fixes related pathing issues.

Expand Down
22 changes: 0 additions & 22 deletions About/Manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,6 @@
<version>1.3.0.1</version>
<dependencies />
<incompatibleWith />
<!-- TODO: Shouldn't the following belong in dependencies/loadAfter sections of the referenced mods rather than be listed here in loadBefore? -->
<loadBefore>
<li>CoC-Factions</li>
<li>CoC-Cults</li>
<li>CoC-ElderThings</li>
<li>IA-ObjectsAndFurniture</li>
<li>IA-SteamCorp</li>
<li>LotR-Dwarves</li>
<li>LotR-Elves</li>
<li>LotR-Hobbits</li>
<li>LotR-MenAndBeasts</li>
<li>LotR-OrcsAndGoblins</li>
<li>LotR-TheThirdAge</li>
<li>RoM-Arachnophobia</li>
<li>RoM-Vampires</li>
<li>RoM-Werewolves</li>
<li>RimWriter</li>
<li>SW-Factions</li>
<li>SW-Lightsabers</li>
<li>SW-TheForce</li>
</loadBefore>
<loadAfter />
<manifestUri>https://raw.githubusercontent.com/jecrell/DoorsExpanded/master/About/Manifest.xml</manifestUri>
<downloadUri>https://github.com/jecrell/DoorsExpanded/releases</downloadUri>
</Manifest>
2 changes: 1 addition & 1 deletion Source/Building_DoorRegionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public override void DeSpawn(DestroyMode mode = DestroyMode.Vanish)

public override void Destroy(DestroyMode mode = DestroyMode.Vanish)
{
// This check is necessary to prevent errors during operations that delete all things in the same cell,
// This check is necessary to prevent errors during operations that destroy all things in the same cell,
// since despawning/destroying parent doors also destroys their invis doors.
if (!Destroyed)
base.Destroy(mode);
Expand Down
3 changes: 2 additions & 1 deletion Source/DebugInspectorPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ public static class MoreDebugViewSettings

public static class DebugInspectorPatches
{
public static void PatchDebugInspector(Harmony harmony)
public static void PatchDebugInspector()
{
var harmony = HarmonyPatches.harmony;
harmony.Patch(original: AccessTools.Method(typeof(Dialog_DebugSettingsMenu), "DoListingItems"),
transpiler: new HarmonyMethod(typeof(DebugInspectorPatches), nameof(DebugSettingsMenuDoListingItemsTranspiler)));
harmony.Patch(original: AccessTools.Method(typeof(EditWindow_DebugInspector), "CurrentDebugString"),
Expand Down
13 changes: 13 additions & 0 deletions Source/DoorsExpandedMod.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Verse;

namespace DoorsExpanded
{
public class DoorsExpandedMod : Mod
{
public DoorsExpandedMod(ModContentPack content) : base(content)
{
}

// TODO: Mod options
}
}
Loading

0 comments on commit c7e961c

Please sign in to comment.