Elin Modding Docs Doc
Loading...
Searching...
No Matches
HotItemActionMode.cs
1using System;
2using Newtonsoft.Json;
3
4// Token: 0x0200060C RID: 1548
6{
7 // Token: 0x17000C53 RID: 3155
8 // (get) Token: 0x06002B0B RID: 11019 RVA: 0x000F1F75 File Offset: 0x000F0175
9 public override string Name
10 {
11 get
12 {
13 return this.id.lang();
14 }
15 }
16
17 // Token: 0x17000C54 RID: 3156
18 // (get) Token: 0x06002B0C RID: 11020 RVA: 0x000F1F82 File Offset: 0x000F0182
19 public override string pathSprite
20 {
21 get
22 {
23 return "icon_" + this.id;
24 }
25 }
26
27 // Token: 0x17000C55 RID: 3157
28 // (get) Token: 0x06002B0D RID: 11021 RVA: 0x000F1F94 File Offset: 0x000F0194
29 public override bool KeepVisibleWhenHighlighted
30 {
31 get
32 {
33 return true;
34 }
35 }
36
37 // Token: 0x06002B0E RID: 11022 RVA: 0x000F1F98 File Offset: 0x000F0198
38 public static void Execute(string id)
39 {
40 uint num = <PrivateImplementationDetails>.ComputeStringHash(id);
41 if (num <= 1491228771U)
42 {
43 if (num <= 996747083U)
44 {
45 if (num <= 547102523U)
46 {
47 if (num != 482302120U)
48 {
49 if (num != 547102523U)
50 {
51 return;
52 }
53 if (!(id == "Deconstruct"))
54 {
55 return;
56 }
57 ActionMode.Deconstruct.Activate(false, false);
58 return;
59 }
60 else
61 {
62 if (!(id == "EditArea"))
63 {
64 return;
65 }
66 ActionMode.EditArea.Activate(false, false);
67 return;
68 }
69 }
70 else if (num != 561074963U)
71 {
72 if (num != 996747083U)
73 {
74 return;
75 }
76 if (!(id == "Dig"))
77 {
78 return;
79 }
80 ActionMode.Dig.Activate(TaskDig.Mode.Default);
81 return;
82 }
83 else
84 {
85 if (!(id == "Populate"))
86 {
87 return;
88 }
89 ActionMode.Populate.Activate(false, false);
90 return;
91 }
92 }
93 else if (num <= 1143685331U)
94 {
95 if (num != 1027767735U)
96 {
97 if (num != 1143685331U)
98 {
99 return;
100 }
101 if (!(id == "EditMarker"))
102 {
103 return;
104 }
105 ActionMode.EditMarker.Activate(false, false);
106 return;
107 }
108 else
109 {
110 if (!(id == "Inspect"))
111 {
112 return;
113 }
114 if (!EClass.scene.actionMode.IsBuildMode)
115 {
116 BuildMenu.Toggle();
117 return;
118 }
119 ActionMode.Inspect.Activate(false, false);
120 return;
121 }
122 }
123 else if (num != 1198054235U)
124 {
125 if (num != 1286637829U)
126 {
127 if (num != 1491228771U)
128 {
129 return;
130 }
131 if (!(id == "Cut"))
132 {
133 return;
134 }
135 ActionMode.Cut.Activate(false, false);
136 return;
137 }
138 else
139 {
140 if (!(id == "Visibility"))
141 {
142 return;
143 }
144 ActionMode.Visibility.Activate(false, false);
145 return;
146 }
147 }
148 else
149 {
150 if (!(id == "FlagCell"))
151 {
152 return;
153 }
154 ActionMode.FlagCell.Activate(false, false);
155 return;
156 }
157 }
158 else if (num <= 2316551543U)
159 {
160 if (num <= 2056661452U)
161 {
162 if (num != 1703884388U)
163 {
164 if (num != 2056661452U)
165 {
166 return;
167 }
168 if (!(id == "RemoveDesignation"))
169 {
170 return;
171 }
172 ActionMode.RemoveDesignation.Activate(false, false);
173 return;
174 }
175 else
176 {
177 if (!(id == "Copy"))
178 {
179 return;
180 }
181 ActionMode.Copy.Activate(false, false);
182 return;
183 }
184 }
185 else if (num != 2207663855U)
186 {
187 if (num != 2316551543U)
188 {
189 return;
190 }
191 if (!(id == "StateEditor"))
192 {
193 return;
194 }
195 ActionMode.StateEditor.Activate(false, false);
196 return;
197 }
198 else
199 {
200 if (!(id == "Picker"))
201 {
202 return;
203 }
204 ActionMode.Picker.Activate(false, false);
205 return;
206 }
207 }
208 else if (num <= 2818509998U)
209 {
210 if (num != 2778370147U)
211 {
212 if (num != 2818509998U)
213 {
214 return;
215 }
216 if (!(id == "Terrain"))
217 {
218 return;
219 }
220 ActionMode.Terrain.Activate(false, false);
221 return;
222 }
223 else
224 {
225 if (!(id == "ExitBuild"))
226 {
227 return;
228 }
229 ActionMode.DefaultMode.Activate(false, false);
230 return;
231 }
232 }
233 else if (num != 3137301143U)
234 {
235 if (num != 3848897750U)
236 {
237 if (num != 3870556090U)
238 {
239 return;
240 }
241 if (!(id == "Cinema"))
242 {
243 return;
244 }
245 ActionMode.Cinema.Activate(false, false);
246 return;
247 }
248 else
249 {
250 if (!(id == "Mine"))
251 {
252 return;
253 }
254 ActionMode.Mine.Activate(false, false);
255 return;
256 }
257 }
258 else
259 {
260 if (!(id == "DigFloor"))
261 {
262 return;
263 }
264 ActionMode.Dig.Activate(TaskDig.Mode.RemoveFloor);
265 return;
266 }
267 }
268
269 // Token: 0x06002B0F RID: 11023 RVA: 0x000F22D9 File Offset: 0x000F04D9
270 public override void OnClick(ButtonHotItem b, Hotbar h)
271 {
272 HotItemActionMode.Execute(this.id);
273 }
274
275 // Token: 0x06002B10 RID: 11024 RVA: 0x000F22E8 File Offset: 0x000F04E8
276 public override bool ShouldHighlight()
277 {
278 ActionMode actionMode = EClass.scene.actionMode;
279 string text = this.id;
280 uint num = <PrivateImplementationDetails>.ComputeStringHash(text);
281 if (num <= 1286637829U)
282 {
283 if (num <= 996747083U)
284 {
285 if (num <= 547102523U)
286 {
287 if (num != 482302120U)
288 {
289 if (num == 547102523U)
290 {
291 if (text == "Deconstruct")
292 {
293 return actionMode == ActionMode.Deconstruct;
294 }
295 }
296 }
297 else if (text == "EditArea")
298 {
299 return actionMode == ActionMode.EditArea || actionMode == ActionMode.CreateArea || actionMode == ActionMode.ExpandArea;
300 }
301 }
302 else if (num != 561074963U)
303 {
304 if (num == 996747083U)
305 {
306 if (text == "Dig")
307 {
308 return actionMode == ActionMode.Dig && ActionMode.Dig.mode == TaskDig.Mode.Default;
309 }
310 }
311 }
312 else if (text == "Populate")
313 {
314 return actionMode == ActionMode.Populate;
315 }
316 }
317 else if (num <= 1143685331U)
318 {
319 if (num != 1027767735U)
320 {
321 if (num == 1143685331U)
322 {
323 if (text == "EditMarker")
324 {
325 return actionMode == ActionMode.EditMarker;
326 }
327 }
328 }
329 else if (text == "Inspect")
330 {
331 return actionMode == ActionMode.Inspect || actionMode == ActionMode.Build;
332 }
333 }
334 else if (num != 1198054235U)
335 {
336 if (num == 1286637829U)
337 {
338 if (text == "Visibility")
339 {
340 return actionMode == ActionMode.Visibility;
341 }
342 }
343 }
344 else if (text == "FlagCell")
345 {
346 return actionMode == ActionMode.FlagCell;
347 }
348 }
349 else if (num <= 2207663855U)
350 {
351 if (num <= 1703884388U)
352 {
353 if (num != 1491228771U)
354 {
355 if (num == 1703884388U)
356 {
357 if (text == "Copy")
358 {
359 return actionMode == ActionMode.Copy;
360 }
361 }
362 }
363 else if (text == "Cut")
364 {
365 return actionMode == ActionMode.Cut;
366 }
367 }
368 else if (num != 2056661452U)
369 {
370 if (num == 2207663855U)
371 {
372 if (text == "Picker")
373 {
374 return actionMode == ActionMode.Picker;
375 }
376 }
377 }
378 else if (text == "RemoveDesignation")
379 {
380 return actionMode == ActionMode.RemoveDesignation;
381 }
382 }
383 else if (num <= 2818509998U)
384 {
385 if (num != 2316551543U)
386 {
387 if (num == 2818509998U)
388 {
389 if (text == "Terrain")
390 {
391 return actionMode == ActionMode.Terrain;
392 }
393 }
394 }
395 else if (text == "StateEditor")
396 {
397 return actionMode == ActionMode.StateEditor;
398 }
399 }
400 else if (num != 3137301143U)
401 {
402 if (num != 3848897750U)
403 {
404 if (num == 3870556090U)
405 {
406 if (text == "Cinema")
407 {
408 return actionMode == ActionMode.Cinema;
409 }
410 }
411 }
412 else if (text == "Mine")
413 {
414 return actionMode == ActionMode.Mine;
415 }
416 }
417 else if (text == "DigFloor")
418 {
419 return actionMode == ActionMode.Dig && ActionMode.Dig.mode == TaskDig.Mode.RemoveFloor;
420 }
421 return false;
422 }
423
424 // Token: 0x0400182A RID: 6186
425 [JsonProperty]
426 public string id;
427}