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

Public Member Functions

void Init ()
 
void OnCardAddedToZone (Card c)
 
void OnSetPlaceState (Card c, PlaceState? newType, PlaceState? oldType=null)
 

Public Attributes

PropsStocked stocked = new PropsStocked()
 
PropsInstalled installed = new PropsInstalled()
 
PropsRoaming roaming = new PropsRoaming()
 
List< Carddeconstructing = new List<Card>()
 
List< Cardsales = new List<Card>()
 

Properties

bool dbg [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 4 of file PropsManager.cs.

Member Function Documentation

◆ Init()

void PropsManager.Init ( )
inline

Definition at line 18 of file PropsManager.cs.

19 {
20 stocked.Init();
22 roaming.Init();
23 }
PropsInstalled installed
Definition: PropsManager.cs:8
PropsRoaming roaming
Definition: PropsManager.cs:10
PropsStocked stocked
Definition: PropsManager.cs:6
void Init()
Definition: Props.cs:41

References Props.Init(), installed, roaming, and stocked.

Referenced by Map.SetZone().

◆ OnCardAddedToZone()

void PropsManager.OnCardAddedToZone ( Card  c)
inline

Definition at line 25 of file PropsManager.cs.

26 {
27 if (!c.isThing)
28 {
29 if (c.isSale)
30 {
31 sales.Add(c);
32 }
33 return;
34 }
35 switch (c.placeState)
36 {
37 case PlaceState.installed:
38 installed.Add(c);
39 if (c.isSale)
40 {
41 sales.Add(c);
42 }
43 break;
44 case PlaceState.roaming:
45 roaming.Add(c);
46 break;
47 case PlaceState.stocked:
48 stocked.Add(c);
49 break;
50 }
51 }
PlaceState
Definition: PlaceState.cs:2
virtual bool isThing
Definition: Card.cs:1957
bool isSale
Definition: Card.cs:838
PlaceState placeState
Definition: Card.cs:79
List< Card > sales
Definition: PropsManager.cs:14
void Add(Card t)
Definition: Props.cs:63

References Props.Add(), installed, Card.isSale, Card.isThing, Card.placeState, roaming, sales, and stocked.

Referenced by Map.AddCardOnActivate(), Map.OnCardAddedToZone(), and Card.SetPlaceState().

◆ OnSetPlaceState()

void PropsManager.OnSetPlaceState ( Card  c,
PlaceState newType,
PlaceState oldType = null 
)
inline

Definition at line 53 of file PropsManager.cs.

54 {
55 if (!c.isThing || c.parent != EClass._zone)
56 {
57 return;
58 }
59 if (oldType.HasValue)
60 {
61 switch (oldType)
62 {
63 case PlaceState.roaming:
64 if (dbg && !roaming.all.Contains(c))
65 {
66 Debug.LogError("remove roaming" + c);
67 }
68 roaming.Remove(c);
69 break;
70 case PlaceState.stocked:
71 if (dbg && !stocked.all.Contains(c))
72 {
73 Debug.LogError("remove stocked" + c);
74 }
75 stocked.Remove(c);
76 break;
77 case PlaceState.installed:
78 if (dbg && !installed.all.Contains(c))
79 {
80 Debug.LogError("remove installed" + c);
81 }
83 break;
84 }
85 if (c.isSale)
86 {
87 sales.Remove(c);
88 }
89 }
90 if (!newType.HasValue || !newType.HasValue)
91 {
92 return;
93 }
94 switch (newType.GetValueOrDefault())
95 {
96 case PlaceState.roaming:
97 if (dbg && roaming.all.Contains(c))
98 {
99 Debug.LogError("add roaming" + c);
100 }
101 roaming.Add(c);
102 break;
103 case PlaceState.stocked:
104 if (dbg && stocked.all.Contains(c))
105 {
106 Debug.LogError("add stocked" + c);
107 }
108 stocked.Add(c);
109 break;
110 case PlaceState.installed:
111 if (dbg && installed.all.Contains(c))
112 {
113 Debug.LogError("add installed" + c);
114 }
115 installed.Add(c);
116 if (c.isSale)
117 {
118 sales.Add(c);
119 }
120 break;
121 }
122 }
ICardParent parent
Definition: Card.cs:51
Definition: EClass.cs:5
static Zone _zone
Definition: EClass.cs:20
void Remove(Card t)
Definition: Props.cs:115
PropSet all
Definition: Props.cs:8

References EClass._zone, Props.Add(), Props.all, dbg, Debug, installed, Card.isSale, Card.isThing, Card.parent, Props.Remove(), roaming, sales, and stocked.

Member Data Documentation

◆ deconstructing

List<Card> PropsManager.deconstructing = new List<Card>()

◆ installed

◆ roaming

PropsRoaming PropsManager.roaming = new PropsRoaming()

Definition at line 10 of file PropsManager.cs.

Referenced by Zone.Deactivate(), Init(), OnCardAddedToZone(), and OnSetPlaceState().

◆ sales

◆ stocked

Property Documentation

◆ dbg

bool PropsManager.dbg
getprivate

Definition at line 16 of file PropsManager.cs.

Referenced by OnSetPlaceState().


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