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

Classes

class  Item
 

Public Member Functions

void SetID (TraitTeleporter t, int uidZone)
 
Zone GetTeleportZone (TraitTeleporter t)
 
void Remove (int uidThing)
 

Public Attributes

Dictionary< int, Itemitems = new Dictionary<int, Item>()
 

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
 
- 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]
 

Detailed Description

Definition at line 4 of file TeleportManager.cs.

Member Function Documentation

◆ GetTeleportZone()

Zone TeleportManager.GetTeleportZone ( TraitTeleporter  t)
inline

Definition at line 37 of file TeleportManager.cs.

38 {
39 string id = t.id;
40 int uid = t.owner.uid;
41 if (id.IsEmpty())
42 {
43 return null;
44 }
45 List<Zone> list = new List<Zone>();
46 foreach (KeyValuePair<int, Item> item in items)
47 {
48 if (item.Key != uid && item.Value.id == id)
49 {
50 Zone zone = EClass.game.spatials.Find(item.Value.uidZone);
51 if (zone != null && zone != EClass._zone)
52 {
53 list.Add(zone);
54 }
55 }
56 }
57 return list.RandomItem();
58 }
int uid
Definition: Card.cs:118
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static Zone _zone
Definition: EClass.cs:20
SpatialManager spatials
Definition: Game.cs:152
Zone Find(string id)
Dictionary< int, Item > items
Card owner
Definition: Trait.cs:26
Definition: Zone.cs:12

References EClass._zone, SpatialManager.Find(), EClass.game, TraitTeleporter.id, item, items, Trait.owner, Game.spatials, and Card.uid.

Referenced by TraitTeleporter.TryTeleport().

◆ Remove()

void TeleportManager.Remove ( int  uidThing)
inline

Definition at line 60 of file TeleportManager.cs.

61 {
62 items.Remove(uidThing);
63 }

References items.

Referenced by TraitTeleporter.OnChangePlaceState(), and SetID().

◆ SetID()

void TeleportManager.SetID ( TraitTeleporter  t,
int  uidZone 
)
inline

Definition at line 18 of file TeleportManager.cs.

19 {
20 string id = t.id;
21 int uid = t.owner.uid;
22 if (id.IsEmpty())
23 {
24 Remove(uid);
25 return;
26 }
27 Item item = items.TryGetValue(uid);
28 if (item == null)
29 {
30 item = new Item();
31 items.Add(uid, item);
32 }
33 item.uidZone = uidZone;
34 item.id = id;
35 }
void Remove(int uidThing)

References TraitTeleporter.id, item, items, Trait.owner, Remove(), and Card.uid.

Referenced by TraitTeleporter.OnChangePlaceState(), and TraitTeleporter.TrySetAct().

Member Data Documentation

◆ items

Dictionary<int, Item> TeleportManager.items = new Dictionary<int, Item>()

Definition at line 16 of file TeleportManager.cs.

Referenced by GetTeleportZone(), Remove(), and SetID().


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