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