Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
SpatialManager Class Reference
Inheritance diagram for SpatialManager:
EClass

Classes

class  GlobalSpatialList
 

Public Member Functions

void AssignUID (Spatial s)
 
void Remove (Spatial s)
 
Find< T > (Func< T, bool > func)
 
Zone Find (string id)
 
Zone Find (int uid)
 
List< ZoneListReturnLocations ()
 

Public Attributes

GlobalSpatialList map = new GlobalSpatialList()
 
int uidNext = 1
 
RankedZoneManager ranks = new RankedZoneManager()
 
List< SpatiallistDestryoed = new List<Spatial>()
 

Properties

Zone Somewhere [get]
 
List< ZoneZones [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from EClass
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 6 of file SpatialManager.cs.

Member Function Documentation

◆ AssignUID()

void SpatialManager.AssignUID ( Spatial  s)
inline

Definition at line 31 of file SpatialManager.cs.

32 {
33 s.uid = uidNext;
34 uidNext++;
35 map.Add(s);
36 }
GlobalSpatialList map

References SpatialManager.GlobalSpatialList.Add(), map, and uidNext.

Referenced by Spatial.Register().

◆ Find() [1/2]

Zone SpatialManager.Find ( int  uid)
inline

Definition at line 72 of file SpatialManager.cs.

73 {
74 return map.TryGetValue(uid) as Zone;
75 }
Definition: Zone.cs:12

References map.

◆ Find() [2/2]

◆ Find< T >()

T SpatialManager.Find< T > ( Func< T, bool >  func)
inline
Type Constraints
T :Zone 

Definition at line 48 of file SpatialManager.cs.

48 : Zone
49 {
50 foreach (Spatial value in map.Values)
51 {
52 if (value is T val && func(val))
53 {
54 return val;
55 }
56 }
57 return null;
58 }

References map.

◆ ListReturnLocations()

List< Zone > SpatialManager.ListReturnLocations ( )
inline

Definition at line 77 of file SpatialManager.cs.

78 {
80 {
81 List<Zone> list = (from Zone a in map.Values.Where((Spatial a) => a is Zone)
82 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")
83 select a).ToList();
84 list.Sort((Zone a, Zone b) => a.GetSortVal() - b.GetSortVal());
85 return list;
86 }
87 List<Zone> list2 = (from Zone a in map.Values.Where((Spatial a) => a is Zone)
88 where a != EClass._zone && a.IsReturnLocation && a.GetTopZone().visitCount > 0 && (a.GetTopZone().FindDeepestZone() == a || EClass.pc.homeZone == a)
89 select a).ToList();
90 list2.Sort((Zone a, Zone b) => a.GetSortVal() - b.GetSortVal());
91 return list2;
92 }
bool returnAnywhere
Definition: CoreDebug.cs:202
Definition: EClass.cs:5
static Zone _zone
Definition: EClass.cs:20
static World world
Definition: EClass.cs:40
static CoreDebug debug
Definition: EClass.cs:48
bool isRandomSite
Definition: Spatial.cs:334
Spatial parent
Definition: Spatial.cs:10
SourceZone.Row source
Definition: Spatial.cs:441
Zone FindDeepestZone()
Definition: Spatial.cs:701
int visitCount
Definition: Spatial.cs:154
Region region
Definition: World.cs:23
int GetSortVal()
Definition: Zone.cs:2998

References EClass._zone, EClass.debug, Spatial.FindDeepestZone(), Zone.GetSortVal(), Spatial.isRandomSite, map, Spatial.parent, World.region, CoreDebug.returnAnywhere, Spatial.source, Spatial.visitCount, and EClass.world.

Referenced by AM_Adv._OnUpdateInput(), and ActEffect.Proc().

◆ Remove()

void SpatialManager.Remove ( Spatial  s)
inline

Definition at line 38 of file SpatialManager.cs.

39 {
40 if (s.parent != null)
41 {
42 s.parent.children.Remove(s);
43 }
44 map.Remove(s.uid);
45 listDestryoed.Add(s);
46 }
List< Spatial > listDestryoed
int uid
Definition: Spatial.cs:70
List< Spatial > children
Definition: Spatial.cs:37

References Spatial.children, listDestryoed, map, Spatial.parent, and Spatial.uid.

Referenced by Zone.Destroy().

Member Data Documentation

◆ listDestryoed

List<Spatial> SpatialManager.listDestryoed = new List<Spatial>()

Definition at line 25 of file SpatialManager.cs.

Referenced by Game.OnBeforeSave(), and Remove().

◆ map

◆ ranks

◆ uidNext

int SpatialManager.uidNext = 1

Definition at line 20 of file SpatialManager.cs.

Referenced by AssignUID().

Property Documentation

◆ Somewhere

Zone SpatialManager.Somewhere
get

Definition at line 27 of file SpatialManager.cs.

◆ Zones


The documentation for this class was generated from the following file: