Пример #1
0
        public override void FinalizeInit()
        {
            base.FinalizeInit();

            InitDeepFieldsInitial();

            diningSpots.Clear();
            diningSpots.AddRange(DiningUtility.GetAllDiningSpots(map));
            stock.RareTick();
            orders.RareTick();
            debts.RareTick();
        }
Пример #2
0
 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);
         }
     }
 }
Пример #3
0
 public void ScanDiningSpots()
 {
     diningSpots.Clear();
     diningSpots.AddRange(DiningUtility.GetAllDiningSpots(Map));
 }