Elin Modding Docs Doc
Loading...
Searching...
No Matches
CoreDebug.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Runtime.CompilerServices;
5using ReflexCLI.Attributes;
6using Steamworks;
7using UnityEngine;
8
9// Token: 0x0200000A RID: 10
10[ConsoleCommandClassCustomizer("")]
11public class CoreDebug : EScriptable
12{
13 // Token: 0x1700002F RID: 47
14 // (get) Token: 0x0600008D RID: 141 RVA: 0x0000483D File Offset: 0x00002A3D
15 public bool godBuild
16 {
17 get
18 {
19 return this._godBuild || this.runtimeGodBuild;
20 }
21 }
22
23 // Token: 0x0600008E RID: 142 RVA: 0x00004850 File Offset: 0x00002A50
24 private IEnumerable<string> ZoneIDs()
25 {
26 List<SourceZone.Row> rows = EClass.sources.zones.rows;
27 List<string> list = new List<string>();
28 foreach (SourceZone.Row row in rows)
29 {
30 list.Add(row.id);
31 }
32 return list;
33 }
34
35 // Token: 0x0600008F RID: 143 RVA: 0x000048B8 File Offset: 0x00002AB8
36 public void Init()
37 {
38 this.InitDebugCommands();
39 EInput.disableKeyAxis = Application.isEditor;
40 }
41
42 // Token: 0x06000090 RID: 144 RVA: 0x000048CC File Offset: 0x00002ACC
43 public void QuickStart()
44 {
45 Game.Create("quick");
46 Tutorial.debugSkip = EClass.debug.skipNerun;
47 if (!this.startSetting.race.IsEmpty())
48 {
49 EClass.pc.ChangeRace(this.startSetting.race);
50 }
51 if (!this.startSetting.job.IsEmpty())
52 {
53 EClass.pc.ChangeJob(this.startSetting.job);
54 }
55 CoreDebug.StartScene startScene = this.startScene;
56 if (startScene - CoreDebug.StartScene.Zone > 1)
57 {
58 if (startScene == CoreDebug.StartScene.Home_Cave)
59 {
60 EClass.game.idPrologue = 2;
61 }
62 }
63 else
64 {
65 EClass.game.world.date.hour = EClass.debug.startHour;
66 }
67 EClass.game.StartNewGame();
68 EClass.player.flags.OnEnableDebug();
69 EClass.player.pref.lastIdTabAbility = 3;
70 EClass.player.flags.KilledBossInVoid = true;
71 CoreDebug.<>c__DisplayClass102_0 CS$<>8__locals1;
72 CS$<>8__locals1.homeZone = EClass.game.spatials.Find(EClass.game.Prologue.idStartZone);
73 CoreDebug.StartParty startParty = this.startParty;
74 if (startParty != CoreDebug.StartParty.Farris)
75 {
76 if (startParty == CoreDebug.StartParty.Full)
77 {
78 CoreDebug.<QuickStart>g__AddParty|102_0("farris", ref CS$<>8__locals1);
79 CoreDebug.<QuickStart>g__AddParty|102_0("wescott", ref CS$<>8__locals1);
80 }
81 }
82 else
83 {
84 CoreDebug.<QuickStart>g__AddParty|102_0("farris", ref CS$<>8__locals1);
85 }
86 int lv = this.startSetting.lv;
87 if (this.allAbility)
88 {
89 foreach (SourceElement.Row row in EClass.sources.elements.rows)
90 {
91 if (row.category == "ability" && row.aliasRef != "mold" && !EClass.pc.HasElement(row.id, 1) && (row.aliasRef.IsEmpty() || row.id <= 10000 || EClass.sources.elements.alias[row.aliasRef].tag.Contains(row.alias.Split('_', StringSplitOptions.None)[0])))
92 {
93 EClass.pc.elements.ModBase(row.id, lv).vPotential = 30;
94 }
95 }
96 }
97 if (this.allSkill)
98 {
99 foreach (SourceElement.Row row2 in EClass.sources.elements.rows)
100 {
101 if (row2.isSkill && !row2.tag.Contains("unused"))
102 {
103 EClass.pc.elements.ModBase(row2.id, 1);
104 }
105 }
106 }
107 EClass.pc.elements.ModBase(60, lv / 2);
108 EClass.pc.elements.ModBase(61, lv / 2);
109 EClass.pc.elements.ModBase(79, lv / 5);
110 EClass.player.totalFeat = lv;
111 EClass.pc.SetLv(lv - 1);
112 CS$<>8__locals1.idx = 0;
113 CoreDebug.StartLoadout startLoadout = this.startLoadout;
114 if (startLoadout != CoreDebug.StartLoadout.AllItem)
115 {
116 if (startLoadout == CoreDebug.StartLoadout.FewItem)
117 {
118 Thing thing = ThingGen.Create("backpack", -1, -1);
119 thing.AddCard(ThingGen.Create("rp_food", -1, 10).SetNum(30));
120 thing.AddCard(ThingGen.Create("rp_block", -1, 10).SetNum(30));
121 for (int i = 0; i < 30; i++)
122 {
123 thing.AddCard(ThingGen.Create("rp_block", -1, 50));
124 }
125 EClass.pc.AddCard(thing);
126 thing = ThingGen.Create("pouch", -1, -1);
127 for (int j = 0; j < 30; j++)
128 {
129 CardBlueprint.Set(CardBlueprint.DebugEQ);
130 Thing thing2 = ThingGen.CreateFromCategory("weapon", EClass.pc.LV);
131 thing2.elements.SetBase(653, 1, 0);
132 if (!(thing2.trait is TraitAmmo))
133 {
134 thing.AddCard(thing2);
135 }
136 thing2 = ThingGen.CreateFromCategory("armor", EClass.pc.LV);
137 thing2.elements.SetBase(653, 1, 0);
138 thing.AddCard(thing2);
139 }
140 EClass.pc.AddCard(thing);
141 thing = ThingGen.Create("pouch", -1, -1);
142 for (int k = 0; k < 30; k++)
143 {
144 thing.AddCard(ThingGen.Create("mathammer", MATERIAL.GetRandomMaterial(100, null, false).alias));
145 }
146 EClass.pc.AddCard(thing);
147 thing = ThingGen.Create("pouch", -1, -1);
148 for (int l = 0; l < 30; l++)
149 {
150 thing.AddCard(ThingGen.CreateFromCategory("ammo", EClass.pc.LV));
151 }
152 EClass.pc.AddCard(thing);
153 thing = ThingGen.Create("coolerbox", -1, -1);
154 for (int m = 0; m < 20; m++)
155 {
156 thing.AddCard(ThingGen.CreateFromCategory("foodstuff", -1).SetNum(EScriptable.rnd(10) + 1));
157 }
158 EClass.pc.AddCard(thing);
159 List<SourceChara.Row> source = (from a in EClass.sources.charas.map.Values
160 where a._idRenderData == "chara"
161 select a).ToList<SourceChara.Row>();
162 thing = ThingGen.Create("pouch", -1, -1);
163 source = (from a in EClass.sources.charas.map.Values
164 where a._idRenderData == "chara_L"
165 select a).ToList<SourceChara.Row>();
166 for (int n = 0; n < 20; n++)
167 {
168 string id = source.RandomItem<SourceChara.Row>().id;
169 Thing thing3 = ThingGen.Create("figure", -1, -1);
170 thing3.MakeFigureFrom(id);
171 thing.AddCard(thing3);
172 }
173 EClass.pc.AddCard(thing);
174 thing = ThingGen.Create("pouch", -1, -1);
175 source = (from a in EClass.sources.charas.map.Values
176 where a._idRenderData == "chara"
177 select a).ToList<SourceChara.Row>();
178 for (int num = 0; num < 20; num++)
179 {
180 string id2 = source.RandomItem<SourceChara.Row>().id;
181 Thing thing4 = ThingGen.Create("figure3", -1, -1);
182 thing4.MakeFigureFrom(id2);
183 thing.AddCard(thing4);
184 }
185 EClass.pc.AddCard(thing);
186 thing.Dye("oak");
187 thing = ThingGen.Create("pouch", -1, -1);
188 source = (from a in EClass.sources.charas.map.Values
189 where a._idRenderData == "chara_L"
190 select a).ToList<SourceChara.Row>();
191 for (int num2 = 0; num2 < 20; num2++)
192 {
193 string id3 = source.RandomItem<SourceChara.Row>().id;
194 Thing thing5 = ThingGen.Create("figure3", -1, -1);
195 thing5.MakeFigureFrom(id3);
196 thing.AddCard(thing5);
197 }
198 EClass.pc.AddCard(thing);
199 thing.Dye("pine");
200 thing = ThingGen.Create("pouch", -1, -1);
201 thing.AddCard(ThingGen.Create("flour", -1, -1).SetNum(10));
202 thing.AddCard(ThingGen.Create("wheat", -1, -1).SetNum(200));
203 thing.AddCard(ThingGen.Create("rice_plant", -1, -1).SetNum(200));
204 thing.AddCard(ThingGen.Create("noodle", -1, -1).SetNum(10));
205 thing.AddCard(ThingGen.Create("rice", -1, -1).SetNum(10));
206 thing.AddCard(ThingGen.Create("dough_cake", -1, -1).SetNum(10));
207 thing.AddCard(ThingGen.Create("dough_bread", -1, -1).SetNum(10));
208 thing.AddCard(ThingGen.Create("salt", -1, -1).SetNum(10));
209 thing.AddCard(ThingGen.Create("sugar", -1, -1).SetNum(10));
210 thing.AddCard(ThingGen.Create("honey", -1, -1).SetNum(10));
211 thing.AddCard(ThingGen.Create("yeast", -1, -1).SetNum(10));
212 thing.AddCard(ThingGen.Create("ketchup", -1, -1).SetNum(10));
213 thing.AddCard(ThingGen.Create("butter", -1, -1).SetNum(10));
214 thing.AddCard(ThingGen.Create("potion_empty", -1, -1).SetNum(10));
215 thing.AddCard(ThingGen.Create("bucket_empty", -1, -1).SetNum(10));
216 thing.AddCard(ThingGen.Create("battery", -1, -1));
217 EClass.pc.AddCard(thing);
218 thing.Dye("saphire");
219 thing = ThingGen.Create("pouch", -1, -1);
220 thing.AddCard(ThingGen.Create("log", -1, -1).SetNum(99));
221 thing.AddCard(ThingGen.Create("log", -1, -1).SetNum(99).ChangeMaterial("pine"));
222 thing.AddCard(ThingGen.Create("ore", -1, -1).SetNum(99).ChangeMaterial("steel"));
223 thing.AddCard(ThingGen.Create("ore", -1, -1).SetNum(99).ChangeMaterial("copper"));
224 thing.AddCard(ThingGen.Create("ore_gem", -1, -1).SetNum(99).ChangeMaterial("gold"));
225 thing.AddCard(ThingGen.Create("gem", -1, -1).SetNum(99).ChangeMaterial("rubinus"));
226 thing.AddCard(ThingGen.Create("flower_white", -1, -1).SetNum(99));
227 thing.AddCard(ThingGen.Create("bait", -1, -1).SetNum(10));
228 thing.AddCard(ThingGen.Create("seed", -1, -1).SetNum(99));
229 EClass.pc.AddCard(thing);
230 thing.Dye("rubinus");
231 Thing thing6 = ThingGen.Create("quiver", -1, -1);
232 thing6.AddCard(ThingGen.Create("bullet", -1, -1).SetNum(250));
233 thing6.AddCard(ThingGen.Create("arrow", -1, -1).SetNum(250));
234 thing6.AddCard(ThingGen.Create("bolt", -1, -1).SetNum(250));
235 thing6.AddCard(ThingGen.Create("bullet_energy", -1, -1).SetNum(250));
236 EClass.pc.body.GetEquippedThing(44).AddCard(thing6);
237 thing = ThingGen.Create("backpack", -1, -1);
238 for (int num3 = 0; num3 < 10; num3++)
239 {
240 thing.AddThing("book", lv);
241 thing.AddThing("parchment", -1);
242 thing.AddThing("book_ancient", -1);
243 }
244 EClass.pc.AddCard(thing);
245 thing.Dye("rubinus");
246 thing = ThingGen.Create("pouch", -1, -1);
247 for (int num4 = 0; num4 < 30; num4++)
248 {
249 thing.AddThing((EScriptable.rnd(10) != 0) ? "potion" : "drink", lv).SetNum(99);
250 }
251 EClass.pc.AddCard(thing);
252 thing.Dye("steel");
253 thing = ThingGen.Create("pouch", -1, -1);
254 for (int num5 = 0; num5 < 30; num5++)
255 {
256 thing.AddThing(ThingGen.CreateFromCategory("rod", lv), true, -1, -1);
257 }
258 EClass.pc.AddCard(thing);
259 thing.Dye("steel");
260 thing = ThingGen.Create("pouch", -1, -1);
261 for (int num6 = 0; num6 < 30; num6++)
262 {
263 thing.AddThing("scroll", lv).SetNum(99);
264 }
265 EClass.pc.AddCard(thing);
266 thing.Dye("steel");
267 thing = ThingGen.Create("pouch", -1, -1);
268 for (int num7 = 0; num7 < 40; num7++)
269 {
270 thing.AddThing("372", 100);
271 }
272 EClass.pc.AddCard(thing);
273 thing.Dye("steel");
274 Thing thing7 = EClass.pc.things.Find("purse", -1, -1);
275 thing7.AddThing("casino_coin", -1).SetNum(30000000);
276 thing7.AddThing("medal", -1).SetNum(1000);
277 thing7.ModCurrency(500, "plat");
278 EClass.pc.AddThing("record", -1);
279 EClass.pc.AddThing("deed", -1).SetNum(5);
280 EClass.pc.AddThing("book_story", -1);
281 EClass.pc.AddThing("book_tutorial", -1);
282 EClass.pc.AddThing("water", -1).SetNum(20).SetBlessedState(BlessedState.Blessed);
283 EClass.pc.AddThing("water", -1).SetNum(20).SetBlessedState(BlessedState.Cursed);
284 EClass.pc.AddThing("potion_empty", -1).SetNum(20);
285 EClass.pc.ModCurrency(10000000, "money");
286 EClass.pc.AddCard(ThingGen.CreateBlock(67, 1).SetNum(99));
287 EClass.pc.AddCard(ThingGen.CreateFloor(41, 1, false).SetNum(99));
288 Thing thing8 = ThingGen.Create("scroll_random", -1, -1).SetNum(10);
289 thing8.refVal = 8220;
290 EClass.pc.AddCard(thing8);
291 EClass.pc.ModCurrency(50, "money2");
292 CoreDebug.<QuickStart>g__AddHotbar|102_1("hoe", ref CS$<>8__locals1);
293 CoreDebug.<QuickStart>g__AddHotbar|102_1("shovel", ref CS$<>8__locals1);
294 CoreDebug.<QuickStart>g__AddHotbar|102_1("axe", ref CS$<>8__locals1);
295 CoreDebug.<QuickStart>g__AddHotbar|102_1("pickaxe", ref CS$<>8__locals1);
296 CoreDebug.<QuickStart>g__AddHotbar|102_1("wateringCan", ref CS$<>8__locals1);
297 CoreDebug.<QuickStart>g__AddHotbar|102_1("gun_assault", ref CS$<>8__locals1);
298 CoreDebug.<QuickStart>g__AddHotbar|102_1("hammer", ref CS$<>8__locals1);
299 CoreDebug.<QuickStart>g__AddHotbar|102_1("bow", ref CS$<>8__locals1);
300 }
301 }
302 else
303 {
304 EClass.pc.ModCurrency(50, "plat");
305 EClass.pc.ModCurrency(50, "money2");
306 EClass.pc.EQ_CAT("weapon");
307 EClass.pc.EQ_CAT((EScriptable.rnd(2) == 0) ? "weapon" : "shield");
308 EClass.pc.EQ_CAT("torso");
309 EClass.pc.EQ_CAT("arm");
310 EClass.pc.EQ_CAT("ring");
311 EClass.pc.AddCard(ThingGen.Create("chest2", -1, -1));
312 EClass.pc.AddCard(ThingGen.Create("torch_held", -1, -1));
313 CoreDebug.<QuickStart>g__AddHotbar|102_1("axe", ref CS$<>8__locals1);
314 CoreDebug.<QuickStart>g__AddHotbar|102_1("pickaxe", ref CS$<>8__locals1);
315 CoreDebug.<QuickStart>g__AddHotbar|102_1("wateringCan", ref CS$<>8__locals1);
316 CoreDebug.<QuickStart>g__AddHotbar|102_1("bow", ref CS$<>8__locals1);
317 CoreDebug.<QuickStart>g__AddHotbar|102_1("deed", ref CS$<>8__locals1);
318 CoreDebug.<QuickStart>g__AddAbility|102_2("SpellTeleport");
319 CoreDebug.<QuickStart>g__AddAbility|102_2("SpellCatsEye");
320 CoreDebug.<QuickStart>g__AddHotbar|102_1("map_big", ref CS$<>8__locals1);
321 }
322 EClass.pc.RestockEquip(true);
323 EClass.pc.stamina.value = EClass.pc.stamina.max;
324 EClass.pc.mana.value = EClass.pc.mana.max;
325 EClass.pc.hp = EClass.pc.MaxHP;
326 if (EClass.debug.startScene == CoreDebug.StartScene.Zone)
327 {
328 EClass._zone.ClaimZone(true);
329 }
330 SoundManager.ignoreSounds = true;
331 EClass.ui.ToggleInventory(false);
332 SoundManager.ignoreSounds = true;
333 EClass.ui.ToggleAbility(false);
334 SoundManager.ignoreSounds = false;
335 EClass.ui.layerFloat.GetLayer<LayerAbility>(false).windows[0].SetRect(EClass.core.refs.rects.abilityDebug, false);
336 if (this.allRecipe)
337 {
338 this.AddAllRecipes();
339 }
340 foreach (Thing thing9 in EClass.pc.things)
341 {
342 thing9.isNew = false;
343 }
344 LayerInventory.SetDirtyAll(false);
345 EClass.core.actionsNextFrame.Add(new Action(EClass.pc.RecalculateFOV));
346 if (this.startScene == CoreDebug.StartScene.Story_Test)
347 {
348 EClass._zone.ClaimZone(true);
349 EClass.Branch.AddMemeber(EClass._zone.AddCard(CharaGen.Create("loytel", -1), EClass.pc.pos.GetNearestPoint(false, false, true, false)) as Chara);
350 EClass.Branch.AddMemeber(EClass._zone.AddCard(CharaGen.Create("farris", -1), EClass.pc.pos.GetNearestPoint(false, false, true, false)) as Chara);
351 EClass.Branch.AddMemeber(EClass._zone.AddCard(CharaGen.Create("kettle", -1), EClass.pc.pos.GetNearestPoint(false, false, true, false)) as Chara);
352 EClass.Branch.AddMemeber(EClass._zone.AddCard(CharaGen.Create("quru", -1), EClass.pc.pos.GetNearestPoint(false, false, true, false)) as Chara);
353 EClass.Branch.AddMemeber(EClass._zone.AddCard(CharaGen.Create("corgon", -1), EClass.pc.pos.GetNearestPoint(false, false, true, false)) as Chara);
354 EClass.Branch.AddMemeber(EClass._zone.AddCard(CharaGen.Create("demitas", -1), EClass.pc.pos.GetNearestPoint(false, false, true, false)) as Chara);
355 EClass.game.quests.Add("greatDebt", null);
356 EClass.game.quests.Add("farris_tulip", null);
357 EClass.game.quests.Add("kettle_join", null);
358 EClass.game.quests.Add("quru_morning", null);
359 EClass.game.quests.Add("vernis_gold", null);
360 EClass.game.quests.Add("quru_sing", null);
361 EClass.game.quests.Add("quru_past1", null);
362 EClass.game.quests.Add("quru_past2", null);
363 EClass.game.quests.Add("pre_debt", null);
364 EClass.game.quests.Add("exile_meet", null);
365 EClass.game.quests.Add("exile_quru", null);
366 EClass.game.quests.Add("exile_kettle", null);
367 EClass.game.quests.Add("exile_whisper", null);
368 EClass.game.quests.Add("exile_voice", null);
369 EClass.game.quests.Add("into_darkness", null);
370 EClass.game.quests.Add("into_darkness", null);
371 }
372 }
373
374 // Token: 0x06000091 RID: 145 RVA: 0x00005CB8 File Offset: 0x00003EB8
375 public void OnLoad()
376 {
377 if (this.allRecipe)
378 {
379 this.AddAllRecipes();
380 }
381 }
382
383 // Token: 0x06000092 RID: 146 RVA: 0x00005CC8 File Offset: 0x00003EC8
384 public void AddAllRecipes()
385 {
386 foreach (RecipeSource recipeSource in RecipeManager.list)
387 {
388 if (!EClass.player.recipes.knownRecipes.ContainsKey(recipeSource.id))
389 {
390 EClass.player.recipes.knownRecipes.Add(recipeSource.id, 1);
391 }
392 }
393 }
394
395 // Token: 0x06000093 RID: 147 RVA: 0x00005D4C File Offset: 0x00003F4C
396 public void SetStartStockpile(Thing container, int num = 100)
397 {
398 LittlePopper.skipPop = true;
399 foreach (SourceMaterial.Row row in EClass.sources.materials.rows)
400 {
401 if (!(row.alias == "void") && (!this.randomResource || EScriptable.rnd(4) == 0))
402 {
403 row.CreateByProduct(container, num);
404 }
405 }
406 foreach (SourceThing.Row row2 in EClass.sources.things.rows)
407 {
408 if ((row2.factory.IsEmpty() || !(row2.factory[0] == "x")) && !row2.isOrigin && row2.Category.tag.Contains("debug"))
409 {
410 Thing thing = ThingGen.Create(row2.id, -1, -1);
411 if (thing.trait.CanStack)
412 {
413 thing.ModNum(num, true);
414 }
415 container.AddThing(thing, true, -1, -1);
416 }
417 }
418 for (int i = 0; i < 10; i++)
419 {
420 container.AddThing(TraitSeed.MakeRandomSeed(false), true, -1, -1);
421 }
422 LittlePopper.skipPop = false;
423 }
424
425 // Token: 0x06000094 RID: 148 RVA: 0x00005EB4 File Offset: 0x000040B4
426 public Thing GetOrCreateDebugContainer()
427 {
428 foreach (Thing thing in EClass._map.things)
429 {
430 if (thing.c_altName == "DebugContainer")
431 {
432 return thing;
433 }
434 }
435 Thing thing2 = EClass._zone.AddThing("barrel", EClass.pc.pos).Thing;
436 thing2.ChangeMaterial("obsidian");
437 thing2.c_altName = "DebugContainer";
438 thing2.isNPCProperty = false;
439 thing2.SetPlaceState(PlaceState.installed, false);
440 return thing2;
441 }
442
443 // Token: 0x06000095 RID: 149 RVA: 0x00005F60 File Offset: 0x00004160
444 public Thing GetDebugContainer()
445 {
446 foreach (Thing thing in EClass._map.things)
447 {
448 if (thing.c_altName == "DebugContainer")
449 {
450 return thing;
451 }
452 }
453 return null;
454 }
455
456 // Token: 0x06000096 RID: 150 RVA: 0x00005FCC File Offset: 0x000041CC
457 public void EnableDebugResource()
458 {
459 this.AddAllRecipes();
460 EClass.player.flags.OnEnableDebug();
461 this.enable = true;
462 if (WidgetHotbar.HotbarBuild)
463 {
464 WidgetHotbar.HotbarBuild.RebuildPage(-1);
465 }
466 WidgetSystemIndicator.Refresh();
467 Thing orCreateDebugContainer = this.GetOrCreateDebugContainer();
468 this.SetStartStockpile(orCreateDebugContainer, this.numResource);
469 }
470
471 // Token: 0x06000097 RID: 151 RVA: 0x00006025 File Offset: 0x00004225
472 public void SpawnCheatContainer()
473 {
474 }
475
476 // Token: 0x06000098 RID: 152 RVA: 0x00006028 File Offset: 0x00004228
477 public void UpdateAlways()
478 {
479 if (!EClass.debug.enable || EClass.ui.GetLayer<LayerConsole>(false))
480 {
481 return;
482 }
483 if (Input.GetKeyDown(KeyCode.B))
484 {
485 UIButton.TryShowTip(null, true, true);
486 }
487 if (Input.GetKeyDown(KeyCode.O))
488 {
489 Steam.GetAchievement(ID_Achievement.test);
490 }
491 if (Input.GetKeyDown(KeyCode.P))
492 {
493 Steam.GetAchievement(ID_Achievement.mew);
494 }
495 if (Input.GetKeyDown(KeyCode.F11))
496 {
497 if (Application.isEditor)
498 {
499 EClass.core.SetLang((Lang.langCode == "EN") ? "JP" : "EN", false);
500 }
501 else
502 {
503 EClass.sources.ImportSourceTexts();
504 }
505 NewsList.dict = null;
506 BookList.dict = null;
507 BookList.Init();
508 }
509 if (!EClass.core.IsGameStarted)
510 {
511 return;
512 }
513 if (Input.GetKeyDown(KeyCode.U))
514 {
515 Vector3 offset = EClass.screen.tileMap.rendererInnerBlock.offset;
516 Msg.SayRaw(offset.ToString() ?? "");
517 EClass.screen.tileMap.rendererInnerBlock.offset = Vector3.zero;
518 }
519 if (Input.GetKeyDown(KeyCode.I))
520 {
521 Vector3 offset = EClass.screen.tileMap.rendererInnerBlock.offset;
522 Msg.SayRaw(offset.ToString() ?? "");
523 EClass.screen.tileMap.rendererInnerBlock.offset = new Vector3(0f, 0.54f, -0.5f);
524 }
525 }
526
527 // Token: 0x06000099 RID: 153 RVA: 0x0000619E File Offset: 0x0000439E
528 public void ValidateData()
529 {
530 if (!EClass.core.IsGameStarted)
531 {
532 return;
533 }
534 EClass._map.Stocked.Validate();
535 EClass._map.Roaming.Validate();
536 EClass._map.Installed.Validate();
537 }
538
539 // Token: 0x0600009A RID: 154 RVA: 0x000061DC File Offset: 0x000043DC
540 public void UpdateInput()
541 {
542 if (!this.debugInput || EInput.isInputFieldActive || EClass.ui.GetLayer<LayerConsole>(false))
543 {
544 return;
545 }
546 bool key = Input.GetKey(KeyCode.LeftShift);
547 bool key2 = Input.GetKey(KeyCode.LeftAlt);
548 bool key3 = Input.GetKey(KeyCode.LeftControl);
549 TraitStairs traitStairs = null;
550 if (Input.GetKeyDown(KeyCode.KeypadPlus))
551 {
552 traitStairs = EClass._map.FindThing<TraitStairsDown>();
553 }
554 if (Input.GetKeyDown(KeyCode.KeypadMinus))
555 {
556 traitStairs = EClass._map.FindThing<TraitStairsUp>();
557 }
558 if (traitStairs != null)
559 {
560 traitStairs.MoveZone(false);
561 }
562 if (EInput.action == EAction.ShowGrid)
563 {
564 EClass.ui.Find("_Guide").ToggleActive();
565 }
566 if (Input.GetKey(KeyCode.N))
567 {
568 if (key)
569 {
570 SoundManager.current.sourceBGM.pitch = 10f;
571 }
572 if (key3)
573 {
574 SoundManager.current.sourceBGM.time = SoundManager.current.currentBGM.length - 10f;
575 }
576 }
577 else if (Input.GetKeyUp(KeyCode.N))
578 {
579 SoundManager.current.sourceBGM.pitch = 1f;
580 }
581 if (EClass.scene.actionMode.IsBuildMode)
582 {
583 string text = "festival";
584 if (Input.GetKeyDown(KeyCode.F1))
585 {
586 EClass.ui.AddLayer<LayerDebug>();
587 }
588 if (Input.GetKeyDown(KeyCode.F2))
589 {
590 Zone.forceRegenerate = true;
591 EClass.scene.actionMode.Deactivate();
592 EClass.scene.Init(Scene.Mode.Zone);
593 ActionMode.Inspect.Activate(true, false);
594 SE.MoveZone();
595 }
596 if (Input.GetKeyDown(KeyCode.F4))
597 {
598 if (!MapSubset.Exist(text))
599 {
600 SE.Beep();
601 return;
602 }
603 Zone.forceRegenerate = true;
604 Zone.forceSubset = text;
605 EClass.scene.actionMode.Deactivate();
606 EClass.scene.Init(Scene.Mode.Zone);
607 ActionMode.Inspect.Activate(true, false);
608 SE.MoveZone();
609 EClass.ui.Say("Loaded Subset", null);
610 }
611 if (Input.GetKeyDown(KeyCode.F5))
612 {
613 MapSubset.Save(text);
614 SE.WriteJournal();
615 EClass.ui.Say("Exported Subset", null);
616 }
617 return;
618 }
619 if (Input.GetKeyDown(KeyCode.F1))
620 {
621 EClass.ui.AddLayer<LayerDebug>();
622 Debug.Log(EClass._zone);
623 string id = EClass._zone.id;
624 string str = "/";
625 Spatial parent = EClass._zone.parent;
626 Debug.Log(id + str + ((parent != null) ? parent.ToString() : null));
627 Debug.Log(EClass._zone.RegionPos);
628 }
629 if (Input.GetKeyDown(KeyCode.F2))
630 {
631 EClass._zone.TryGenerateEvolved(true);
632 Chara targetChara = EClass.scene.mouseTarget.TargetChara;
633 if (targetChara != null)
634 {
635 EClass.pc.Pick(targetChara.MakeMilk(true, 1, true), true, true);
636 EClass.pc.Pick(targetChara.MakeGene(null), true, true);
637 EClass.pc.Pick(targetChara.MakeBraineCell(), true, true);
638 EClass.pc.Pick(targetChara.MakeEgg(true, 10, true), true, true);
639 }
640 return;
641 }
642 if (Input.GetKeyDown(KeyCode.F3))
643 {
644 EClass.core.steam.CheckUpdate();
645 Player.Flags flags = EClass.player.flags;
646 int loytelMartLv = flags.loytelMartLv;
647 flags.loytelMartLv = loytelMartLv + 1;
648 Msg.Say("loytelmart:" + EClass.player.flags.loytelMartLv.ToString());
649 Guild.Fighter.relation.rank = 20;
650 Guild.Mage.relation.rank = 20;
651 Guild.Thief.relation.rank = 20;
652 Guild.Merchant.relation.rank = 20;
653 if (EClass.Branch != null)
654 {
655 EClass.Branch.ModExp(EClass.Branch.GetNextExp(-1));
656 }
657 foreach (Chara chara in EClass.pc.party.members)
658 {
659 chara.AddExp(chara.ExpToNext);
660 }
661 EClass.pc.PlayEffect("boost", true, 0f, default(Vector3));
662 EClass.pc.PlaySound("boost", 1f, true);
663 EClass.pc.elements.SetBase(306, 100, 0);
664 EClass.pc.elements.SetBase(85, 100, 0);
665 EClass.pc.feat += 10;
666 EClass.player.totalFeat += 10;
667 return;
668 }
669 if (Input.GetKeyDown(KeyCode.F4))
670 {
671 foreach (Chara chara2 in EClass.pc.party.members)
672 {
673 chara2.feat += EScriptable.rnd(10);
674 chara2.TryUpgrade(true);
675 }
676 return;
677 }
678 if (Input.GetKeyDown(KeyCode.F5))
679 {
680 string text2 = Input.GetKey(KeyCode.LeftControl) ? "quick3" : (Input.GetKey(KeyCode.LeftShift) ? "quick2" : "quick");
681 if (text2 != Game.id)
682 {
683 IO.DeleteDirectory(GameIO.pathSaveRoot + text2);
684 IO.CopyAll(GameIO.pathSaveRoot + Game.id, GameIO.pathSaveRoot + text2);
685 Game.id = text2;
686 }
687 EClass.game.Save(false, null, false);
688 }
689 if (Input.GetKeyDown(KeyCode.F6))
690 {
691 EClass.core.WaitForEndOfFrame(delegate
692 {
693 string slot = Input.GetKey(KeyCode.LeftControl) ? "quick3" : (Input.GetKey(KeyCode.LeftShift) ? "quick2" : "quick");
694 EClass.scene.Init(Scene.Mode.None);
695 Game.Load(slot);
696 });
697 }
698 if (Input.GetKeyDown(KeyCode.F7))
699 {
700 MiniGame.Activate(MiniGame.Type.Scratch);
701 return;
702 }
703 if (Input.GetKeyDown(KeyCode.F8))
704 {
705 SE.Click();
706 this.EnableDebugResource();
707 this.runtimeGodBuild = true;
708 WidgetMenuPanel.OnChangeMode();
709 EClass.player.hotbars.ResetHotbar(2);
710 }
711 if (key3)
712 {
713 if (Input.GetKeyDown(KeyCode.F9))
714 {
715 this.indexResolution++;
716 if (this.indexResolution >= this.resolutions.Count)
717 {
718 this.indexResolution = 0;
719 }
720 int[] array = this.resolutions[this.indexResolution];
721 int width = array[0];
722 int height = array[1];
723 Screen.SetResolution(width, height, key);
724 WidgetFeed instance = WidgetFeed.Instance;
725 if (instance != null)
726 {
727 instance.Nerun(width.ToString() + "/" + height.ToString(), "UN_nerun");
728 }
729 }
730 if (Input.GetKeyDown(KeyCode.F10))
731 {
732 int width2 = Screen.width;
733 int height2 = width2 / 16 * 9;
734 Screen.SetResolution(width2, height2, key);
735 WidgetFeed instance2 = WidgetFeed.Instance;
736 if (instance2 != null)
737 {
738 instance2.Nerun(width2.ToString() + "/" + height2.ToString(), "UN_nerun");
739 }
740 }
741 }
742 else
743 {
744 Input.GetKeyDown(KeyCode.F9);
745 if (Input.GetKey(KeyCode.F9))
746 {
747 EClass.scene.paused = false;
748 for (int i = 0; i < this.advanceMin; i++)
749 {
750 EClass.game.updater.FixedUpdate();
751 }
752 EClass.game.world.date.AdvanceMin(this.advanceMin);
753 }
754 if (Input.GetKeyDown(KeyCode.F10))
755 {
756 switch (EScriptable.rnd(5))
757 {
758 case 0:
759 EClass.world.weather.SetCondition(Weather.Condition.Rain, 20, false);
760 break;
761 case 1:
762 EClass.world.weather.SetCondition(Weather.Condition.Snow, 20, false);
763 break;
764 case 2:
765 EClass.world.weather.SetCondition(Weather.Condition.Ether, 20, false);
766 break;
767 default:
768 EClass.world.weather.SetCondition(Weather.Condition.Fine, 20, false);
769 break;
770 }
771 }
772 }
773 if (Input.GetKeyDown(KeyCode.N) && !EInput.isShiftDown && !EInput.isCtrlDown)
774 {
775 EClass.Sound.NextBGM();
776 }
777 if (Input.GetKeyDown(KeyCode.M))
778 {
779 EClass.scene.ToggleMuteBGM();
780 }
781 if (Input.GetKeyDown(KeyCode.Tab))
782 {
783 if (key)
784 {
785 EClass.ui.AddLayer<LayerConsole>();
786 }
787 else
788 {
789 EClass.ui.widgets.Toggle("Debug");
790 }
791 }
792 Point hitPoint = Scene.HitPoint;
793 if (!hitPoint.IsValid || EClass.ui.IsActive)
794 {
795 return;
796 }
797 if (hitPoint.detail != null)
798 {
799 Area area = hitPoint.area;
800 }
801 CellDetail detail = hitPoint.detail;
802 if (((detail != null) ? detail.things : null) == null)
803 {
804 new List<Thing>();
805 }
806 CellDetail detail2 = hitPoint.detail;
807 if (((detail2 != null) ? detail2.charas : null) == null)
808 {
809 new List<Chara>();
810 }
811 List<Card> list = hitPoint.ListCards(false);
812 if (Input.GetMouseButtonDown(2))
813 {
814 if (EClass.core.releaseMode != ReleaseMode.Public)
815 {
816 if (key)
817 {
818 EClass._zone.SpawnMob(hitPoint, null);
819 return;
820 }
821 if (key3)
822 {
823 EClass._zone.SpawnMob(hitPoint, null);
824 return;
825 }
826 if (key2)
827 {
828 EClass._zone.SpawnMob(hitPoint, null);
829 }
830 }
831 return;
832 }
833 if (key2)
834 {
835 if (Input.GetMouseButtonDown(0))
836 {
837 foreach (Card card in list)
838 {
839 Debug.Log(string.Concat(new string[]
840 {
841 card.Name,
842 "/",
843 card.dir.ToString(),
844 "/",
845 card.flipX.ToString(),
846 "/",
847 card.angle.ToString()
848 }));
849 }
850 }
851 if (Input.GetMouseButtonDown(1))
852 {
853 if (key)
854 {
855 EClass._map.charas.ForeachReverse(delegate(Chara c)
856 {
857 if (c.IsHostile(EClass.pc))
858 {
859 c.DamageHP(9999999, AttackSource.Finish, EClass.pc);
860 }
861 });
862 }
863 else if (hitPoint.detail != null)
864 {
865 for (int j = hitPoint.detail.charas.Count - 1; j >= 0; j--)
866 {
867 hitPoint.detail.charas[j].DamageHP(9999999, AttackSource.Finish, EClass.pc);
868 }
869 }
870 EInput.Consume(false, 1);
871 }
872 }
873 if (Input.GetKeyDown(KeyCode.Delete))
874 {
875 if (Input.GetKey(KeyCode.RightControl))
876 {
877 return;
878 }
879 if (key)
880 {
881 using (List<Card>.Enumerator enumerator2 = EClass._map.Roaming.all.GetList<Card>().GetEnumerator())
882 {
883 while (enumerator2.MoveNext())
884 {
885 Card t = enumerator2.Current;
886 EClass._zone.RemoveCard(t);
887 }
888 goto IL_AEB;
889 }
890 }
891 if (hitPoint.detail != null)
892 {
893 for (int k = hitPoint.detail.things.Count - 1; k >= 0; k--)
894 {
895 hitPoint.detail.things[k].Destroy();
896 }
897 if (hitPoint.detail != null)
898 {
899 for (int l = hitPoint.detail.charas.Count - 1; l >= 0; l--)
900 {
901 hitPoint.detail.charas[l].Destroy();
902 }
903 }
904 }
905 }
906 IL_AEB:
907 if (Input.GetKeyDown(KeyCode.End) && hitPoint.detail != null)
908 {
909 for (int m = hitPoint.detail.things.Count - 1; m >= 0; m--)
910 {
911 Thing thing = hitPoint.detail.things[m];
912 string[] array2 = new string[13];
913 array2[0] = thing.id;
914 array2[1] = "/";
915 array2[2] = thing.Pref.height.ToString();
916 array2[3] = "/";
917 int num = 4;
918 Trait trait = thing.trait;
919 array2[num] = ((trait != null) ? trait.ToString() : null);
920 array2[5] = "/";
921 array2[6] = thing.source.tileType.CanStack.ToString();
922 array2[7] = "/";
923 int num2 = 8;
924 TileType tileType = thing.source.tileType;
925 array2[num2] = ((tileType != null) ? tileType.ToString() : null);
926 array2[9] = "/";
927 array2[10] = thing.isSynced.ToString();
928 array2[11] = "/";
929 array2[12] = RenderObject.syncList.Contains(thing.renderer).ToString();
930 Debug.Log(string.Concat(array2));
931 }
932 }
933 if (!Application.isEditor)
934 {
935 return;
936 }
937 switch (this.debugHotkeys)
938 {
939 case CoreDebug.DebugHotkey.Block:
940 if (Input.GetKeyDown(KeyCode.Alpha1))
941 {
942 EClass._map.SetLiquid(hitPoint.x, hitPoint.z, 1, 9);
943 }
944 if (Input.GetKeyDown(KeyCode.Alpha2))
945 {
946 EClass._map.SetLiquid(hitPoint.x, hitPoint.z, 2, 9);
947 }
948 break;
949 case CoreDebug.DebugHotkey.Item:
950 if (Input.GetKeyDown(KeyCode.Alpha1))
951 {
952 Thing thing2 = ThingGen.Create("stairsDown_cave", -1, -1);
953 EClass._zone.AddCard(thing2, EClass.pc.pos);
954 thing2.SetPlaceState(PlaceState.installed, false);
955 }
956 if (Input.GetKeyDown(KeyCode.Alpha2))
957 {
958 Thing thing3 = ThingGen.Create("stairs", -1, -1);
959 EClass._zone.AddCard(thing3, EClass.pc.pos);
960 thing3.SetPlaceState(PlaceState.installed, false);
961 }
962 if (Input.GetKeyDown(KeyCode.Alpha3))
963 {
964 Thing thing4 = ThingGen.Create("sign", -1, -1);
965 EClass._zone.AddCard(thing4, hitPoint);
966 thing4.SetPlaceState(PlaceState.installed, false);
967 }
968 if (Input.GetKeyDown(KeyCode.Alpha4))
969 {
970 Thing thing5 = ThingGen.Create("sign2", -1, -1);
971 EClass._zone.AddCard(thing5, hitPoint);
972 thing5.SetPlaceState(PlaceState.installed, false);
973 }
974 if (Input.GetKeyDown(KeyCode.Alpha5))
975 {
976 Thing thing6 = ThingGen.Create("well", -1, -1);
977 EClass._zone.AddCard(thing6, hitPoint);
978 thing6.SetPlaceState(PlaceState.installed, false);
979 }
980 if (Input.GetKeyDown(KeyCode.Alpha6))
981 {
982 Thing thing7 = ThingGen.Create("altar", -1, -1);
983 EClass._zone.AddCard(thing7, hitPoint);
984 thing7.SetPlaceState(PlaceState.installed, false);
985 }
986 if (Input.GetKeyDown(KeyCode.Alpha7))
987 {
988 Thing t2 = ThingGen.Create("torch", -1, -1);
989 EClass._zone.AddCard(t2, hitPoint);
990 }
991 if (Input.GetKeyDown(KeyCode.Alpha8))
992 {
993 Thing t3 = ThingGen.Create("street_lamp", -1, -1);
994 EClass._zone.AddCard(t3, hitPoint);
995 }
996 if (Input.GetKeyDown(KeyCode.Alpha9))
997 {
998 Thing t4 = ThingGen.Create("statue_elin", -1, -1);
999 EClass._zone.AddCard(t4, hitPoint);
1000 }
1001 if (Input.GetKeyDown(KeyCode.Alpha0))
1002 {
1003 Thing t5 = ThingGen.TestCreate();
1004 EClass._zone.AddCard(t5, hitPoint);
1005 }
1006 if (key && Input.GetKeyDown(KeyCode.Alpha1))
1007 {
1008 Chara t6 = CharaGen.Create("korgon", -1);
1009 EClass._zone.AddCard(t6, hitPoint);
1010 }
1011 break;
1012 case CoreDebug.DebugHotkey.Decal:
1013 if (Input.GetKeyDown(KeyCode.Alpha1))
1014 {
1015 EClass._map.AddDecal(hitPoint.x, hitPoint.z, EClass.pc.material.decal, 1, true);
1016 }
1017 if (Input.GetKeyDown(KeyCode.Alpha2))
1018 {
1019 }
1020 break;
1021 case CoreDebug.DebugHotkey.Test:
1022 if (Input.GetKeyDown(KeyCode.Alpha1))
1023 {
1024 QualitySettings.vSyncCount = 0;
1025 Application.targetFrameRate = 60;
1026 }
1027 if (Input.GetKeyDown(KeyCode.Alpha2))
1028 {
1029 QualitySettings.vSyncCount = 0;
1030 Application.targetFrameRate = 20;
1031 }
1032 if (Input.GetKeyDown(KeyCode.Alpha3))
1033 {
1034 QualitySettings.vSyncCount = 0;
1035 Application.targetFrameRate = 30;
1036 }
1037 if (Input.GetKeyDown(KeyCode.Alpha4))
1038 {
1039 QualitySettings.vSyncCount = 0;
1040 Application.targetFrameRate = 40;
1041 }
1042 break;
1043 case CoreDebug.DebugHotkey.Anime:
1044 {
1045 int num3 = -1;
1046 if (Input.GetKeyDown(KeyCode.Alpha0))
1047 {
1048 num3 = 0;
1049 }
1050 if (Input.GetKeyDown(KeyCode.Alpha1))
1051 {
1052 num3 = 1;
1053 }
1054 if (Input.GetKeyDown(KeyCode.Alpha2))
1055 {
1056 num3 = 2;
1057 }
1058 if (Input.GetKeyDown(KeyCode.Alpha3))
1059 {
1060 num3 = 3;
1061 }
1062 if (Input.GetKeyDown(KeyCode.Alpha4))
1063 {
1064 num3 = 4;
1065 }
1066 if (Input.GetKeyDown(KeyCode.Alpha5))
1067 {
1068 num3 = 5;
1069 }
1070 if (Input.GetKeyDown(KeyCode.Alpha6))
1071 {
1072 num3 = 6;
1073 }
1074 if (Input.GetKeyDown(KeyCode.Alpha7))
1075 {
1076 num3 = 7;
1077 }
1078 if (Input.GetKeyDown(KeyCode.Alpha8))
1079 {
1080 num3 = 8;
1081 }
1082 if (Input.GetKeyDown(KeyCode.Alpha9))
1083 {
1084 num3 = 9;
1085 }
1086 if (num3 != -1)
1087 {
1088 foreach (Card card2 in hitPoint.ListCards(false))
1089 {
1090 card2.renderer.PlayAnime(num3.ToEnum<AnimeID>(), default(Vector3), false);
1091 }
1092 Debug.Log(num3.ToEnum<AnimeID>());
1093 }
1094 break;
1095 }
1096 }
1097 Card card3 = hitPoint.FirstChara ?? hitPoint.FirstThing;
1098 if (card3 != null)
1099 {
1100 CharaActorPCC charaActorPCC = (card3.renderer.actor as CharaActor) as CharaActorPCC;
1101 if (charaActorPCC)
1102 {
1103 if (Input.GetKeyDown(KeyCode.Keypad0))
1104 {
1105 charaActorPCC.NextFrame();
1106 charaActorPCC.RefreshSprite();
1107 }
1108 if (Input.GetKeyDown(KeyCode.Keypad1))
1109 {
1110 charaActorPCC.NextDir();
1111 card3.angle = charaActorPCC.provider.angle;
1112 charaActorPCC.RefreshSprite();
1113 }
1114 if (Input.GetKeyDown(KeyCode.Keypad2))
1115 {
1116 charaActorPCC.pcc.data.Randomize(null, null, true);
1117 charaActorPCC.provider.Rebuild(PCCState.Normal);
1118 }
1119 }
1120 if (Input.GetKeyDown(KeyCode.Keypad4))
1121 {
1122 this.lastEmo = this.lastEmo.NextEnum<Emo>();
1123 card3.ShowEmo(Emo.none, 0f, true);
1124 card3.ShowEmo(this.lastEmo, 0f, true);
1125 }
1126 if (Input.GetKeyDown(KeyCode.Keypad5))
1127 {
1128 card3.ShowEmo(Emo.none, 0f, true);
1129 card3.ShowEmo(this.lastEmo, 0f, true);
1130 }
1131 if (Input.GetKeyDown(KeyCode.Keypad7))
1132 {
1133 this.lastAnime = this.lastAnime.NextEnum<AnimeID>();
1134 card3.renderer.PlayAnime(this.lastAnime, default(Vector3), false);
1135 }
1136 if (Input.GetKeyDown(KeyCode.Keypad8))
1137 {
1138 card3.renderer.PlayAnime(this.lastAnime, default(Vector3), false);
1139 this.animeDest = card3;
1140 }
1141 if (Input.GetKeyDown(KeyCode.Keypad9))
1142 {
1143 card3.renderer.PlayAnime(AnimeID.Attack, this.animeDest);
1144 }
1145 }
1146 }
1147
1148 // Token: 0x0600009B RID: 155 RVA: 0x000073E8 File Offset: 0x000055E8
1149 public void InitDebugCommands()
1150 {
1151 this.commands.Clear();
1152 int cat = 0;
1153 this.<InitDebugCommands>g__Add|113_0(cat, "Save Widgets", delegate
1154 {
1155 EClass.ui.widgets.Save(null);
1156 });
1157 this.<InitDebugCommands>g__Add|113_0(cat, "Save Widgets(Dialog)", delegate
1158 {
1159 EClass.ui.widgets.DialogSave(null);
1160 });
1161 this.<InitDebugCommands>g__Add|113_0(cat, "Export Zone", delegate
1162 {
1163 EClass._zone.Export();
1164 });
1165 this.<InitDebugCommands>g__Add|113_0(cat, "Export Zone(Dialog)", delegate
1166 {
1167 EClass._zone.ExportDialog(null);
1168 });
1169 this.<InitDebugCommands>g__Add|113_0(0, "Import Zone(Dialog)", delegate
1170 {
1171 EClass._zone.ImportDialog(null);
1172 });
1173 this.<InitDebugCommands>g__Add|113_0(cat, "Validate Backer Contents", delegate
1174 {
1175 foreach (SourceBacker.Row row in EClass.sources.backers.rows)
1176 {
1177 if (row.valid)
1178 {
1179 int type = row.type;
1180 if (type != 1)
1181 {
1182 if (type != 4)
1183 {
1184 if (type == 6)
1185 {
1186 if (!EClass.sources.religions.map.ContainsKey(row.deity.ToLower()))
1187 {
1188 Debug.Log(string.Concat(new string[]
1189 {
1190 row.id.ToString(),
1191 "/",
1192 row.Name,
1193 "/follower/",
1194 row.deity
1195 }));
1196 }
1197 }
1198 }
1199 else if (!EClass.sources.charas.map.ContainsKey(row.chara))
1200 {
1201 Debug.Log(string.Concat(new string[]
1202 {
1203 row.id.ToString(),
1204 "/pet/",
1205 row.Name,
1206 "/",
1207 row.chara
1208 }));
1209 }
1210 }
1211 else if (!EClass.sources.things.map.ContainsKey(row.loot))
1212 {
1213 Debug.Log(string.Concat(new string[]
1214 {
1215 row.id.ToString(),
1216 "/remain/",
1217 row.Name,
1218 "/",
1219 row.loot
1220 }));
1221 }
1222 }
1223 }
1224 });
1225 this.<InitDebugCommands>g__Add|113_0(cat, "Edit PCC", delegate
1226 {
1227 EClass.ui.AddLayer<LayerEditPCC>().Activate(EClass.pc, UIPCC.Mode.Full, null, null);
1228 });
1229 this.<InitDebugCommands>g__Add|113_0(cat, "COM_Teleport", new Action(this.COM_Teleport));
1230 this.<InitDebugCommands>g__Add|113_0(cat, "LOG_Spatials", new Action(this.LOG_Spatials));
1231 this.<InitDebugCommands>g__Add|113_0(cat, "Play Start Drama", new Action(this.COM_PlayStartDrama));
1232 this.<InitDebugCommands>g__Add|113_0(cat, "Fix Floating Items", delegate
1233 {
1234 foreach (Thing thing in EClass._map.things)
1235 {
1236 if (thing.Pref.Float)
1237 {
1238 thing.isFloating = true;
1239 }
1240 }
1241 });
1242 cat = 1;
1243 this.<InitDebugCommands>g__Add|113_0(cat, "Add Conditions", delegate
1244 {
1245 if (EScriptable.rnd(2) == 0)
1246 {
1247 EClass.pc.AddCondition<ConWet>(100, false);
1248 }
1249 else
1250 {
1251 EClass.pc.AddCondition<ConSuffocation>(100, false);
1252 }
1253 if (EScriptable.rnd(2) == 0)
1254 {
1255 EClass.pc.AddCondition<ConPoison>(100, false);
1256 return;
1257 }
1258 EClass.pc.AddCondition<ConDisease>(100, false);
1259 });
1260 cat = 2;
1261 this.<InitDebugCommands>g__Add|113_0(cat, "Max Construction", new Action(this.COM_MaxConstruction));
1262 this.<InitDebugCommands>g__Add|113_0(cat, "Add Reserves", delegate
1263 {
1264 EClass.Home.AddReserve(CharaGen.Create("merc_archer", -1));
1265 EClass.Home.AddReserve(CharaGen.Create("healer", -1));
1266 EClass.Home.AddReserve(CharaGen.Create("bartender", -1));
1267 EClass.Home.AddReserve(CharaGen.Create("merchant", -1));
1268 EClass.Home.AddReserve(CharaGen.CreateFromFilter("c_wilds", -1, -1));
1269 EClass.Home.AddReserve(CharaGen.CreateFromFilter("c_wilds", -1, -1));
1270 EClass.Home.AddReserve(CharaGen.CreateFromFilter("c_wilds", -1, -1));
1271 });
1272 this.<InitDebugCommands>g__Add|113_0(cat, "Add Recruits", delegate
1273 {
1274 if (EClass.Branch == null)
1275 {
1276 return;
1277 }
1278 EClass.Branch.AddRecruit(CharaGen.Create("merc_archer", -1));
1279 EClass.Branch.AddRecruit(CharaGen.Create("healer", -1));
1280 EClass.Branch.AddRecruit(CharaGen.Create("bartender", -1));
1281 EClass.Branch.AddRecruit(CharaGen.Create("merchant", -1));
1282 EClass.Branch.AddRecruit(CharaGen.CreateFromFilter("c_wilds", -1, -1));
1283 EClass.Branch.AddRecruit(CharaGen.CreateFromFilter("c_wilds", -1, -1));
1284 EClass.Branch.AddRecruit(CharaGen.CreateFromFilter("c_wilds", -1, -1));
1285 });
1286 this.<InitDebugCommands>g__Add|113_0(cat, "Add Resources", delegate
1287 {
1288 if (EClass.Branch == null)
1289 {
1290 return;
1291 }
1292 EClass.Branch.resources.food.Mod(100, true);
1293 EClass.Branch.resources.knowledge.Mod(100, true);
1294 });
1295 this.<InitDebugCommands>g__Add|113_0(cat, "Add Influence", delegate
1296 {
1297 EClass._zone.influence += 100;
1298 });
1299 this.<InitDebugCommands>g__Add|113_0(cat, "Reroll Hobbies", delegate
1300 {
1301 foreach (Chara chara in EClass._map.charas)
1302 {
1303 chara.RerollHobby(true);
1304 }
1305 });
1306 this.<InitDebugCommands>g__Add|113_0(cat, "Test_Siege", new Action(this.Test_Siege));
1307 this.<InitDebugCommands>g__Add|113_0(cat, "Test_SiegeGuard", new Action(this.Test_SiegeGuard));
1308 this.<InitDebugCommands>g__Add|113_0(cat, "Log_BranchMembers", delegate
1309 {
1310 if (EClass._zone.IsPCFaction)
1311 {
1312 Debug.Log(EClass.Branch.members.Count);
1313 foreach (Chara o in EClass.Branch.members)
1314 {
1315 EClass.debug.Log(o);
1316 }
1317 }
1318 });
1319 cat = 3;
1320 this.<InitDebugCommands>g__Add|113_0(cat, "Weather.Fine", delegate
1321 {
1322 EClass.world.weather.SetCondition(Weather.Condition.Fine, 20, false);
1323 });
1324 this.<InitDebugCommands>g__Add|113_0(cat, "Weather.Blossom", delegate
1325 {
1326 EClass.world.weather.SetCondition(Weather.Condition.Blossom, 20, false);
1327 });
1328 this.<InitDebugCommands>g__Add|113_0(cat, "Weather.Random", delegate
1329 {
1330 EClass.world.weather.SetRandomCondition();
1331 });
1332 this.<InitDebugCommands>g__Add|113_0(cat, "Weather.Ether+50", delegate
1333 {
1334 EClass.world.ModEther(50);
1335 Debug.Log(EClass.world.ether.ToString() + "/" + EClass.world.weather.CurrentCondition.ToString());
1336 });
1337 this.<InitDebugCommands>g__Add|113_0(cat, "Season.Next", delegate
1338 {
1339 EClass.world.season.Next();
1340 });
1341 this.<InitDebugCommands>g__Add|113_0(cat, "Unreveal Map", delegate
1342 {
1343 EClass._map.ForeachCell(delegate(Cell c)
1344 {
1345 c.isSeen = false;
1346 });
1347 WidgetMinimap.Instance.Reload();
1348 });
1349 this.<InitDebugCommands>g__Add|113_0(cat, "Test_GodTalk", new Action(this.Test_GodTalk));
1350 this.<InitDebugCommands>g__Add|113_0(cat, "Test_Filter", new Action(this.Test_Filter));
1351 this.<InitDebugCommands>g__Add|113_0(cat, "Test_Grow", new Action(this.Test_Grow));
1352 this.<InitDebugCommands>g__Add|113_0(cat, "Turn On All Lights", delegate
1353 {
1354 foreach (Thing thing in EClass._map.things)
1355 {
1356 if (thing.trait.IsLighting)
1357 {
1358 thing.trait.Toggle(true, false);
1359 }
1360 }
1361 });
1362 this.<InitDebugCommands>g__Add|113_0(cat, "Reset All Custom Lights", delegate
1363 {
1364 foreach (Thing thing in EClass._map.things)
1365 {
1366 thing.c_lightColor = 0;
1367 thing.RecalculateFOV();
1368 }
1369 });
1370 this.<InitDebugCommands>g__Add|113_0(cat, "Reset All obj materials", delegate
1371 {
1372 EClass._map.ForeachCell(delegate(Cell c)
1373 {
1374 if (c.HasObj)
1375 {
1376 c.objMat = (byte)c.sourceObj.DefaultMaterial.id;
1377 }
1378 });
1379 });
1380 this.<InitDebugCommands>g__Add|113_0(cat, "Fix Floors under Blocks", delegate
1381 {
1382 EClass._map.ForeachCell(delegate(Cell c)
1383 {
1384 if (c.HasFullBlock)
1385 {
1386 SourceBlock.Row sourceBlock = c.sourceBlock;
1387 SourceFloor.Row row = EClass.sources.floors.alias[sourceBlock.autoFloor];
1388 EClass._map.SetFloor((int)c.x, (int)c.z, row.DefaultMaterial.id, row.id);
1389 }
1390 });
1391 });
1392 this.<InitDebugCommands>g__Add|113_0(cat, "Bless Inventory", delegate
1393 {
1394 EClass.pc.things.Foreach(delegate(Thing t)
1395 {
1396 t.SetBlessedState(BlessedState.Blessed);
1397 }, true);
1398 });
1399 this.<InitDebugCommands>g__Add|113_0(cat, "Curse Inventory", delegate
1400 {
1401 EClass.pc.things.Foreach(delegate(Thing t)
1402 {
1403 t.SetBlessedState(BlessedState.Cursed);
1404 }, true);
1405 });
1406 this.<InitDebugCommands>g__Add|113_0(cat, "List Global Charas", delegate
1407 {
1408 foreach (KeyValuePair<int, Chara> keyValuePair in EClass.game.cards.globalCharas)
1409 {
1410 string str = keyValuePair.Key.ToString();
1411 string str2 = "/";
1412 Chara value = keyValuePair.Value;
1413 Debug.Log(str + str2 + ((value != null) ? value.ToString() : null));
1414 }
1415 });
1416 this.<InitDebugCommands>g__Add|113_0(cat, "List Global Charas In Zone", delegate
1417 {
1418 foreach (KeyValuePair<int, Chara> keyValuePair in EClass.game.cards.globalCharas)
1419 {
1420 if (keyValuePair.Value.currentZone == EClass._zone)
1421 {
1422 string str = keyValuePair.Key.ToString();
1423 string str2 = "/";
1424 Chara value = keyValuePair.Value;
1425 Debug.Log(str + str2 + ((value != null) ? value.ToString() : null));
1426 }
1427 }
1428 });
1429 this.<InitDebugCommands>g__Add|113_0(cat, "List Citizen", delegate
1430 {
1431 using (Dictionary<int, string>.Enumerator enumerator = EClass._zone.dictCitizen.GetEnumerator())
1432 {
1433 while (enumerator.MoveNext())
1434 {
1435 KeyValuePair<int, string> p = enumerator.Current;
1436 string[] array = new string[7];
1437 array[0] = p.Key.ToString();
1438 array[1] = "/";
1439 array[2] = p.Value;
1440 array[3] = "/";
1441 int num = 4;
1442 Chara chara = EClass._map.FindChara(p.Key);
1443 array[num] = ((chara != null) ? chara.ToString() : null);
1444 array[5] = "/";
1445 int num2 = 6;
1446 IEnumerable<Chara> enumerable = from c in EClass._map.deadCharas
1447 where c.uid == p.Key
1448 select c;
1449 array[num2] = ((enumerable != null) ? enumerable.ToString() : null);
1450 Debug.Log(string.Concat(array));
1451 }
1452 }
1453 });
1454 }
1455
1456 // Token: 0x0600009C RID: 156 RVA: 0x000079EC File Offset: 0x00005BEC
1457 public void Test_Grow()
1458 {
1459 EClass._map.ForeachCell(delegate(Cell c)
1460 {
1461 if (c.sourceObj.HasGrowth)
1462 {
1463 c.TryGrow(null);
1464 }
1465 });
1466 foreach (Thing thing in EClass._map.things.Copy<Thing>())
1467 {
1468 TraitSeed traitSeed = thing.trait as TraitSeed;
1469 if (traitSeed != null)
1470 {
1471 traitSeed.TrySprout(true, false, null);
1472 }
1473 }
1474 }
1475
1476 // Token: 0x0600009D RID: 157 RVA: 0x00007A7C File Offset: 0x00005C7C
1477 public void Test_GodTalk()
1478 {
1479 foreach (Religion religion in EClass.game.religions.dictAll.Values)
1480 {
1481 religion.Talk("test", null, null);
1482 }
1483 }
1484
1485 // Token: 0x0600009E RID: 158 RVA: 0x00007AE4 File Offset: 0x00005CE4
1486 public void COM_Teleport()
1487 {
1488 for (int i = 0; i < 10000; i++)
1489 {
1490 Point point = EClass.pc.pos.Copy();
1491 point.x += EScriptable.rnd(60) - EScriptable.rnd(60);
1492 point.z += EScriptable.rnd(60) - EScriptable.rnd(60);
1493 if (point.IsValid && !point.cell.blocked && point.HasFloor)
1494 {
1495 EClass.pc.Teleport(point, false, false);
1496 return;
1497 }
1498 }
1499 }
1500
1501 // Token: 0x0600009F RID: 159 RVA: 0x00007B74 File Offset: 0x00005D74
1502 public void COM_PlayStartDrama()
1503 {
1504 EClass.ui.CloseLayers();
1505 EClass.game.world.date.hour = 2;
1506 EClass.scene.screenElin.RefreshAll();
1507 LayerDrama.ActivateMain("mono", "1-2", null, null, "");
1508 }
1509
1510 // Token: 0x060000A0 RID: 160 RVA: 0x00007BC8 File Offset: 0x00005DC8
1511 public void Test_Filter()
1512 {
1513 this.bilinear = !this.bilinear;
1514 MeshPass[] passes = EClass.scene.passes;
1515 for (int i = 0; i < passes.Length; i++)
1516 {
1517 passes[i].mat.GetTexture("_MainTex").filterMode = (this.bilinear ? FilterMode.Bilinear : FilterMode.Point);
1518 }
1519 }
1520
1521 // Token: 0x060000A1 RID: 161 RVA: 0x00007C20 File Offset: 0x00005E20
1522 public void LOG_Spatials()
1523 {
1524 foreach (Spatial spatial in EClass.world.region.children)
1525 {
1526 Debug.Log(string.Concat(new string[]
1527 {
1528 spatial.uid.ToString(),
1529 "/",
1530 spatial.Name,
1531 "/",
1532 spatial.mainFaction.name,
1533 "/",
1534 (spatial == EClass.player.zone).ToString()
1535 }));
1536 }
1537 }
1538
1539 // Token: 0x060000A2 RID: 162 RVA: 0x00007CE0 File Offset: 0x00005EE0
1540 public void Test_SiegeGuard()
1541 {
1542 if (EClass._zone.events.GetEvent<ZoneEventSiegeGuard>() == null)
1543 {
1544 EClass._zone.events.Add(new ZoneEventSiegeGuard(), false);
1545 return;
1546 }
1547 EClass._zone.events.Remove<ZoneEventSiegeGuard>();
1548 }
1549
1550 // Token: 0x060000A3 RID: 163 RVA: 0x00007D18 File Offset: 0x00005F18
1551 public void Test_Siege()
1552 {
1553 if (EClass._zone.events.GetEvent<ZoneEventSiege>() == null)
1554 {
1555 EClass._zone.events.Add(new ZoneEventSiege(), false);
1556 return;
1557 }
1558 EClass._zone.events.Remove<ZoneEventSiege>();
1559 }
1560
1561 // Token: 0x060000A4 RID: 164 RVA: 0x00007D50 File Offset: 0x00005F50
1562 public void COM_MaxConstruction()
1563 {
1564 if (EClass.pc.homeBranch == null)
1565 {
1566 return;
1567 }
1568 EClass.pc.homeBranch.owner.elements.ModBase(2003, 50);
1569 }
1570
1571 // Token: 0x060000A5 RID: 165 RVA: 0x00007D80 File Offset: 0x00005F80
1572 public static bool CheatEnabled()
1573 {
1574 return EClass.debug.enable || EClass.game.config.cheat;
1575 }
1576
1577 // Token: 0x17000030 RID: 48
1578 // (get) Token: 0x060000A6 RID: 166 RVA: 0x00007D9F File Offset: 0x00005F9F
1579 public static string EnableCheat
1580 {
1581 get
1582 {
1583 return "Enable cheat by typing 'Cheat'";
1584 }
1585 }
1586
1587 // Token: 0x060000A7 RID: 167 RVA: 0x00007DA6 File Offset: 0x00005FA6
1588 [ConsoleCommand("")]
1589 public static string Cheat()
1590 {
1591 EClass.game.config.cheat = true;
1592 return "Cheat Enabled";
1593 }
1594
1595 // Token: 0x060000A8 RID: 168 RVA: 0x00007DC0 File Offset: 0x00005FC0
1596 [ConsoleCommand("")]
1597 public static string Fix_RemoveDuplicateUnique()
1598 {
1599 if (EClass.Branch == null)
1600 {
1601 return "No Branch";
1602 }
1603 EClass.Branch.members.ForeachReverse(delegate(Chara c)
1604 {
1605 if ((c.id == "kettle" || c.id == "quru") && (from c2 in EClass.Branch.members
1606 where c2.id == c.id
1607 select c2).Count<Chara>() >= 2)
1608 {
1609 EClass.Branch.RemoveMemeber(c);
1610 c.Destroy();
1611 }
1612 });
1613 return "Fixed!";
1614 }
1615
1616 // Token: 0x060000A9 RID: 169 RVA: 0x00007E10 File Offset: 0x00006010
1617 [ConsoleCommand("")]
1618 public static string Fix_EtherDisease()
1619 {
1620 EClass.pc.ModCorruption(-100000);
1621 Chara chara = CharaGen.Create("chara", -1);
1622 chara.ChangeRace(EClass.pc.race.id);
1623 chara.ChangeJob(EClass.pc.job.id);
1624 string text = "";
1625 foreach (Element element in chara.elements.dict.Values)
1626 {
1627 if (!(element.source.category != "attribute"))
1628 {
1629 Element orCreateElement = EClass.pc.elements.GetOrCreateElement(element.id);
1630 if (element.vBase > orCreateElement.vBase)
1631 {
1632 text = string.Concat(new string[]
1633 {
1634 text,
1635 "Fixing Base Value:",
1636 orCreateElement.Name,
1637 " Before:",
1638 orCreateElement.vBase.ToString(),
1639 " Now:",
1640 (element.vBase + 1).ToString(),
1641 Environment.NewLine
1642 });
1643 EClass.pc.elements.ModBase(orCreateElement.id, element.vBase - orCreateElement.vBase + 1);
1644 }
1645 }
1646 }
1647 return text + "Fixed!";
1648 }
1649
1650 // Token: 0x060000AA RID: 170 RVA: 0x00007F84 File Offset: 0x00006184
1651 [ConsoleCommand("")]
1652 public static string ListChara()
1653 {
1654 string text = "";
1655 foreach (SourceChara.Row row in EClass.sources.charas.rows)
1656 {
1657 text = text + row.id + "\n";
1658 }
1659 return text;
1660 }
1661
1662 // Token: 0x060000AB RID: 171 RVA: 0x00007FF4 File Offset: 0x000061F4
1663 [ConsoleCommand("")]
1664 public static string ListThing()
1665 {
1666 string text = "";
1667 foreach (SourceThing.Row row in EClass.sources.things.rows)
1668 {
1669 text = text + row.id + "\n";
1670 }
1671 return text;
1672 }
1673
1674 // Token: 0x060000AC RID: 172 RVA: 0x00008064 File Offset: 0x00006264
1675 [ConsoleCommand("")]
1676 public static string SetElement(string alias, int value, int potential = 100)
1677 {
1678 if (!CoreDebug.CheatEnabled())
1679 {
1680 return CoreDebug.EnableCheat;
1681 }
1682 SourceElement.Row row = EClass.sources.elements.alias.TryGetValue(alias, null);
1683 if (row == null)
1684 {
1685 return "Element not found.";
1686 }
1687 EClass.pc.elements.SetBase(row.id, value, potential);
1688 return "Done.";
1689 }
1690
1691 // Token: 0x060000AD RID: 173 RVA: 0x000080BC File Offset: 0x000062BC
1692 [ConsoleCommand("")]
1693 public static string Spawn(string id, int num = 1)
1694 {
1695 if (!CoreDebug.CheatEnabled())
1696 {
1697 return CoreDebug.EnableCheat;
1698 }
1699 if (EClass.sources.things.map.ContainsKey(id))
1700 {
1701 Thing thing = ThingGen.Create(id, -1, -1).SetNum(num);
1702 EClass._zone.AddCard(thing, EClass.pc.pos);
1703 return "Spawned " + thing.Name;
1704 }
1705 if (EClass.sources.charas.map.ContainsKey(id))
1706 {
1707 Chara chara = CharaGen.Create(id, -1);
1708 EClass._zone.AddCard(chara, EClass.pc.pos);
1709 return "Spawned " + chara.Name;
1710 }
1711 return "'" + id + "' does not exist in the database.";
1712 }
1713
1714 // Token: 0x060000AE RID: 174 RVA: 0x0000817C File Offset: 0x0000637C
1715 [ConsoleCommand("")]
1716 public static string TestSpawn(int lv, int num)
1717 {
1718 if (!CoreDebug.CheatEnabled())
1719 {
1720 return CoreDebug.EnableCheat;
1721 }
1722 foreach (Chara chara in (from c in EClass._map.charas
1723 where c.HasEditorTag(EditorTag.SpawnTest)
1724 select c).ToList<Chara>())
1725 {
1726 chara.Destroy();
1727 }
1728 for (int i = 0; i < num; i++)
1729 {
1730 EClass._zone.SpawnMob(EClass.pc.pos.GetNearestPoint(false, false, false, true), new SpawnSetting
1731 {
1732 filterLv = lv
1733 }).AddEditorTag(EditorTag.SpawnTest);
1734 }
1735 return "Spawned.";
1736 }
1737
1738 // Token: 0x060000AF RID: 175 RVA: 0x0000824C File Offset: 0x0000644C
1739 [ConsoleCommand("")]
1740 public static string ResetPetUpgrades()
1741 {
1742 foreach (Chara chara in EClass.game.cards.globalCharas.Values)
1743 {
1744 if (chara.IsPCFaction)
1745 {
1746 chara.ResetUpgrade();
1747 }
1748 }
1749 return "Not Implemented.";
1750 }
1751
1752 // Token: 0x060000B0 RID: 176 RVA: 0x000082BC File Offset: 0x000064BC
1753 [ConsoleCommand("")]
1754 public static string GodMode()
1755 {
1756 if (!CoreDebug.CheatEnabled())
1757 {
1758 return CoreDebug.EnableCheat;
1759 }
1760 EClass.pc.Revive(null, false);
1761 EClass.pc.hp = EClass.pc.MaxHP;
1762 return "I'm God!";
1763 }
1764
1765 // Token: 0x060000B1 RID: 177 RVA: 0x000082F0 File Offset: 0x000064F0
1766 [ConsoleCommand("")]
1767 public static string ModFame(int amount)
1768 {
1769 if (!CoreDebug.CheatEnabled())
1770 {
1771 return CoreDebug.EnableCheat;
1772 }
1773 EClass.player.ModFame(amount);
1774 return "Done.";
1775 }
1776
1777 // Token: 0x060000B2 RID: 178 RVA: 0x0000830F File Offset: 0x0000650F
1778 [ConsoleCommand("")]
1779 public static string ModKarma(int amount)
1780 {
1781 if (!CoreDebug.CheatEnabled())
1782 {
1783 return CoreDebug.EnableCheat;
1784 }
1785 EClass.player.ModKarma(amount);
1786 return "Done.";
1787 }
1788
1789 // Token: 0x060000B3 RID: 179 RVA: 0x00008330 File Offset: 0x00006530
1790 [ConsoleCommand("")]
1791 public static string ModContribution(int amount)
1792 {
1793 if (!CoreDebug.CheatEnabled())
1794 {
1795 return CoreDebug.EnableCheat;
1796 }
1797 Guild currentGuild = Guild.GetCurrentGuild();
1798 if (currentGuild != null)
1799 {
1800 currentGuild.AddContribution(amount);
1801 }
1802 return "Done.";
1803 }
1804
1805 // Token: 0x060000B4 RID: 180 RVA: 0x0000835F File Offset: 0x0000655F
1806 [ConsoleCommand("")]
1807 public static string FlyMode()
1808 {
1809 EClass.pc.AddCondition<ConLevitate>(100, false);
1810 return "I can fly!";
1811 }
1812
1813 // Token: 0x060000B5 RID: 181 RVA: 0x00008374 File Offset: 0x00006574
1814 [ConsoleCommand("")]
1815 public static string ChangeRace(string id = "?")
1816 {
1817 if (EClass.sources.races.map.ContainsKey(id))
1818 {
1819 Thing thing = null;
1820 foreach (BodySlot bodySlot in EClass.pc.body.slots)
1821 {
1822 if (bodySlot.thing != null)
1823 {
1824 if (bodySlot.thing.blessedState <= BlessedState.Cursed)
1825 {
1826 bodySlot.thing.blessedState = BlessedState.Normal;
1827 }
1828 if (bodySlot.thing.trait is TraitToolBelt)
1829 {
1830 thing = bodySlot.thing;
1831 }
1832 EClass.pc.body.Unequip(bodySlot, true);
1833 }
1834 }
1835 EClass.pc.body.RemoveBodyPart(45);
1836 EClass.pc.body.RemoveBodyPart(44);
1837 EClass.pc.ChangeRace(id);
1838 if (EClass.ui.IsInventoryOpen)
1839 {
1840 EClass.ui.ToggleInventory(false);
1841 }
1842 EClass.pc.body.AddBodyPart(45, null);
1843 EClass.pc.body.AddBodyPart(44, null);
1844 EClass.pc.body.Equip(thing, null, true);
1845 return "Done.";
1846 }
1847 string text = "";
1848 foreach (SourceRace.Row row in EClass.sources.races.rows)
1849 {
1850 text = string.Concat(new string[]
1851 {
1852 text,
1853 row.id,
1854 " ",
1855 row.GetName(),
1856 Environment.NewLine
1857 });
1858 }
1859 return text;
1860 }
1861
1862 // Token: 0x060000B6 RID: 182 RVA: 0x00008534 File Offset: 0x00006734
1863 [ConsoleCommand("")]
1864 public static string ChangeJob(string id = "?")
1865 {
1866 if (EClass.sources.jobs.map.ContainsKey(id))
1867 {
1868 EClass.pc.ChangeJob(id);
1869 EClass.player.RefreshDomain();
1870 return "Done.";
1871 }
1872 string text = "";
1873 foreach (SourceJob.Row row in EClass.sources.jobs.rows)
1874 {
1875 text = string.Concat(new string[]
1876 {
1877 text,
1878 row.id,
1879 " ",
1880 row.GetName(),
1881 Environment.NewLine
1882 });
1883 }
1884 return text;
1885 }
1886
1887 // Token: 0x060000B7 RID: 183 RVA: 0x000085F4 File Offset: 0x000067F4
1888 [ConsoleCommand("")]
1889 public static string FirstAdventurer()
1890 {
1891 string text = "Steam is not running.";
1892 if (SteamAPI.IsSteamRunning())
1893 {
1894 DateTime dateTime = new DateTime(2024, 11, 2, 18, 0, 0);
1895 DateTimeOffset left = DateTimeOffset.FromUnixTimeSeconds((long)((ulong)SteamApps.GetEarliestPurchaseUnixTime(EClass.core.steam.steamworks.settings.applicationId)));
1896 left.ToOffset(new TimeSpan(9, 0, 0));
1897 Debug.Log(string.Concat(new string[]
1898 {
1899 dateTime.Year.ToString(),
1900 "/",
1901 dateTime.Month.ToString(),
1902 "/",
1903 dateTime.Day.ToString(),
1904 "/",
1905 dateTime.Hour.ToString()
1906 }));
1907 text = ((left > dateTime) ? "" : "");
1908 text = string.Concat(new string[]
1909 {
1910 text,
1911 "Arrived North Tyris on ",
1912 left.Year.ToString(),
1913 " ",
1914 left.Month.ToString(),
1915 "/",
1916 left.Day.ToString(),
1917 " ",
1918 left.Hour.ToString(),
1919 ":",
1920 left.Minute.ToString()
1921 });
1922 text = string.Concat(new string[]
1923 {
1924 text,
1925 " Eligible by ",
1926 dateTime.Year.ToString(),
1927 " ",
1928 dateTime.Month.ToString(),
1929 "/",
1930 dateTime.Day.ToString(),
1931 " ",
1932 dateTime.Hour.ToString(),
1933 ":",
1934 dateTime.Minute.ToString()
1935 });
1936 }
1937 return text;
1938 }
1939
1940 // Token: 0x060000B8 RID: 184 RVA: 0x00008810 File Offset: 0x00006A10
1941 [ConsoleCommand("")]
1942 public static string AllRecipe(bool forget = false)
1943 {
1944 if (!CoreDebug.CheatEnabled())
1945 {
1946 return CoreDebug.EnableCheat;
1947 }
1948 if (forget)
1949 {
1950 EClass.player.recipes.knownRecipes.Clear();
1951 }
1952 else
1953 {
1954 EClass.debug.AddAllRecipes();
1955 }
1956 return "Done!";
1957 }
1958
1959 // Token: 0x060000B9 RID: 185 RVA: 0x00008848 File Offset: 0x00006A48
1960 [ConsoleCommand("")]
1961 public static string LastWish(string name)
1962 {
1963 string text = "";
1964 foreach (SourceBacker.Row row in EClass.sources.backers.rows)
1965 {
1966 if (row.name.Contains(name) || row.id.ToString() == name)
1967 {
1968 text = string.Concat(new string[]
1969 {
1970 text,
1971 row.name,
1972 " valid?:",
1973 row.valid.ToString(),
1974 " lang:",
1975 row.lang,
1976 " type:",
1977 row.type.ToString(),
1978 " destroyed:",
1979 EClass.player.doneBackers.Contains(row.id).ToString(),
1980 " loc:",
1981 row.loc.IsEmpty() ? "random" : row.loc,
1982 Environment.NewLine
1983 });
1984 }
1985 }
1986 if (text == "")
1987 {
1988 return "Not Found";
1989 }
1990 text += Resources.Load<TextAsset>("logo2").text;
1991 return text;
1992 }
1993
1994 // Token: 0x060000BA RID: 186 RVA: 0x000089A8 File Offset: 0x00006BA8
1995 [ConsoleCommand("")]
1996 public static string ClearLastWishFlag()
1997 {
1998 if (!CoreDebug.CheatEnabled())
1999 {
2000 return CoreDebug.EnableCheat;
2001 }
2002 EClass.player.doneBackers.Clear();
2003 return Resources.Load<TextAsset>("logo2").text + Environment.NewLine + "Done!";
2004 }
2005
2006 // Token: 0x060000BB RID: 187 RVA: 0x000089E4 File Offset: 0x00006BE4
2007 [ConsoleCommand("")]
2008 public static string Resource()
2009 {
2010 if (!CoreDebug.CheatEnabled())
2011 {
2012 return CoreDebug.EnableCheat;
2013 }
2014 EClass.debug.SpawnCheatContainer();
2015 return "Resources spawned.";
2016 }
2017
2018 // Token: 0x060000BC RID: 188 RVA: 0x00008A02 File Offset: 0x00006C02
2019 public void Log(object o)
2020 {
2021 Debug.Log(o);
2022 }
2023
2024 // Token: 0x060000BD RID: 189 RVA: 0x00008A0A File Offset: 0x00006C0A
2025 public void NextBGM()
2026 {
2027 if (!SoundManager.current)
2028 {
2029 return;
2030 }
2031 SoundManager.current.NextBGM();
2032 }
2033
2034 // Token: 0x060000BE RID: 190 RVA: 0x00008A23 File Offset: 0x00006C23
2035 public void ToggleRevealMap()
2036 {
2037 this.revealMap = !this.revealMap;
2038 if (this.revealMap)
2039 {
2040 EClass._map.RevealAll(true);
2041 }
2042 SE.ClickGeneral();
2043 }
2044
2045 // Token: 0x060000BF RID: 191 RVA: 0x00008A4C File Offset: 0x00006C4C
2046 public void LoadBroadcast()
2047 {
2048 TextAsset textAsset = Resources.Load<TextAsset>("Data/Text/broadcast");
2049 this.blines = textAsset.text.Split('-', StringSplitOptions.None);
2050 }
2051
2052 // Token: 0x060000C0 RID: 192 RVA: 0x00008A78 File Offset: 0x00006C78
2053 public void BroadcastNext()
2054 {
2055 this.LoadBroadcast();
2056 if (Input.GetKey(KeyCode.LeftControl))
2057 {
2058 this.bidx--;
2059 }
2060 this.bidx = Mathf.Clamp(this.bidx, 0, this.blines.Length - 1);
2061 string text = this.blines[this.bidx];
2062 this.bidx += (Input.GetKey(KeyCode.LeftShift) ? -1 : 1);
2063 EClass.pc.SayRaw(text.TrimNewLines(), null, null);
2064 }
2065
2066 // Token: 0x060000C2 RID: 194 RVA: 0x00008B8C File Offset: 0x00006D8C
2067 [CompilerGenerated]
2068 internal static void <QuickStart>g__AddParty|102_0(string id, ref CoreDebug.<>c__DisplayClass102_0 A_1)
2069 {
2070 Chara chara = CharaGen.Create(id, -1);
2071 chara.SetFaction(EClass.Home);
2072 chara.SetHomeZone(A_1.homeZone);
2073 if (chara.currentZone != EClass._zone)
2074 {
2075 EClass._zone.AddCard(chara, EClass.pc.pos.GetNearestPoint(false, false, true, false));
2076 }
2077 EClass.pc.party.AddMemeber(chara);
2078 }
2079
2080 // Token: 0x060000C3 RID: 195 RVA: 0x00008BF4 File Offset: 0x00006DF4
2081 [CompilerGenerated]
2082 internal static Thing <QuickStart>g__AddHotbar|102_1(string id, ref CoreDebug.<>c__DisplayClass102_0 A_1)
2083 {
2084 Thing thing = EClass.pc.AddThing(ThingGen.Create(id, -1, -1), true, -1, -1);
2085 thing.invX = A_1.idx;
2086 thing.invY = 1;
2087 int idx = A_1.idx;
2088 A_1.idx = idx + 1;
2089 return thing;
2090 }
2091
2092 // Token: 0x060000C4 RID: 196 RVA: 0x00008C39 File Offset: 0x00006E39
2093 [CompilerGenerated]
2094 internal static Thing <QuickStart>g__AddAbility|102_2(string id)
2095 {
2096 Thing thing = EClass.pc.AddThing(ThingGen.Create("catalyst", -1, -1), true, -1, -1);
2097 thing.c_idAbility = id;
2098 return thing;
2099 }
2100
2101 // Token: 0x060000C5 RID: 197 RVA: 0x00008C5C File Offset: 0x00006E5C
2102 [CompilerGenerated]
2103 private void <InitDebugCommands>g__Add|113_0(int cat, string id, Action action)
2104 {
2106 {
2107 name = id,
2108 action = action,
2109 cat = cat
2110 };
2111 this.commands.Add(item);
2112 }
2113
2114 // Token: 0x0400003C RID: 60
2115 [Header("Quick Start Setup")]
2116 public CoreDebug.StartScene startScene;
2117
2118 // Token: 0x0400003D RID: 61
2119 public CoreDebug.StartLoadout startLoadout;
2120
2121 // Token: 0x0400003E RID: 62
2122 public CoreDebug.StartParty startParty;
2123
2124 // Token: 0x0400003F RID: 63
2125 public int startHour;
2126
2127 // Token: 0x04000040 RID: 64
2128 public CoreDebug.StartSetting startSetting;
2129
2130 // Token: 0x04000041 RID: 65
2131 public string startZone;
2132
2133 // Token: 0x04000042 RID: 66
2134 [Header("System(Release)")]
2135 public bool showSceneSelector;
2136
2137 // Token: 0x04000043 RID: 67
2138 [Header("System(Release)")]
2139 public bool skipModSync;
2140
2141 // Token: 0x04000044 RID: 68
2142 public Lang.LangCode langCode;
2143
2144 // Token: 0x04000045 RID: 69
2145 [Header("System")]
2146 public bool ignorePool;
2147
2148 // Token: 0x04000046 RID: 70
2149 [Header("System")]
2150 public bool resetPlayerConfig;
2151
2152 // Token: 0x04000047 RID: 71
2153 public bool dontUseThread;
2154
2155 // Token: 0x04000048 RID: 72
2156 public bool useNewConfig;
2157
2158 // Token: 0x04000049 RID: 73
2159 public bool ignoreAutoSave;
2160
2161 // Token: 0x0400004A RID: 74
2162 public bool alwaysResetWindow;
2163
2164 // Token: 0x0400004B RID: 75
2165 public bool validateData;
2166
2167 // Token: 0x0400004C RID: 76
2168 public bool dontCompressSave;
2169
2170 // Token: 0x0400004D RID: 77
2171 public bool skipMod;
2172
2173 // Token: 0x0400004E RID: 78
2174 public string command;
2175
2176 // Token: 0x0400004F RID: 79
2177 [Header("Input")]
2178 public bool debugInput;
2179
2180 // Token: 0x04000050 RID: 80
2181 public bool keypadDebug;
2182
2183 // Token: 0x04000051 RID: 81
2184 public CoreDebug.DebugHotkey debugHotkeys;
2185
2186 // Token: 0x04000052 RID: 82
2187 [Header("Util")]
2188 public int advanceMin;
2189
2190 // Token: 0x04000053 RID: 83
2191 public bool testLOS;
2192
2193 // Token: 0x04000054 RID: 84
2194 public bool testLOS2;
2195
2196 // Token: 0x04000055 RID: 85
2197 public bool debugProps;
2198
2199 // Token: 0x04000056 RID: 86
2200 public bool revealMap;
2201
2202 // Token: 0x04000057 RID: 87
2203 public bool debugHoard;
2204
2205 // Token: 0x04000058 RID: 88
2206 public bool revealInner;
2207
2208 // Token: 0x04000059 RID: 89
2209 public bool ignorePopup;
2210
2211 // Token: 0x0400005A RID: 90
2212 public bool skipEvent;
2213
2214 // Token: 0x0400005B RID: 91
2215 public bool skipNerun;
2216
2217 // Token: 0x0400005C RID: 92
2218 public bool showTone;
2219
2220 // Token: 0x0400005D RID: 93
2221 public bool showExtra;
2222
2223 // Token: 0x0400005E RID: 94
2224 public bool test;
2225
2226 // Token: 0x0400005F RID: 95
2227 [Header("Game")]
2228 public bool godMode;
2229
2230 // Token: 0x04000060 RID: 96
2231 public bool randomResource;
2232
2233 // Token: 0x04000061 RID: 97
2234 public bool debugScatter;
2235
2236 // Token: 0x04000062 RID: 98
2237 public bool _godBuild;
2238
2239 // Token: 0x04000063 RID: 99
2240 public bool godCraft;
2241
2242 // Token: 0x04000064 RID: 100
2243 public bool godFood;
2244
2245 // Token: 0x04000065 RID: 101
2246 public bool ignoreBuildRule;
2247
2248 // Token: 0x04000066 RID: 102
2249 public bool ignoreWeight;
2250
2251 // Token: 0x04000067 RID: 103
2252 public bool autoIdentify;
2253
2254 // Token: 0x04000068 RID: 104
2255 public bool allAbility;
2256
2257 // Token: 0x04000069 RID: 105
2258 public bool allSkill;
2259
2260 // Token: 0x0400006A RID: 106
2261 public bool allHomeSkill;
2262
2263 // Token: 0x0400006B RID: 107
2264 public bool allArt;
2265
2266 // Token: 0x0400006C RID: 108
2267 public bool allBGM;
2268
2269 // Token: 0x0400006D RID: 109
2270 public bool ignoreEncounter;
2271
2272 // Token: 0x0400006E RID: 110
2273 public bool returnAnywhere;
2274
2275 // Token: 0x0400006F RID: 111
2276 public bool instaReturn;
2277
2278 // Token: 0x04000070 RID: 112
2279 public bool travelAnywhere;
2280
2281 // Token: 0x04000071 RID: 113
2282 public bool hidePCItemsInBuild;
2283
2284 // Token: 0x04000072 RID: 114
2285 public bool autoAdvanceQuest;
2286
2287 // Token: 0x04000073 RID: 115
2288 public bool enableMapPieceEditor;
2289
2290 // Token: 0x04000074 RID: 116
2291 public bool testThingQuality;
2292
2293 // Token: 0x04000075 RID: 117
2294 public int numResource;
2295
2296 // Token: 0x04000076 RID: 118
2297 [Header("Game(Specific)")]
2298 public bool unlimitedInterest;
2299
2300 // Token: 0x04000077 RID: 119
2301 public bool inviteAnytime;
2302
2303 // Token: 0x04000078 RID: 120
2304 public bool marryAnytime;
2305
2306 // Token: 0x04000079 RID: 121
2307 public bool showFav;
2308
2309 // Token: 0x0400007A RID: 122
2310 public bool alwaysFavFood;
2311
2312 // Token: 0x0400007B RID: 123
2313 public bool maxQuests;
2314
2315 // Token: 0x0400007C RID: 124
2316 [Header("Progress")]
2317 public bool allRecipe;
2318
2319 // Token: 0x0400007D RID: 125
2320 public bool allMenu;
2321
2322 // Token: 0x0400007E RID: 126
2323 public bool allPolicy;
2324
2325 // Token: 0x0400007F RID: 127
2326 public bool allStory;
2327
2328 // Token: 0x04000080 RID: 128
2329 public bool skipInitialQuest;
2330
2331 // Token: 0x04000081 RID: 129
2332 [Header("Log")]
2333 public bool logAdv;
2334
2335 // Token: 0x04000082 RID: 130
2336 [Header("Log")]
2337 public bool logCombat;
2338
2339 // Token: 0x04000083 RID: 131
2340 public bool logDice;
2341
2342 // Token: 0x04000084 RID: 132
2343 [Header("Once")]
2344 public bool validatePref;
2345
2346 // Token: 0x04000085 RID: 133
2347 [Header("Test")]
2348 public int param1;
2349
2350 // Token: 0x04000086 RID: 134
2351 [Header("Test")]
2352 public int param2;
2353
2354 // Token: 0x04000087 RID: 135
2355 public CoreDebug.MatColorTest matColorTest;
2356
2357 // Token: 0x04000088 RID: 136
2358 public bool boradcast;
2359
2360 // Token: 0x04000089 RID: 137
2361 public bool testFixedColor;
2362
2363 // Token: 0x0400008A RID: 138
2364 public Color32 fixedColor;
2365
2366 // Token: 0x0400008B RID: 139
2367 private readonly List<int[]> resolutions = new List<int[]>
2368 {
2369 new int[]
2370 {
2371 1920,
2372 1080
2373 },
2374 new int[]
2375 {
2376 1366,
2377 768
2378 },
2379 new int[]
2380 {
2381 1280,
2382 720
2383 }
2384 };
2385
2386 // Token: 0x0400008C RID: 140
2387 private Card animeDest;
2388
2389 // Token: 0x0400008D RID: 141
2390 [NonSerialized]
2391 private int bidx;
2392
2393 // Token: 0x0400008E RID: 142
2394 private bool bilinear;
2395
2396 // Token: 0x0400008F RID: 143
2397 [NonSerialized]
2398 private string[] blines;
2399
2400 // Token: 0x04000090 RID: 144
2401 public List<CoreDebug.DebugCommand> commands = new List<CoreDebug.DebugCommand>();
2402
2403 // Token: 0x04000091 RID: 145
2404 [NonSerialized]
2405 public bool enable;
2406
2407 // Token: 0x04000092 RID: 146
2408 public Fov fov = new Fov();
2409
2410 // Token: 0x04000093 RID: 147
2411 private int indexResolution;
2412
2413 // Token: 0x04000094 RID: 148
2414 private AnimeID lastAnime;
2415
2416 // Token: 0x04000095 RID: 149
2417 private Emo lastEmo;
2418
2419 // Token: 0x04000096 RID: 150
2420 private bool naked;
2421
2422 // Token: 0x04000097 RID: 151
2423 [NonSerialized]
2424 private bool runtimeGodBuild;
2425
2426 // Token: 0x04000098 RID: 152
2427 private int ttt;
2428
2429 // Token: 0x02000773 RID: 1907
2430 [Serializable]
2431 public class StartSetting
2432 {
2433 // Token: 0x04001E20 RID: 7712
2434 public string race;
2435
2436 // Token: 0x04001E21 RID: 7713
2437 public string job;
2438
2439 // Token: 0x04001E22 RID: 7714
2440 public int lv;
2441 }
2442
2443 // Token: 0x02000774 RID: 1908
2444 public enum DebugHotkey
2445 {
2446 // Token: 0x04001E24 RID: 7716
2447 None,
2448 // Token: 0x04001E25 RID: 7717
2449 Block,
2450 // Token: 0x04001E26 RID: 7718
2451 Item,
2452 // Token: 0x04001E27 RID: 7719
2453 Decal,
2454 // Token: 0x04001E28 RID: 7720
2455 Act,
2456 // Token: 0x04001E29 RID: 7721
2457 Test,
2458 // Token: 0x04001E2A RID: 7722
2459 Anime
2460 }
2461
2462 // Token: 0x02000775 RID: 1909
2463 public enum StartLoadout
2464 {
2465 // Token: 0x04001E2C RID: 7724
2466 New,
2467 // Token: 0x04001E2D RID: 7725
2468 AllItem,
2469 // Token: 0x04001E2E RID: 7726
2470 FewItem
2471 }
2472
2473 // Token: 0x02000776 RID: 1910
2474 public enum StartParty
2475 {
2476 // Token: 0x04001E30 RID: 7728
2477 None,
2478 // Token: 0x04001E31 RID: 7729
2479 Farris,
2480 // Token: 0x04001E32 RID: 7730
2481 Full
2482 }
2483
2484 // Token: 0x02000777 RID: 1911
2485 public enum StartScene
2486 {
2487 // Token: 0x04001E34 RID: 7732
2488 Title,
2489 // Token: 0x04001E35 RID: 7733
2490 Zone,
2491 // Token: 0x04001E36 RID: 7734
2492 Home,
2493 // Token: 0x04001E37 RID: 7735
2494 Home_Cave,
2495 // Token: 0x04001E38 RID: 7736
2496 Story_Test,
2497 // Token: 0x04001E39 RID: 7737
2498 MeetFarris,
2499 // Token: 0x04001E3A RID: 7738
2500 NymelleBoss,
2501 // Token: 0x04001E3B RID: 7739
2502 AfterNymelle,
2503 // Token: 0x04001E3C RID: 7740
2504 Melilith,
2505 // Token: 0x04001E3D RID: 7741
2506 Tefra
2507 }
2508
2509 // Token: 0x02000778 RID: 1912
2510 [Serializable]
2511 public class MatColorTest
2512 {
2513 // Token: 0x060036A6 RID: 13990 RVA: 0x00129228 File Offset: 0x00127428
2514 public void Update()
2515 {
2516 foreach (SourceMaterial.Row row in EClass.sources.materials.rows)
2517 {
2518 if (row != MATERIAL.sourceWaterSea)
2519 {
2520 MatColors matColors = this.profile.matColors.TryGetValue(row.alias, null);
2521 row.matColor = matColors.main;
2522 row.altColor = matColors.alt;
2523 }
2524 }
2525 }
2526
2527 // Token: 0x04001E3E RID: 7742
2528 public bool enable;
2529
2530 // Token: 0x04001E3F RID: 7743
2531 public Color color;
2532
2533 // Token: 0x04001E40 RID: 7744
2534 public int matColor;
2535
2536 // Token: 0x04001E41 RID: 7745
2537 public ColorProfile profile;
2538 }
2539
2540 // Token: 0x02000779 RID: 1913
2541 public class DebugCommand
2542 {
2543 // Token: 0x04001E42 RID: 7746
2544 public Action action;
2545
2546 // Token: 0x04001E43 RID: 7747
2547 public int cat;
2548
2549 // Token: 0x04001E44 RID: 7748
2550 public string name;
2551 }
2552}
Definition Act.2.cs:7
Definition Area.cs:6
Definition Card.cs:13
Definition Cell.cs:10
Definition Chara.cs:12
Definition Fov.cs:7
Definition Game.cs:10
Definition Guild.cs:5
Definition Msg.cs:7
Definition Point.cs:11
Definition Scene.cs:10
Definition Steam.cs:11
Definition Thing.cs:10
Definition Trait.cs:9
Definition Zone.cs:14