Beispiel #1
0
        public static void Postfix(ref Door __instance)
        {
            // If the door has the InsulatingDoor component, remove its insulation
            InsulatingDoor insulatingDoor = __instance.gameObject.GetComponent <InsulatingDoor>();

            if (insulatingDoor != null)
            {
                insulatingDoor.SetInsulation(__instance.gameObject, 1f);
            }
        }
Beispiel #2
0
        public static void Postfix(ref BuildingComplete __instance)
        {
            // If the door has the InsulatingDoor component, apply its insulation
            InsulatingDoor insulatingDoor = __instance.gameObject.GetComponent <InsulatingDoor>();

            if (insulatingDoor != null)
            {
                insulatingDoor.SetInsulation(__instance.gameObject, insulatingDoor.door.building.Def.ThermalConductivity);
            }
        }
Beispiel #3
0
        public static void Postfix(ref BuildingComplete __instance)
        {
            // Trigger if the building is an InsulatedPressureDoor
            if (string.Compare(__instance.name, "InsulatedPressureDoorComplete") == 0)
            {
                // Apply the custom colour tint
                __instance.GetComponent <KAnimControllerBase>().TintColour = InsulatedPressureDoorConfig.Color();

                // Add the InsulatingDoor component
                __instance.gameObject.AddOrGet <InsulatingDoor>();
            }

            // If the building has the InsulatingDoor component, apply its insulation
            InsulatingDoor insulatingDoor = __instance.gameObject.GetComponent <InsulatingDoor>();

            if (insulatingDoor != null)
            {
                insulatingDoor.SetInsulation(__instance.gameObject, insulatingDoor.door.building.Def.ThermalConductivity);
            }
        }