/// <summary> /// Applied after SetFlag runs. /// </summary> internal static void Postfix(Operational __instance, Operational.Flag flag) { var obj = __instance.gameObject; if (obj != null && obj.HasTag(RoomConstraints.ConstraintTags.RecBuilding) && (flag.FlagType == Operational.Flag.Type.Functional || flag == BuildingEnabledButton.EnabledFlag)) // Update rooms if rec buildings break down or get disabled Game.Instance.roomProber.SolidChangedEvent(Grid.PosToCell(obj), true); }
private DecorCellManager() { brokenFlag = Traverse.Create(typeof(BuildingHP.States)). GetField <Operational.Flag>("healthyFlag"); happinessAttribute = Db.Get().CritterAttributes.Happiness; size = Grid.CellCount; noCritterDecor = DecorReimaginedPatches.Options.AllCrittersZeroDecor; decorGrid = new DecorCell[size]; provInfo = new Dictionary <DecorProvider, DecorSplatNew>(1024); }
static WirelessPowerBattery() { WirelessPowerBattery.JoulesAvailableFlag = new Operational.Flag("joules_available", Operational.Flag.Type.Requirement); }