Elin Decompiled Documentation EA 23.209 Stable Patch 2
Loading...
Searching...
No Matches
Game Class Reference
Inheritance diagram for Game:
EClass

Classes

class  Config
 
class  Flags
 

Public Member Functions

void OnUpdate ()
 
void OnLoad ()
 
void OnGameInstantiated ()
 
void _Create ()
 
void StartNewGame ()
 
void AddAdventurers ()
 
void AddAdventurer (string id, Zone z=null)
 
void GotoTitle (bool showDialog=true)
 
void Quit ()
 
bool Save (bool isAutoSave=false, bool silent=false)
 
void OnBeforeSave ()
 
void Kill ()
 
void Pause (Action onUnpause=null)
 

Static Public Member Functions

static new void Wait (float a, Point p)
 
static new void Wait (float a, Card c)
 
static void Wait (float a)
 
static bool TryLoad (string id, bool cloud, Action onLoad)
 
static void Load (string id, bool cloud)
 
static void Create (string _id=null, bool cloud=false)
 
static void OnBeforeInstantiate ()
 
- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 

Public Attributes

SpatialManager spatials = new SpatialManager()
 
CardManager cards = new CardManager()
 
ReligionManager religions = new ReligionManager()
 
FactionManager factions = new FactionManager()
 
DomainManager domains = new DomainManager()
 
Version version
 
PartyManager parties = new PartyManager()
 
new World world
 
new Player player = new Player()
 
QuestManager quests = new QuestManager()
 
RelationManager relations = new RelationManager()
 
MsgLog log
 
PCCUniformManager uniforms = new PCCUniformManager()
 
TeleportManager teleports = new TeleportManager()
 
int seed
 
int idPrologue
 
int idDifficulty
 
int dateScratch
 
double backupTime
 
Flags flags = new Flags()
 
Config config = new Config()
 
List< ThinglostThings = new List<Thing>()
 
GamePrincipal principal = new GamePrincipal()
 
SurvivalManager survival
 
int gameSpeedIndex = 1
 
int lastGameSpeedIndex = 1
 
int sessionMin
 
int countLoadedMaps
 
int saveCount
 
float timeSinceStart
 
bool isLoading
 
bool isKilling
 
bool isCloud
 
GameBlueprint bp
 
GameUpdater updater = new GameUpdater()
 
Zone activeZone
 
Zone lastActiveZone
 
Dictionary< string, IGlobalValuereferenceMap = new Dictionary<string, IGlobalValue>()
 
HashSet< Texture2D > loadedTextures = new HashSet<Texture2D>()
 

Static Public Attributes

static Game Instance
 
static float waitTimer
 
static string id
 
static bool isPaused
 
- Static Public Attributes inherited from EClass
static Core core
 

Properties

static bool IsWaiting [get]
 
Prologue Prologue [get]
 
bool UseGrid [get]
 
bool altUI [get]
 
bool altInv [get]
 
bool altCraft [get]
 
bool altAbility [get]
 
bool IsSurvival [get]
 
Zone StartZone [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Private Member Functions

void OnSerializing (StreamingContext context)
 
void OnDeserializing (StreamingContext context)
 

Private Attributes

float welcomeTimer
 

Detailed Description

Definition at line 7 of file Game.cs.

Member Function Documentation

◆ _Create()

void Game._Create ( )
inline

Definition at line 757 of file Game.cs.

758 {
759 principal = IO.DeepCopy(EClass.setting.start.principals[0]);
760 idDifficulty = 1;
761 config.snapFreePos = (config.slope = (config.autoWall = true));
762 config.autoCombat.abortOnAllyDead = true;
763 config.autoCombat.abortOnHalfHP = true;
764 config.autoCombat.bUseHotBar = true;
765 config.autoCombat.bUseInventory = true;
766 config.autoCombat.bDontChangeTarget = true;
767 config.autoCombat.abortOnKill = true;
768 config.autoCombat.abortOnItemLoss = true;
769 seed = EClass.rnd(10000);
770 Debug.Log("creating game: " + id + " seed:" + seed);
771 uniforms.Import();
776 foreach (Spatial value in spatials.map.Values)
777 {
778 value.SetMainFaction(factions.Find(value.source.faction.IsEmpty("wilds")));
779 }
781 cards.container_shipping = ThingGen.Create("container_shipping");
782 cards.container_deliver = ThingGen.Create("container_delivery");
783 cards.container_deposit = ThingGen.Create("container_deposit");
784 bp = new GameBlueprint();
785 bp.Create();
786 }
void OnCreateGame()
Definition: DomainManager.cs:7
Definition: EClass.cs:5
static int rnd(long a)
Definition: EClass.cs:58
static GameSetting setting
Definition: EClass.cs:34
Faction Find(string id)
List< GamePrincipal > principals
Definition: GameSetting.cs:244
StartSetting start
Definition: GameSetting.cs:305
GameBlueprint bp
Definition: Game.cs:244
new Player player
Definition: Game.cs:176
ReligionManager religions
Definition: Game.cs:158
GamePrincipal principal
Definition: Game.cs:221
DomainManager domains
Definition: Game.cs:164
SpatialManager spatials
Definition: Game.cs:152
PCCUniformManager uniforms
Definition: Game.cs:191
new World world
Definition: Game.cs:173
int idDifficulty
Definition: Game.cs:203
int seed
Definition: Game.cs:197
FactionManager factions
Definition: Game.cs:161
Definition: IO.cs:11
void OnCreateGame()
Definition: Player.cs:1345
static Spatial CreateRecursive(string id, Spatial parent=null)
Definition: SpatialGen.cs:3
GlobalSpatialList map
SourceZone.Row source
Definition: Spatial.cs:441
virtual void SetMainFaction(Faction f)
Definition: Spatial.cs:634
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: World.cs:4

References ZoneBlueprint.Create(), ThingGen.Create(), SpatialGen.CreateRecursive(), Debug, FactionManager.Find(), SpatialManager.map, DomainManager.OnCreateGame(), FactionManager.OnCreateGame(), Player.OnCreateGame(), ReligionManager.OnCreateGame(), GameSetting.StartSetting.principals, EClass.rnd(), seed, Spatial.SetMainFaction(), EClass.setting, Spatial.source, GameSetting.start, and world.

Referenced by Create().

◆ AddAdventurer()

void Game.AddAdventurer ( string  id,
Zone  z = null 
)
inline

Definition at line 970 of file Game.cs.

971 {
972 if (z == null)
973 {
974 List<Zone> source = world.region.ListTowns();
975 do
976 {
977 z = source.RandomItem();
978 }
979 while ((z is Zone_SubTown && EClass.rnd(5) != 0) || z == EClass.pc.currentZone);
980 }
981 Chara chara = CharaGen.Create(id);
982 chara.SetHomeZone(z);
983 chara.global.transition = new ZoneTransition
984 {
985 state = ZoneTransition.EnterState.RandomVisit
986 };
987 z.AddCard(chara);
988 cards.listAdv.Add(chara);
989 }
List< Chara > listAdv
Definition: CardManager.cs:64
static Chara Create(string id, int lv=-1)
Definition: CharaGen.cs:17
Definition: Chara.cs:10
Chara SetHomeZone(Zone zone)
Definition: Chara.cs:1409
Zone currentZone
Definition: Chara.cs:253
static Chara pc
Definition: EClass.cs:14
CardManager cards
Definition: Game.cs:155
List< Zone > ListTowns()
Definition: Region.cs:269
Region region
Definition: World.cs:23
Card AddCard(Card t, Point point)
Definition: Zone.cs:1948

References CharaGen.Create(), Chara.currentZone, CardManager.listAdv, EClass.pc, EClass.rnd(), Chara.SetHomeZone(), and world.

◆ AddAdventurers()

void Game.AddAdventurers ( )
inline

Definition at line 943 of file Game.cs.

944 {
945 List<Zone> source = world.region.ListTowns();
946 string[] array = new string[7] { "adv_kiria", "adv_gaki", "adv_wini", "adv_verna", "adv_ivory", "adv_mesherada", "adv_yukiimo" };
947 for (int i = 0; i < EClass.setting.balance.numAdv; i++)
948 {
949 Zone zone = source.RandomItem();
950 if (zone is Zone_SubTown && EClass.rnd(5) != 0)
951 {
952 i--;
953 continue;
954 }
955 if (i >= array.Length && i < array.Length + 2)
956 {
958 }
959 Chara chara = CharaGen.Create((i < array.Length) ? array[i] : ((EClass.rnd(10) == 0) ? "adv_fairy" : "adv"));
960 chara.SetHomeZone(zone);
961 chara.global.transition = new ZoneTransition
962 {
963 state = ZoneTransition.EnterState.RandomVisit
964 };
965 zone.AddCard(chara);
966 cards.listAdv.Add(chara);
967 }
968 }
static void Set(CardBlueprint _bp)
static CardBlueprint Chara(int lv, Rarity rarity=Rarity.Normal)
BalanceSetting balance
Definition: GameSetting.cs:309
Definition: Zone.cs:12

References Zone.AddCard(), GameSetting.balance, CardBlueprint.Chara(), CharaGen.Create(), CardManager.listAdv, GameSetting.BalanceSetting.numAdv, EClass.rnd(), CardBlueprint.Set(), Chara.SetHomeZone(), EClass.setting, and world.

Referenced by OnLoad().

◆ Create()

static void Game.Create ( string  _id = null,
bool  cloud = false 
)
inlinestatic

Definition at line 715 of file Game.cs.

716 {
717 id = _id ?? GameIO.GetNewId(cloud ? CorePath.RootSaveCloud : CorePath.RootSave, "world_");
719 EClass.core.game = (Instance = new Game());
720 EClass.core.game.isCloud = cloud;
724 }
static string RootSave
Definition: CorePath.cs:206
static string RootSaveCloud
Definition: CorePath.cs:208
Game game
Definition: Core.cs:72
static Core core
Definition: EClass.cs:6
Definition: GameIO.cs:10
static string GetNewId(string path, string prefix="", int start=1)
Definition: GameIO.cs:342
static void ResetTemp()
Definition: GameIO.cs:41
Definition: Game.cs:8
void _Create()
Definition: Game.cs:757
static void OnBeforeInstantiate()
Definition: Game.cs:726
static Game Instance
Definition: Game.cs:143
void OnGameInstantiated()
Definition: Game.cs:731

References _Create(), EClass.core, Core.game, GameIO.GetNewId(), OnGameInstantiated(), GameIO.ResetTemp(), CorePath.RootSave, and CorePath.RootSaveCloud.

Referenced by LayerEditBio.OnAfterAddLayer(), LayerEmbark.OnAfterAddLayer(), and CoreDebug.QuickStart().

◆ GotoTitle()

void Game.GotoTitle ( bool  showDialog = true)
inline

Definition at line 991 of file Game.cs.

992 {
993 if (showDialog)
994 {
995 Dialog.YesNo("dialog_gotoTitle", delegate
996 {
997 if (EClass.game.Save(isAutoSave: true))
998 {
999 EClass.scene.Init(Scene.Mode.Title);
1000 }
1001 });
1002 }
1003 else
1004 {
1005 EClass.scene.Init(Scene.Mode.Title);
1006 }
1007 }
Definition: Dialog.cs:7
static Dialog YesNo(string langDetail, Action actionYes, Action actionNo=null, string langYes="yes", string langNo="no")
Definition: Dialog.cs:244
static Game game
Definition: EClass.cs:8
static Scene scene
Definition: EClass.cs:30
bool Save(bool isAutoSave=false, bool silent=false)
Definition: Game.cs:1020
Definition: Scene.cs:8
void Init(Mode newMode)
Definition: Scene.cs:178
Mode
Definition: Scene.cs:10

References EClass.game, Scene.Init(), Save(), EClass.scene, and Dialog.YesNo().

Referenced by LayerPauseMenu.OnClickTitle(), and HotItemContext.Show().

◆ Kill()

void Game.Kill ( )
inline

Definition at line 1090 of file Game.cs.

1091 {
1092 isKilling = true;
1093 Debug.Log("Killing Game: IsStarted? " + EClass.core.IsGameStarted);
1095 {
1096 EClass.ui.OnKillGame();
1099 }
1100 EClass.core.game = (Instance = null);
1101 EClass.Sound.currentPlaylist = null;
1102 Window.dictTab.Clear();
1103 foreach (Texture2D loadedTexture in loadedTextures)
1104 {
1105 if (loadedTexture != null)
1106 {
1107 UnityEngine.Object.Destroy(loadedTexture);
1108 }
1109 }
1110 }
bool IsGameStarted
Definition: Core.cs:84
static UI ui
Definition: EClass.cs:16
HashSet< Texture2D > loadedTextures
Definition: Game.cs:254
Zone activeZone
Definition: Game.cs:248
bool isKilling
Definition: Game.cs:240
void OnKillGame()
Definition: Scene.cs:341
Definition: Window.cs:13
static Dictionary< string, int > dictTab
Definition: Window.cs:596
void OnKillGame()
Definition: Zone.cs:1669

References EClass.core, Debug, Window.dictTab, Core.IsGameStarted, Scene.OnKillGame(), Zone.OnKillGame(), EClass.scene, and EClass.ui.

Referenced by Scene.Init(), Load(), and Core.SetLang().

◆ Load()

static void Game.Load ( string  id,
bool  cloud 
)
inlinestatic

Definition at line 318 of file Game.cs.

319 {
320 string text = (cloud ? CorePath.RootSaveCloud : CorePath.RootSave) + id;
321 Debug.Log("Loading: " + id + ": " + text);
322 if (EClass.game != null)
323 {
324 EClass.game.Kill();
325 }
327 EClass.core.game = GameIO.LoadGame(id, text, cloud);
328 EClass.game.isCloud = cloud;
329 EClass.game.isLoading = true;
333 EClass.scene.Init(Scene.Mode.StartGame);
334 if (EClass.game.altInv)
335 {
336 SoundManager.ignoreSounds = true;
338 {
339 EClass.ui.OpenFloatInv();
340 }
341 SoundManager.ignoreSounds = true;
343 {
344 EClass.ui.ToggleAbility();
345 }
346 SoundManager.ignoreSounds = false;
347 TooltipManager.Instance.HideTooltips(immediate: true);
348 }
349 if ((bool)WidgetSideScreen.Instance)
350 {
352 }
353 EClass.game.isLoading = false;
354 }
static void ClearTemp()
Definition: GameIO.cs:51
static Game LoadGame(string id, string root, bool cloud)
Definition: GameIO.cs:140
void Kill()
Definition: Game.cs:1090
bool altInv
Definition: Game.cs:266
void OnLoad()
Definition: Game.cs:356
bool layerAbility
Definition: Player.cs:35
bool layerInventory
Definition: Player.cs:33
Pref pref
Definition: Player.cs:1010
static TooltipManager Instance
void HideTooltips(bool immediate=false)
static WidgetSideScreen Instance
override void OnChangeResolution()

References altInv, GameIO.ClearTemp(), Debug, EClass.game, TooltipManager.HideTooltips(), Scene.Init(), TooltipManager.Instance, WidgetSideScreen.Instance, Kill(), Player.Pref.layerAbility, Player.Pref.layerInventory, GameIO.LoadGame(), OnBeforeInstantiate(), WidgetSideScreen.OnChangeResolution(), OnGameInstantiated(), OnLoad(), player, Player.pref, CorePath.RootSave, EClass.scene, and EClass.ui.

Referenced by AM_Adv._OnUpdateInput(), Map.Reload(), and CoreDebug.UpdateInput().

◆ OnBeforeInstantiate()

static void Game.OnBeforeInstantiate ( )
inlinestatic

Definition at line 726 of file Game.cs.

727 {
728 Player.seedHallucination = 0;
729 }

Referenced by Load().

◆ OnBeforeSave()

void Game.OnBeforeSave ( )
inline

Definition at line 1076 of file Game.cs.

1077 {
1078 foreach (Zone zone in spatials.Zones)
1079 {
1080 zone.OnBeforeSave();
1081 }
1083 foreach (Spatial item in spatials.listDestryoed)
1084 {
1085 item.DeleteMapRecursive();
1086 }
1087 spatials.listDestryoed.Clear();
1088 }
void OnBeforeSave()
Definition: Player.cs:1453
List< Zone > Zones
List< Spatial > listDestryoed
void OnBeforeSave()
Definition: Spatial.cs:656

References item, SpatialManager.listDestryoed, Player.OnBeforeSave(), Spatial.OnBeforeSave(), and SpatialManager.Zones.

◆ OnDeserializing()

void Game.OnDeserializing ( StreamingContext  context)
inlineprivate

Definition at line 1137 of file Game.cs.

1138 {
1139 Debug.Log("#io game OnDeserializing");
1140 Instance = this;
1141 }

References Debug.

◆ OnGameInstantiated()

void Game.OnGameInstantiated ( )
inline

Definition at line 731 of file Game.cs.

732 {
733 HotItemHeld.taskBuild = null;
734 InvOwner.Trader = (InvOwner.Main = null);
735 LayerDrama.currentQuest = null;
736 BookList.Init();
737 ContentGallery.lastPage = 0;
738 ContentGallery.listMode = false;
739 if (!Application.isEditor || !EClass.debug.enable)
740 {
742 }
743 foreach (Chara value in cards.globalCharas.Values)
744 {
745 if (value.uid == player.uidChara)
746 {
747 player.chara = value;
748 break;
749 }
750 }
752 EClass.ui.widgets.OnGameInstantiated();
753 EClass.Sound.ResetPlaylist();
754 EClass.core.config.ApplyFPS(force: true);
755 }
static void OnGameInstantiated()
Definition: ActionMode.cs:247
static void Init()
Definition: BookList.cs:22
GlobalCharaList globalCharas
Definition: CardManager.cs:46
int uid
Definition: Card.cs:120
void ApplyFPS(bool force=false)
Definition: CoreConfig.cs:837
bool enable
Definition: CoreDebug.cs:286
CoreConfig config
Definition: Core.cs:70
static CoreDebug debug
Definition: EClass.cs:48
static SoundManager Sound
Definition: EClass.cs:46
int uidChara
Definition: Player.cs:866
static void BuildList()

References CoreConfig.ApplyFPS(), RecipeManager.BuildList(), Core.config, EClass.core, EClass.debug, CoreDebug.enable, CardManager.globalCharas, BookList.Init(), ActionMode.OnGameInstantiated(), EClass.Sound, EClass.ui, Card.uid, and Player.uidChara.

Referenced by Create(), and Load().

◆ OnLoad()

void Game.OnLoad ( )
inline

Definition at line 356 of file Game.cs.

357 {
358 domains.OnLoad();
361 world._OnLoad();
362 player.OnLoad();
364 {
365 EClass.pc.party.members.ForEach(delegate(Chara c)
366 {
367 c.currentZone = EClass.pc.homeZone;
368 c.global.transition = new ZoneTransition
369 {
370 state = ZoneTransition.EnterState.Return
371 };
372 });
373 }
374 player.zone = EClass.pc.currentZone;
375 EClass.pc.currentZone.lastActive = world.date.GetRaw();
376 if (spatials.Find("somewhere") == null)
377 {
378 SpatialGen.Create("somewhere", world.region, register: true);
379 }
380 EClass.pc.homeZone.isKnown = true;
383 foreach (Thing item in EClass.pc.things.List((Thing t) => t.Num <= 0 || t.isDestroyed))
384 {
385 item.parent.RemoveCard(item);
386 }
387 foreach (Thing item2 in EClass.pc.things.List((Thing t) => t.trait is TraitChestMerchant))
388 {
389 item2.Destroy();
390 }
391 foreach (Thing item3 in EClass.pc.things.List((Thing t) => t.invY == 1 && t.invX == -1))
392 {
393 item3.invY = 0;
394 }
395 foreach (Chara value in EClass.game.cards.globalCharas.Values)
396 {
397 if (value.id == "demitas" && value.faction.id == "wilds")
398 {
400 }
401 if (value.memberType == FactionMemberType.Livestock && !value.IsPCFaction)
402 {
403 value.memberType = FactionMemberType.Default;
404 }
405 if (!value.isDyed && value.HasTag(CTAG.random_color))
406 {
407 value.DyeRandom();
408 }
409 }
410 foreach (FactionBranch child in EClass.pc.faction.GetChildren())
411 {
412 foreach (Chara member in child.members)
413 {
414 if (!member.isDead && (member.currentZone == null || member.currentZone.id == "somewhere"))
415 {
416 Debug.Log("exception: Moving invalid chara: " + member.Name + "/" + member.currentZone?.ToString() + "/" + member.homeBranch?.ToString() + "/" + member.faction);
417 member.MoveZone(child.owner, ZoneTransition.EnterState.RandomVisit);
418 }
419 member.RefreshWorkElements(child.owner.elements);
420 member.Refresh();
421 }
422 }
423 EClass.pc.angle = player.angle;
425 if (cards.listAdv.Count == 0)
426 {
428 }
429 quests.list.ForeachReverse(delegate(Quest q)
430 {
431 if (!(q is QuestRandom))
432 {
433 foreach (Quest item4 in quests.list)
434 {
435 if (q != item4 && item4.id == q.id)
436 {
437 quests.list.Remove(item4);
438 break;
439 }
440 }
441 }
442 });
443 quests.globalList.ForeachReverse(delegate(Quest q)
444 {
445 if (!(q is QuestRandom))
446 {
447 foreach (Quest global in quests.globalList)
448 {
449 if (q != global && global.id == q.id)
450 {
451 quests.globalList.Remove(global);
452 break;
453 }
454 }
455 }
456 });
457 TryAddQuest("into_darkness", "exile_kettle");
458 if (version.IsBelow(0, 23, 185))
459 {
460 player.resetPrincipal = true;
461 }
462 if (version.IsBelow(0, 23, 182))
463 {
464 foreach (Chara value2 in cards.globalCharas.Values)
465 {
466 if (!value2.IsUnique && value2.c_lockedAge != 0)
467 {
468 value2.elements.SetBase(1243, 1);
469 }
470 }
471 }
472 if (version.IsBelow(0, 23, 155))
473 {
474 AddAdventurer("adv_yukiimo");
475 }
476 if (version.IsBelow(0, 23, 100))
477 {
478 int num = player.recipes.knownRecipes.TryGetValue("trainingDummy_heavy", 0);
479 if (num != 0)
480 {
481 player.recipes.knownRecipes["trainingDummy_heavy1"] = num;
482 }
483 }
484 if (version.IsBelow(0, 23, 96))
485 {
486 EClass.game.principal = IO.DeepCopy(EClass.setting.start.principals[0]);
487 }
489 {
491 EClass.game.principal.id = -1;
492 EClass.game.principal.permadeath = gameDifficultySetting.deleteGameOnDeath;
493 EClass.game.principal.disableManualSave = !gameDifficultySetting.allowManualSave;
494 EClass.core.actionsNextFrame.Add(delegate
495 {
496 EClass.ui.AddLayer<LayerWorldSetting>();
497 });
498 }
499 if (version.IsBelow(0, 23, 93))
500 {
502 Debug.Log("■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■feafefaeffaeaffeaaeaefseasfaefaef");
503 while (TryAddRecipe())
504 {
505 }
506 }
507 if (version.IsBelow(0, 23, 72))
508 {
509 foreach (Chara value3 in EClass.game.cards.globalCharas.Values)
510 {
511 if (!value3.isDead)
512 {
513 value3.c_wasInPcParty = false;
514 }
515 }
516 }
517 if (version.IsBelow(0, 23, 59))
518 {
519 while (TryDestroy())
520 {
521 }
522 }
523 if (version.IsBelow(0, 23, 199) && EClass.game.quests.GetPhase<QuestNegotiationDarkness>() >= 3)
524 {
525 world.SendPackage(ThingGen.CreateParcel(null, ThingGen.Create("bone_duponne")));
526 }
527 if (version.IsBelow(0, 23, 195))
528 {
529 Zone zone = spatials.Find("startVillage2");
530 if (zone != null && zone.visitCount > 0)
531 {
533 }
534 }
535 if (version.IsBelow(0, 23, 52))
536 {
537 player.flags.toggleHotbarHighlightActivated = true;
538 }
539 if (version.IsBelow(0, 23, 51))
540 {
541 foreach (Chara value4 in EClass.game.cards.globalCharas.Values)
542 {
543 if (!(value4.id != "adv") && value4.IsPCFaction)
544 {
545 value4.idSkin = value4.uid % (value4.source._tiles.Length - 4) / 2 * 2 + ((!value4.IsMale) ? 1 : 0);
546 }
547 }
548 }
549 if (version.IsBelow(0, 22, 91))
550 {
551 TryAddQuestIfActive("demitas_spellwriter", "into_darkness");
552 }
553 if (version.IsBelow(0, 22, 86))
554 {
555 Chara chara = cards.globalCharas.Find("demitas");
556 if (chara != null && chara._works != null && chara._works.Count > 0)
557 {
558 chara._works[0] = 51;
559 }
560 }
561 if (version.IsBelow(0, 22, 86))
562 {
563 TryAddQuest("farris_tulip", "greatDebt");
564 }
565 if (version.IsBelow(0, 22, 86))
566 {
567 TryAddQuest("exile_whisper", "exile_kettle");
568 }
569 if (version.IsBelow(0, 22, 85))
570 {
571 TryAddQuest("exile_meet", "pre_debt");
572 }
573 if (version.IsBelow(0, 22, 60) && EClass.game.quests.Get<QuestDebt>() != null)
574 {
575 Chara chara2 = cards.globalCharas.Find("loytel");
576 Debug.Log("Loytelfix: " + chara2.homeZone);
577 if (chara2.homeZone == null || !chara2.homeZone.IsPCFaction)
578 {
580 chara2.homeZone = EClass.pc.homeBranch.owner;
581 chara2.RemoveEditorTag(EditorTag.Invulnerable);
582 }
583 }
584 if (version.IsBelow(0, 22, 52) && quests.completedIDs.Contains("vernis_gold"))
585 {
586 quests.Add("pre_debt", "farris");
587 }
588 if (quests.completedIDs.Contains("farris_tulip"))
589 {
590 quests.globalList.ForeachReverse(delegate(Quest q)
591 {
592 if (q.id == "farris_tulip")
593 {
594 quests.globalList.Remove(q);
595 }
596 });
597 }
598 quests.list.ForeachReverse(delegate(Quest q)
599 {
600 if (q is QuestDialog && quests.completedIDs.Contains(q.id))
601 {
602 quests.list.Remove(q);
603 }
604 });
605 if (version.IsBelow(0, 22, 20))
606 {
607 foreach (Chara value5 in cards.globalCharas.Values)
608 {
609 value5.SetBool(18, enable: false);
610 }
611 }
612 if (version.IsBelow(0, 22, 22))
613 {
614 if (EClass.pc.faithElements != null)
615 {
617 }
618 foreach (Element item5 in EClass.pc.elements.ListElements((Element e) => e.source.categorySub == "god"))
619 {
620 EClass.pc.SetFeat(item5.id, 0);
621 }
623 }
624 if (version.IsBelow(0, 22, 45))
625 {
626 player.debt = 20000000;
627 }
629 {
631 }
632 if (cards.container_deposit == null)
633 {
634 cards.container_deposit = ThingGen.Create("container_deposit");
635 if (player.bankMoney > 0)
636 {
638 }
639 }
640 foreach (Quest item6 in quests.list)
641 {
642 if (item6 is QuestSequence && !EClass.sources.quests.map.ContainsKey(item6.idSource))
643 {
644 item6.phase = 0;
645 }
646 }
647 foreach (Quest global2 in quests.globalList)
648 {
649 if (global2 is QuestSequence && !EClass.sources.quests.map.ContainsKey(global2.idSource))
650 {
651 global2.phase = 0;
652 }
653 }
654 void TryAddQuest(string idQuest, string idReqQuest)
655 {
656 if (quests.completedIDs.Contains(idReqQuest) && !quests.completedIDs.Contains(idQuest) && quests.GetGlobal(idQuest) == null && quests.Get(idQuest) == null)
657 {
658 quests.Add(idQuest);
659 }
660 }
661 void TryAddQuestIfActive(string idQuest, string idReqQuest)
662 {
663 if (quests.Get(idReqQuest) != null && !quests.completedIDs.Contains(idQuest) && quests.GetGlobal(idQuest) == null && quests.Get(idQuest) == null)
664 {
665 quests.Add(idQuest);
666 }
667 }
668 bool TryAddRecipe()
669 {
670 foreach (string key in player.recipes.knownRecipes.Keys)
671 {
672 if (key.Length > 1 && key[0] == 'b')
673 {
674 RecipeSource recipeSource = RecipeManager.Get(key + "-p");
675 if (recipeSource != null && !player.recipes.knownRecipes.ContainsKey(recipeSource.id))
676 {
677 Debug.Log(recipeSource.id);
678 player.recipes.Add(recipeSource.id, showEffect: false);
679 return true;
680 }
681 recipeSource = RecipeManager.Get(key.Replace("-p", ""));
682 if (recipeSource != null && !player.recipes.knownRecipes.ContainsKey(recipeSource.id))
683 {
684 Debug.Log(recipeSource.id);
685 player.recipes.Add(recipeSource.id, showEffect: false);
686 return true;
687 }
688 }
689 }
690 return false;
691 }
692 static bool TryDestroy()
693 {
694 for (int i = 0; i < EClass.pc.party.members.Count; i++)
695 {
696 Chara chara3 = EClass.pc.party.members[i];
697 Debug.Log(chara3.id + "/" + chara3.uid + "/" + chara3._cints[1]);
698 for (int j = 0; j < EClass.pc.party.members.Count; j++)
699 {
700 Chara chara4 = EClass.pc.party.members[j];
701 if (i != j && chara3.uid == chara4.uid)
702 {
703 EClass.pc.party.uidMembers.RemoveAt(j);
704 EClass.pc.party.members.RemoveAt(j);
705 chara4.Destroy();
706 Debug.Log("Destroyed");
707 return true;
708 }
709 }
710 }
711 return false;
712 }
713 }
CTAG
Definition: CTAG.cs:2
EditorTag
Definition: EditorTag.cs:2
FactionMemberType
void SetBool(int id, bool enable)
Definition: BaseCard.cs:20
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
Version version
Definition: BaseCore.cs:17
Chara Find(string id)
Definition: CardManager.cs:20
Thing container_deposit
Definition: CardManager.cs:58
int c_lockedAge
Definition: Card.cs:1339
bool isDestroyed
Definition: Card.cs:73
void RemoveEditorTag(EditorTag tag)
Definition: Card.cs:2584
ElementContainerCard elements
Definition: Card.cs:39
string id
Definition: Card.cs:33
bool IsUnique
Definition: Card.cs:2065
int invY
Definition: Card.cs:1929
bool IsMale
Definition: Card.cs:2358
string Name
Definition: Card.cs:2111
bool HasTag(CTAG tag)
Definition: Card.cs:2569
void DyeRandom()
Definition: Card.cs:5828
Trait trait
Definition: Card.cs:51
bool isDyed
Definition: Card.cs:456
void Destroy()
Definition: Card.cs:4958
ThingContainer things
Definition: Card.cs:36
int invX
Definition: Card.cs:1917
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:3047
int Num
Definition: Card.cs:156
void Refresh(bool calledRecursive=false)
Definition: Chara.cs:1708
int[] _cints
Definition: Chara.cs:82
void RefreshWorkElements(ElementContainer parent=null)
Definition: Chara.cs:8693
Faction faction
Definition: Chara.cs:425
void SetFeat(int id, int value=1, bool msg=false)
Definition: Chara.cs:9520
Party party
Definition: Chara.cs:43
override bool IsPCFaction
Definition: Chara.cs:669
FactionMemberType memberType
Definition: Chara.cs:46
Zone homeZone
Definition: Chara.cs:265
void RefreshFaithElement()
Definition: Chara.cs:9835
ElementContainer faithElements
Definition: Chara.cs:38
FactionBranch homeBranch
Definition: Chara.cs:1052
bool isDead
Definition: Chara.cs:387
List< int > _works
Definition: Chara.cs:52
void MoveZone(string alias)
Definition: Chara.cs:3278
void OnLoad()
Definition: CoreDebug.cs:702
int GetRaw(int offsetHours=0)
Definition: Date.cs:322
static SourceManager sources
Definition: EClass.cs:42
List< Element > ListElements(Func< Element, bool > shoudList=null, Comparison< Element > comparison=null)
void SetParent(Card c)
Element SetBase(string alias, int v, int potential=0)
int id
Definition: ELEMENT.cs:250
SourceElement.Row source
Definition: ELEMENT.cs:273
List< Chara > members
void AddMemeber(Chara c)
List< FactionBranch > GetChildren()
Definition: FACTION.cs:202
string id
Definition: FACTION.cs:129
List< GameDifficultySetting > difficulties
Definition: GameSetting.cs:242
void AddAdventurers()
Definition: Game.cs:943
void AddAdventurer(string id, Zone z=null)
Definition: Game.cs:970
QuestManager quests
Definition: Game.cs:179
Version version
Definition: Game.cs:167
List< int > uidMembers
Definition: Party.cs:11
List< Chara > members
Definition: Party.cs:18
RecipeManager recipes
Definition: Player.cs:1094
float angle
Definition: Player.cs:968
bool resetPrincipal
Definition: Player.cs:1174
void OnLoad()
Definition: Player.cs:1429
int bankMoney
Definition: Player.cs:911
HashSet< string > completedIDs
Definition: QuestManager.cs:17
List< Quest > list
Definition: QuestManager.cs:11
Quest Add(string id, string idGlobalChara=null)
Definition: QuestManager.cs:29
List< Quest > globalList
Definition: QuestManager.cs:14
Quest Get(string id)
Quest GetGlobal(string id)
Definition: Quest.cs:7
virtual string idSource
Definition: Quest.cs:149
string id
Definition: Quest.cs:31
static RecipeSource Get(string id)
Dictionary< string, int > knownRecipes
void Add(string id, bool showEffect=true)
void OnVersionUpdate()
SourceQuest quests
static Spatial Create(string id, Spatial parent, bool register, int x=-99999, int y=-99999, int icon=0)
Definition: SpatialGen.cs:16
Zone Find(string id)
void _OnLoad()
Definition: Spatial.cs:665
bool destryoed
Definition: Spatial.cs:45
string id
Definition: Spatial.cs:13
int visitCount
Definition: Spatial.cs:154
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)
void RefreshGridRecursive()
static Thing CreateParcel(string idLang=null, params Thing[] things)
Definition: ThingGen.cs:42
static Thing CreateCassette(int id)
Definition: ThingGen.cs:230
Definition: Thing.cs:8
GameDate date
Definition: World.cs:6
void SendPackage(Thing p)
Definition: World.cs:68
override string ToString()
Definition: Zone.cs:547
ElementContainerZone elements
Definition: Zone.cs:43
bool IsPCFaction
Definition: Zone.cs:468
override bool Equals(object obj)
Definition: Version.cs:95
bool IsBelow(int _major, int _minor, int _batch)
Definition: Version.cs:31

References Spatial._OnLoad(), AddAdventurers(), FactionBranch.AddMemeber(), Player.angle, cards, ElementContainerCard.CheckSkillActions(), SpatialGen.Create(), Chara.currentZone, World.date, EClass.debug, Debug, Card.Destroy(), Spatial.destryoed, domains, Card.DyeRandom(), Card.elements, Zone.elements, Chara.faction, factions, SpatialManager.Find(), EClass.game, Faction.GetChildren(), Date.GetRaw(), CardManager.globalCharas, Card.HasTag(), Chara.homeBranch, Chara.homeZone, Card.id, Faction.id, Spatial.id, Card.invX, Card.invY, Chara.isDead, Card.isDestroyed, Card.isDyed, Chara.IsPCFaction, item, QuestManager.list, ThingContainer.List(), CardManager.listAdv, FactionBranch.members, Party.members, Chara.memberType, Chara.MoveZone(), Card.Name, Card.Num, CoreDebug.OnLoad(), DomainManager.OnLoad(), FactionManager.OnLoad(), Player.OnLoad(), ReligionManager.OnLoad(), FactionBranch.owner, Chara.party, EClass.pc, player, quests, Chara.Refresh(), ThingContainer.RefreshGridRecursive(), Chara.RefreshWorkElements(), World.region, religions, spatials, Card.things, Zone.ToString(), Card.trait, and world.

Referenced by Load().

◆ OnSerializing()

void Game.OnSerializing ( StreamingContext  context)
inlineprivate

Definition at line 1131 of file Game.cs.

1132 {
1133 Debug.Log("#io game OnSerializing");
1134 }

References Debug.

◆ OnUpdate()

void Game.OnUpdate ( )
inline

Definition at line 294 of file Game.cs.

295 {
296 backupTime += Time.deltaTime;
297 waitTimer -= Time.deltaTime;
298 timeSinceStart += Time.deltaTime;
299 player.stats.timeElapsed += Time.deltaTime;
301 {
302 flags.IsWelcomeMessageShown = true;
303 }
305 }
void FixedUpdate()
Definition: GameUpdater.cs:436
bool IsWelcomeMessageShown
Definition: Game.cs:119
GameUpdater updater
Definition: Game.cs:246
static float waitTimer
Definition: Game.cs:145
Flags flags
Definition: Game.cs:212
double backupTime
Definition: Game.cs:209
float timeSinceStart
Definition: Game.cs:236
double timeElapsed
Definition: Player.cs:66
Stats stats
Definition: Player.cs:1013

References backupTime, GameUpdater.FixedUpdate(), flags, Game.Flags.IsWelcomeMessageShown, player, Player.stats, Player.Stats.timeElapsed, timeSinceStart, updater, and waitTimer.

Referenced by Core.Update().

◆ Pause()

void Game.Pause ( Action  onUnpause = null)
inline

Definition at line 1112 of file Game.cs.

1113 {
1114 isPaused = true;
1115 LayerPause layerPause = EClass.ui.AddLayer<LayerPause>();
1116 Game lastGame = EClass.game;
1117 if (onUnpause == null)
1118 {
1119 return;
1120 }
1121 layerPause.SetOnKill(delegate
1122 {
1123 if (EClass.core.IsGameStarted && lastGame == EClass.game)
1124 {
1125 onUnpause();
1126 }
1127 });
1128 }
static bool isPaused
Definition: Game.cs:149
Layer SetOnKill(Action action)
Definition: Layer.cs:579

References EClass.core, EClass.game, Core.IsGameStarted, Layer.SetOnKill(), and EClass.ui.

Referenced by ZoneEventQuest.OnTickRound(), and ZoneEventQuest.SpawnBoss().

◆ Quit()

void Game.Quit ( )
inline

Definition at line 1009 of file Game.cs.

1010 {
1011 Dialog.YesNo("dialog_quit", delegate
1012 {
1013 if (EClass.game.Save())
1014 {
1015 EClass.core.Quit();
1016 }
1017 });
1018 }

References EClass.game, Save(), and Dialog.YesNo().

Referenced by EUtil.ExitGame(), LayerPauseMenu.OnClickExit(), and HotItemContext.Show().

◆ Save()

bool Game.Save ( bool  isAutoSave = false,
bool  silent = false 
)
inline

Definition at line 1020 of file Game.cs.

1021 {
1022 if (EClass.ui.IsDragging)
1023 {
1024 EClass.ui.EndDrag(canceled: true);
1025 }
1026 if (isAutoSave && EClass.debug.ignoreAutoSave)
1027 {
1028 return true;
1029 }
1030 bool flag = EClass.core.config.game.autoBackup && backupTime >= (double)(EClass.core.config.game.backupInterval * 60 * 30);
1031 if (flag)
1032 {
1033 backupTime = 0.0;
1034 }
1036 countLoadedMaps = 0;
1037 player.pref.layerInventory = EClass.ui.layerFloat.GetLayer<LayerInventory>();
1039 {
1040 player.pref.layerAbility = EClass.ui.layerFloat.GetLayer<LayerAbility>();
1041 }
1042 player.pref.layerCraft = EClass.ui.layerFloat.GetLayer<LayerCraftFloat>();
1043 player.angle = EClass.pc.angle;
1045 EClass.ui.widgets.UpdateConfigs();
1046 GameIndex gameIndex = null;
1047 try
1048 {
1049 OnBeforeSave();
1050 gameIndex = GameIO.SaveGame();
1051 }
1052 catch (Exception ex)
1053 {
1054 EClass.ui.Say(ex.Message);
1055 SE.Beep();
1056 Msg.Say("error_save");
1057 return false;
1058 }
1059 if (flag)
1060 {
1061 GameIO.MakeBackup(gameIndex);
1062 EClass.ui.Say("backupDone");
1063 }
1064 if (!silent)
1065 {
1066 if (!isAutoSave)
1067 {
1068 SE.WriteJournal();
1069 }
1070 Msg.Say("saved");
1071 }
1072 saveCount++;
1073 return true;
1074 }
float angle
Definition: Card.cs:69
new GameConfig game
Definition: CoreConfig.cs:605
void TryUpdatePlayedHour()
Definition: CoreConfig.cs:811
bool ignoreAutoSave
Definition: CoreDebug.cs:126
static GameIndex SaveGame()
Definition: GameIO.cs:69
static void MakeBackup(GameIndex index, string suffix="")
Definition: GameIO.cs:102
int countLoadedMaps
Definition: Game.cs:232
int saveCount
Definition: Game.cs:234
void OnBeforeSave()
Definition: Game.cs:1076
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58

References Card.angle, CoreConfig.GameConfig.backupInterval, Core.config, EClass.core, EClass.debug, CoreConfig.game, CoreDebug.ignoreAutoSave, Player.Pref.layerInventory, GameIO.MakeBackup(), EClass.pc, Player.pref, GameIO.SaveGame(), Msg.Say(), CoreConfig.TryUpdatePlayedHour(), EClass.ui, and BaseCore.version.

Referenced by AM_Adv._OnUpdateInput(), LayerSleep.Advance(), LayerNewZone.Embark(), GotoTitle(), Scene.Init(), Chara.MoveZone(), LayerPauseMenu.OnClickSave(), TraitDeedRelocate.OnRead(), DramaManager.ParseLine(), Quit(), Map.Reload(), HotItemContext.Show(), and CoreDebug.UpdateInput().

◆ StartNewGame()

void Game.StartNewGame ( )
inline

Definition at line 788 of file Game.cs.

789 {
790 EClass.pc.homeZone = StartZone;
793 Prologue prologue = EClass.game.Prologue;
794 if (prologue.type == GameType.Survival)
795 {
797 }
798 else
799 {
800 CharaGen.Create("fiama").SetGlobal(EClass.game.StartZone, prologue.posFiama.x, prologue.posFiama.y);
801 CharaGen.Create("ashland").SetGlobal(EClass.game.StartZone, prologue.posAsh.x, prologue.posAsh.y);
802 }
803 if ((bool)LayerTitle.actor)
804 {
805 world.date.hour = EClass.game.Prologue.hour;
807 Player obj = player;
808 Chara chara = EClass.pc;
809 Zone zone2 = (EClass.pc.homeZone = EClass.game.spatials.Find(EClass.game.Prologue.idStartZone));
810 Zone zone4 = (chara.currentZone = zone2);
811 obj.zone = zone4;
812 EClass.pc.global.transition = new ZoneTransition
813 {
814 state = ZoneTransition.EnterState.Exact,
816 z = EClass.game.Prologue.startZ
817 };
818 EClass.pc.hp = EClass.pc.MaxHP;
821 EClass.pc.AddCondition<ConFaint>(200, force: true);
822 }
823 else
824 {
825 EClass.pc.homeZone = EClass.game.spatials.Find(EClass.game.Prologue.idStartZone);
826 Zone zone5 = null;
827 ZoneTransition transition = new ZoneTransition
828 {
829 state = ZoneTransition.EnterState.Auto
830 };
831 Chara c = EClass.game.cards.globalCharas.Find("ashland");
832 switch (EClass.debug.startScene)
833 {
834 case CoreDebug.StartScene.Zone:
836 transition = new ZoneTransition
837 {
838 state = ZoneTransition.EnterState.Exact,
840 z = EClass.game.Prologue.startZ
841 };
842 break;
843 case CoreDebug.StartScene.Home:
844 case CoreDebug.StartScene.Story_Test:
846 transition = new ZoneTransition
847 {
848 state = ZoneTransition.EnterState.Exact,
850 z = EClass.game.Prologue.startZ
851 };
852 break;
853 case CoreDebug.StartScene.Survival:
854 EClass.game.idPrologue = 3;
856 transition = new ZoneTransition
857 {
858 state = ZoneTransition.EnterState.Exact,
860 z = EClass.game.Prologue.startZ
861 };
862 break;
863 case CoreDebug.StartScene.Home_Cave:
864 EClass.game.idPrologue = 2;
866 transition = new ZoneTransition
867 {
868 state = ZoneTransition.EnterState.Exact,
870 z = EClass.game.Prologue.startZ
871 };
872 break;
873 case CoreDebug.StartScene.MeetFarris:
874 {
875 Zone parent4 = EClass.game.spatials.Find("nymelle");
876 zone5 = SpatialGen.Create("nymelle", parent4, register: true) as Zone;
877 zone5.lv = -2;
878 EClass.game.quests.Start("exploration", c, assignQuest: false);
879 break;
880 }
881 case CoreDebug.StartScene.NymelleBoss:
882 {
883 Zone parent3 = EClass.game.spatials.Find("nymelle");
884 zone5 = SpatialGen.Create("nymelle_boss", parent3, register: true) as Zone;
885 zone5.lv = -5;
886 EClass.game.quests.Start("exploration", c, assignQuest: false).ChangePhase(2);
887 break;
888 }
889 case CoreDebug.StartScene.AfterNymelle:
891 transition = new ZoneTransition
892 {
893 state = ZoneTransition.EnterState.Exact,
895 z = EClass.game.Prologue.startZ
896 };
897 EClass.game.quests.Start("exploration", c, assignQuest: false).ChangePhase(5);
898 EClass.game.quests.globalList.Add(Quest.Create("sharedContainer").SetClient(c, assignQuest: false));
899 EClass.game.quests.globalList.Add(Quest.Create("crafter").SetClient(c, assignQuest: false));
900 EClass.game.quests.globalList.Add(Quest.Create("defense").SetClient(c, assignQuest: false));
901 break;
902 case CoreDebug.StartScene.Melilith:
903 {
904 Zone parent2 = EClass.game.spatials.Find("cursed_manor");
905 zone5 = SpatialGen.Create("cursed_manor_dungeon", parent2, register: true) as Zone;
906 zone5.lv = -5;
907 break;
908 }
909 case CoreDebug.StartScene.Tefra:
910 {
911 Zone parent = EClass.game.spatials.Find("vernis");
912 zone5 = SpatialGen.Create("vernis_mine", parent, register: true) as Zone;
913 zone5.lv = -7;
914 break;
915 }
916 }
917 if (zone5 != null)
918 {
919 Player obj2 = player;
920 Chara chara2 = EClass.pc;
921 Zone zone2 = (EClass.pc.homeZone = zone5);
922 Zone zone4 = (chara2.currentZone = zone2);
923 obj2.zone = zone4;
924 EClass.pc.global.transition = transition;
925 }
926 else
927 {
928 Player obj3 = player;
929 Zone zone4 = (EClass.pc.currentZone = EClass.game.spatials.Find(EClass.debug.startZone));
930 obj3.zone = zone4;
931 EClass.pc.global.transition = new ZoneTransition
932 {
933 state = ZoneTransition.EnterState.Return
934 };
935 }
936 }
937 EClass.pc.homeZone.isKnown = true;
940 EClass.scene.Init(Scene.Mode.StartGame);
941 }
GameType
Definition: GameType.cs:2
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:8933
Chara SetGlobal(Zone _home, int x, int z)
Definition: Chara.cs:1453
override int MaxHP
Definition: Chara.cs:706
Stats mana
Definition: Chara.cs:1136
Stats stamina
Definition: Chara.cs:1128
string startZone
Definition: CoreDebug.cs:106
StartScene startScene
Definition: CoreDebug.cs:96
SurvivalManager survival
Definition: Game.cs:224
PartyManager parties
Definition: Game.cs:170
Prologue Prologue
Definition: Game.cs:260
Zone StartZone
Definition: Game.cs:274
static void KillActor()
Definition: LayerTitle.cs:191
static EmbarkActor actor
Definition: LayerTitle.cs:25
Party Create(Chara leader)
Definition: PartyManager.cs:9
Definition: Player.cs:11
void OnStartNewGame()
Definition: Player.cs:1378
Vector2Int posAsh
Definition: Prologue.cs:23
string idStartZone
Definition: Prologue.cs:9
Vector2Int posFiama
Definition: Prologue.cs:25
int hour
Definition: Prologue.cs:21
GameType type
Definition: Prologue.cs:7
int startX
Definition: Prologue.cs:11
Quest Start(string id, string idGlobalChara)
Definition: QuestManager.cs:41
void ChangePhase(int a)
Definition: Quest.cs:577
Quest SetClient(Chara c, bool assignQuest=true)
Definition: Quest.cs:380
static Quest Create(string _id, string _idPerson=null, Chara c=null)
Definition: Quest.cs:241
Stats Set(int[] _raw, int _rawIndex, Chara _CC)
Definition: Stats.cs:109
virtual int max
Definition: Stats.cs:68

References BaseCore.actionsNextFrame, LayerTitle.actor, Chara.AddCondition(), cards, Quest.ChangePhase(), EClass.core, PartyManager.Create(), Quest.Create(), CharaGen.Create(), SpatialGen.Create(), EClass.debug, CardManager.GlobalCharaList.Find(), SpatialManager.Find(), EClass.game, CardManager.globalCharas, QuestManager.globalList, Prologue.hour, Prologue.idStartZone, Scene.Init(), LayerTitle.KillActor(), Chara.mana, Stats.max, Chara.MaxHP, Player.OnStartNewGame(), EClass.pc, Prologue.posAsh, Prologue.posFiama, Prologue, quests, EClass.scene, Stats.Set(), Quest.SetClient(), Chara.SetGlobal(), spatials, Chara.stamina, QuestManager.Start(), CoreDebug.startScene, Prologue.startX, CoreDebug.startZone, StartZone, and Prologue.type.

Referenced by CoreDebug.QuickStart(), and DramaOutcome.StartNewGame().

◆ TryLoad()

static bool Game.TryLoad ( string  id,
bool  cloud,
Action  onLoad 
)
inlinestatic

Definition at line 307 of file Game.cs.

308 {
310 {
311 onLoad();
312 return true;
313 }
314 EClass.ui.Say("incompatible");
315 return false;
316 }
static bool CanLoad(string root)
Definition: GameIO.cs:134

References GameIO.CanLoad(), CorePath.RootSave, CorePath.RootSaveCloud, and EClass.ui.

Referenced by AM_Adv._OnUpdateInput().

◆ Wait() [1/3]

static void Game.Wait ( float  a)
inlinestatic

Definition at line 289 of file Game.cs.

290 {
291 waitTimer = a * (float)(EClass.core.config.game.waiter * 25) / 100f;
292 }

References Core.config, EClass.core, CoreConfig.game, CoreConfig.GameConfig.waiter, and waitTimer.

◆ Wait() [2/3]

static new void Game.Wait ( float  a,
Card  c 
)
inlinestatic

Definition at line 281 of file Game.cs.

282 {
283 if (c != null && c.isSynced && !c.IsPC)
284 {
285 Wait(a);
286 }
287 }
virtual bool IsPC
Definition: Card.cs:2117
virtual bool isSynced
Definition: Card.cs:2061
Definition: Wait.cs:2

References Card.IsPC, and Card.isSynced.

◆ Wait() [3/3]

static new void Game.Wait ( float  a,
Point  p 
)
inlinestatic

Definition at line 276 of file Game.cs.

277 {
278 _ = p?.IsSync;
279 }
bool IsSync
Definition: Point.cs:332

References Point.IsSync.

Referenced by EClass.Wait().

Member Data Documentation

◆ activeZone

◆ backupTime

double Game.backupTime

Definition at line 209 of file Game.cs.

Referenced by OnUpdate().

◆ bp

GameBlueprint Game.bp

Definition at line 244 of file Game.cs.

◆ cards

CardManager Game.cards = new CardManager()

Definition at line 155 of file Game.cs.

Referenced by ReligionManager.ジュアさまの薄い本をください(), QuestManager.Add(), Zone.AddGlobalCharasOnActivate(), QuestManager.AddQuestAsh(), QuestManager.AddQuestFiama(), Zone.AddRandomVisitor(), GameDate.AdvanceDay(), GameDate.AdvanceHour(), LayerShippingResult.Awake(), TraitSalesTag.CanTagSale(), ElementContainerFaction.CheckDirty(), SurvivalManager.CheckLoytelDebt(), Faction.CountMembers(), Card.Create(), LayerInventory.CreateContainer(), Card.Destroy(), Chara.Die(), CoreDebug.Fix_RemoveDemitas(), RefChara.Get(), DramaSequence.GetActor(), RefChara.GetAndCache(), Faction.HasMember(), TaskDump.IsValidContainer(), Faction.IsWearingPanty(), TaskDump.ListThingsToPut(), Zone_Specwing.OnActivate(), Faction.OnAdvanceMonth(), Zone_WindRest.OnAfterSimulate(), Zone_Nymelle.OnBeforeSimulate(), QuestDefense.OnChangePhase(), QuestVernis.OnChangePhase(), DramaOutcome.OnClaimLand(), Quest.OnClickQuest(), QuestIntroInspector.OnComplete(), QuestSharedContainer.OnComplete(), TraitDrinkMilkMother.OnDrink(), QuestDialog.OnDropReward(), Zone_DungeonPuppy.OnGenerateMap(), ElementContainerFaction.OnJoinFaith(), ElementContainerFaction.OnLeaveFaith(), ZoneInstanceBout.OnLeaveZone(), ListPeopleRevive.OnList(), OnLoad(), TraitStoryBookHome.OnRead(), QuestDebt.OnStart(), QuestExploration.OnStart(), DramaManager.ParseLine(), InvOwnerDeliver.PayBill(), DramaOutcome.QuestExploration_AfterComplete(), DramaOutcome.QuestExploration_AfterCrystal(), FactionBranch.ReceivePackages(), WindowChara.RefreshProfile(), LayerQuestBoard.RefreshRanking(), Chara.RemoveGlobal(), CoreDebug.ResetPetUpgrades(), SerializedCards.Restore(), Zone.Revive(), AI_Idle.Run(), TaskDump.Run(), World.SendPackage(), Meeting.SetChara(), Chara.SetGlobal(), FactionBranch.SetOwner(), UIFactionInfo.SetZone(), UIZoneInfo.SetZone(), GameDate.ShipGoods(), GameDate.ShipPackages(), QuestManager.Start(), StartNewGame(), Zone.TryAddThingInSharedContainer(), Faction.TryPayBill(), GrowSystem.TryPick(), TraitBed.ValidateOwners(), and EloPos.WriteNote().

◆ config

◆ countLoadedMaps

int Game.countLoadedMaps

Definition at line 232 of file Game.cs.

Referenced by Zone.Activate(), and Scene.Init().

◆ dateScratch

int Game.dateScratch

Definition at line 206 of file Game.cs.

◆ domains

DomainManager Game.domains = new DomainManager()

Definition at line 164 of file Game.cs.

Referenced by OnLoad().

◆ factions

◆ flags

Flags Game.flags = new Flags()

Definition at line 212 of file Game.cs.

Referenced by OnUpdate().

◆ gameSpeedIndex

int Game.gameSpeedIndex = 1

◆ id

◆ idDifficulty

int Game.idDifficulty

Definition at line 203 of file Game.cs.

◆ idPrologue

int Game.idPrologue

Definition at line 200 of file Game.cs.

Referenced by DramaOutcome.fiama_gold(), UICharaMaker.ListModes(), and UICharaMaker.SetChara().

◆ Instance

Game Game.Instance
static

Definition at line 143 of file Game.cs.

◆ isCloud

◆ isKilling

bool Game.isKilling

Definition at line 240 of file Game.cs.

Referenced by LayerInventory.OnKill().

◆ isLoading

◆ isPaused

bool Game.isPaused
static

Definition at line 149 of file Game.cs.

Referenced by GameUpdater.CharaUpdater.FixedUpdate().

◆ lastActiveZone

Zone Game.lastActiveZone

Definition at line 250 of file Game.cs.

Referenced by LayerPeople.CreateSelectEmbarkMembers().

◆ lastGameSpeedIndex

int Game.lastGameSpeedIndex = 1

Definition at line 228 of file Game.cs.

Referenced by ActionMode.UnPause().

◆ loadedTextures

HashSet<Texture2D> Game.loadedTextures = new HashSet<Texture2D>()

Definition at line 254 of file Game.cs.

Referenced by Card.GetPaintSprite().

◆ log

MsgLog Game.log
Initial value:
= new MsgLog
{
id = "log"
}
Definition: MsgLog.cs:7

Definition at line 185 of file Game.cs.

Referenced by ContentChronicle.OnSwitchContent(), and Msg.SayRaw().

◆ lostThings

List<Thing> Game.lostThings = new List<Thing>()

Definition at line 218 of file Game.cs.

◆ parties

PartyManager Game.parties = new PartyManager()

Definition at line 170 of file Game.cs.

◆ player

new Player Game.player = new Player()

Definition at line 176 of file Game.cs.

Referenced by Core.Awake(), GameIndex.Create(), Load(), OnLoad(), OnUpdate(), and ItemCulture.Refresh().

◆ principal

◆ quests

QuestManager Game.quests = new QuestManager()

Definition at line 179 of file Game.cs.

Referenced by InvOwnerDeliver._OnProcess(), ActPlan._Update(), QuestManager.Add(), GameDate.AdvanceDay(), GameDate.AdvanceHour(), DramaCustomSequence.Build(), QuestVernis.CanUpdateOnTalk(), SurvivalManager.CheckLoytelDebt(), Quest.Complete(), QuestCraft.Deliver(), QuestDeliver.Deliver(), CardRenderer.Draw(), AI_PlayMusic.Evaluate(), ZonePreEnterOnCompleteQuestInstance.Execute(), Player.ExitBorder(), Quest.Fail(), Recipe.GetQuestTrack(), Chara.GiveGift(), TraitDoorman_Fighter.GiveTrial(), TraitDoorman_Mage.GiveTrial(), TraitDoorman_Thief.GiveTrial(), DramaOutcome.guild_trial(), Quest.Init(), Scene.Init(), Chara.IsEscorted(), RecipeManager.ListSources(), DramaOutcome.melilith_friend(), Player.ModKarma(), Zone_Exile.OnActivate(), Zone_Specwing.OnActivate(), Trait.OnBarter(), QuestDefense.OnChangePhase(), DramaOutcome.OnClaimLand(), ItemQuestTracker.OnClickClose(), QuestIntroInspector.OnComplete(), QuestLoytelFarm.OnComplete(), QuestSharedContainer.OnComplete(), QuestShippingChest.OnComplete(), QuestVernis.OnComplete(), Quest.OnCompleteTask(), TCExtra.OnDraw(), QuestDialog.OnDropReward(), Player.Flags.OnEnterZone(), Zone_DungeonPuppy.OnGenerateMap(), OnLoad(), TraitStoryBookHome.OnRead(), QuestExploration.OnStart(), QuestIntoDarkness.OnStart(), Player.OnStartNewGame(), ContentQuest.OnSwitchContent(), DramaManager.ParseLine(), InvOwnerDeliver.PayBill(), DramaOutcome.poppy_found(), DramaOutcome.QuestDebt_reward(), DramaOutcome.QuestExploration_AfterComplete(), DramaOutcome.QuestExploration_AfterCrystal(), DramaOutcome.QuestExploration_MeetFarris(), DramaOutcome.QuestExploration_MeetFarris2(), CoreDebug.QuickStart(), ItemQuestTracker.Refresh(), LayerShippingResult.Refresh(), WidgetQuestTracker.Refresh(), TCOrbitChara.RefreshAll(), LayerQuestBoard.RefreshQuest(), CoreDebug.Reset_LoytelDebt(), RecipeUpdater.RunRecipe(), ItemQuest.SetQuest(), Chara.ShowDialog(), StartNewGame(), ActThrow.Throw(), Chara.Tick(), Recipe.ToggleTrack(), Chara.TryDropBossLoot(), WidgetQuestTracker.TryShow(), TraitTeleporter.TryTeleport(), CoreDebug.UpdateInput(), and Zone.UpdateQuests().

◆ referenceMap

Dictionary<string, IGlobalValue> Game.referenceMap = new Dictionary<string, IGlobalValue>()

Definition at line 252 of file Game.cs.

◆ relations

RelationManager Game.relations = new RelationManager()

Definition at line 182 of file Game.cs.

Referenced by GameDate.AdvanceDay().

◆ religions

◆ saveCount

int Game.saveCount

Definition at line 234 of file Game.cs.

◆ seed

◆ sessionMin

int Game.sessionMin

Definition at line 230 of file Game.cs.

Referenced by QueueList< T >.GetTask(), and TaskList< T >.GetTask().

◆ spatials

◆ survival

◆ teleports

◆ timeSinceStart

float Game.timeSinceStart

Definition at line 236 of file Game.cs.

Referenced by OnUpdate().

◆ uniforms

PCCUniformManager Game.uniforms = new PCCUniformManager()

Definition at line 191 of file Game.cs.

Referenced by LayerEditPCC.Activate(), LayerEditPCC.Apply(), and Chara.ApplyJob().

◆ updater

◆ version

Version Game.version

Definition at line 167 of file Game.cs.

◆ waitTimer

float Game.waitTimer
static

Definition at line 145 of file Game.cs.

Referenced by OnUpdate(), and Wait().

◆ welcomeTimer

float Game.welcomeTimer
private

Definition at line 256 of file Game.cs.

◆ world

Property Documentation

◆ altAbility

bool Game.altAbility
get

Definition at line 270 of file Game.cs.

Referenced by LayerAbility.OnInit(), ButtonAbility.SetAct(), and UI.ToggleAbility().

◆ altCraft

bool Game.altCraft
get

Definition at line 268 of file Game.cs.

Referenced by Scene.Init().

◆ altInv

bool Game.altInv
get

◆ altUI

bool Game.altUI
get

Definition at line 264 of file Game.cs.

Referenced by ActionMode.Activate(), BuildMenu.Deactivate(), and BuildMenu.Init().

◆ IsSurvival

◆ IsWaiting

bool Game.IsWaiting
staticget

Definition at line 258 of file Game.cs.

Referenced by Scene.OnUpdate().

◆ Prologue

◆ StartZone

◆ UseGrid

bool Game.UseGrid
get

Definition at line 262 of file Game.cs.

Referenced by InvOwner.OnDrag(), and InvOwner.Transaction.Process().


The documentation for this class was generated from the following file: