Elin Modding Docs Doc
Loading...
Searching...
No Matches
PropsManager.cs
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4
5// Token: 0x0200069A RID: 1690
6public class PropsManager : EClass
7{
8 // Token: 0x17000E28 RID: 3624
9 // (get) Token: 0x06003122 RID: 12578 RVA: 0x0011358D File Offset: 0x0011178D
10 private bool dbg
11 {
12 get
13 {
14 return EClass.debug.debugProps;
15 }
16 }
17
18 // Token: 0x06003123 RID: 12579 RVA: 0x00113599 File Offset: 0x00111799
19 public void Init()
20 {
21 this.stocked.Init();
22 this.installed.Init();
23 this.roaming.Init();
24 }
25
26 // Token: 0x06003124 RID: 12580 RVA: 0x001135BC File Offset: 0x001117BC
27 public void OnCardAddedToZone(Card c)
28 {
29 if (!c.isThing)
30 {
31 if (c.isSale)
32 {
33 this.sales.Add(c);
34 }
35 return;
36 }
37 switch (c.placeState)
38 {
39 case PlaceState.roaming:
40 this.roaming.Add(c);
41 return;
42 case PlaceState.stocked:
43 this.stocked.Add(c);
44 break;
45 case PlaceState.installed:
46 this.installed.Add(c);
47 if (c.isSale)
48 {
49 this.sales.Add(c);
50 return;
51 }
52 break;
53 default:
54 return;
55 }
56 }
57
58 // Token: 0x06003125 RID: 12581 RVA: 0x0011363C File Offset: 0x0011183C
59 public void OnSetPlaceState(Card c, PlaceState? newType, PlaceState? oldType = null)
60 {
61 if (!c.isThing)
62 {
63 return;
64 }
65 if (c.parent != EClass._zone)
66 {
67 return;
68 }
69 if (oldType != null)
70 {
71 if (oldType != null)
72 {
73 switch (oldType.GetValueOrDefault())
74 {
75 case PlaceState.roaming:
76 if (this.dbg && !this.roaming.all.Contains(c))
77 {
78 Debug.LogError("remove roaming" + ((c != null) ? c.ToString() : null));
79 }
80 this.roaming.Remove(c);
81 break;
82 case PlaceState.stocked:
83 if (this.dbg && !this.stocked.all.Contains(c))
84 {
85 Debug.LogError("remove stocked" + ((c != null) ? c.ToString() : null));
86 }
87 this.stocked.Remove(c);
88 break;
89 case PlaceState.installed:
90 if (this.dbg && !this.installed.all.Contains(c))
91 {
92 Debug.LogError("remove installed" + ((c != null) ? c.ToString() : null));
93 }
94 this.installed.Remove(c);
95 break;
96 }
97 }
98 if (c.isSale)
99 {
100 this.sales.Remove(c);
101 }
102 }
103 if (newType != null && newType != null)
104 {
105 switch (newType.GetValueOrDefault())
106 {
107 case PlaceState.roaming:
108 if (this.dbg && this.roaming.all.Contains(c))
109 {
110 Debug.LogError("add roaming" + ((c != null) ? c.ToString() : null));
111 }
112 this.roaming.Add(c);
113 return;
114 case PlaceState.stocked:
115 if (this.dbg && this.stocked.all.Contains(c))
116 {
117 Debug.LogError("add stocked" + ((c != null) ? c.ToString() : null));
118 }
119 this.stocked.Add(c);
120 return;
121 case PlaceState.installed:
122 if (this.dbg && this.installed.all.Contains(c))
123 {
124 Debug.LogError("add installed" + ((c != null) ? c.ToString() : null));
125 }
126 this.installed.Add(c);
127 if (c.isSale)
128 {
129 this.sales.Add(c);
130 }
131 break;
132 default:
133 return;
134 }
135 }
136 }
137
138 // Token: 0x04001B36 RID: 6966
139 public PropsStocked stocked = new PropsStocked();
140
141 // Token: 0x04001B37 RID: 6967
142 public PropsInstalled installed = new PropsInstalled();
143
144 // Token: 0x04001B38 RID: 6968
145 public PropsRoaming roaming = new PropsRoaming();
146
147 // Token: 0x04001B39 RID: 6969
148 public List<Card> deconstructing = new List<Card>();
149
150 // Token: 0x04001B3A RID: 6970
151 public List<Card> sales = new List<Card>();
152}
Definition Card.cs:13