public override void FinalizeInit() { base.FinalizeInit(); InitDeepFieldsInitial(); diningSpots.Clear(); diningSpots.AddRange(DiningUtility.GetAllDiningSpots(map)); stock.RareTick(); orders.RareTick(); debts.RareTick(); }
private static void NotifyDespawnedAtPosition(Building building, Map map, IntVec3 pos) { foreach (var thing in pos.GetThingList(map).ToArray()) { // Notify potential dining spots if (DiningUtility.CanPossiblyDineAt(thing.def)) { thing.TryGetComp <CompCanDineAt>()?.Notify_BuildingDespawned(building, map); } // Notify table top if (thing is Building_TableTop t) { t.Notify_BuildingDespawned(building); } // Remove blueprints else if (thing.def.IsBlueprint && thing.def.entityDefToBuild is ThingDef td && typeof(Building_TableTop).IsAssignableFrom(td.thingClass)) { thing.Destroy(DestroyMode.Cancel); } } }
public void ScanDiningSpots() { diningSpots.Clear(); diningSpots.AddRange(DiningUtility.GetAllDiningSpots(Map)); }