Elin Decompiled Documentation EA 23.352.1 Stable
Loading...
Searching...
No Matches
CoreDebug.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using ReflexCLI.Attributes;
5using Steamworks;
6using UnityEngine;
7
8[ConsoleCommandClassCustomizer("")]
9public class CoreDebug : EScriptable
10{
11 [Serializable]
12 public class StartSetting
13 {
14 public string race;
15
16 public string job;
17
18 public int lv;
19 }
20
21 public enum DebugHotkey
22 {
23 None,
24 Block,
25 Item,
26 Decal,
27 Act,
28 Test,
29 Anime
30 }
31
32 public enum StartLoadout
33 {
34 New,
35 AllItem,
37 }
38
39 public enum StartParty
40 {
41 None,
42 Farris,
43 Full
44 }
45
46 public enum StartScene
47 {
48 Title,
50 Zone,
51 Home,
58 Tefra
59 }
60
61 public enum BodyCode
62 {
63 head = 30,
64 neck = 31,
65 torso = 32,
66 back = 33,
67 waist = 37,
68 arm = 34,
69 hand = 35,
70 finger = 36,
71 leg = 38,
72 foot = 39,
73 lightsource = 45,
74 relic = 46
75 }
76
77 [Serializable]
78 public class MatColorTest
79 {
80 public bool enable;
81
82 public Color color;
83
84 public int matColor;
85
87
88 public void Update()
89 {
90 foreach (SourceMaterial.Row row in EClass.sources.materials.rows)
91 {
92 if (row != MATERIAL.sourceWaterSea)
93 {
94 MatColors matColors = profile.matColors.TryGetValue(row.alias);
95 row.matColor = matColors.main;
96 row.altColor = matColors.alt;
97 }
98 }
99 }
100 }
101
102 public class DebugCommand
103 {
104 public Action action;
105
106 public int cat;
107
108 public string name;
109 }
110
111 [Header("Quick Start Setup")]
113
115
117
118 public int startHour;
119
121
122 public string startZone;
123
124 [Header("System(Release)")]
125 public bool showSceneSelector;
126
127 [Header("System(Release)")]
128 public bool skipModSync;
129
131
132 [Header("System")]
133 public bool ignorePool;
134
135 [Header("System")]
136 public bool resetPlayerConfig;
137
138 public bool dontUseThread;
139
140 public bool useNewConfig;
141
142 public bool ignoreAutoSave;
143
144 public bool alwaysResetWindow;
145
146 public bool validateData;
147
148 public bool dontCompressSave;
149
150 public bool skipMod;
151
152 public string command;
153
154 [Header("Input")]
155 public bool debugInput;
156
157 public bool keypadDebug;
158
160
161 [Header("Util")]
162 public int advanceMin;
163
164 public bool testLOS;
165
166 public bool testLOS2;
167
168 public bool debugProps;
169
170 public bool revealMap;
171
172 public bool debugHoard;
173
174 public bool revealInner;
175
176 public bool ignorePopup;
177
178 public bool skipEvent;
179
180 public bool skipNerun;
181
182 public bool showTone;
183
184 public bool showExtra;
185
186 public bool test;
187
188 [Header("Game")]
189 public bool godMode;
190
191 public bool randomResource;
192
193 public bool debugScatter;
194
195 public bool _godBuild;
196
197 public bool godCraft;
198
199 public bool godFood;
200
201 public bool ignoreBuildRule;
202
203 public bool ignoreWeight;
204
205 public bool autoIdentify;
206
207 public bool allAbility;
208
209 public bool allSkill;
210
211 public bool allHomeSkill;
212
213 public bool allArt;
214
215 public bool allBGM;
216
217 public bool ignoreEncounter;
218
219 public bool returnAnywhere;
220
221 public bool instaReturn;
222
223 public bool travelAnywhere;
224
226
227 public bool autoAdvanceQuest;
228
230
231 public bool testThingQuality;
232
233 public int numResource;
234
235 [Header("Game(Specific)")]
236 public bool unlimitedInterest;
237
238 public bool inviteAnytime;
239
240 public bool marryAnytime;
241
242 public bool showFav;
243
244 public bool alwaysFavFood;
245
246 public bool maxQuests;
247
248 [Header("Progress")]
249 public bool allRecipe;
250
251 public bool allMenu;
252
253 public bool allPolicy;
254
255 public bool allStory;
256
257 [Header("Log")]
258 public bool logAdv;
259
260 [Header("Log")]
261 public bool logCombat;
262
263 public bool logDice;
264
265 [Header("Once")]
266 public bool validatePref;
267
268 [Header("Test")]
269 public int param1;
270
271 [Header("Test")]
272 public int param2;
273
275
276 public bool boradcast;
277
278 public bool testFixedColor;
279
280 public Color32 fixedColor;
281
282 private readonly List<int[]> resolutions = new List<int[]>
283 {
284 new int[2] { 1920, 1080 },
285 new int[2] { 1366, 768 },
286 new int[2] { 1280, 720 }
287 };
288
290
291 [NonSerialized]
292 private int bidx;
293
294 private bool bilinear;
295
296 [NonSerialized]
297 private string[] blines;
298
299 public List<DebugCommand> commands = new List<DebugCommand>();
300
301 [NonSerialized]
302 public bool enable;
303
304 public Fov fov = new Fov();
305
306 private int indexResolution;
307
309
310 private Emo lastEmo;
311
312 private bool naked;
313
314 [NonSerialized]
315 private bool runtimeGodBuild;
316
317 private int ttt;
318
319 public bool godBuild
320 {
321 get
322 {
323 if (!_godBuild)
324 {
325 return runtimeGodBuild;
326 }
327 return true;
328 }
329 }
330
331 public static string EnableCheat => "Enable cheat by typing 'Cheat'";
332
333 private IEnumerable<string> ZoneIDs()
334 {
335 List<SourceZone.Row> rows = EClass.sources.zones.rows;
336 List<string> list = new List<string>();
337 foreach (SourceZone.Row item in rows)
338 {
339 list.Add(item.id);
340 }
341 return list;
342 }
343
344 public void Init()
345 {
347 EInput.disableKeyAxis = Application.isEditor;
348 }
349
350 public void QuickStart()
351 {
352 Game.Create("quick");
353 Tutorial.debugSkip = EClass.debug.skipNerun;
354 if (!startSetting.race.IsEmpty())
355 {
357 }
358 if (!startSetting.job.IsEmpty())
359 {
362 }
363 switch (startScene)
364 {
365 case StartScene.Zone:
366 case StartScene.Home:
367 EClass.game.world.date.hour = EClass.debug.startHour;
368 break;
369 case StartScene.Survival:
370 EClass.game.idPrologue = 3;
371 break;
372 case StartScene.Home_Cave:
373 EClass.game.idPrologue = 2;
374 break;
375 }
378 EClass.player.pref.lastIdTabAbility = 3;
380 switch (startParty)
381 {
382 case StartParty.Farris:
383 AddParty("farris");
384 break;
385 case StartParty.Full:
386 AddParty("farris");
387 AddParty("wescott");
388 break;
389 }
390 int lv = startSetting.lv;
391 if (allAbility)
392 {
393 foreach (SourceElement.Row row in EClass.sources.elements.rows)
394 {
395 if (row.category == "ability" && row.aliasRef != "mold" && !EClass.pc.HasElement(row.id))
396 {
397 if (!row.aliasRef.IsEmpty() && row.id > 10000)
398 {
399 _ = EClass.sources.elements.alias[row.aliasRef];
400 }
401 EClass.pc.elements.ModBase(row.id, lv).vPotential = 30;
402 }
403 }
404 }
405 if (allSkill)
406 {
407 foreach (SourceElement.Row row2 in EClass.sources.elements.rows)
408 {
409 if (row2.isSkill && !row2.tag.Contains("unused"))
410 {
411 EClass.pc.elements.ModBase(row2.id, 1);
412 }
413 }
414 }
415 EClass.pc.elements.ModBase(60, lv / 2);
416 EClass.pc.elements.ModBase(61, lv / 2);
417 EClass.pc.elements.ModBase(79, lv / 5);
418 EClass.player.totalFeat = lv;
419 EClass.pc.feat = 50;
420 EClass.pc.SetLv(lv - 1);
421 EClass.player.fame = EClass.pc.LV * 100;
422 int idx = 0;
423 switch (startLoadout)
424 {
425 case StartLoadout.AllItem:
426 EClass.pc.ModCurrency(50, "plat");
427 EClass.pc.ModCurrency(50, "money2");
428 EClass.pc.EQ_CAT("weapon");
429 EClass.pc.EQ_CAT((EScriptable.rnd(2) == 0) ? "weapon" : "shield");
430 EClass.pc.EQ_CAT("torso");
431 EClass.pc.EQ_CAT("arm");
432 EClass.pc.EQ_CAT("ring");
433 EClass.pc.AddCard(ThingGen.Create("chest2"));
434 EClass.pc.AddCard(ThingGen.Create("torch_held"));
435 AddHotbar("axe");
436 AddHotbar("pickaxe");
437 AddHotbar("wateringCan");
438 AddHotbar("bow");
439 AddHotbar("deed");
440 AddAbility("SpellTeleport");
441 AddAbility("SpellCatsEye");
442 AddHotbar("map_big");
443 break;
444 case StartLoadout.FewItem:
445 {
446 if (startScene == StartScene.Survival)
447 {
448 AddHotbar("pickaxe").ChangeMaterial(0);
449 break;
450 }
454 EClass.player.ModKeyItem("license_adv");
455 Thing thing = ThingGen.Create("backpack");
456 thing.AddCard(ThingGen.Create("rp_food", -1, 10).SetNum(30));
457 thing.AddCard(ThingGen.Create("rp_block", -1, 10).SetNum(30));
458 for (int i = 0; i < 30; i++)
459 {
460 thing.AddCard(ThingGen.Create("rp_block", -1, 50));
461 }
462 EClass.pc.AddCard(thing);
463 thing = ThingGen.Create("pouch");
464 for (int j = 0; j < 30; j++)
465 {
467 Thing thing2 = ThingGen.CreateFromCategory("weapon", 214748364);
468 thing2.elements.SetBase(653, 1);
469 if (!(thing2.trait is TraitAmmo))
470 {
471 thing.AddCard(thing2);
472 }
474 thing2 = ThingGen.CreateFromCategory("armor", 214748364);
475 thing2.elements.SetBase(653, 1);
476 thing.AddCard(thing2);
477 }
478 EClass.pc.AddCard(thing);
479 thing = ThingGen.Create("pouch");
480 for (int k = 0; k < 5; k++)
481 {
482 Thing thing3 = ThingGen.Create("scrubber");
483 thing3.elements.SetBase(770, k * 10 + 1);
484 thing.AddCard(thing3);
485 }
486 for (int l = 0; l < 30; l++)
487 {
488 thing.AddCard(ThingGen.Create("mathammer", MATERIAL.GetRandomMaterial(100).alias)).SetNum(10);
489 }
490 thing.AddCard(ThingGen.Create("mathammer", 103)).SetNum(10);
491 thing.AddCard(ThingGen.Create("mathammer", 102)).SetNum(10);
492 thing.AddCard(ThingGen.Create("mathammer", 33)).SetNum(10);
493 thing.AddCard(ThingGen.Create("mathammer", 18)).SetNum(10);
494 thing.AddCard(ThingGen.Create("mathammer", 10)).SetNum(99);
495 thing.AddCard(ThingGen.Create("mathammer", 31)).SetNum(10);
496 thing.AddCard(ThingGen.Create("mathammer", 28)).SetNum(99);
497 EClass.pc.AddCard(thing);
498 thing = ThingGen.Create("pouch");
499 for (int m = 0; m < 30; m++)
500 {
502 }
503 EClass.pc.AddCard(thing);
504 thing = ThingGen.Create("coolerbox");
505 for (int n = 0; n < 20; n++)
506 {
507 thing.AddCard(ThingGen.CreateFromCategory("foodstuff").SetNum(EScriptable.rnd(10) + 1));
508 }
509 EClass.pc.AddCard(thing);
510 List<SourceChara.Row> list = EClass.sources.charas.map.Values.Where((SourceChara.Row a) => a._idRenderData == "chara").ToList();
511 thing = ThingGen.Create("pouch");
512 list = EClass.sources.charas.map.Values.Where((SourceChara.Row a) => a._idRenderData == "chara_L").ToList();
513 for (int num = 0; num < 20; num++)
514 {
515 string id = list.RandomItem().id;
516 Thing thing4 = ThingGen.Create("figure");
517 thing4.MakeFigureFrom(id);
518 thing.AddCard(thing4);
519 }
520 EClass.pc.AddCard(thing);
521 thing = ThingGen.Create("pouch");
522 list = EClass.sources.charas.map.Values.Where((SourceChara.Row a) => a._idRenderData == "chara").ToList();
523 for (int num2 = 0; num2 < 20; num2++)
524 {
525 string id2 = list.RandomItem().id;
526 Thing thing5 = ThingGen.Create("figure3");
527 thing5.MakeFigureFrom(id2);
528 thing.AddCard(thing5);
529 }
530 EClass.pc.AddCard(thing);
531 thing.Dye("oak");
532 thing = ThingGen.Create("pouch");
533 list = EClass.sources.charas.map.Values.Where((SourceChara.Row a) => a._idRenderData == "chara_L").ToList();
534 for (int num3 = 0; num3 < 20; num3++)
535 {
536 string id3 = list.RandomItem().id;
537 Thing thing6 = ThingGen.Create("figure3");
538 thing6.MakeFigureFrom(id3);
539 thing.AddCard(thing6);
540 }
541 EClass.pc.AddCard(thing);
542 thing.Dye("pine");
543 thing = ThingGen.Create("pouch");
544 thing.AddCard(ThingGen.Create("flour").SetNum(10));
545 thing.AddCard(ThingGen.Create("wheat").SetNum(200));
546 thing.AddCard(ThingGen.Create("rice_plant").SetNum(200));
547 thing.AddCard(ThingGen.Create("noodle").SetNum(10));
548 thing.AddCard(ThingGen.Create("rice").SetNum(10));
549 thing.AddCard(ThingGen.Create("dough_cake").SetNum(10));
550 thing.AddCard(ThingGen.Create("dough_bread").SetNum(10));
551 thing.AddCard(ThingGen.Create("salt").SetNum(10));
552 thing.AddCard(ThingGen.Create("sugar").SetNum(10));
553 thing.AddCard(ThingGen.Create("honey").SetNum(10));
554 thing.AddCard(ThingGen.Create("yeast").SetNum(10));
555 thing.AddCard(ThingGen.Create("ketchup").SetNum(10));
556 thing.AddCard(ThingGen.Create("butter").SetNum(10));
557 thing.AddCard(ThingGen.Create("potion_empty").SetNum(10));
558 thing.AddCard(ThingGen.Create("bucket_empty").SetNum(10));
559 thing.AddCard(ThingGen.Create("battery"));
560 EClass.pc.AddCard(thing);
561 thing.Dye("saphire");
562 thing = ThingGen.Create("pouch");
563 thing.AddCard(ThingGen.Create("log").SetNum(99));
564 thing.AddCard(ThingGen.Create("log").SetNum(99).ChangeMaterial("pine"));
565 thing.AddCard(ThingGen.Create("ore").SetNum(99).ChangeMaterial("steel"));
566 thing.AddCard(ThingGen.Create("ore").SetNum(99).ChangeMaterial("copper"));
567 thing.AddCard(ThingGen.Create("ore_gem").SetNum(99).ChangeMaterial("gold"));
568 thing.AddCard(ThingGen.Create("gem").SetNum(99).ChangeMaterial("rubinus"));
569 thing.AddCard(ThingGen.Create("flower_white").SetNum(99));
570 thing.AddCard(ThingGen.Create("bait").SetNum(10));
571 EClass.pc.AddCard(thing);
572 thing.Dye("rubinus");
573 Thing thing7 = ThingGen.Create("quiver");
574 thing7.AddCard(ThingGen.Create("bullet").SetNum(250));
575 thing7.AddCard(ThingGen.Create("arrow").SetNum(250));
576 thing7.AddCard(ThingGen.Create("bolt").SetNum(250));
577 thing7.AddCard(ThingGen.Create("bullet_energy").SetNum(250));
579 thing = ThingGen.Create("backpack");
580 for (int num4 = 0; num4 < 10; num4++)
581 {
582 thing.AddThing("book", lv);
583 thing.AddThing("parchment");
584 thing.AddThing("book_ancient");
585 thing.AddCard(ThingGen.CreateRedBook("fox_dawn"));
586 thing.AddCard(ThingGen.CreateRedBook("forgotten_gods_1"));
587 }
588 EClass.pc.AddCard(thing);
589 thing.Dye("rubinus");
590 thing = ThingGen.Create("backpack");
591 foreach (SourceObj.Row row3 in EClass.sources.objs.rows)
592 {
593 if (row3.tag.Contains("seed"))
594 {
595 Thing c = TraitSeed.MakeSeed(row3).SetNum(10);
596 thing.AddCard(c);
597 }
598 }
599 EClass.pc.AddCard(thing);
600 thing.Dye("silver");
601 thing = ThingGen.Create("pouch");
602 for (int num5 = 0; num5 < 30; num5++)
603 {
604 thing.AddThing((EScriptable.rnd(10) != 0) ? "potion" : "drink", lv).SetNum(99);
605 }
606 EClass.pc.AddCard(thing);
607 thing.Dye("steel");
608 thing = ThingGen.Create("pouch");
609 for (int num6 = 0; num6 < 30; num6++)
610 {
611 thing.AddThing(ThingGen.CreateFromCategory("rod", lv));
612 }
613 EClass.pc.AddCard(thing);
614 thing.Dye("steel");
615 thing = ThingGen.Create("pouch");
616 for (int num7 = 0; num7 < 30; num7++)
617 {
618 thing.AddThing("scroll", lv).SetNum(99);
619 }
620 EClass.pc.AddCard(thing);
621 thing.Dye("steel");
622 thing = ThingGen.Create("pouch");
623 for (int num8 = 0; num8 < 40; num8++)
624 {
625 thing.AddThing("372", 100);
626 }
627 EClass.pc.AddCard(thing);
628 thing.Dye("steel");
629 Thing thing8 = EClass.pc.things.Find("purse");
630 thing8.AddThing("casino_coin").SetNum(30000000);
631 thing8.AddThing("medal").SetNum(1000);
632 thing8.ModCurrency(500, "plat");
633 EClass.pc.AddThing("record");
634 EClass.pc.AddThing("deed").SetNum(5);
635 EClass.pc.AddThing("book_story");
636 EClass.pc.AddThing("book_story_home");
637 EClass.pc.AddThing("book_tutorial");
638 EClass.pc.AddThing("water").SetNum(20).SetBlessedState(BlessedState.Blessed);
640 EClass.pc.AddThing("potion_empty").SetNum(20);
645 EClass.pc.ModCurrency(10000000);
648 Thing thing9 = ThingGen.Create("scroll_random").SetNum(10);
649 thing9.refVal = 8220;
650 EClass.pc.AddCard(thing9);
651 EClass.pc.ModCurrency(50, "money2");
652 AddHotbar("hoe");
653 AddHotbar("shovel");
654 AddHotbar("axe");
655 AddHotbar("pickaxe");
656 AddHotbar("wateringCan");
657 AddHotbar("gun_assault");
658 AddHotbar("hammer");
659 AddHotbar("bow");
660 break;
661 }
662 }
663 EClass.pc.RestockEquip(onCreate: true);
664 EClass.pc.stamina.value = EClass.pc.stamina.max;
665 EClass.pc.mana.value = EClass.pc.mana.max;
666 EClass.pc.hp = EClass.pc.MaxHP;
667 if (EClass.debug.startScene == StartScene.Zone)
668 {
669 EClass._zone.ClaimZone(debug: true);
670 }
671 SoundManager.ignoreSounds = true;
672 EClass.ui.ToggleInventory();
673 SoundManager.ignoreSounds = true;
674 EClass.ui.ToggleAbility();
675 SoundManager.ignoreSounds = false;
676 EClass.ui.layerFloat.GetLayer<LayerAbility>().windows[0].SetRect(EClass.core.refs.rects.abilityDebug);
677 if (allRecipe)
678 {
680 }
681 foreach (Thing thing11 in EClass.pc.things)
682 {
683 thing11.isNew = false;
684 }
687 if (startScene == StartScene.Story_Test)
688 {
689 EClass._zone.ClaimZone(debug: true);
690 EClass.Branch.AddMemeber(EClass._zone.AddCard(CharaGen.Create("loytel"), EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false)) as Chara);
691 EClass.Branch.AddMemeber(EClass._zone.AddCard(CharaGen.Create("farris"), EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false)) as Chara);
692 EClass.Branch.AddMemeber(EClass._zone.AddCard(CharaGen.Create("kettle"), EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false)) as Chara);
693 EClass.Branch.AddMemeber(EClass._zone.AddCard(CharaGen.Create("quru"), EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false)) as Chara);
694 EClass.Branch.AddMemeber(EClass._zone.AddCard(CharaGen.Create("corgon"), EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false)) as Chara);
695 EClass.Branch.AddMemeber(EClass._zone.AddCard(CharaGen.Create("demitas"), EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false)) as Chara);
696 EClass.game.quests.Add("greatDebt");
697 EClass.game.quests.Add("farris_tulip");
698 EClass.game.quests.Add("kettle_join");
699 EClass.game.quests.Add("quru_morning");
700 EClass.game.quests.Add("vernis_gold");
701 EClass.game.quests.Add("quru_sing");
702 EClass.game.quests.Add("quru_past1");
703 EClass.game.quests.Add("quru_past2");
704 EClass.game.quests.Add("pre_debt");
705 EClass.game.quests.Add("exile_meet");
706 EClass.game.quests.Add("exile_quru");
707 EClass.game.quests.Add("exile_kettle");
708 EClass.game.quests.Add("exile_whisper");
709 EClass.game.quests.Add("exile_voice");
710 EClass.game.quests.Add("into_darkness");
711 EClass.game.quests.Add("demitas_spellwriter");
712 EClass.game.quests.Add("negotiation_darkness");
713 EClass.game.quests.Start("into_darkness", EClass.game.cards.globalCharas.Find("kettle"));
715 EClass.player.ModKeyItem("potion_sorin", 1, msg: false);
716 EClass.player.ModKeyItem("potion_farris", 1, msg: false);
717 }
718 static Thing AddAbility(string c_idAbility)
719 {
720 Thing thing10 = EClass.pc.AddThing(ThingGen.Create("catalyst"));
721 thing10.c_idAbility = c_idAbility;
722 return thing10;
723 }
724 Thing AddHotbar(string id4)
725 {
726 Thing thing10 = EClass.pc.AddThing(ThingGen.Create(id4));
727 thing10.invX = idx;
728 thing10.invY = 1;
729 idx++;
730 return thing10;
731 }
732 void AddParty(string id4)
733 {
734 Chara chara = CharaGen.Create(id4);
735 chara.SetFaction(EClass.Home);
736 chara.SetHomeZone(homeZone);
737 if (chara.currentZone != EClass._zone)
738 {
739 EClass._zone.AddCard(chara, EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false));
740 }
741 EClass.pc.party.AddMemeber(chara);
742 }
743 }
744
745 public void OnLoad()
746 {
747 if (allRecipe)
748 {
750 }
751 }
752
753 public void AddAllRecipes()
754 {
756 {
757 if (!EClass.player.recipes.knownRecipes.ContainsKey(item.id))
758 {
760 }
761 }
762 }
763
764 public void SetStartStockpile(Thing container, int num = 100)
765 {
766 LittlePopper.skipPop = true;
767 foreach (SourceMaterial.Row row in EClass.sources.materials.rows)
768 {
769 if (!(row.alias == "void") && (!randomResource || EScriptable.rnd(4) == 0))
770 {
771 row.CreateByProduct(container, num);
772 }
773 }
774 foreach (SourceThing.Row row2 in EClass.sources.things.rows)
775 {
776 if ((row2.factory.IsEmpty() || !(row2.factory[0] == "x")) && !row2.isOrigin && row2.Category.tag.Contains("debug"))
777 {
778 Thing thing = ThingGen.Create(row2.id);
779 if (thing.trait.CanStack)
780 {
781 thing.ModNum(num);
782 }
783 container.AddThing(thing);
784 }
785 }
786 for (int i = 0; i < 10; i++)
787 {
788 container.AddThing(TraitSeed.MakeRandomSeed());
789 }
790 LittlePopper.skipPop = false;
791 }
792
794 {
795 foreach (Thing thing2 in EClass._map.things)
796 {
797 if (thing2.c_altName == "DebugContainer")
798 {
799 return thing2;
800 }
801 }
802 Thing thing = EClass._zone.AddThing("barrel", EClass.pc.pos).Thing;
803 thing.ChangeMaterial("obsidian");
804 thing.c_altName = "DebugContainer";
805 thing.isNPCProperty = false;
806 thing.SetPlaceState(PlaceState.installed);
807 return thing;
808 }
809
811 {
812 foreach (Thing thing in EClass._map.things)
813 {
814 if (thing.c_altName == "DebugContainer")
815 {
816 return thing;
817 }
818 }
819 return null;
820 }
821
823 {
826 enable = true;
827 if ((bool)WidgetHotbar.HotbarBuild)
828 {
830 }
832 Thing orCreateDebugContainer = GetOrCreateDebugContainer();
833 SetStartStockpile(orCreateDebugContainer, numResource);
834 }
835
837 {
838 }
839
840 public void UpdateAlways()
841 {
842 if (!EClass.debug.enable || (bool)EClass.ui.GetLayer<LayerConsole>())
843 {
844 return;
845 }
846 if (Input.GetKeyDown(KeyCode.B))
847 {
849 }
850 if (Input.GetKeyDown(KeyCode.P))
851 {
853 }
854 if (Input.GetKeyDown(KeyCode.F11))
855 {
856 if (Application.isEditor)
857 {
858 EClass.core.SetLang((Lang.langCode == "EN") ? "JP" : "EN");
859 }
860 else
861 {
863 }
864 NewsList.dict = null;
865 BookList.dict = null;
866 BottleMessageList.list = null;
867 }
869 {
870 if (Input.GetKeyDown(KeyCode.U))
871 {
873 Msg.SayRaw(offset.ToString() ?? "");
874 EClass.screen.tileMap.rendererInnerBlock.offset = Vector3.zero;
875 }
876 if (Input.GetKeyDown(KeyCode.I))
877 {
879 Msg.SayRaw(offset.ToString() ?? "");
880 EClass.screen.tileMap.rendererInnerBlock.offset = new Vector3(0f, 0.54f, -0.5f);
881 }
882 }
883 }
884
885 public void ValidateData()
886 {
888 {
892 }
893 }
894
895 public void UpdateInput()
896 {
897 if (!debugInput || EInput.isInputFieldActive || (bool)EClass.ui.GetLayer<LayerConsole>())
898 {
899 return;
900 }
901 bool key = Input.GetKey(KeyCode.LeftShift);
902 bool key2 = Input.GetKey(KeyCode.LeftAlt);
903 bool key3 = Input.GetKey(KeyCode.LeftControl);
904 TraitStairs traitStairs = null;
905 if (Input.GetKeyDown(KeyCode.KeypadPlus) || (EInput.isShiftDown && Input.GetKeyDown(KeyCode.Period)))
906 {
908 if (traitStairsLocked != null && EClass._zone.CanUnlockExit)
909 {
910 traitStairsLocked.OnUse(EClass.pc);
911 }
912 }
913 if (Input.GetKeyDown(KeyCode.KeypadPlus) || (EInput.isShiftDown && Input.GetKeyDown(KeyCode.Period)))
914 {
915 traitStairs = EClass._map.FindThing<TraitStairsDown>();
916 }
917 if (Input.GetKeyDown(KeyCode.KeypadMinus) || (EInput.isShiftDown && Input.GetKeyDown(KeyCode.Comma)))
918 {
919 traitStairs = EClass._map.FindThing<TraitStairsUp>();
920 }
921 traitStairs?.MoveZone();
922 if (EInput.action == EAction.ShowGrid)
923 {
924 EClass.ui.Find("_Guide").ToggleActive();
925 }
926 if (Input.GetKey(KeyCode.N))
927 {
928 if (key)
929 {
930 SoundManager.current.sourceBGM.pitch = 10f;
931 }
932 if (key3)
933 {
934 SoundManager.current.sourceBGM.time = SoundManager.current.currentBGM.length - 10f;
935 }
936 }
937 else if (Input.GetKeyUp(KeyCode.N))
938 {
939 SoundManager.current.sourceBGM.pitch = 1f;
940 }
942 {
943 string text = "festival";
944 if (Input.GetKeyDown(KeyCode.F1))
945 {
946 EClass.ui.AddLayer<LayerDebug>();
947 }
948 if (Input.GetKeyDown(KeyCode.F2))
949 {
950 Zone.forceRegenerate = true;
952 EClass.scene.Init(Scene.Mode.Zone);
954 SE.MoveZone();
955 }
956 if (Input.GetKeyDown(KeyCode.F4))
957 {
958 if (!MapSubset.Exist(text))
959 {
960 SE.Beep();
961 return;
962 }
963 Zone.forceRegenerate = true;
964 Zone.forceSubset = text;
966 EClass.scene.Init(Scene.Mode.Zone);
968 SE.MoveZone();
969 EClass.ui.Say("Loaded Subset");
970 }
971 if (Input.GetKeyDown(KeyCode.F5))
972 {
973 MapSubset.Save(text);
974 SE.WriteJournal();
975 EClass.ui.Say("Exported Subset");
976 }
977 return;
978 }
979 if (Input.GetKeyDown(KeyCode.F1))
980 {
981 EClass.ui.AddLayer<LayerDebug>();
982 Debug.Log(EClass._zone);
983 Debug.Log(EClass._zone.id + "/" + EClass._zone.parent);
985 }
986 if (Input.GetKeyDown(KeyCode.F2))
987 {
988 EClass._zone.development += 10;
989 EClass._zone.development *= EClass._zone.development;
991 if (targetChara != null)
992 {
993 EClass.pc.Pick(targetChara.MakeGene(DNA.Type.Superior));
994 }
995 if (EClass.game.quests.Get<QuestDebt>() == null)
996 {
997 Chara chara = CharaGen.Create("loytel");
999 chara.SetGlobal();
1000 Quest q = EClass.game.quests.Add("debt", "loytel");
1002 EClass.pc.party.RemoveMember(chara);
1003 Hostility hostility = (chara.c_originalHostility = Hostility.Ally);
1004 chara.hostility = hostility;
1005 }
1006 return;
1007 }
1008 if (Input.GetKeyDown(KeyCode.F3))
1009 {
1010 for (int i = 0; i < 10; i++)
1011 {
1012 Thing thing = ThingGen.Create("egg_fertilized");
1013 thing.TryMakeRandomItem(40);
1014 thing.SetEncLv(200);
1015 EClass.pc.Pick(thing);
1016 }
1017 foreach (Chara deadChara in EClass._map.deadCharas)
1018 {
1019 Debug.Log(deadChara);
1020 }
1023 Msg.Say("loytelmart:" + EClass.player.flags.loytelMartLv);
1024 Guild.Fighter.relation.rank = 20;
1025 Guild.Mage.relation.rank = 20;
1026 Guild.Thief.relation.rank = 20;
1027 Guild.Merchant.relation.rank = 20;
1028 if (EClass.Branch != null)
1029 {
1031 }
1032 foreach (Chara item in EClass._map.charas.ToList())
1033 {
1034 item.AddExp(item.ExpToNext);
1035 item.Vomit();
1036 }
1037 EClass.pc.PlayEffect("boost");
1038 EClass.pc.PlaySound("boost");
1039 EClass.pc.elements.SetBase(306, 100);
1040 EClass.pc.elements.SetBase(85, 100);
1041 EClass.pc.feat += 10;
1042 EClass.player.totalFeat += 10;
1043 return;
1044 }
1045 if (Input.GetKeyDown(KeyCode.F4))
1046 {
1047 string text2 = new string[4] { "エターナルフォースブリザード", "Eternal Force Blizzard", "ぬるぽ", "Null Pointer" }.RandomItem();
1048 EClass.pc.renderer.Say("| " + text2 + " ");
1049 return;
1050 }
1051 if (Input.GetKeyDown(KeyCode.F5))
1052 {
1053 string text3 = (Input.GetKey(KeyCode.LeftControl) ? "quick3" : (Input.GetKey(KeyCode.LeftShift) ? "quick2" : "quick"));
1054 if (text3 != Game.id)
1055 {
1056 IO.DeleteDirectory(CorePath.RootSave + text3);
1057 IO.CopyAll(CorePath.RootSave + Game.id, CorePath.RootSave + text3);
1058 Game.id = text3;
1059 }
1060 EClass.game.isCloud = false;
1061 EClass.game.Save();
1062 }
1063 if (Input.GetKeyDown(KeyCode.F6))
1064 {
1066 {
1067 string id = (Input.GetKey(KeyCode.LeftControl) ? "quick3" : (Input.GetKey(KeyCode.LeftShift) ? "quick2" : "quick"));
1068 EClass.scene.Init(Scene.Mode.None);
1069 Game.Load(id, cloud: false);
1070 });
1071 }
1072 if (Input.GetKeyDown(KeyCode.F7))
1073 {
1074 EClass.pc.PlayEffect("punishment");
1075 EClass.pc.elements.ModBase(79, key ? (-10) : 10);
1076 }
1077 if (Input.GetKeyDown(KeyCode.F8))
1078 {
1079 SE.Click();
1081 runtimeGodBuild = true;
1084 }
1085 if (key3)
1086 {
1087 if (Input.GetKeyDown(KeyCode.F9))
1088 {
1090 if (indexResolution >= resolutions.Count)
1091 {
1092 indexResolution = 0;
1093 }
1094 int[] array = resolutions[indexResolution];
1095 int width = array[0];
1096 int height = array[1];
1097 Screen.SetResolution(width, height, key);
1098 WidgetFeed.Instance?.Nerun(width + "/" + height);
1099 }
1100 if (Input.GetKeyDown(KeyCode.F10))
1101 {
1102 int width2 = Screen.width;
1103 int height2 = width2 / 16 * 9;
1104 Screen.SetResolution(width2, height2, key);
1105 WidgetFeed.Instance?.Nerun(width2 + "/" + height2);
1106 }
1107 }
1108 else
1109 {
1110 if (Input.GetKeyDown(KeyCode.F9))
1111 {
1112 for (int num = 0; num < 8; num++)
1113 {
1115 }
1116 }
1117 if (Input.GetKey(KeyCode.F9))
1118 {
1119 EClass.scene.paused = false;
1120 for (int num2 = 0; num2 < advanceMin; num2++)
1121 {
1123 }
1125 }
1126 if (Input.GetKeyDown(KeyCode.F10))
1127 {
1128 switch (EScriptable.rnd(5))
1129 {
1130 case 0:
1132 break;
1133 case 1:
1135 break;
1136 case 2:
1138 break;
1139 default:
1141 break;
1142 }
1143 }
1144 }
1145 if (Input.GetKeyDown(KeyCode.N) && !EInput.isShiftDown && !EInput.isCtrlDown)
1146 {
1147 EClass.Sound.NextBGM();
1148 }
1149 if (Input.GetKeyDown(KeyCode.Tab))
1150 {
1151 if (key)
1152 {
1153 EClass.ui.AddLayer<LayerConsole>();
1154 }
1155 else
1156 {
1157 EClass.ui.widgets.Toggle("Debug");
1158 }
1159 }
1160 Point hitPoint = Scene.HitPoint;
1161 if (!hitPoint.IsValid || EClass.ui.IsActive)
1162 {
1163 return;
1164 }
1165 if (hitPoint.detail != null)
1166 {
1167 _ = hitPoint.area;
1168 }
1169 if (hitPoint.detail?.things == null)
1170 {
1171 new List<Thing>();
1172 }
1173 if (hitPoint.detail?.charas == null)
1174 {
1175 new List<Chara>();
1176 }
1177 List<Card> list = hitPoint.ListCards();
1178 if (Input.GetMouseButtonDown(2))
1179 {
1180 if (EClass.core.releaseMode != ReleaseMode.Public)
1181 {
1182 if (key)
1183 {
1184 EClass._zone.SpawnMob(hitPoint);
1185 }
1186 else if (key3)
1187 {
1188 EClass._zone.SpawnMob(hitPoint);
1189 }
1190 else if (key2)
1191 {
1192 EClass._zone.SpawnMob(hitPoint);
1193 }
1194 }
1195 return;
1196 }
1197 if (key2)
1198 {
1199 if (Input.GetMouseButtonDown(0))
1200 {
1201 foreach (Card item2 in list)
1202 {
1203 Debug.Log(item2.Name + "/" + item2.dir + "/" + item2.flipX + "/" + item2.angle);
1204 }
1205 }
1206 if (Input.GetMouseButtonDown(1))
1207 {
1208 if (key)
1209 {
1210 EClass._map.charas.ForeachReverse(delegate(Chara c)
1211 {
1212 if (c.IsHostile(EClass.pc))
1213 {
1214 c.DamageHP(999999999L, AttackSource.Finish, EClass.pc);
1215 }
1216 });
1217 }
1218 else if (hitPoint.detail != null)
1219 {
1220 for (int num3 = hitPoint.detail.charas.Count - 1; num3 >= 0; num3--)
1221 {
1222 hitPoint.detail.charas[num3].DamageHP(999999999L, AttackSource.Finish, EClass.pc);
1223 }
1224 }
1225 EInput.Consume();
1226 }
1227 }
1228 if (Input.GetKeyDown(KeyCode.Delete))
1229 {
1230 if (Input.GetKey(KeyCode.RightControl))
1231 {
1232 return;
1233 }
1234 if (key)
1235 {
1236 foreach (Card item3 in EClass._map.Roaming.all)
1237 {
1238 EClass._zone.RemoveCard(item3);
1239 }
1240 }
1241 else if (hitPoint.detail != null)
1242 {
1243 for (int num4 = hitPoint.detail.things.Count - 1; num4 >= 0; num4--)
1244 {
1245 hitPoint.detail.things[num4].Destroy();
1246 }
1247 if (hitPoint.detail != null)
1248 {
1249 for (int num5 = hitPoint.detail.charas.Count - 1; num5 >= 0; num5--)
1250 {
1251 hitPoint.detail.charas[num5].Destroy();
1252 }
1253 }
1254 }
1255 }
1256 if (Input.GetKeyDown(KeyCode.End) && hitPoint.detail != null)
1257 {
1258 for (int num6 = hitPoint.detail.things.Count - 1; num6 >= 0; num6--)
1259 {
1260 Thing thing2 = hitPoint.detail.things[num6];
1261 Debug.Log(thing2.id + "/" + thing2.Pref.height + "/" + thing2.trait?.ToString() + "/" + thing2.source.tileType.CanStack + "/" + thing2.source.tileType?.ToString() + "/" + thing2.isSynced + "/" + RenderObject.syncList.Contains(thing2.renderer));
1262 }
1263 }
1264 if (!Application.isEditor)
1265 {
1266 return;
1267 }
1268 switch (debugHotkeys)
1269 {
1270 case DebugHotkey.Anime:
1271 {
1272 int num7 = -1;
1273 if (Input.GetKeyDown(KeyCode.Alpha0))
1274 {
1275 num7 = 0;
1276 }
1277 if (Input.GetKeyDown(KeyCode.Alpha1))
1278 {
1279 num7 = 1;
1280 }
1281 if (Input.GetKeyDown(KeyCode.Alpha2))
1282 {
1283 num7 = 2;
1284 }
1285 if (Input.GetKeyDown(KeyCode.Alpha3))
1286 {
1287 num7 = 3;
1288 }
1289 if (Input.GetKeyDown(KeyCode.Alpha4))
1290 {
1291 num7 = 4;
1292 }
1293 if (Input.GetKeyDown(KeyCode.Alpha5))
1294 {
1295 num7 = 5;
1296 }
1297 if (Input.GetKeyDown(KeyCode.Alpha6))
1298 {
1299 num7 = 6;
1300 }
1301 if (Input.GetKeyDown(KeyCode.Alpha7))
1302 {
1303 num7 = 7;
1304 }
1305 if (Input.GetKeyDown(KeyCode.Alpha8))
1306 {
1307 num7 = 8;
1308 }
1309 if (Input.GetKeyDown(KeyCode.Alpha9))
1310 {
1311 num7 = 9;
1312 }
1313 if (num7 == -1)
1314 {
1315 break;
1316 }
1317 foreach (Card item4 in hitPoint.ListCards())
1318 {
1319 item4.renderer.PlayAnime(num7.ToEnum<AnimeID>());
1320 }
1321 Debug.Log(num7.ToEnum<AnimeID>());
1322 break;
1323 }
1324 case DebugHotkey.Block:
1325 if (Input.GetKeyDown(KeyCode.Alpha1))
1326 {
1327 EClass._map.SetLiquid(hitPoint.x, hitPoint.z, 1, 9);
1328 }
1329 if (Input.GetKeyDown(KeyCode.Alpha2))
1330 {
1331 EClass._map.SetLiquid(hitPoint.x, hitPoint.z, 2, 9);
1332 }
1333 break;
1334 case DebugHotkey.Item:
1335 if (Input.GetKeyDown(KeyCode.Alpha1))
1336 {
1337 Thing thing3 = ThingGen.Create("stairsDown_cave");
1338 EClass._zone.AddCard(thing3, EClass.pc.pos);
1339 thing3.SetPlaceState(PlaceState.installed);
1340 }
1341 if (Input.GetKeyDown(KeyCode.Alpha2))
1342 {
1343 Thing thing4 = ThingGen.Create("stairs");
1344 EClass._zone.AddCard(thing4, EClass.pc.pos);
1345 thing4.SetPlaceState(PlaceState.installed);
1346 }
1347 if (Input.GetKeyDown(KeyCode.Alpha3))
1348 {
1349 Thing thing5 = ThingGen.Create("sign");
1350 EClass._zone.AddCard(thing5, hitPoint);
1351 thing5.SetPlaceState(PlaceState.installed);
1352 }
1353 if (Input.GetKeyDown(KeyCode.Alpha4))
1354 {
1355 Thing thing6 = ThingGen.Create("sign2");
1356 EClass._zone.AddCard(thing6, hitPoint);
1357 thing6.SetPlaceState(PlaceState.installed);
1358 }
1359 if (Input.GetKeyDown(KeyCode.Alpha5))
1360 {
1361 Thing thing7 = ThingGen.Create("well");
1362 EClass._zone.AddCard(thing7, hitPoint);
1363 thing7.SetPlaceState(PlaceState.installed);
1364 }
1365 if (Input.GetKeyDown(KeyCode.Alpha6))
1366 {
1367 Thing thing8 = ThingGen.Create("altar");
1368 EClass._zone.AddCard(thing8, hitPoint);
1369 thing8.SetPlaceState(PlaceState.installed);
1370 }
1371 if (Input.GetKeyDown(KeyCode.Alpha7))
1372 {
1373 Thing t = ThingGen.Create("torch");
1374 EClass._zone.AddCard(t, hitPoint);
1375 }
1376 if (Input.GetKeyDown(KeyCode.Alpha8))
1377 {
1378 Thing t2 = ThingGen.Create("street_lamp");
1379 EClass._zone.AddCard(t2, hitPoint);
1380 }
1381 if (Input.GetKeyDown(KeyCode.Alpha9))
1382 {
1383 Thing t3 = ThingGen.Create("statue_elin");
1384 EClass._zone.AddCard(t3, hitPoint);
1385 }
1386 if (Input.GetKeyDown(KeyCode.Alpha0))
1387 {
1388 Thing t4 = ThingGen.TestCreate();
1389 EClass._zone.AddCard(t4, hitPoint);
1390 }
1391 if (key && Input.GetKeyDown(KeyCode.Alpha1))
1392 {
1393 Chara t5 = CharaGen.Create("korgon");
1394 EClass._zone.AddCard(t5, hitPoint);
1395 }
1396 break;
1397 case DebugHotkey.Decal:
1398 if (Input.GetKeyDown(KeyCode.Alpha1))
1399 {
1400 EClass._map.AddDecal(hitPoint.x, hitPoint.z, EClass.pc.material.decal);
1401 }
1402 if (!Input.GetKeyDown(KeyCode.Alpha2))
1403 {
1404 }
1405 break;
1406 case DebugHotkey.Test:
1407 if (Input.GetKeyDown(KeyCode.Alpha1))
1408 {
1409 QualitySettings.vSyncCount = 0;
1410 Application.targetFrameRate = 60;
1411 }
1412 if (Input.GetKeyDown(KeyCode.Alpha2))
1413 {
1414 QualitySettings.vSyncCount = 0;
1415 Application.targetFrameRate = 20;
1416 }
1417 if (Input.GetKeyDown(KeyCode.Alpha3))
1418 {
1419 QualitySettings.vSyncCount = 0;
1420 Application.targetFrameRate = 30;
1421 }
1422 if (Input.GetKeyDown(KeyCode.Alpha4))
1423 {
1424 QualitySettings.vSyncCount = 0;
1425 Application.targetFrameRate = 40;
1426 }
1427 break;
1428 }
1429 Card card = (Card)(((object)hitPoint.FirstChara) ?? ((object)hitPoint.FirstThing));
1430 if (card == null)
1431 {
1432 return;
1433 }
1434 CharaActorPCC charaActorPCC = (card.renderer.actor as CharaActor) as CharaActorPCC;
1435 if ((bool)charaActorPCC)
1436 {
1437 if (Input.GetKeyDown(KeyCode.Keypad0))
1438 {
1439 charaActorPCC.NextFrame();
1440 charaActorPCC.RefreshSprite();
1441 }
1442 if (Input.GetKeyDown(KeyCode.Keypad1))
1443 {
1444 charaActorPCC.NextDir();
1445 card.angle = charaActorPCC.provider.angle;
1446 charaActorPCC.RefreshSprite();
1447 }
1448 if (Input.GetKeyDown(KeyCode.Keypad2))
1449 {
1450 charaActorPCC.pcc.data.Randomize();
1451 charaActorPCC.provider.Rebuild();
1452 }
1453 }
1454 if (Input.GetKeyDown(KeyCode.Keypad4))
1455 {
1456 lastEmo = lastEmo.NextEnum();
1457 card.ShowEmo();
1458 card.ShowEmo(lastEmo);
1459 }
1460 if (Input.GetKeyDown(KeyCode.Keypad5))
1461 {
1462 card.ShowEmo();
1463 card.ShowEmo(lastEmo);
1464 }
1465 if (Input.GetKeyDown(KeyCode.Keypad7))
1466 {
1467 lastAnime = lastAnime.NextEnum();
1468 card.renderer.PlayAnime(lastAnime);
1469 }
1470 if (Input.GetKeyDown(KeyCode.Keypad8))
1471 {
1472 card.renderer.PlayAnime(lastAnime);
1473 animeDest = card;
1474 }
1475 if (Input.GetKeyDown(KeyCode.Keypad9))
1476 {
1477 card.renderer.PlayAnime(AnimeID.Attack, animeDest);
1478 }
1479 }
1480
1481 public void InitDebugCommands()
1482 {
1483 commands.Clear();
1484 int cat = 0;
1485 Add(cat, "Save Widgets", delegate
1486 {
1487 EClass.ui.widgets.Save();
1488 });
1489 Add(cat, "Save Widgets(Dialog)", delegate
1490 {
1491 EClass.ui.widgets.DialogSave();
1492 });
1493 Add(cat, "Export Zone", delegate
1494 {
1496 });
1497 Add(cat, "Export Zone(Dialog)", delegate
1498 {
1500 });
1501 Add(0, "Import Zone(Dialog)", delegate
1502 {
1504 });
1505 Add(cat, "Validate Backer Contents", delegate
1506 {
1507 foreach (SourceBacker.Row row2 in EClass.sources.backers.rows)
1508 {
1509 if (row2.valid)
1510 {
1511 switch (row2.type)
1512 {
1513 case 1:
1514 if (!EClass.sources.things.map.ContainsKey(row2.loot))
1515 {
1516 Debug.Log(row2.id + "/remain/" + row2.Name + "/" + row2.loot);
1517 }
1518 break;
1519 case 4:
1520 if (!EClass.sources.charas.map.ContainsKey(row2.chara))
1521 {
1522 Debug.Log(row2.id + "/pet/" + row2.Name + "/" + row2.chara);
1523 }
1524 break;
1525 case 6:
1526 if (!EClass.sources.religions.map.ContainsKey(row2.deity.ToLowerInvariant()))
1527 {
1528 Debug.Log(row2.id + "/" + row2.Name + "/follower/" + row2.deity);
1529 }
1530 break;
1531 }
1532 }
1533 }
1534 });
1535 Add(cat, "Edit PCC", delegate
1536 {
1537 EClass.ui.AddLayer<LayerEditPCC>("LayerPCC/LayerEditPCC").Activate(EClass.pc, UIPCC.Mode.Full);
1538 });
1539 Add(cat, "COM_Teleport", COM_Teleport);
1540 Add(cat, "LOG_Spatials", LOG_Spatials);
1541 Add(cat, "Play Start Drama", COM_PlayStartDrama);
1542 Add(cat, "Fix Floating Items", delegate
1543 {
1544 foreach (Thing thing in EClass._map.things)
1545 {
1546 if (thing.Pref.Float)
1547 {
1548 thing.isFloating = true;
1549 }
1550 }
1551 });
1552 cat = 1;
1553 Add(cat, "Add Conditions", delegate
1554 {
1555 if (EScriptable.rnd(2) == 0)
1556 {
1557 EClass.pc.AddCondition<ConWet>();
1558 }
1559 else
1560 {
1561 EClass.pc.AddCondition<ConSuffocation>();
1562 }
1563 if (EScriptable.rnd(2) == 0)
1564 {
1565 EClass.pc.AddCondition<ConPoison>();
1566 }
1567 else
1568 {
1569 EClass.pc.AddCondition<ConDisease>();
1570 }
1571 });
1572 cat = 2;
1573 Add(cat, "Max Construction", COM_MaxConstruction);
1574 Add(cat, "Add Reserves", delegate
1575 {
1576 EClass.Home.AddReserve(CharaGen.Create("merc_archer"));
1578 EClass.Home.AddReserve(CharaGen.Create("bartender"));
1579 EClass.Home.AddReserve(CharaGen.Create("merchant"));
1583 });
1584 Add(cat, "Add Recruits", delegate
1585 {
1586 if (EClass.Branch != null)
1587 {
1588 EClass.Branch.AddRecruit(CharaGen.Create("merc_archer"));
1589 EClass.Branch.AddRecruit(CharaGen.Create("healer"));
1590 EClass.Branch.AddRecruit(CharaGen.Create("bartender"));
1591 EClass.Branch.AddRecruit(CharaGen.Create("merchant"));
1592 EClass.Branch.AddRecruit(CharaGen.CreateFromFilter("c_wilds"));
1593 EClass.Branch.AddRecruit(CharaGen.CreateFromFilter("c_wilds"));
1594 EClass.Branch.AddRecruit(CharaGen.CreateFromFilter("c_wilds"));
1595 }
1596 });
1597 Add(cat, "Add Resources", delegate
1598 {
1599 if (EClass.Branch != null)
1600 {
1601 EClass.Branch.resources.food.Mod(100);
1602 EClass.Branch.resources.knowledge.Mod(100);
1603 }
1604 });
1605 Add(cat, "Remove Influence", delegate
1606 {
1607 EClass._zone.influence = 0;
1608 });
1609 Add(cat, "Reroll Hobbies", delegate
1610 {
1611 foreach (Chara chara in EClass._map.charas)
1612 {
1613 chara.RerollHobby();
1614 }
1615 });
1616 Add(cat, "Test_Siege", Test_Siege);
1617 Add(cat, "Test_SiegeGuard", Test_SiegeGuard);
1618 Add(cat, "Log_BranchMembers", delegate
1619 {
1621 {
1622 Debug.Log(EClass.Branch.members.Count);
1623 foreach (Chara member in EClass.Branch.members)
1624 {
1625 EClass.debug.Log(member);
1626 }
1627 }
1628 });
1629 cat = 3;
1630 Add(cat, "Weather.Fine", delegate
1631 {
1633 });
1634 Add(cat, "Weather.Blossom", delegate
1635 {
1637 });
1638 Add(cat, "Weather.Random", delegate
1639 {
1641 });
1642 Add(cat, "Weather.Ether+50", delegate
1643 {
1644 EClass.world.ModEther(50);
1646 });
1647 Add(cat, "Season.Next", delegate
1648 {
1650 });
1651 Add(cat, "Unreveal Map", delegate
1652 {
1653 EClass._map.ForeachCell(delegate(Cell c)
1654 {
1655 c.isSeen = false;
1656 });
1658 });
1659 Add(cat, "Test_GodTalk", Test_GodTalk);
1660 Add(cat, "Test_Filter", Test_Filter);
1661 Add(cat, "Test_Grow", Test_Grow);
1662 Add(cat, "Turn On All Lights", delegate
1663 {
1664 foreach (Thing thing2 in EClass._map.things)
1665 {
1666 if (thing2.trait.IsLighting)
1667 {
1668 thing2.trait.Toggle(on: true);
1669 }
1670 }
1671 });
1672 Add(cat, "Reset All Custom Lights", delegate
1673 {
1674 foreach (Thing thing3 in EClass._map.things)
1675 {
1676 thing3.c_lightColor = 0;
1677 thing3.RecalculateFOV();
1678 }
1679 });
1680 Add(cat, "Reset All obj materials", delegate
1681 {
1682 EClass._map.ForeachCell(delegate(Cell c)
1683 {
1684 if (c.HasObj)
1685 {
1686 c.objMat = c.sourceObj.DefaultMaterial.id;
1687 }
1688 });
1689 });
1690 Add(cat, "Reset Certain obj materials", delegate
1691 {
1692 EClass._map.ForeachCell(delegate(Cell c)
1693 {
1694 if (c.HasObj && c.obj == 79)
1695 {
1696 c.objMat = c.sourceObj.DefaultMaterial.id;
1697 }
1698 });
1699 });
1700 Add(cat, "Fix Floors under Blocks", delegate
1701 {
1702 EClass._map.ForeachCell(delegate(Cell c)
1703 {
1704 if (c.HasFullBlock)
1705 {
1706 SourceBlock.Row sourceBlock = c.sourceBlock;
1707 SourceFloor.Row row = EClass.sources.floors.alias[sourceBlock.autoFloor];
1708 EClass._map.SetFloor(c.x, c.z, row.DefaultMaterial.id, row.id);
1709 }
1710 });
1711 });
1712 Add(cat, "Bless Inventory", delegate
1713 {
1714 EClass.pc.things.Foreach(delegate(Thing t)
1715 {
1716 t.SetBlessedState(BlessedState.Blessed);
1717 });
1718 });
1719 Add(cat, "Curse Inventory", delegate
1720 {
1721 EClass.pc.things.Foreach(delegate(Thing t)
1722 {
1723 t.SetBlessedState(BlessedState.Cursed);
1724 });
1725 });
1726 Add(cat, "List Global Charas", delegate
1727 {
1728 foreach (KeyValuePair<int, Chara> globalChara in EClass.game.cards.globalCharas)
1729 {
1730 Debug.Log(globalChara.Key + "/" + globalChara.Value.Name + "/" + ((globalChara.Value.currentZone == null) ? "NULL" : globalChara.Value.currentZone.Name) + "/" + globalChara.Value.faction?.ToString() + "/" + globalChara.Value.homeBranch);
1731 }
1732 });
1733 Add(cat, "List Global Charas In Zone", delegate
1734 {
1735 foreach (KeyValuePair<int, Chara> globalChara2 in EClass.game.cards.globalCharas)
1736 {
1737 if (globalChara2.Value.currentZone == EClass._zone)
1738 {
1739 Debug.Log(globalChara2.Key + "/" + globalChara2.Value);
1740 }
1741 }
1742 });
1743 Add(cat, "List Citizen", delegate
1744 {
1745 foreach (KeyValuePair<int, string> p in EClass._zone.dictCitizen)
1746 {
1747 Debug.Log(p.Value);
1748 Debug.Log(EClass._map.charas.Find((Chara c) => c.uid == p.Key));
1749 Debug.Log(EClass._map.deadCharas.Find((Chara c) => c.uid == p.Key));
1750 }
1751 });
1752 void Add(int cat2, string id, Action action)
1753 {
1754 DebugCommand item = new DebugCommand
1755 {
1756 name = id,
1757 action = action,
1758 cat = cat2
1759 };
1760 commands.Add(item);
1761 }
1762 }
1763
1764 public void Test_Grow()
1765 {
1766 EClass._map.ForeachCell(delegate(Cell c)
1767 {
1768 if (c.sourceObj.HasGrowth)
1769 {
1770 c.TryGrow();
1771 }
1772 });
1773 foreach (Thing item in EClass._map.things.Copy())
1774 {
1775 if (item.trait is TraitSeed traitSeed)
1776 {
1777 traitSeed.TrySprout(force: true);
1778 }
1779 }
1780 }
1781
1782 public void Test_GodTalk()
1783 {
1784 foreach (Religion value in EClass.game.religions.dictAll.Values)
1785 {
1786 value.Talk("test");
1787 }
1788 }
1789
1790 public void COM_Teleport()
1791 {
1792 for (int i = 0; i < 10000; i++)
1793 {
1794 Point point = EClass.pc.pos.Copy();
1795 point.x += EScriptable.rnd(60) - EScriptable.rnd(60);
1796 point.z += EScriptable.rnd(60) - EScriptable.rnd(60);
1797 if (point.IsValid && !point.cell.blocked && point.HasFloor)
1798 {
1799 EClass.pc.Teleport(point);
1800 break;
1801 }
1802 }
1803 }
1804
1806 {
1807 EClass.ui.CloseLayers();
1808 EClass.game.world.date.hour = 2;
1810 LayerDrama.ActivateMain("mono", "1-2");
1811 }
1812
1813 public void Test_Filter()
1814 {
1815 bilinear = !bilinear;
1816 MeshPass[] passes = EClass.scene.passes;
1817 for (int i = 0; i < passes.Length; i++)
1818 {
1819 passes[i].mat.GetTexture("_MainTex").filterMode = (bilinear ? FilterMode.Bilinear : FilterMode.Point);
1820 }
1821 }
1822
1823 public void LOG_Spatials()
1824 {
1825 foreach (Spatial child in EClass.world.region.children)
1826 {
1827 Debug.Log(child.uid + "/" + child.Name + "/" + child.mainFaction.name + "/" + (child == EClass.player.zone));
1828 }
1829 }
1830
1831 public void Test_SiegeGuard()
1832 {
1833 if (EClass._zone.events.GetEvent<ZoneEventSiegeGuard>() == null)
1834 {
1836 }
1837 else
1838 {
1840 }
1841 }
1842
1843 public void Test_Siege()
1844 {
1845 if (EClass._zone.events.GetEvent<ZoneEventSiege>() == null)
1846 {
1848 }
1849 else
1850 {
1852 }
1853 }
1854
1856 {
1857 if (EClass.pc.homeBranch != null)
1858 {
1860 }
1861 }
1862
1863 public static bool CheatEnabled()
1864 {
1865 if (!EClass.debug.enable)
1866 {
1867 return EClass.game.config.cheat;
1868 }
1869 return true;
1870 }
1871
1872 [ConsoleCommand("")]
1873 public static string Cheat()
1874 {
1875 EClass.game.config.cheat = true;
1876 return "Cheat Enabled";
1877 }
1878
1879 [ConsoleCommand("")]
1880 public static string Reset_LoytelDebt()
1881 {
1882 QuestDebt questDebt = EClass.game.quests.Get<QuestDebt>();
1883 if (questDebt == null)
1884 {
1885 return "Quest Status Not Valid.";
1886 }
1887 questDebt.stage = 0;
1888 questDebt.paid = false;
1889 questDebt.gaveBill = false;
1890 EClass.player.debt = 20000000;
1891 Thing thing = ThingGen.Create("856");
1892 thing.refVal = 109;
1893 EClass.pc.Pick(thing);
1894 return "Quest Reset!";
1895 }
1896
1897 [ConsoleCommand("")]
1898 public static string Fix_Awning()
1899 {
1900 foreach (Thing thing in EClass._map.things)
1901 {
1902 if (thing.id == "ash3")
1903 {
1904 thing.id = "awning ";
1905 thing.source = EClass.sources.things.map[thing.id];
1906 thing._CreateRenderer();
1907 }
1908 }
1909 return "Fixed!";
1910 }
1911
1912 [ConsoleCommand("")]
1913 public static string Fix_RemoveDuplicateUnique()
1914 {
1915 if (EClass.Branch == null)
1916 {
1917 return "No Branch";
1918 }
1919 EClass.Branch.members.ForeachReverse(delegate(Chara c)
1920 {
1921 if ((c.id == "kettle" || c.id == "quru") && EClass.Branch.members.Where((Chara chara) => chara.id == c.id).Count() >= 2)
1922 {
1923 EClass.Branch.RemoveMemeber(c);
1924 c.Destroy();
1925 }
1926 });
1927 return "Fixed!";
1928 }
1929
1930 [ConsoleCommand("")]
1931 public static string Fix_EtherDisease()
1932 {
1933 EClass.pc.ModCorruption(-100000);
1934 Chara chara = CharaGen.Create("chara");
1935 chara.ChangeRace(EClass.pc.race.id);
1936 chara.ChangeJob(EClass.pc.job.id);
1937 string text = "";
1938 foreach (Element value in chara.elements.dict.Values)
1939 {
1940 if (!(value.source.category != "attribute"))
1941 {
1942 Element orCreateElement = EClass.pc.elements.GetOrCreateElement(value.id);
1943 if (value.vBase > orCreateElement.vBase)
1944 {
1945 text = text + "Fixing Base Value:" + orCreateElement.Name + " Before:" + orCreateElement.vBase + " Now:" + (value.vBase + 1) + Environment.NewLine;
1946 EClass.pc.elements.ModBase(orCreateElement.id, value.vBase - orCreateElement.vBase + 1);
1947 }
1948 }
1949 }
1950 return text + "Fixed!";
1951 }
1952
1953 [ConsoleCommand("")]
1954 public static string Fix_LostCore()
1955 {
1957 {
1958 return "Not in base.";
1959 }
1960 foreach (Thing thing in EClass._map.things)
1961 {
1962 if (thing.trait is TraitCoreZone)
1963 {
1964 return "Base already has core.";
1965 }
1966 }
1967 if (EClass.pc.things.Find((Thing t) => t.trait is TraitCoreZone) != null)
1968 {
1969 return "Player has core.";
1970 }
1972 return "Done.";
1973 }
1974
1975 [ConsoleCommand("")]
1976 public static string Fix_RemoveDemitas()
1977 {
1978 List<Chara> list = new List<Chara>();
1979 foreach (Chara value in EClass.game.cards.globalCharas.Values)
1980 {
1981 if (value.id == "demitas" && value.currentZone == EClass._zone)
1982 {
1983 list.Add(value);
1984 }
1985 }
1986 if (list.Count > 1)
1987 {
1988 Chara chara = list[1];
1989 chara.RemoveGlobal();
1990 chara.homeBranch.BanishMember(chara);
1991 chara.Destroy();
1992 return "Demitas Removed!";
1993 }
1994 return "Not enough Demitas!";
1995 }
1996
1997 [ConsoleCommand("")]
1998 public static string Fix_RemoveAshland()
1999 {
2000 List<Chara> list = new List<Chara>();
2001 foreach (Chara value in EClass.game.cards.globalCharas.Values)
2002 {
2003 if (value.id == "ashland")
2004 {
2005 list.Add(value);
2006 }
2007 }
2008 if (list.Count > 1)
2009 {
2010 Chara chara = list[1];
2011 chara.RemoveGlobal();
2012 chara.homeBranch.BanishMember(chara);
2013 chara.Destroy();
2014 return "Ashland Removed!";
2015 }
2016 return "Not enough Ashland!";
2017 }
2018
2019 [ConsoleCommand("")]
2020 public static string Fix_RemoveDesignations()
2021 {
2022 EClass._map.ForeachCell(delegate(Cell c)
2023 {
2024 if (c.detail != null && c.detail.designation != null)
2025 {
2026 c.detail.designation.taskList.Remove(c.detail.designation);
2027 }
2028 });
2029 return "Done.";
2030 }
2031
2032 [ConsoleCommand("")]
2033 public static string ListChara()
2034 {
2035 string text = "";
2036 foreach (SourceChara.Row row in EClass.sources.charas.rows)
2037 {
2038 text = text + row.id + "\n";
2039 }
2040 return text;
2041 }
2042
2043 [ConsoleCommand("")]
2044 public static string ListThing()
2045 {
2046 string text = "";
2047 foreach (SourceThing.Row row in EClass.sources.things.rows)
2048 {
2049 text = text + row.id + "\n";
2050 }
2051 return text;
2052 }
2053
2054 [ConsoleCommand("")]
2055 public static string SetElement(string alias, int value, int potential = 100)
2056 {
2057 if (!CheatEnabled())
2058 {
2059 return EnableCheat;
2060 }
2061 SourceElement.Row row = EClass.sources.elements.alias.TryGetValue(alias);
2062 if (row == null)
2063 {
2064 return "Element not found.";
2065 }
2066 if (row.type == "Feat")
2067 {
2068 EClass.pc.SetFeat(row.id, value, msg: true);
2069 }
2070 else
2071 {
2072 EClass.pc.elements.SetBase(row.id, value, potential);
2073 }
2074 return "Done.";
2075 }
2076
2077 [ConsoleCommand("")]
2078 public static string SpawnBoss(string id)
2079 {
2080 if (!CheatEnabled())
2081 {
2082 return EnableCheat;
2083 }
2084 if (EClass.sources.charas.map.ContainsKey(id))
2085 {
2087 return "Spawned " + chara.Name;
2088 }
2089 return "'" + id + "' does not exist in the database.";
2090 }
2091
2092 [ConsoleCommand("")]
2093 public static string Spawn(string id, int num = 1, string aliasMat = "", int objLv = -1)
2094 {
2095 if (!CheatEnabled())
2096 {
2097 return EnableCheat;
2098 }
2099 if (EClass.sources.things.map.ContainsKey(id))
2100 {
2101 Thing thing = ThingGen.Create(id, -1, objLv).SetNum(num);
2102 if (!aliasMat.IsEmpty())
2103 {
2104 thing.ChangeMaterial(aliasMat);
2105 }
2106 EClass._zone.AddCard(thing, EClass.pc.pos);
2107 return "Spawned " + thing.Name;
2108 }
2109 _ = EClass.sources.charas.map;
2110 if (EClass.sources.charas.map.ContainsKey(id))
2111 {
2112 Chara chara = CharaGen.Create(id);
2113 if (objLv != -1)
2114 {
2115 chara.SetLv(objLv);
2116 }
2117 EClass._zone.AddCard(chara, EClass.pc.pos);
2118 return "Spawned " + chara.Name;
2119 }
2120 return "'" + id + "' does not exist in the database.";
2121 }
2122
2123 [ConsoleCommand("")]
2124 public static string SpawnFigure(string id)
2125 {
2126 if (!CheatEnabled())
2127 {
2128 return EnableCheat;
2129 }
2130 if (!EClass.sources.charas.map.ContainsKey(id))
2131 {
2132 return "'" + id + "' does not exist in the database.";
2133 }
2134 Thing thing = ThingGen.Create("figure");
2135 Thing thing2 = ThingGen.Create("figure3");
2136 string c_idRefCard = (thing2.c_idRefCard = id);
2137 thing.c_idRefCard = c_idRefCard;
2138 EClass.pc.DropThing(thing);
2139 EClass.pc.DropThing(thing2);
2140 return "Spawned figures for '" + id + "'";
2141 }
2142
2143 [ConsoleCommand("")]
2144 public static string TestSpawn(int lv, int num, int lvRange = -1)
2145 {
2146 if (!CheatEnabled())
2147 {
2148 return EnableCheat;
2149 }
2150 if (EClass._zone is Zone_Arena)
2151 {
2152 EClass._zone._dangerLv = lv;
2153 }
2154 foreach (Chara item in EClass._map.charas.Where((Chara c) => c.HasEditorTag(EditorTag.SpawnTest)).ToList())
2155 {
2156 item.Destroy();
2157 }
2158 for (int num2 = 0; num2 < num; num2++)
2159 {
2160 EClass._zone.SpawnMob(EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: false, ignoreCenter: true), new SpawnSetting
2161 {
2162 filterLv = lv,
2163 levelRange = lvRange
2164 }).AddEditorTag(EditorTag.SpawnTest);
2165 }
2166 return "Spawned.";
2167 }
2168
2169 [ConsoleCommand("")]
2170 public static string ResetPetUpgrades()
2171 {
2172 foreach (Chara value in EClass.game.cards.globalCharas.Values)
2173 {
2174 if (value.IsPCFaction)
2175 {
2176 value.ResetUpgrade();
2177 }
2178 }
2179 return "Not Implemented.";
2180 }
2181
2182 [ConsoleCommand("")]
2183 public static string ResetPrincipalSeals()
2184 {
2185 if (!CheatEnabled())
2186 {
2187 return EnableCheat;
2188 }
2189 EClass.game.principal.modified.Clear();
2190 return "Done.";
2191 }
2192
2193 [ConsoleCommand("")]
2194 public static string GodMode()
2195 {
2196 if (!CheatEnabled())
2197 {
2198 return EnableCheat;
2199 }
2200 EClass.pc.Revive();
2201 EClass.pc.hp = EClass.pc.MaxHP;
2202 return "I'm God!";
2203 }
2204
2205 [ConsoleCommand("")]
2206 public static string ModFame(int amount)
2207 {
2208 if (!CheatEnabled())
2209 {
2210 return EnableCheat;
2211 }
2212 EClass.player.ModFame(amount);
2213 return "Done.";
2214 }
2215
2216 [ConsoleCommand("")]
2217 public static string MaxFame()
2218 {
2219 if (!CheatEnabled())
2220 {
2221 return EnableCheat;
2222 }
2223 if (EClass.player.CountKeyItem("license_adv") == 0)
2224 {
2225 EClass.player.ModKeyItem("license_adv");
2226 }
2227 EClass.player.ModFame(int.MaxValue);
2228 return "Done.";
2229 }
2230
2231 [ConsoleCommand("")]
2232 public static string ModKarma(int amount)
2233 {
2234 if (!CheatEnabled())
2235 {
2236 return EnableCheat;
2237 }
2238 EClass.player.ModKarma(amount);
2239 return "Done.";
2240 }
2241
2242 [ConsoleCommand("")]
2243 public static string ModContribution(int amount)
2244 {
2245 if (!CheatEnabled())
2246 {
2247 return EnableCheat;
2248 }
2250 return "Done.";
2251 }
2252
2253 [ConsoleCommand("")]
2254 public static string Rust()
2255 {
2256 if (!CheatEnabled())
2257 {
2258 return EnableCheat;
2259 }
2260 EClass.pc.things.Foreach(delegate(Thing t)
2261 {
2262 t.ModEncLv(-100);
2263 });
2264 return "Done.";
2265 }
2266
2267 [ConsoleCommand("")]
2268 public static string FlyMode()
2269 {
2270 if (!CheatEnabled())
2271 {
2272 return EnableCheat;
2273 }
2275 return "I can fly!";
2276 }
2277
2278 [ConsoleCommand("")]
2279 public static string AddBodyPart(BodyCode bodyCode)
2280 {
2281 if (!CheatEnabled())
2282 {
2283 return EnableCheat;
2284 }
2285 _AddBodyPart(bodyCode);
2286 return "Done.";
2287 }
2288
2289 [ConsoleCommand("")]
2290 public static string RemoveBodyPart(BodyCode bodyCode)
2291 {
2292 if (!CheatEnabled())
2293 {
2294 return EnableCheat;
2295 }
2296 _RemoveBodyPart(bodyCode);
2297 return "Done.";
2298 }
2299
2300 public static void _AddBodyPart(BodyCode bodyCode)
2301 {
2302 EClass.pc.body.AddBodyPart((int)bodyCode);
2305 }
2306
2307 public static void _RemoveBodyPart(BodyCode bodyCode)
2308 {
2309 EClass.pc.body.RemoveBodyPart((int)bodyCode);
2312 }
2313
2314 [ConsoleCommand("")]
2315 public static string ChangeRace(string id = "?")
2316 {
2317 if (!CheatEnabled())
2318 {
2319 return EnableCheat;
2320 }
2321 if (EClass.sources.races.map.ContainsKey(id))
2322 {
2323 Thing thing = null;
2324 foreach (BodySlot slot in EClass.pc.body.slots)
2325 {
2326 if (slot.thing != null)
2327 {
2328 if (slot.thing.blessedState <= BlessedState.Cursed)
2329 {
2330 slot.thing.blessedState = BlessedState.Normal;
2331 }
2332 if (slot.thing.trait is TraitToolBelt)
2333 {
2334 thing = slot.thing;
2335 }
2336 EClass.pc.body.Unequip(slot);
2337 }
2338 }
2341 EClass.pc.ChangeRace(id);
2342 if (EClass.ui.IsInventoryOpen)
2343 {
2344 EClass.ui.ToggleInventory();
2345 }
2348 EClass.pc.body.Equip(thing);
2351 return "Done.";
2352 }
2353 string text = "";
2354 foreach (SourceRace.Row row in EClass.sources.races.rows)
2355 {
2356 text = text + row.id + " " + row.GetName() + Environment.NewLine;
2357 }
2358 return text;
2359 }
2360
2361 [ConsoleCommand("")]
2362 public static string ResetAllAchievement()
2363 {
2365 return "Done.";
2366 }
2367
2368 [ConsoleCommand("")]
2369 public static string ResetAchievement(ID_Achievement id)
2370 {
2372 return "Done.";
2373 }
2374
2375 [ConsoleCommand("")]
2376 public static string ChangeJob(string id = "?")
2377 {
2378 if (!CheatEnabled())
2379 {
2380 return EnableCheat;
2381 }
2382 if (EClass.sources.jobs.map.ContainsKey(id))
2383 {
2384 EClass.pc.ChangeJob(id);
2386 return "Done.";
2387 }
2388 string text = "";
2389 foreach (SourceJob.Row row in EClass.sources.jobs.rows)
2390 {
2391 text = text + row.id + " " + row.GetName() + Environment.NewLine;
2392 }
2393 return text;
2394 }
2395
2396 [ConsoleCommand("")]
2397 public static string FirstAdventurer()
2398 {
2399 string text = "Steam is not running.";
2400 DateTime dateTime = new DateTime(2024, 11, 3, 6, 0, 0);
2401 DateTimeOffset dateTimeOffset = (Application.isEditor ? new DateTimeOffset(2024, 11, 6, 1, 9, 0, default(TimeSpan)) : ((!SteamAPI.IsSteamRunning()) ? new DateTimeOffset(9999, 1, 1, 1, 9, 0, default(TimeSpan)) : DateTimeOffset.FromUnixTimeSeconds(SteamApps.GetEarliestPurchaseUnixTime(EClass.core.steam.steamworks.settings.applicationId))));
2402 dateTimeOffset = dateTimeOffset.ToOffset(new TimeSpan(9, 0, 0));
2403 text = ((dateTimeOffset < dateTime) ? "Valid: " : "Invalid: ");
2404 text = text + "Arrived North Tyris on " + dateTimeOffset.Year + " " + dateTimeOffset.Month + "/" + dateTimeOffset.Day + " " + dateTimeOffset.Hour + ":" + dateTimeOffset.Minute;
2405 return text + " Eligible by " + dateTime.Year + " " + dateTime.Month + "/" + dateTime.Day + " " + dateTime.Hour + ":" + dateTime.Minute;
2406 }
2407
2408 [ConsoleCommand("")]
2409 public static string RegenerateNames()
2410 {
2411 EClass.core.mods.InitLang();
2412 NameGen.list = null;
2413 AliasGen.list = null;
2414 AliasGen.listMix.Clear();
2415 AliasGen.listBuiltin.Clear();
2416 WordGen.listMix.Clear();
2417 WordGen.listBuiltin.Clear();
2418 NameGen.Init();
2419 AliasGen.Init();
2420 foreach (Chara chara in EClass._map.charas)
2421 {
2422 if (!chara.IsPC)
2423 {
2424 if (chara.source.name == "*r")
2425 {
2426 chara.c_altName = NameGen.getRandomName();
2427 }
2428 if (!chara._alias.IsEmpty())
2429 {
2430 chara._alias = AliasGen.GetRandomAlias();
2431 }
2432 }
2433 }
2434 return "Done!";
2435 }
2436
2437 [ConsoleCommand("")]
2438 public static string Stats()
2439 {
2440 return string.Concat(string.Concat(string.Concat(string.Concat(string.Concat(string.Concat(string.Concat(string.Concat(string.Concat(string.Concat(string.Concat(string.Concat(string.Concat(string.Concat("" + "Fish Stolen: " + EClass.player.flags.fishStolen + Environment.NewLine, "Little Saved: ", EClass.player.little_saved.ToString(), Environment.NewLine), "Little Lost: ", EClass.player.little_dead.ToString(), Environment.NewLine), "Little Depart: ", EClass.player.stats.sistersDepart.ToString(), Environment.NewLine), "Cat Depart: ", EClass.player.stats.catDepart.ToString(), Environment.NewLine), "Angry Cats: ", EClass.player.stats.angryCats.ToString(), Environment.NewLine), "Love Made: ", EClass.player.stats.kimo.ToString(), Environment.NewLine), "Nefia Beaten: ", EClass.player.stats.nefiaBeaten.ToString(), Environment.NewLine), "Sheared: ", EClass.player.stats.shear.ToString(), Environment.NewLine), "Brushed: ", EClass.player.stats.brush.ToString(), Environment.NewLine), "Egg Hatched: ", EClass.player.stats.eggHatched.ToString(), Environment.NewLine), "Plowed: ", EClass.player.stats.plow.ToString(), Environment.NewLine), "Cleaned: ", EClass.player.stats.clean.ToString(), Environment.NewLine), "Unpaid Bill: ", EClass.player.unpaidBill.ToString(), Environment.NewLine), "Statue Shipped: ", EClass.player.flags.statueShipped.ToString(), Environment.NewLine);
2441 }
2442
2443 [ConsoleCommand("")]
2444 public static string AllRecipe(bool forget = false)
2445 {
2446 if (!CheatEnabled())
2447 {
2448 return EnableCheat;
2449 }
2450 if (forget)
2451 {
2453 }
2454 else
2455 {
2457 }
2458 return "Done!";
2459 }
2460
2461 [ConsoleCommand("")]
2462 public static string LastWish(string name)
2463 {
2464 string text = "";
2465 foreach (SourceBacker.Row row in EClass.sources.backers.rows)
2466 {
2467 if (row.name.Contains(name) || row.id.ToString() == name)
2468 {
2469 text = text + row.id + " valid?:" + row.valid + " lang:" + row.lang + " type:" + row.type + " destroyed:" + EClass.player.doneBackers.Contains(row.id) + " loc:" + (row.loc.IsEmpty() ? "random" : row.loc) + Environment.NewLine;
2470 }
2471 }
2472 if (text == "")
2473 {
2474 return "Not Found";
2475 }
2476 return text + Resources.Load<TextAsset>("logo2").text;
2477 }
2478
2479 [ConsoleCommand("")]
2480 public static string ClearLastWishFlag()
2481 {
2482 if (!CheatEnabled())
2483 {
2484 return EnableCheat;
2485 }
2486 EClass.player.doneBackers.Clear();
2487 return Resources.Load<TextAsset>("logo2").text + Environment.NewLine + "Done!";
2488 }
2489
2490 [ConsoleCommand("")]
2491 public static string Resource()
2492 {
2493 if (!CheatEnabled())
2494 {
2495 return EnableCheat;
2496 }
2498 return "Resources spawned.";
2499 }
2500
2501 public void Log(object o)
2502 {
2503 Debug.Log(o);
2504 }
2505
2506 public void NextBGM()
2507 {
2508 if ((bool)SoundManager.current)
2509 {
2510 SoundManager.current.NextBGM();
2511 }
2512 }
2513
2514 public void ToggleRevealMap()
2515 {
2516 revealMap = !revealMap;
2517 if (revealMap)
2518 {
2520 }
2521 SE.ClickGeneral();
2522 }
2523
2524 public void LoadBroadcast()
2525 {
2526 TextAsset textAsset = Resources.Load<TextAsset>("Data/Text/broadcast");
2527 blines = textAsset.text.Split('-');
2528 }
2529
2530 public void BroadcastNext()
2531 {
2532 LoadBroadcast();
2533 if (Input.GetKey(KeyCode.LeftControl))
2534 {
2535 bidx--;
2536 }
2537 bidx = Mathf.Clamp(bidx, 0, blines.Length - 1);
2538 string text = blines[bidx];
2539 bidx += ((!Input.GetKey(KeyCode.LeftShift)) ? 1 : (-1));
2540 EClass.pc.SayRaw(text.TrimNewLines());
2541 }
2542}
AnimeID
Definition: AnimeID.cs:2
AttackSource
Definition: AttackSource.cs:2
BlessedState
Definition: BlessedState.cs:2
if(!match.Success)
EAction
Definition: EAction.cs:2
EditorTag
Definition: EditorTag.cs:2
Emo
Definition: Emo.cs:2
Hostility
Definition: Hostility.cs:2
ID_Achievement
PlaceState
Definition: PlaceState.cs:2
ReleaseMode
Definition: ReleaseMode.cs:2
void Activate(Thing t)
static AM_Inspect Inspect
Definition: ActionMode.cs:23
void Deactivate()
Definition: ActionMode.cs:529
virtual bool IsBuildMode
Definition: ActionMode.cs:181
Definition: Anime.cs:6
void WaitForEndOfFrame(Action action)
Definition: BaseCore.cs:61
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
ReleaseMode releaseMode
Definition: BaseCore.cs:23
BaseTileMap tileMap
RenderData rendererInnerBlock
Definition: BaseTileMap.cs:203
Thing thing
Definition: BodySlot.cs:8
static void Set(CardBlueprint _bp=null)
static CardBlueprint DebugEQ
Chara Find(string id)
Definition: CardManager.cs:20
GlobalCharaList globalCharas
Definition: CardManager.cs:46
void PlayAnime(AnimeID id, bool force)
void Say(string text, Color c=default(Color), float duration=0f)
Definition: Card.cs:11
float angle
Definition: Card.cs:74
Thing TryMakeRandomItem(int lv=-1, TryMakeRandomItemSource itemSource=TryMakeRandomItemSource.Default, Chara crafter=null)
Definition: Card.cs:5758
void Teleport(Point point, bool silent=false, bool force=false)
Definition: Card.cs:6194
void MakeFigureFrom(string id)
Definition: Card.cs:6022
void SetPlaceState(PlaceState newState, bool byPlayer=false)
Definition: Card.cs:3928
ElementContainerCard elements
Definition: Card.cs:42
string id
Definition: Card.cs:36
SourceMaterial.Row material
Definition: Card.cs:2103
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6645
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Definition: Card.cs:3217
string c_altName
Definition: Card.cs:1633
Card AddCard(Card c)
Definition: Card.cs:3266
virtual CardRenderer _CreateRenderer()
Definition: Card.cs:6440
Thing AddThing(string id, int lv=-1)
Definition: Card.cs:3280
Card SetLv(int a)
Definition: Card.cs:3070
string Name
Definition: Card.cs:2191
void AddEditorTag(EditorTag tag)
Definition: Card.cs:2738
Thing SetNum(int a)
Definition: Card.cs:3676
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:4076
void RecalculateFOV()
Definition: Card.cs:6862
Point pos
Definition: Card.cs:60
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6679
void Dye(string idMat)
Definition: Card.cs:6478
Trait trait
Definition: Card.cs:54
void ModCurrency(int a, string id="money")
Definition: Card.cs:4142
void ModEncLv(int a)
Definition: Card.cs:4027
void SetEncLv(int a)
Definition: Card.cs:4045
void Destroy()
Definition: Card.cs:5314
bool HasEditorTag(EditorTag tag)
Definition: Card.cs:2733
ThingContainer things
Definition: Card.cs:39
virtual Thing Thing
Definition: Card.cs:2110
BlessedState blessedState
Definition: Card.cs:281
int dir
Definition: Card.cs:149
void ModNum(int a, bool notify=true)
Definition: Card.cs:3696
void SayRaw(string text, string ref1=null, string ref2=null)
Definition: Card.cs:7303
CardRenderer renderer
Definition: Card.cs:64
virtual bool flipX
Definition: Card.cs:2168
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6383
int LV
Definition: Card.cs:389
virtual bool isSynced
Definition: Card.cs:2139
TaskDesignation designation
Definition: CellDetail.cs:19
List< Thing > things
Definition: CellDetail.cs:11
List< Chara > charas
Definition: CellDetail.cs:13
Definition: Cell.cs:7
int obj
Definition: Cell.cs:50
CellDetail detail
Definition: Cell.cs:112
SourceObj.Row sourceObj
Definition: Cell.cs:1112
bool HasObj
Definition: Cell.cs:677
bool HasFullBlock
Definition: Cell.cs:853
override void RefreshSprite()
override void NextDir()
override void NextFrame()
SpriteProvider provider
Definition: CharaActorPCC.cs:9
void AddBodyPart(int ele, Thing thing=null)
Definition: CharaBody.cs:312
void Unequip(Thing thing, bool refresh=true)
Definition: CharaBody.cs:49
List< BodySlot > slots
Definition: CharaBody.cs:8
Thing GetEquippedThing(int elementId)
Definition: CharaBody.cs:453
bool Equip(Thing thing, BodySlot slot=null, bool msg=true)
Definition: CharaBody.cs:213
void RefreshBodyParts()
Definition: CharaBody.cs:338
void RemoveBodyPart(int ele)
Definition: CharaBody.cs:367
static Chara CreateFromFilter(string id, int lv=-1, int levelRange=-1)
Definition: CharaGen.cs:22
static Chara Create(string id, int lv=-1)
Definition: CharaGen.cs:17
Definition: Chara.cs:10
void ChangeRace(string idNew)
Definition: Chara.cs:2509
CharaBody body
Definition: Chara.cs:96
void RemoveGlobal()
Definition: Chara.cs:1574
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9877
override bool IsPC
Definition: Chara.cs:632
SourceJob.Row job
Definition: Chara.cs:472
void SetFeat(int id, int value=1, bool msg=false)
Definition: Chara.cs:10556
void ResetUpgrade()
Definition: Chara.cs:9158
Party party
Definition: Chara.cs:45
Chara SetHomeZone(Zone zone)
Definition: Chara.cs:1500
Chara SetFaction(Faction f)
Definition: Chara.cs:1492
Chara SetGlobal(Zone _home, int x, int z)
Definition: Chara.cs:1546
override bool IsPCFaction
Definition: Chara.cs:691
override int MaxHP
Definition: Chara.cs:728
Zone currentZone
Definition: Chara.cs:261
SourceChara.Row source
Definition: Chara.cs:164
Stats mana
Definition: Chara.cs:1215
Stats stamina
Definition: Chara.cs:1207
void ChangeJob(string idNew)
Definition: Chara.cs:2389
void Revive(Point p=null, bool msg=false)
Definition: Chara.cs:5499
Thing MakeGene(DNA.Type? type=null)
Definition: Chara.cs:8720
void ModCorruption(int a)
Definition: Chara.cs:10494
void RestockEquip(bool onCreate)
Definition: Chara.cs:4997
void DropThing(Thing t, int num=-1)
Definition: Chara.cs:4925
string _alias
Definition: Chara.cs:225
FactionBranch homeBranch
Definition: Chara.cs:1115
bool IsHostile()
Definition: Chara.cs:6948
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
Definition: Chara.cs:4608
void EQ_CAT(string s)
Definition: Chara.cs:5440
SourceRace.Row race
Definition: Chara.cs:470
UD_String_MatData matColors
ColorProfile profile
Definition: CoreDebug.cs:86
static string ResetAchievement(ID_Achievement id)
Definition: CoreDebug.cs:2369
bool ignoreWeight
Definition: CoreDebug.cs:203
bool marryAnytime
Definition: CoreDebug.cs:240
bool godMode
Definition: CoreDebug.cs:189
bool godFood
Definition: CoreDebug.cs:199
bool allStory
Definition: CoreDebug.cs:255
static string Resource()
Definition: CoreDebug.cs:2491
static string ModKarma(int amount)
Definition: CoreDebug.cs:2232
void Init()
Definition: CoreDebug.cs:344
bool godCraft
Definition: CoreDebug.cs:197
bool debugScatter
Definition: CoreDebug.cs:193
bool skipMod
Definition: CoreDebug.cs:150
bool allBGM
Definition: CoreDebug.cs:215
static string ResetAllAchievement()
Definition: CoreDebug.cs:2362
bool dontCompressSave
Definition: CoreDebug.cs:148
static bool CheatEnabled()
Definition: CoreDebug.cs:1863
StartParty startParty
Definition: CoreDebug.cs:116
bool showSceneSelector
Definition: CoreDebug.cs:125
bool allSkill
Definition: CoreDebug.cs:209
string[] blines
Definition: CoreDebug.cs:297
void Test_Siege()
Definition: CoreDebug.cs:1843
static string Fix_EtherDisease()
Definition: CoreDebug.cs:1931
bool showTone
Definition: CoreDebug.cs:182
bool allPolicy
Definition: CoreDebug.cs:253
bool testFixedColor
Definition: CoreDebug.cs:278
bool naked
Definition: CoreDebug.cs:312
static string RemoveBodyPart(BodyCode bodyCode)
Definition: CoreDebug.cs:2290
Thing GetDebugContainer()
Definition: CoreDebug.cs:810
IEnumerable< string > ZoneIDs()
Definition: CoreDebug.cs:333
bool allMenu
Definition: CoreDebug.cs:251
void ToggleRevealMap()
Definition: CoreDebug.cs:2514
bool alwaysResetWindow
Definition: CoreDebug.cs:144
bool test
Definition: CoreDebug.cs:186
int indexResolution
Definition: CoreDebug.cs:306
int bidx
Definition: CoreDebug.cs:292
string startZone
Definition: CoreDebug.cs:122
bool logCombat
Definition: CoreDebug.cs:261
DebugHotkey debugHotkeys
Definition: CoreDebug.cs:159
bool inviteAnytime
Definition: CoreDebug.cs:238
static string Fix_RemoveDesignations()
Definition: CoreDebug.cs:2020
bool _godBuild
Definition: CoreDebug.cs:195
void Test_Filter()
Definition: CoreDebug.cs:1813
int numResource
Definition: CoreDebug.cs:233
MatColorTest matColorTest
Definition: CoreDebug.cs:274
Card animeDest
Definition: CoreDebug.cs:289
bool debugInput
Definition: CoreDebug.cs:155
List< DebugCommand > commands
Definition: CoreDebug.cs:299
bool logDice
Definition: CoreDebug.cs:263
bool revealMap
Definition: CoreDebug.cs:170
static string FirstAdventurer()
Definition: CoreDebug.cs:2397
static string ClearLastWishFlag()
Definition: CoreDebug.cs:2480
void Test_Grow()
Definition: CoreDebug.cs:1764
static string Reset_LoytelDebt()
Definition: CoreDebug.cs:1880
bool showFav
Definition: CoreDebug.cs:242
void LoadBroadcast()
Definition: CoreDebug.cs:2524
bool keypadDebug
Definition: CoreDebug.cs:157
bool unlimitedInterest
Definition: CoreDebug.cs:236
static string EnableCheat
Definition: CoreDebug.cs:331
bool travelAnywhere
Definition: CoreDebug.cs:223
static string FlyMode()
Definition: CoreDebug.cs:2268
bool allAbility
Definition: CoreDebug.cs:207
bool instaReturn
Definition: CoreDebug.cs:221
bool ignorePool
Definition: CoreDebug.cs:133
bool alwaysFavFood
Definition: CoreDebug.cs:244
bool useNewConfig
Definition: CoreDebug.cs:140
string command
Definition: CoreDebug.cs:152
void Log(object o)
Definition: CoreDebug.cs:2501
bool showExtra
Definition: CoreDebug.cs:184
bool returnAnywhere
Definition: CoreDebug.cs:219
void SetStartStockpile(Thing container, int num=100)
Definition: CoreDebug.cs:764
static string SetElement(string alias, int value, int potential=100)
Definition: CoreDebug.cs:2055
void ValidateData()
Definition: CoreDebug.cs:885
bool ignoreEncounter
Definition: CoreDebug.cs:217
bool validateData
Definition: CoreDebug.cs:146
static string Rust()
Definition: CoreDebug.cs:2254
static string Spawn(string id, int num=1, string aliasMat="", int objLv=-1)
Definition: CoreDebug.cs:2093
bool runtimeGodBuild
Definition: CoreDebug.cs:315
Emo lastEmo
Definition: CoreDebug.cs:310
void InitDebugCommands()
Definition: CoreDebug.cs:1481
static string GodMode()
Definition: CoreDebug.cs:2194
void COM_MaxConstruction()
Definition: CoreDebug.cs:1855
static string ModFame(int amount)
Definition: CoreDebug.cs:2206
static string Fix_RemoveDemitas()
Definition: CoreDebug.cs:1976
bool validatePref
Definition: CoreDebug.cs:266
bool allHomeSkill
Definition: CoreDebug.cs:211
readonly List< int[]> resolutions
Definition: CoreDebug.cs:282
void COM_Teleport()
Definition: CoreDebug.cs:1790
void COM_PlayStartDrama()
Definition: CoreDebug.cs:1805
static string RegenerateNames()
Definition: CoreDebug.cs:2409
int param1
Definition: CoreDebug.cs:269
void QuickStart()
Definition: CoreDebug.cs:350
void Test_SiegeGuard()
Definition: CoreDebug.cs:1831
void UpdateInput()
Definition: CoreDebug.cs:895
bool enable
Definition: CoreDebug.cs:302
bool ignorePopup
Definition: CoreDebug.cs:176
void LOG_Spatials()
Definition: CoreDebug.cs:1823
bool skipModSync
Definition: CoreDebug.cs:128
int param2
Definition: CoreDebug.cs:272
Color32 fixedColor
Definition: CoreDebug.cs:280
static string Cheat()
Definition: CoreDebug.cs:1873
bool skipEvent
Definition: CoreDebug.cs:178
bool testLOS2
Definition: CoreDebug.cs:166
static string Stats()
Definition: CoreDebug.cs:2438
bool logAdv
Definition: CoreDebug.cs:258
bool autoIdentify
Definition: CoreDebug.cs:205
AnimeID lastAnime
Definition: CoreDebug.cs:308
static string ListThing()
Definition: CoreDebug.cs:2044
bool resetPlayerConfig
Definition: CoreDebug.cs:136
static void _AddBodyPart(BodyCode bodyCode)
Definition: CoreDebug.cs:2300
void AddAllRecipes()
Definition: CoreDebug.cs:753
void UpdateAlways()
Definition: CoreDebug.cs:840
bool godBuild
Definition: CoreDebug.cs:320
bool autoAdvanceQuest
Definition: CoreDebug.cs:227
static string AllRecipe(bool forget=false)
Definition: CoreDebug.cs:2444
static string ListChara()
Definition: CoreDebug.cs:2033
int startHour
Definition: CoreDebug.cs:118
static string ChangeJob(string id="?")
Definition: CoreDebug.cs:2376
bool testThingQuality
Definition: CoreDebug.cs:231
void Test_GodTalk()
Definition: CoreDebug.cs:1782
bool allRecipe
Definition: CoreDebug.cs:249
static string MaxFame()
Definition: CoreDebug.cs:2217
bool bilinear
Definition: CoreDebug.cs:294
StartLoadout startLoadout
Definition: CoreDebug.cs:114
bool skipNerun
Definition: CoreDebug.cs:180
static string ResetPetUpgrades()
Definition: CoreDebug.cs:2170
void EnableDebugResource()
Definition: CoreDebug.cs:822
bool debugHoard
Definition: CoreDebug.cs:172
Thing GetOrCreateDebugContainer()
Definition: CoreDebug.cs:793
bool debugProps
Definition: CoreDebug.cs:168
static string ModContribution(int amount)
Definition: CoreDebug.cs:2243
static string ResetPrincipalSeals()
Definition: CoreDebug.cs:2183
static void _RemoveBodyPart(BodyCode bodyCode)
Definition: CoreDebug.cs:2307
void OnLoad()
Definition: CoreDebug.cs:745
void NextBGM()
Definition: CoreDebug.cs:2506
bool maxQuests
Definition: CoreDebug.cs:246
static string AddBodyPart(BodyCode bodyCode)
Definition: CoreDebug.cs:2279
static string SpawnFigure(string id)
Definition: CoreDebug.cs:2124
static string LastWish(string name)
Definition: CoreDebug.cs:2462
static string Fix_LostCore()
Definition: CoreDebug.cs:1954
bool enableMapPieceEditor
Definition: CoreDebug.cs:229
bool revealInner
Definition: CoreDebug.cs:174
bool allArt
Definition: CoreDebug.cs:213
bool testLOS
Definition: CoreDebug.cs:164
static string SpawnBoss(string id)
Definition: CoreDebug.cs:2078
StartSetting startSetting
Definition: CoreDebug.cs:120
static string Fix_RemoveAshland()
Definition: CoreDebug.cs:1998
bool ignoreAutoSave
Definition: CoreDebug.cs:142
bool boradcast
Definition: CoreDebug.cs:276
static string TestSpawn(int lv, int num, int lvRange=-1)
Definition: CoreDebug.cs:2144
int advanceMin
Definition: CoreDebug.cs:162
void SpawnCheatContainer()
Definition: CoreDebug.cs:836
static string Fix_RemoveDuplicateUnique()
Definition: CoreDebug.cs:1913
static string Fix_Awning()
Definition: CoreDebug.cs:1898
bool ignoreBuildRule
Definition: CoreDebug.cs:201
static string ChangeRace(string id="?")
Definition: CoreDebug.cs:2315
void BroadcastNext()
Definition: CoreDebug.cs:2530
bool hidePCItemsInBuild
Definition: CoreDebug.cs:225
Lang.LangCode langCode
Definition: CoreDebug.cs:130
bool randomResource
Definition: CoreDebug.cs:191
bool dontUseThread
Definition: CoreDebug.cs:138
StartScene startScene
Definition: CoreDebug.cs:112
static string RootSave
Definition: CorePath.cs:202
RectData abilityDebug
Definition: CoreRef.cs:173
Rects rects
Definition: CoreRef.cs:364
CoreRef refs
Definition: Core.cs:51
ModManager mods
Definition: Core.cs:39
Steam steam
Definition: Core.cs:57
bool IsGameStarted
Definition: Core.cs:87
void SetLang(string langCode, bool force=false)
Definition: Core.cs:714
Definition: DNA.cs:9
Type
Definition: DNA.cs:11
Definition: EClass.cs:6
static Game game
Definition: EClass.cs:9
static Scene scene
Definition: EClass.cs:31
static Faction Home
Definition: EClass.cs:27
static Core core
Definition: EClass.cs:7
static Zone _zone
Definition: EClass.cs:21
static World world
Definition: EClass.cs:41
static Map _map
Definition: EClass.cs:19
static SourceManager sources
Definition: EClass.cs:43
static FactionBranch Branch
Definition: EClass.cs:23
static BaseGameScreen screen
Definition: EClass.cs:33
static Player player
Definition: EClass.cs:13
static Chara pc
Definition: EClass.cs:15
static CoreDebug debug
Definition: EClass.cs:49
static SoundManager Sound
Definition: EClass.cs:47
static UI ui
Definition: EClass.cs:17
Definition: EInput.cs:8
static bool isCtrlDown
Definition: EInput.cs:274
static void Consume(int _skipFrame)
Definition: EInput.cs:667
static bool isInputFieldActive
Definition: EInput.cs:288
static bool isShiftDown
Definition: EInput.cs:272
static EAction action
Definition: EInput.cs:270
static int rnd(int a)
Definition: EScriptable.cs:5
Dictionary< int, Element > dict
Element ModBase(int ele, int v)
Element SetBase(string alias, int v, int potential=0)
Element GetOrCreateElement(Element ele)
int id
Definition: ELEMENT.cs:259
int vBase
Definition: ELEMENT.cs:261
SourceElement.Row source
Definition: ELEMENT.cs:282
int vPotential
Definition: ELEMENT.cs:265
void ModExp(int a)
int GetNextExp(int _lv=-1)
List< Chara > members
void BanishMember(Chara c, bool skipMsg=false)
void AddMemeber(Chara c)
string name
Definition: FACTION.cs:135
void AddReserve(Chara c)
Definition: FACTION.cs:338
void AddContribution(int a)
Definition: FACTION.cs:318
Definition: Fov.cs:6
void AdvanceMin(int a)
Definition: GameDate.cs:24
void AdvanceHour()
Definition: GameDate.cs:92
HashSet< string > modified
void FixedUpdate()
Definition: GameUpdater.cs:444
bool cheat
Definition: Game.cs:55
Definition: Game.cs:9
ReligionManager religions
Definition: Game.cs:159
static void Load(string id, bool cloud)
Definition: Game.cs:322
GamePrincipal principal
Definition: Game.cs:225
static string id
Definition: Game.cs:148
bool Save(bool isAutoSave=false, bool silent=false)
Definition: Game.cs:1058
SpatialManager spatials
Definition: Game.cs:153
static void Create(string _id=null, bool cloud=false)
Definition: Game.cs:751
Prologue Prologue
Definition: Game.cs:264
CardManager cards
Definition: Game.cs:156
GameUpdater updater
Definition: Game.cs:250
new World world
Definition: Game.cs:177
Config config
Definition: Game.cs:219
QuestManager quests
Definition: Game.cs:183
void StartNewGame()
Definition: Game.cs:824
Definition: Guild.cs:2
static Guild GetCurrentGuild()
Definition: Guild.cs:74
void ResetHotbar(int id)
Definition: HotbarManager.cs:8
Definition: Lang.cs:7
static string langCode
Definition: Lang.cs:29
LangCode
Definition: Lang.cs:9
static LayerDrama ActivateMain(string idSheet, string idStep=null, Chara target=null, Card ref1=null, string tag="")
Definition: LayerDrama.cs:61
static void SetDirtyAll(bool immediate=false)
static SourceMaterial.Row GetRandomMaterial(int lv, string group=null, bool tryLevelMatTier=false)
Definition: MATERIAL.cs:56
static SourceMaterial.Row sourceWaterSea
Definition: MATERIAL.cs:49
Point GetCenterPos()
Definition: MapBounds.cs:52
static bool Exist(string id)
Definition: MapSubset.cs:17
static void Save(string id)
Definition: MapSubset.cs:22
new void ForeachCell(Action< Cell > action)
Definition: Map.cs:2512
Thing FindThing(Func< Thing, bool > func)
Definition: Map.cs:2778
PropsInstalled Installed
Definition: Map.cs:128
void SetLiquid(int x, int z, CellEffect effect=null)
Definition: Map.cs:1617
PropsRoaming Roaming
Definition: Map.cs:130
List< Thing > things
Definition: Map.cs:52
List< Chara > deadCharas
Definition: Map.cs:49
PropsStocked Stocked
Definition: Map.cs:126
List< Chara > charas
Definition: Map.cs:84
void AddDecal(int x, int z, int id, int amount=1, bool refresh=true)
Definition: Map.cs:2169
void RevealAll(bool reveal=true)
Definition: Map.cs:1011
Color main
Definition: MatColors.cs:7
Color alt
Definition: MatColors.cs:9
Material mat
Definition: MeshPass.cs:21
override void Init(string path, string defaultPackage="_Elona")
Definition: ModManager.cs:63
Definition: Msg.cs:5
static string SayRaw(string text)
Definition: Msg.cs:118
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
void RemoveMember(Chara c)
Definition: Party.cs:116
void AddMemeber(Chara c, bool showMsg=false)
Definition: Party.cs:71
int fishStolen
Definition: Player.cs:736
void OnEnableDebug()
Definition: Player.cs:775
bool statueShipped
Definition: Player.cs:460
int loytelMartLv
Definition: Player.cs:700
long eggHatched
Definition: Player.cs:201
int sistersDepart
Definition: Player.cs:123
long nefiaBeaten
Definition: Player.cs:153
int catDepart
Definition: Player.cs:126
long plow
Definition: Player.cs:213
long brush
Definition: Player.cs:189
long kimo
Definition: Player.cs:165
long clean
Definition: Player.cs:225
int angryCats
Definition: Player.cs:135
long shear
Definition: Player.cs:177
Flags flags
Definition: Player.cs:1164
RecipeManager recipes
Definition: Player.cs:1167
void ModFame(int a)
Definition: Player.cs:2192
void ModKarma(int a)
Definition: Player.cs:2636
void RefreshDomain()
Definition: Player.cs:1610
Stats stats
Definition: Player.cs:1086
Zone zone
Definition: Player.cs:1152
int little_dead
Definition: Player.cs:993
HashSet< int > doneBackers
Definition: Player.cs:1143
int CountKeyItem(string alias)
Definition: Player.cs:2266
void ModKeyItem(string alias, int num=1, bool msg=true)
Definition: Player.cs:2234
int unpaidBill
Definition: Player.cs:978
int little_saved
Definition: Player.cs:996
HotbarManager hotbars
Definition: Player.cs:1155
Chara TargetChara
Definition: PointTarget.cs:41
Definition: Point.cs:9
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1057
Point Copy()
Definition: Point.cs:491
CellDetail detail
Definition: Point.cs:71
int x
Definition: Point.cs:36
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:624
int z
Definition: Point.cs:39
bool IsValid
Definition: Point.cs:88
Area area
Definition: Point.cs:73
bool HasFloor
Definition: Point.cs:219
Chara FirstChara
Definition: Point.cs:288
Thing FirstThing
Definition: Point.cs:301
Cell cell
Definition: Point.cs:51
string idStartZone
Definition: Prologue.cs:9
void Validate()
Definition: Props.cs:451
PropSet all
Definition: Props.cs:8
Quest Add(string id, string idGlobalChara=null)
Definition: QuestManager.cs:29
Quest Start(string id, string idGlobalChara)
Definition: QuestManager.cs:41
Quest Get(string id)
Definition: Quest.cs:7
static List< RecipeSource > list
Dictionary< string, int > knownRecipes
Dictionary< string, Religion > dictAll
virtual void Talk(string idTalk, Card c=null, Card agent=null)
Definition: Religion.cs:175
Vector3 offset
Definition: RenderData.cs:19
static List< ISyncScreen > syncList
Definition: RenderObject.cs:24
Definition: Scene.cs:8
static Point HitPoint
Definition: Scene.cs:21
GameScreen screenElin
Definition: Scene.cs:93
ActionMode actionMode
Definition: Scene.cs:79
MeshPass[] passes
Definition: Scene.cs:121
PointTarget mouseTarget
Definition: Scene.cs:135
void Init(Mode newMode)
Definition: Scene.cs:178
Mode
Definition: Scene.cs:10
void Next()
Definition: Season.cs:106
SourceMaterial materials
SourceRace races
SourceObj objs
SourceThing things
SourceZone zones
void ImportSourceTexts()
SourceBacker backers
SourceElement elements
SourceChara charas
SourceJob jobs
float height
Definition: SourcePref.cs:53
Zone Find(string id)
int uid
Definition: Spatial.cs:70
Spatial parent
Definition: Spatial.cs:10
virtual string Name
Definition: Spatial.cs:509
Faction mainFaction
Definition: Spatial.cs:442
string id
Definition: Spatial.cs:13
int development
Definition: Spatial.cs:238
virtual Point RegionPos
Definition: Spatial.cs:560
List< Spatial > children
Definition: Spatial.cs:37
static SpawnSetting Boss(int filterLv, int fixedLv=-1)
Definition: SpawnSetting.cs:49
virtual int max
Definition: Stats.cs:68
Definition: Steam.cs:12
SteamworksBehaviour steamworks
Definition: Steam.cs:15
static void GetAchievement(ID_Achievement id)
Definition: Steam.cs:53
static void ResetAchievement(ID_Achievement id)
Definition: Steam.cs:101
static void ResetAllAchievement()
Definition: Steam.cs:92
void CheckUpdate()
Definition: Steam.cs:34
Thing Find(int uid)
void Foreach(Action< Thing > action, bool onlyAccessible=true)
static Thing CreateBlock(int id, int idMat)
Definition: ThingGen.cs:101
static Thing CreateRedBook(string id, int num=1)
Definition: ThingGen.cs:175
static Thing TestCreate()
Definition: ThingGen.cs:32
static Thing CreateFloor(int id, int idMat, bool platform=false)
Definition: ThingGen.cs:108
static Thing CreateFromCategory(string idCat, int lv=-1)
Definition: ThingGen.cs:75
static Thing CreateScroll(int ele, int num=1)
Definition: ThingGen.cs:190
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8
SourceThing.Row source
Definition: Thing.cs:11
override SourcePref Pref
Definition: Thing.cs:50
bool MoveZone(bool confirmed=false)
static Thing MakeSeed(string idSource)
Definition: TraitSeed.cs:105
static Thing MakeRandomSeed(bool enc=false)
Definition: TraitSeed.cs:97
override bool OnUse(Chara c)
virtual bool CanStack
Definition: Trait.cs:163
bool TryGetValue(TKey key, out TValue value)
Definition: UDictionary.cs:178
static void TryShowTip(Transform root=null, bool highlight=true, bool ignoreWhenRightClick=true)
Definition: UIButton.cs:778
void SetCondition(Condition condition, int _duration=20, bool silent=false)
Definition: Weather.cs:308
Condition
Definition: Weather.cs:16
Condition CurrentCondition
Definition: Weather.cs:79
void SetRandomCondition()
Definition: Weather.cs:295
static void OnChangeBodyPart()
Definition: WidgetEquip.cs:53
void Nerun(string text, string idPortrait="UN_nerun")
Definition: WidgetFeed.cs:93
static WidgetFeed Instance
Definition: WidgetFeed.cs:14
void RebuildPage(int page=-1)
static WidgetHotbar HotbarBuild
Definition: WidgetHotbar.cs:36
static void OnChangeMode()
static WidgetMinimap Instance
Region region
Definition: World.cs:23
GameDate date
Definition: World.cs:6
void ModEther(int a=3)
Definition: World.cs:58
Weather weather
Definition: World.cs:12
int ether
Definition: World.cs:21
Season season
Definition: World.cs:9
void Add(ZoneEvent e, bool allowDuplicate=false)
void Remove(ZoneEvent e)
Definition: Zone.cs:12
Dictionary< int, string > dictCitizen
Definition: Zone.cs:55
ZoneEventManager events
Definition: Zone.cs:43
void ImportDialog(string dir=null)
Definition: Zone.cs:3530
void ClaimZone(bool debug=false, Point pos=null)
Definition: Zone.cs:1888
Card AddThing(string id, int x, int z)
Definition: Zone.cs:2149
ElementContainerZone elements
Definition: Zone.cs:46
void ExportDialog(string dir=null)
Definition: Zone.cs:3517
virtual bool CanUnlockExit
Definition: Zone.cs:284
MapBounds bounds
Definition: Zone.cs:52
Chara SpawnMob(string id, Point pos=null)
Definition: Zone.cs:2988
void RemoveCard(Card t)
Definition: Zone.cs:2199
bool IsPCFaction
Definition: Zone.cs:480
void Export(string path, PartialMap partial=null, bool usermap=false)
Definition: Zone.cs:3476
Card AddCard(Card t, Point point)
Definition: Zone.cs:2159