public static void Postfix(Pawn pawn, Thing t, bool forced, WorkGiver_Repair __instance, ref bool __result) { if (__result == false) { return; } if (FrozenWallBase.isFrozenWall(t)) { if (((double)t.HitPoints / t.MaxHitPoints) > ((FrozenWallBase)t).attributes.maxHealHP) { __result = forced; } } }
public static void Postfix(Pawn pawn, Thing t, bool forced, WorkGiver_Repair __instance, ref bool __result) { if (__result == false) { return; } if (t.def == Buildings.Cooler_Wall_Ice || t.def == Buildings.Wall_Ice || t.def == Buildings.IceSculptureSmall || t.def == Buildings.IceSculptureGrand || t.def == Buildings.IceSculptureLarge) { if ((double)t.HitPoints / t.MaxHitPoints > RepairThreshold) { __result = forced; } } }