static void Postfix(Refrigerator __instance) { if (!Main.enabled) { return; } var building = __instance.GetComponent <Building>(); Main.SetCapacity(building, true); }