Esempio n. 1
0
 private void UpdateRoomStatsAndRole()
 {
     statsAndRoleDirty = false;
     if (!TouchesMapEdge && RegionType == RegionType.Normal && regions.Count <= 36)
     {
         if (stats == null)
         {
             stats = new DefMap <RoomStatDef, float>();
         }
         foreach (RoomStatDef item in DefDatabase <RoomStatDef> .AllDefs.OrderByDescending((RoomStatDef x) => x.updatePriority))
         {
             stats[item] = item.Worker.GetScore(this);
         }
         role = DefDatabase <RoomRoleDef> .AllDefs.MaxBy((RoomRoleDef x) => x.Worker.GetScore(this));
     }
     else
     {
         stats = null;
         role  = RoomRoleDefOf.None;
     }
 }
Esempio n. 2
0
 private void UpdateRoomStatsAndRole()
 {
     this.statsAndRoleDirty = false;
     if (!this.TouchesMapEdge && this.RegionType == RegionType.Normal && this.regions.Count <= 36)
     {
         if (this.stats == null)
         {
             this.stats = new DefMap <RoomStatDef, float>();
         }
         foreach (RoomStatDef current in from x in DefDatabase <RoomStatDef> .AllDefs
                  orderby x.updatePriority descending
                  select x)
         {
             this.stats[current] = current.Worker.GetScore(this);
         }
         this.role = DefDatabase <RoomRoleDef> .AllDefs.MaxBy((RoomRoleDef x) => x.Worker.GetScore(this));
     }
     else
     {
         this.stats = null;
         this.role  = RoomRoleDefOf.None;
     }
 }
Esempio n. 3
0
 private float <UpdateRoomStatsAndRole> m__1(RoomRoleDef x)
 {
     return(x.Worker.GetScore(this));
 }