コード例 #1
0
        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;
                }
            }
        }
コード例 #2
0
        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;
                }
            }
        }