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); } }
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); } }
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); } }