10 public void AssignUID(
Spatial s)
22 s.parent.children.Remove(s);
24 this.map.Remove(s.uid);
25 this.listDestryoed.Add(s);
29 public T Find<T>(Func<T, bool> func) where T :
Zone
31 foreach (
Spatial spatial
in this.map.Values)
34 if (t !=
null && func(t))
43 public Zone Find(
string id)
45 foreach (
Spatial spatial
in this.map.Values)
47 if (spatial is
Zone && spatial.id ==
id)
49 return spatial as
Zone;
56 public Zone Find(
int uid)
58 return this.map.TryGetValue(uid,
null) as
Zone;
62 public List<Zone> ListReturnLocations()
64 if (
EClass.debug.returnAnywhere)
66 return (from
Zone a in
67 from a in this.map.Values
70 where a !=
EClass._zone && (a.IsReturnLocation || a.IsPCFaction || (!(a is
Zone_Field) && !a.IsInstance && !a.isRandomSite)) && a.parent ==
EClass.world.region && !a.source.tag.Contains(
"closed")
71 select a).ToList<
Zone>();
73 return (from
Zone a in
74 from a in this.map.Values
77 where a !=
EClass._zone && a.IsReturnLocation && a.GetTopZone().visitCount > 0 && (a.GetTopZone().FindDeepestZone() == a ||
EClass.pc.homeZone == a)
78 select a).ToList<
Zone>();
83 public List<Zone> Zones
87 return (from a in this.map.Values
89 select a).Cast<
Zone>().ToList<Zone>();
99 public int uidNext = 1;
106 public List<Spatial> listDestryoed =
new List<Spatial>();