Exemplo n.º 1
0
 public void FinalizeInit()
 {
     this.pathGrid.RecalculateAllPerceivedPathCosts();
     this.regionAndRoomUpdater.Enabled = true;
     this.regionAndRoomUpdater.RebuildAllRegionsAndRooms();
     this.powerNetManager.UpdatePowerNetsAndConnections_First();
     this.temperatureCache.temperatureSaveLoad.ApplyLoadedDataToRegions();
     foreach (Thing thing in this.listerThings.AllThings.ToList <Thing>())
     {
         try
         {
             thing.PostMapInit();
         }
         catch (Exception ex)
         {
             Log.Error(string.Concat(new object[]
             {
                 "Exception PostMapInit in ",
                 thing,
                 ": ",
                 ex
             }), false);
         }
     }
     this.listerFilthInHomeArea.RebuildAll();
     LongEventHandler.ExecuteWhenFinished(delegate
     {
         this.mapDrawer.RegenerateEverythingNow();
     });
     this.resourceCounter.UpdateResourceCounts();
     this.wealthWatcher.ForceRecount(true);
     MapComponentUtility.FinalizeInit(this);
 }
Exemplo n.º 2
0
 public void FinalizeInit()
 {
     pathGrid.RecalculateAllPerceivedPathCosts();
     regionAndRoomUpdater.Enabled = true;
     regionAndRoomUpdater.RebuildAllRegionsAndRooms();
     powerNetManager.UpdatePowerNetsAndConnections_First();
     temperatureCache.temperatureSaveLoad.ApplyLoadedDataToRegions();
     avoidGrid.Regenerate();
     foreach (Thing item in listerThings.AllThings.ToList())
     {
         try
         {
             item.PostMapInit();
         }
         catch (Exception ex)
         {
             Log.Error("Error in PostMapInit() for " + item.ToStringSafe() + ": " + ex);
         }
     }
     listerFilthInHomeArea.RebuildAll();
     LongEventHandler.ExecuteWhenFinished(delegate
     {
         mapDrawer.RegenerateEverythingNow();
     });
     resourceCounter.UpdateResourceCounts();
     wealthWatcher.ForceRecount(allowDuringInit: true);
     MapComponentUtility.FinalizeInit(this);
 }