Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Source/1.5/HarmonyPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5209,6 +5209,35 @@ public static void Postfix(GameEnder __instance)
}
}

// Space map does not have raw food sources by default, so no need to show "Need meal source" warning
[HarmonyPatch(typeof(Alert_NeedMealSource), "NeedMealSource")]
public static class SpaceMapDoesNotNeedStoveWarning
{
public static bool Prefix(Map map, ref bool __result)
{
if (map.IsSpace())
{
__result = false;
return false;
}
return true;
}
}

[HarmonyPatch(typeof(Alert_NeedBatteries), "NeedBatteries")]
public static class ShipCapacitorCountsAsBattery
{
public static bool Prefix(Map map, ref bool __result)
{
if (map.listerBuildings.ColonistsHaveBuilding((Thing building) => building is Building_ShipCapacitor))
{
__result = false;
return false;
}
return true;
}
}

/*[HarmonyPatch(typeof(ActiveDropPod),"PodOpen")]
public static class ActivePodFix{
public static bool Prefix (ref ActiveDropPod __instance)
Expand Down