Пример #1
0
 public static void RegisterInRegions(Thing thing, Map map)
 {
     if (!ListerThings.EverListable(thing.def, ListerThingsUse.Region))
     {
         return;
     }
     GetTouchableRegions(thing, map, tmpRegions);
     for (int i = 0; i < tmpRegions.Count; i++)
     {
         ListerThings listerThings = tmpRegions[i].ListerThings;
         if (!listerThings.Contains(thing))
         {
             listerThings.Add(thing);
         }
     }
     tmpRegions.Clear();
 }
        public static void RegisterInRegions(Thing thing, Map map)
        {
            ThingDef def = thing.def;

            if (ListerThings.EverListable(def, ListerThingsUse.Region))
            {
                RegionListersUpdater.GetTouchableRegions(thing, map, RegionListersUpdater.tmpRegions, false);
                for (int i = 0; i < RegionListersUpdater.tmpRegions.Count; i++)
                {
                    ListerThings listerThings = RegionListersUpdater.tmpRegions[i].ListerThings;
                    if (!listerThings.Contains(thing))
                    {
                        listerThings.Add(thing);
                    }
                }
            }
        }