Skip to content

Commit

Permalink
allow road equipment in stockpiles
Browse files Browse the repository at this point in the history
  • Loading branch information
LocoNeko committed May 6, 2020
1 parent 3664e5e commit 5afb8fd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Source/HarmonyPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,20 @@ public static void Postfix(List<TransferableOneWay> transferables, ref Transfera
}
}

[HarmonyPatch(typeof(ThingFilter), "SetFromPreset")]
//Remove Road equipment from Item tab when forming caravans
public static class Patch_ThingFilter_SetFromPreset
{
[HarmonyPostfix]
public static void Postfix(ref ThingFilter __instance , StorageSettingsPreset preset)
{
if (preset == StorageSettingsPreset.DefaultStockpile)
{
__instance.SetAllow(ThingCategoryDef.Named("RoadEquipment"), allow: true);
}
}
}

// All Tiles can now have roads
[HarmonyPatch(typeof(Tile), "Roads", MethodType.Getter)]
public static class Patch_Tile_Roads
Expand Down
Binary file modified v1.1/Assemblies/RoadsOfTheRim.dll
Binary file not shown.

0 comments on commit 5afb8fd

Please sign in to comment.