Elin Modding Docs Doc
Loading...
Searching...
No Matches
ZoneInspector.cs
1using System;
2using UnityEngine;
3
4// Token: 0x02000753 RID: 1875
5public class ZoneInspector : EMono
6{
7 // Token: 0x170010AD RID: 4269
8 // (get) Token: 0x06003649 RID: 13897 RVA: 0x0012714C File Offset: 0x0012534C
9 public string idExport
10 {
11 get
12 {
13 Zone zone = this.zone;
14 if (zone == null)
15 {
16 return null;
17 }
18 return zone.idExport;
19 }
20 }
21
22 // Token: 0x170010AE RID: 4270
23 // (get) Token: 0x0600364A RID: 13898 RVA: 0x0012715F File Offset: 0x0012535F
24 // (set) Token: 0x0600364B RID: 13899 RVA: 0x00127177 File Offset: 0x00125377
25 public MapConfig mapConfig
26 {
27 get
28 {
29 Zone zone = this.zone;
30 if (zone == null)
31 {
32 return null;
33 }
34 return zone.map.config;
35 }
36 set
37 {
38 this.zone.map.config = value;
39 }
40 }
41
42 // Token: 0x170010AF RID: 4271
43 // (get) Token: 0x0600364C RID: 13900 RVA: 0x0012718A File Offset: 0x0012538A
44 // (set) Token: 0x0600364D RID: 13901 RVA: 0x001271A2 File Offset: 0x001253A2
45 public MapBounds bounds
46 {
47 get
48 {
49 Zone zone = this.zone;
50 if (zone == null)
51 {
52 return null;
53 }
54 return zone.map.bounds;
55 }
56 set
57 {
58 this.zone.map.bounds = value;
59 }
60 }
61
62 // Token: 0x0600364E RID: 13902 RVA: 0x001271B5 File Offset: 0x001253B5
63 private void Awake()
64 {
65 ZoneInspector.Instance = this;
66 }
67
68 // Token: 0x0600364F RID: 13903 RVA: 0x001271BD File Offset: 0x001253BD
69 public void RefreshAll()
70 {
71 EMono._map.RefreshAllTiles();
72 }
73
74 // Token: 0x06003650 RID: 13904 RVA: 0x001271CC File Offset: 0x001253CC
75 public void RefreshScreen()
76 {
77 if (!EMono.core.IsGameStarted)
78 {
79 return;
80 }
81 EMono.scene.profile = SceneProfile.Load(EMono._map.config.idSceneProfile.IsEmpty("default"));
82 EMono.screen.Deactivate();
83 if (EMono.player.zone is Region)
84 {
85 ActionMode.Region.Activate(true, false);
86 }
87 else
88 {
89 ActionMode.Adv.Activate(true, false);
90 }
91 EMono.screen.SetZoom(0.5f);
92 EMono.screen.RefreshScreenSize();
93 }
94
95 // Token: 0x06003651 RID: 13905 RVA: 0x0012725C File Offset: 0x0012545C
96 public void SetAllPlayerCreation()
97 {
98 foreach (Thing thing in EMono._map.things)
99 {
100 thing.isPlayerCreation = true;
101 }
102 foreach (Chara chara in EMono._map.charas)
103 {
104 chara.isPlayerCreation = true;
105 }
106 }
107
108 // Token: 0x06003652 RID: 13906 RVA: 0x001272F8 File Offset: 0x001254F8
109 public void Export()
110 {
111 EMono._zone.Export();
112 }
113
114 // Token: 0x06003653 RID: 13907 RVA: 0x00127304 File Offset: 0x00125504
115 private void OnValidate()
116 {
117 if (Application.isPlaying)
118 {
119 this.RefreshScreen();
120 }
121 }
122
123 // Token: 0x04001CAE RID: 7342
124 public static ZoneInspector Instance;
125
126 // Token: 0x04001CAF RID: 7343
128
129 // Token: 0x04001CB0 RID: 7344
131
132 // Token: 0x04001CB1 RID: 7345
133 public Zone zone;
134
135 // Token: 0x02000C44 RID: 3140
136 public class FillUtil
137 {
138 // Token: 0x060046C9 RID: 18121 RVA: 0x00161E6E File Offset: 0x0016006E
139 public void FlattenHeight()
140 {
141 EMono._map.ForeachCell(delegate(Cell c)
142 {
143 c.height = (byte)this.flatHeight;
144 });
145 EMono._map.RefreshAllTiles();
146 }
147
148 // Token: 0x060046CA RID: 18122 RVA: 0x00161E90 File Offset: 0x00160090
149 public void FillFloor()
150 {
151 EMono._map.ForeachCell(delegate(Cell c)
152 {
153 int dir = this.randomFillDir ? EMono.rnd(4) : 0;
154 EMono._map.SetFloor((int)c.x, (int)c.z, EMono.sources.floors.rows[this.fillFloor].DefaultMaterial.id, this.fillFloor, dir);
155 });
156 }
157
158 // Token: 0x060046CB RID: 18123 RVA: 0x00161EA8 File Offset: 0x001600A8
159 public void FillBlock()
160 {
161 EMono._map.ForeachCell(delegate(Cell c)
162 {
163 int dir = this.randomFillDir ? EMono.rnd(4) : 0;
164 EMono._map.SetBlock((int)c.x, (int)c.z, EMono.sources.blocks.rows[this.fillBlock].DefaultMaterial.id, this.fillBlock, dir);
165 });
166 }
167
168 // Token: 0x060046CC RID: 18124 RVA: 0x00161EC0 File Offset: 0x001600C0
169 public void ClearBlock()
170 {
171 EMono._map.ForeachCell(delegate(Cell c)
172 {
173 EMono._map.SetBlock((int)c.x, (int)c.z, 0, 0);
174 });
175 }
176
177 // Token: 0x060046CD RID: 18125 RVA: 0x00161EEB File Offset: 0x001600EB
178 public void ClearObj()
179 {
180 EMono._map.ForeachCell(delegate(Cell c)
181 {
182 EMono._map.SetObj((int)c.x, (int)c.z, 0, 1, 0);
183 });
184 }
185
186 // Token: 0x060046CE RID: 18126 RVA: 0x00161F16 File Offset: 0x00160116
187 public void ClearBridge()
188 {
189 EMono._map.ForeachCell(delegate(Cell c)
190 {
191 EMono._map.SetObj((int)c.x, (int)c.z, 0, 1, 0);
192 });
193 }
194
195 // Token: 0x0400308F RID: 12431
196 public int flatHeight;
197
198 // Token: 0x04003090 RID: 12432
199 public int fillFloor = 5;
200
201 // Token: 0x04003091 RID: 12433
202 public int fillBlock = 1;
203
204 // Token: 0x04003092 RID: 12434
205 public bool randomFillDir;
206 }
207
208 // Token: 0x02000C45 RID: 3141
209 public class ResizeUtil
210 {
211 // Token: 0x060046D3 RID: 18131 RVA: 0x00162028 File Offset: 0x00160228
212 public void Apply()
213 {
214 if (EMono._map.Size != this.newSize)
215 {
216 EMono._map.Resize(this.newSize);
217 }
218 if (this.offset.x != 0 || this.offset.y != 0)
219 {
220 EMono._map.Shift(this.offset);
221 }
222 }
223
224 // Token: 0x04003093 RID: 12435
225 public int newSize;
226
227 // Token: 0x04003094 RID: 12436
228 public Vector2Int offset;
229 }
230}
Definition Cell.cs:10
Definition Chara.cs:12
Definition EMono.cs:6
Definition Thing.cs:10
Definition Zone.cs:14