Elin Decompiled Documentation EA 23.316 Nightly
Loading...
Searching...
No Matches
Core.cs
Go to the documentation of this file.
1using System;
2using System.Collections;
3using System.Collections.Generic;
4using System.IO;
5using System.Text;
6using DG.Tweening;
7using IniParser;
8using IniParser.Model;
9using ReflexCLI;
10using Steamworks;
11using UnityEngine;
12
13public class Core : BaseCore
14{
15 public new static Core Instance;
16
17 public static float delta;
18
19 public static float avgDelta;
20
21 public static float gameDelta;
22
23 public static float gameDeltaNoPause;
24
25 public static float fixedFrame;
26
27 public static bool spiked;
28
30
32
34
36
38
39 public ModManager mods = new ModManager();
40
41 public PCCManager pccs;
42
44
46
48
50
51 public CoreRef refs;
52
54
56
57 public Steam steam;
58
59 public bool useUImat;
60
61 public bool trial;
62
63 public UI ui;
64
65 public Scene scene;
66
68
69 [NonSerialized]
71
72 public Game game;
73
74 [NonSerialized]
75 public bool initialized;
76
77 [NonSerialized]
78 public string[] launchArgs;
79
80 private bool? lastFullScreen;
81
82 private float nextResolutionUpdate;
83
84 private float skinTimer;
85
86 public bool IsGameStarted
87 {
88 get
89 {
90 if (game != null)
91 {
92 return game.activeZone != null;
93 }
94 return false;
95 }
96 }
97
98 public override float uiScale => ui.canvasScaler.scaleFactor;
99
100 protected override void Awake()
101 {
102 base.Awake();
103 Debug.Log("Core Awake");
104 Debug.Log("Version:" + version.GetText());
105 QualitySettings.vSyncCount = 0;
106 Application.targetFrameRate = 60;
107 IO.CreateDirectory(CorePath.Temp);
108 SetCurrent();
109 Lang.langCode = "";
110 if (Application.isEditor && debug.langCode != 0)
111 {
112 forceLangCode = debug.langCode.ToString();
113 }
114 launchArgs = (Application.isEditor ? debug.command.Split(',') : Environment.GetCommandLineArgs());
115 for (int i = 0; i < launchArgs.Length; i++)
116 {
117 string text = launchArgs[i].Replace("-", "").ToUpper();
118 launchArgs[i] = text;
119 Debug.Log("Commandline args:" + text);
120 if (text.StartsWith("LANG_"))
121 {
122 forceLangCode = text.Replace("LANG_", "");
123 continue;
124 }
125 switch (text)
126 {
127 case "DEV":
128 releaseMode = ReleaseMode.Debug;
129 break;
130 case "UPDATE_LANG":
131 Lang.runUpdate = true;
132 break;
133 case "NOMOD":
134 ModManager.disableMod = true;
135 break;
136 }
137 }
138 NewsList.dict = null;
139 InvOwner.Trader = (InvOwner.Main = null);
140 SpriteSheet.dict.Clear();
141 SpriteSheet.loadedPath.Clear();
143 LayerDrama.haltPlaylist = false;
144 LayerDrama.keepBGM = false;
145 BaseModManager.isInitialized = false;
146 Net.isUploading = false;
147 MapPiece.initialized = false;
148 ActPlan.warning = false;
149 Game.isPaused = false;
150 if (Application.isEditor && BaseCore.resetRuntime)
151 {
152 ResetRuntime();
153 }
154 Window.dictData.Clear();
155 LayerInventory.listInv.Clear();
156 debug = Resources.Load<CoreDebug>("_Debug " + releaseMode);
157 debug.enable = releaseMode != ReleaseMode.Public;
158 if (useUImat)
159 {
160 Canvas.GetDefaultCanvasMaterial().CopyPropertiesFromMaterial(matUI);
161 Canvas.GetDefaultCanvasMaterial().shader = matUI.shader;
162 }
163 if (!ui)
164 {
165 ui = Util.Instantiate<UI>("UI/UI");
166 }
167 if (!scene)
168 {
169 scene = Util.Instantiate<Scene>("Scene/Scene");
170 }
172 ui.ShowCover();
173 canvas = ui.canvas;
174 ui.OnCoreStart();
175 BaseCore.BlockInput = () => ui.IsDragging;
176 CommandRegistry.assemblies.Add(typeof(Core).Assembly);
177 SoundData.EditorPlaySpatial = delegate(SoundData a)
178 {
179 game.player.chara.PlaySound(a.name);
180 };
181 SoundManager.funcCanPlayBGM = () => !LayerDrama.haltPlaylist && !LayerDrama.keepBGM;
183 MOD.OnAddPcc = pccs.Add;
185 Portrait.modPortraitBGFs = new ModItemList<Sprite>();
186 Portrait.modPortraitBGs = new ModItemList<Sprite>();
187 Portrait.modPortraits = new ModItemList<Sprite>();
188 Portrait.modOverlays = new ModItemList<Sprite>();
189 Portrait.modFull = new ModItemList<Sprite>();
190 Portrait.dictList = new Dictionary<string, List<ModItem<Sprite>>>();
191 TileType.Init();
193 Debug.Log(steam.steamworks.settings.applicationId);
194 }
195
196 private void Start()
197 {
199 Debug.Log("Loading Config:" + CoreConfig.path + " - " + config);
200 if (config != null && config.other.disableMods)
201 {
202 ModManager.disableMod = true;
203 }
204 try
205 {
206 steam.Init();
207 }
208 catch
209 {
210 }
211 StartCase();
212 }
213
214 public void StartCase()
215 {
216 Debug.Log("StartCase:" + ModManager.IsInitialized);
218 {
220 StartCoroutine(mods.RefreshMods(delegate
221 {
222 MOD.actorSources.Initialize();
223 SpriteReplacer.dictSkins.Clear();
224 SpriteReplacer.ListSkins();
225 StartCase();
227 return;
228 }
229 Debug.Log("Plugins:" + ModManager.ListPluginObject.Count);
230 foreach (object item in ModManager.ListPluginObject)
231 {
232 Component component = item as Component;
233 if (!component)
234 {
235 Debug.Log("no go");
236 continue;
237 }
238 GameObject obj = component.gameObject;
239 obj.SendMessage("OnStartCore");
240 Component[] componentsInChildren = obj.GetComponentsInChildren<Component>();
241 foreach (Component component2 in componentsInChildren)
242 {
243 Debug.Log(component2.GetType().Assembly.GetName().Name);
244 ClassCache.assemblies.Add(component2.GetType().Assembly.GetName().Name);
245 }
246 break;
247 }
248 sources.Init();
249 if (!forceLangCode.IsEmpty())
250 {
252 }
253 else if (config == null)
254 {
255 Debug.Log("Config doesn't exist.");
256 try
257 {
258 if (debug.enable || !SteamAPI.IsSteamRunning())
259 {
260 BookList.dict = null;
261 BottleMessageList.list = null;
262 ui.ShowLang();
263 return;
264 }
265 string currentGameLanguage = SteamApps.GetCurrentGameLanguage();
266 if (!(currentGameLanguage == "chinese"))
267 {
268 if (!(currentGameLanguage == "japanese"))
269 {
270 BookList.dict = null;
271 BottleMessageList.list = null;
272 ui.ShowLang();
273 return;
274 }
275 langCode = "JP";
276 }
277 else
278 {
279 langCode = "CN";
280 }
281 }
282 catch (Exception message)
283 {
284 Debug.Log(message);
285 }
286 }
287 if (debug.showSceneSelector || (Input.GetKey(KeyCode.LeftShift) && debug.enable))
288 {
289 ui.ShowSceneSelector();
290 }
291 else
292 {
293 Init();
294 }
295 }
296
297 private void FixedUpdate()
298 {
299 fixedFrame += 1f;
300 }
301
302 public void Update()
303 {
304 frame++;
305 SoundManager.requestCount = 0;
307 EInput.uiMousePosition = Input.mousePosition / ui.canvasScaler.scaleFactor;
308 if (!initialized)
309 {
310 return;
311 }
312 ui.OnUpdate();
314 PoolManager.ignorePool = debug.ignorePool;
315 if ((bool)screen.tileMap && !screen.tileMap.passBlock.mat.mainTexture)
316 {
318 }
319 if (useUImat)
320 {
321 Canvas.GetDefaultCanvasMaterial().CopyPropertiesFromMaterial(matUI);
322 }
323 avgDelta += (Time.smoothDeltaTime - delta) * 0.1f;
324 delta = Time.smoothDeltaTime;
325 if (delta > 0.1f)
326 {
327 delta = 0.1f;
328 }
329 EInput.delta = (ButtonState.delta = delta);
330 if (lastFullScreen != Screen.fullScreen)
331 {
332 int width = Display.main.systemWidth;
333 int height = Display.main.systemHeight;
334 if (config != null && config.graphic.fixedResolution)
335 {
336 width = config.graphic.w;
337 height = config.graphic.h;
338 }
339 if (Screen.fullScreen)
340 {
341 Screen.SetResolution(width, height, fullscreen: true);
342 }
343 lastFullScreen = Screen.fullScreen;
345 }
346 if (nextResolutionUpdate <= 0f)
347 {
348 if (config != null && config.graphic.fixedResolution)
349 {
350 int w = config.graphic.w;
351 int h = config.graphic.h;
352 if (Screen.width != w || Screen.height != h)
353 {
354 Screen.SetResolution(w, h, Screen.fullScreen);
355 }
356 }
357 if (Screen.width != lastScreenWidth || Screen.height != lastScreenHeight)
358 {
360 }
362 }
363 else
364 {
366 }
367 if (IsGameStarted)
368 {
369 game.OnUpdate();
371 gameDelta = (FlockChild.delta = (ui.IsPauseGame ? 0f : gameDeltaNoPause));
372 }
373 else
374 {
375 gameDelta = 0f;
376 }
377 scene.OnUpdate();
378 if (actionsNextFrame.Count > 0)
379 {
380 for (int num = actionsNextFrame.Count - 1; num >= 0; num--)
381 {
382 Action action = actionsNextFrame[num];
383 actionsNextFrame.RemoveAt(num);
384 action?.Invoke();
385 }
386 }
387 }
388
389 private void LateUpdate()
390 {
391 if (!initialized)
392 {
393 return;
394 }
395 if (UIButton.actionTooltip != null)
396 {
398 UIButton.actionTooltip = null;
399 }
400 if (actionsLateUpdate.Count > 0)
401 {
402 for (int num = actionsLateUpdate.Count - 1; num >= 0; num--)
403 {
404 actionsLateUpdate[num]();
405 actionsLateUpdate.RemoveAt(num);
406 }
407 }
409 }
410
411 public void OnApplicationFocus(bool focus)
412 {
413 Resources.UnloadUnusedAssets();
414 GC.Collect();
415 if (config == null)
416 {
417 return;
418 }
419 if (focus)
420 {
421 AudioListener.volume = 1f;
422 }
423 else if (config.other.muteBackground)
424 {
425 AudioListener.volume = 0f;
426 }
427 if (!focus || !Instance)
428 {
429 return;
430 }
431 if (actionsNextFrame.Count == 0)
432 {
433 actionsNextFrame.Add(delegate
434 {
436 actionsNextFrame.Add(delegate
437 {
438 if (IsGameStarted)
439 {
440 if (Application.isEditor && (bool)WidgetMinimap.Instance)
441 {
442 WidgetMinimap.Instance.Reload();
443 }
444 foreach (CardRow row in sources.cards.rows)
445 {
446 if (row.replacer.isChecked.GetValueOrDefault(row.idSprite) && row.replacer.data != null)
447 {
448 row.replacer.Validate();
449 }
450 }
451 foreach (SpriteReplacer value in SpriteReplacer.dictSkins.Values)
452 {
453 value.data?.LoadPref();
454 }
456 }
457 });
458 });
459 }
461 {
462 foreach (PCC.Part value2 in pccs.allParts.Values)
463 {
464 foreach (ModItem<Texture2D> value3 in value2.modTextures.Values)
465 {
466 value3.ClearCache();
467 }
468 }
469 CharaActorPCC[] array = UnityEngine.Object.FindObjectsOfType<CharaActorPCC>();
470 for (int i = 0; i < array.Length; i++)
471 {
472 array[i].provider.Rebuild();
473 }
474 }
475 EInput.Consume();
476 EInput.dragHack = 0f;
478 }
479
480 public void OnApplicationQuit()
481 {
482 try
483 {
484 Widget[] componentsInChildren = ui.widgets.GetComponentsInChildren<Widget>(includeInactive: true);
485 foreach (Widget widget in componentsInChildren)
486 {
487 if (widget.gameObject != null)
488 {
489 UnityEngine.Object.Destroy(widget.gameObject);
490 }
491 }
492 IO.PrintLog();
493 }
494 catch (Exception ex)
495 {
496 Debug.Log("Exception:" + ex);
497 }
498 try
499 {
500 if (SteamAPI.IsSteamRunning())
501 {
502 SteamAPI.Shutdown();
503 }
504 }
505 catch (Exception ex2)
506 {
507 Debug.Log("Exception:" + ex2);
508 }
509 try
510 {
511 IO.DeleteDirectory(CorePath.Temp);
513 }
514 catch (Exception ex3)
515 {
516 Debug.Log("Exception:" + ex3);
517 }
518 }
519
520 public void ResetRuntime()
521 {
522 BaseCore.resetRuntime = false;
523 BiomeProfile.forceInitialize = true;
524 WidgetHotbar.registering = false;
525 WidgetHotbar.registeringItem = null;
526 WordGen.initialized = false;
527 RecipeManager.rebuild = true;
528 BookList.dict = null;
529 BottleMessageList.list = null;
530 SpawnList.allList.Clear();
531 }
532
533 public void Init()
534 {
535 Debug.Log("Initializing:" + langCode + "/" + forceLangCode);
536 StartCoroutine("OnEndOfFrame");
537 InvokeRepeating("Update100ms", 0.1f, 0.1f);
538 UnityEngine.Object.DestroyImmediate(ui.layoutLang.gameObject);
539 GameIO.Init();
541 if (config.lang.IsEmpty())
542 {
543 config.lang = "EN";
544 }
545 SetLang(config.lang);
546 refs.Init();
547 debug.Init();
548 SpriteSheet.Add("Media/Graphics/Icon/icons_48");
549 Cal.Init();
550 Colors.Init();
551 gameSetting.Init();
552 PCCManager.current.Init();
553 SpriteVariationManager.current.Init();
554 scene.InitPass();
555 textures.Init();
556 textures.RefreshTextures();
557 SoundManager.current.Reset();
558 if (debug.validatePref)
559 {
561 }
562 if (debug.startScene == CoreDebug.StartScene.Title)
563 {
564 scene.Init(Scene.Mode.Title);
565 }
566 else
567 {
568 debug.QuickStart();
569 }
570 ui.HideCover(2f);
571 initialized = true;
572 }
573
574 public void Quit()
575 {
576 Application.Quit();
577 Debug.Log("Quit");
578 }
579
580 public override void ConsumeInput()
581 {
582 EInput.Consume();
583 }
584
585 public static Core SetCurrent(Core _current = null)
586 {
587 if ((bool)Instance)
588 {
589 return Instance;
590 }
591 Instance = _current ?? UnityEngine.Object.FindObjectOfType<Core>();
592 BaseCore.Instance = Instance;
593 if ((bool)Instance)
594 {
595 Instance.SetReferences();
596 }
597 return Instance;
598 }
599
600 public static Core GetCurrent()
601 {
602 return Instance ?? SetCurrent();
603 }
604
605 public void SetReferences()
606 {
607 CorePath.Init();
608 SourceData.dataPath = CorePath.packageCore + "/Data/Source/";
609 Instance = (EClass.core = (EMono.core = this));
610 SkinManager._Instance = skins;
611 PathManager.Instance = pathManager;
612 EffectManager.Instance = effects;
613 sources.InitLang();
614 }
615
617 {
618 if (releaseMode != m)
619 {
620 releaseMode = m;
621 debug = Resources.Load<CoreDebug>("_Debug " + releaseMode);
622 }
623 }
624
625 private IEnumerator OnEndOfFrame()
626 {
627 while (true)
628 {
629 yield return new WaitForEndOfFrame();
630 if ((bool)screen.guide)
631 {
632 screen.guide.OnEndOfFrame();
633 }
634 }
635 }
636
637 private void Update100ms()
638 {
639 if (IsGameStarted)
640 {
641 game.updater.Update100ms();
642 }
643 }
644
645 public void OnChangeResolution()
646 {
647 if (config != null)
648 {
649 config.OnChangeResolution();
650 }
651 screen.RefreshScreenSize();
652 lastScreenWidth = Screen.width;
653 lastScreenHeight = Screen.height;
654 IChangeResolution[] componentsInChildren = ui.GetComponentsInChildren<IChangeResolution>();
655 for (int i = 0; i < componentsInChildren.Length; i++)
656 {
657 componentsInChildren[i].OnChangeResolution();
658 }
660 }
661
662 public void Halt()
663 {
664 }
665
666 public override void FreezeScreen(float duration = 0.2f)
667 {
668 ui.FreezeScreen(duration);
669 }
670
671 public override void UnfreezeScreen()
672 {
673 ui.UnfreezeScreen();
674 }
675
676 public override void RebuildBGMList()
677 {
678 refs.RebuildBGMList();
679 }
680
681 public override void StopEventSystem(Component c, Action action, float duration = 0.12f)
682 {
683 eventSystem.enabled = false;
684 c.transform.DOScale(new Vector3(1f, 0f, 1f), duration).OnKill(delegate
685 {
686 eventSystem.enabled = true;
687 }).OnComplete(delegate
688 {
689 action();
690 })
691 .SetEase(Ease.Linear);
692 }
693
694 public override void StopEventSystem(float duration = 0.2f)
695 {
696 eventSystem.enabled = false;
697 TweenUtil.Tween(duration, null, delegate
698 {
699 eventSystem.enabled = true;
700 });
701 }
702
703 public void SetLang(string langCode, bool force = false)
704 {
705 if (!(Lang.langCode == langCode) || !sources || !sources.langGeneral)
706 {
707 Lang.Init(langCode);
708 AliasGen.list = null;
709 NameGen.list = null;
710 WordGen.initialized = false;
711 sources.OnChangeLang();
712 if (game != null && !IsGameStarted)
713 {
714 game.Kill();
715 }
716 config.OnSetLang();
717 mods.InitLang();
718 if (!Lang.isBuiltin)
719 {
720 sources.ImportSourceTexts();
721 }
722 BaseModManager.PublishEvent("elin.source.lang_set", langCode);
723 }
724 }
725
726 public static int[] ParseElements(string str)
727 {
728 if (string.IsNullOrEmpty(str))
729 {
730 return Array.Empty<int>();
731 }
732 string[] array = str.Replace("\n", "").Split(',');
733 int[] array2 = new int[array.Length * 2];
734 for (int i = 0; i < array.Length; i++)
735 {
736 string[] array3 = array[i].Split('/');
737 array2[i * 2] = GetElement(array3[0]);
738 array2[i * 2 + 1] = ((!int.TryParse(array3.TryGet(1, returnNull: true), out var result)) ? 1 : result);
739 }
740 return array2;
741 }
742
743 public static int GetElement(string id)
744 {
745 SetCurrent();
746 if (sourceElement == null)
747 {
748 sourceElement = UnityEngine.Object.FindObjectOfType<SourceManager>().GetComponent<SourceManager>().elements;
749 }
750 if (!sourceElement.initialized)
751 {
752 sourceElement.Init();
753 }
754 id = id?.Trim() ?? "_void";
755 if (!sourceElement.alias.TryGetValue(id, out var value))
756 {
757 if (sourceElement.fuzzyAlias.TryGetValue(id, out var value2))
758 {
759 Debug.Log("#element lookup: '" + id + "' -> '" + value2 + "'");
760 value = sourceElement.alias[value2];
761 }
762 else
763 {
764 Debug.LogWarning("#element not found: '" + id + "'");
765 value = sourceElement.rows[0];
766 }
767 }
768 return value.id;
769 }
770
771 public void ApplySkins()
772 {
773 IUISkin[] componentsInChildren = ui.GetComponentsInChildren<IUISkin>(includeInactive: true);
774 for (int i = 0; i < componentsInChildren.Length; i++)
775 {
776 componentsInChildren[i].ApplySkin();
777 }
778 }
779
780 public static IniData GetElinIni()
781 {
782 string pathIni = CorePath.PathIni;
783 string ie = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
784 try
785 {
786 FileIniDataParser fileIniDataParser = new FileIniDataParser();
787 if (!File.Exists(pathIni))
788 {
789 File.CreateText(pathIni).Close();
790 }
791 IniData iniData = fileIniDataParser.ReadFile(pathIni, Encoding.UTF8);
792 if (iniData.GetKey("pass").IsEmpty())
793 {
794 string text = "";
795 for (int i = 0; i < 4; i++)
796 {
797 text += ie.RandomItem();
798 }
799 iniData.Global["pass"] = text;
800 fileIniDataParser.WriteFile(pathIni, iniData);
801 }
802 return iniData;
803 }
804 catch (Exception message)
805 {
806 Debug.Log(message);
807 Debug.Log("exception: Failed to parse:" + pathIni);
808 IO.DeleteFile(pathIni);
809 File.CreateText(pathIni).Close();
810 return null;
811 }
812 }
813
814 public static void SaveElinIni(IniData ini)
815 {
816 new FileIniDataParser().WriteFile(CorePath.PathIni, ini);
817 }
818
819 public static void TryWarnMod(Action action, bool warn = true)
820 {
821 if (warn)
822 {
823 IniData ini = GetElinIni();
824 if (ini.Global["agreed_usercontens_usage_terms"] != "yes")
825 {
826 string[] items = new string[3] { "readTerms", "agree", "disagree" };
827 Dialog.List("dialogTermsOfUseUGC".lang(), items, (string j) => j, delegate(int c, string d)
828 {
829 switch (c)
830 {
831 case 0:
832 LayerHelp.Toggle("custom", "terms2");
833 return false;
834 case 1:
835 ini.Global["agreed_usercontens_usage_terms"] = "yes";
836 SaveElinIni(ini);
837 action();
838 break;
839 }
840 return true;
841 }, canCancel: true);
842 return;
843 }
844 }
845 action();
846 }
847
848 public static void TryWarnUpload(Action action)
849 {
850 IniData ini = GetElinIni();
851 if (ini.Global["agreed_usercontents_upload_terms"] != "yes")
852 {
853 string[] items = new string[3] { "readTerms", "agree", "disagree" };
854 Dialog.List("dialogTermsOfUse".lang(), items, (string j) => j, delegate(int c, string d)
855 {
856 switch (c)
857 {
858 case 0:
859 LayerHelp.Toggle("custom", "terms");
860 return false;
861 case 1:
862 ini.Global["agreed_usercontents_upload_terms"] = "yes";
863 SaveElinIni(ini);
864 action();
865 break;
866 }
867 return true;
868 }, canCancel: true);
869 }
870 else
871 {
872 action();
873 }
874 }
875}
ReleaseMode
Definition: ReleaseMode.cs:2
virtual float gameSpeed
Definition: ActionMode.cs:119
int lastScreenHeight
Definition: BaseCore.cs:44
string langCode
Definition: BaseCore.cs:25
static bool IsOffline
Definition: BaseCore.cs:9
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
int frame
Definition: BaseCore.cs:40
string forceLangCode
Definition: BaseCore.cs:37
Canvas canvas
Definition: BaseCore.cs:34
Version version
Definition: BaseCore.cs:17
int lastScreenWidth
Definition: BaseCore.cs:42
static bool resetRuntime
Definition: BaseCore.cs:13
ReleaseMode releaseMode
Definition: BaseCore.cs:23
List< Action > actionsLateUpdate
Definition: BaseCore.cs:29
ScreenGuide guide
void RefreshScreenSize()
BaseTileMap tileMap
static void PublishEvent(string eventId, object data=null)
RenderDataObjDummy rendererObjDummy
Definition: BaseTileMap.cs:227
MeshPass passBlock
Definition: BaseTileMap.cs:147
void OnChangeResolution()
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6543
SpriteProvider provider
Definition: CharaActorPCC.cs:9
static HashSet< string > assemblies
Definition: ClassCache.cs:54
static CoreConfig TryLoadConfig()
Definition: CoreConfig.cs:670
GraphicSetting graphic
Definition: CoreConfig.cs:615
string lang
Definition: CoreConfig.cs:593
void OnChangeResolution()
Definition: CoreConfig.cs:848
static string path
Definition: CoreConfig.cs:644
OtherSetting other
Definition: CoreConfig.cs:627
void OnSetLang()
Definition: CoreConfig.cs:1033
static void Init()
Definition: CoreConfig.cs:720
void Init()
Definition: CoreDebug.cs:343
bool showSceneSelector
Definition: CoreDebug.cs:124
bool ignorePool
Definition: CoreDebug.cs:132
string command
Definition: CoreDebug.cs:151
bool validatePref
Definition: CoreDebug.cs:265
void QuickStart()
Definition: CoreDebug.cs:349
bool enable
Definition: CoreDebug.cs:301
bool skipModSync
Definition: CoreDebug.cs:127
void UpdateAlways()
Definition: CoreDebug.cs:822
Lang.LangCode langCode
Definition: CoreDebug.cs:129
StartScene startScene
Definition: CoreDebug.cs:111
static string PathIni
Definition: CorePath.cs:208
static string Temp
Definition: CorePath.cs:206
static string rootMod
Definition: CorePath.cs:165
static void Init()
Definition: CorePath.cs:218
static string RootSave
Definition: CorePath.cs:202
void RebuildBGMList()
Definition: CoreRef.cs:461
void Init()
Definition: CoreRef.cs:426
Definition: Core.cs:14
override void StopEventSystem(float duration=0.2f)
Definition: Core.cs:694
void StartCase()
Definition: Core.cs:214
override float uiScale
Definition: Core.cs:98
float nextResolutionUpdate
Definition: Core.cs:82
Material matUI
Definition: Core.cs:55
void LateUpdate()
Definition: Core.cs:389
CoreRef refs
Definition: Core.cs:51
ModManager mods
Definition: Core.cs:39
void Quit()
Definition: Core.cs:574
GameSetting gameSetting
Definition: Core.cs:47
IEnumerator OnEndOfFrame()
Definition: Core.cs:625
Game game
Definition: Core.cs:72
override void RebuildBGMList()
Definition: Core.cs:676
static SourceElement sourceElement
Definition: Core.cs:29
void OnApplicationFocus(bool focus)
Definition: Core.cs:411
void FixedUpdate()
Definition: Core.cs:297
override void StopEventSystem(Component c, Action action, float duration=0.12f)
Definition: Core.cs:681
EffectManager effects
Definition: Core.cs:37
static float avgDelta
Definition: Core.cs:19
static int GetElement(string id)
Definition: Core.cs:743
static void SaveElinIni(IniData ini)
Definition: Core.cs:814
void Init()
Definition: Core.cs:533
void Update()
Definition: Core.cs:302
void ResetRuntime()
Definition: Core.cs:520
SourceManager sources
Definition: Core.cs:33
static Core SetCurrent(Core _current=null)
Definition: Core.cs:585
float skinTimer
Definition: Core.cs:84
override void ConsumeInput()
Definition: Core.cs:580
static void TryWarnUpload(Action action)
Definition: Core.cs:848
CoreDebug debug
Definition: Core.cs:31
SkinManager skins
Definition: Core.cs:43
Steam steam
Definition: Core.cs:57
void Start()
Definition: Core.cs:196
TextureManager textures
Definition: Core.cs:45
void OnApplicationQuit()
Definition: Core.cs:480
void Halt()
Definition: Core.cs:662
static int[] ParseElements(string str)
Definition: Core.cs:726
static float gameDeltaNoPause
Definition: Core.cs:23
static float gameDelta
Definition: Core.cs:21
static new Core Instance
Definition: Core.cs:15
ColorProfile Colors
Definition: Core.cs:53
void OnChangeResolution()
Definition: Core.cs:645
bool initialized
Definition: Core.cs:75
override void Awake()
Definition: Core.cs:100
void SetReleaseMode(ReleaseMode m)
Definition: Core.cs:616
Scene scene
Definition: Core.cs:65
static IniData GetElinIni()
Definition: Core.cs:780
void ApplySkins()
Definition: Core.cs:771
BaseGameScreen screen
Definition: Core.cs:67
static float fixedFrame
Definition: Core.cs:25
static bool spiked
Definition: Core.cs:27
override void FreezeScreen(float duration=0.2f)
Definition: Core.cs:666
void Update100ms()
Definition: Core.cs:637
GameData gamedata
Definition: Core.cs:49
string[] launchArgs
Definition: Core.cs:78
override void UnfreezeScreen()
Definition: Core.cs:671
bool IsGameStarted
Definition: Core.cs:87
void SetReferences()
Definition: Core.cs:605
PathManager pathManager
Definition: Core.cs:35
UI ui
Definition: Core.cs:63
PCCManager pccs
Definition: Core.cs:41
void SetLang(string langCode, bool force=false)
Definition: Core.cs:703
static void TryWarnMod(Action action, bool warn=true)
Definition: Core.cs:819
bool trial
Definition: Core.cs:61
static float delta
Definition: Core.cs:17
static Core GetCurrent()
Definition: Core.cs:600
CoreConfig config
Definition: Core.cs:70
bool useUImat
Definition: Core.cs:59
bool? lastFullScreen
Definition: Core.cs:80
Definition: Dialog.cs:7
Definition: EInput.cs:8
static void Consume(int _skipFrame)
Definition: EInput.cs:667
static void DisableIME()
Definition: EInput.cs:465
static Action< List< string > > onDrop
Definition: GameIO.cs:11
static void DeleteEmptyGameFolders(string path)
Definition: GameIO.cs:343
static void Init()
Definition: GameIO.cs:42
void Init()
Definition: GameSetting.cs:355
void Update100ms()
Definition: GameUpdater.cs:395
Definition: Game.cs:9
new Player player
Definition: Game.cs:180
void Kill()
Definition: Game.cs:1113
GameUpdater updater
Definition: Game.cs:250
void OnUpdate()
Definition: Game.cs:298
static void UpdateEventData()
Definition: Lang.cs:7
static string langCode
Definition: Lang.cs:29
static void Init(string lang)
Definition: Lang.cs:74
static bool isBuiltin
Definition: Lang.cs:43
static bool keepBGM
Definition: LayerDrama.cs:10
static bool haltPlaylist
Definition: LayerDrama.cs:12
static void Toggle(string idFile, string idTopic=null)
Definition: LayerHelp.cs:32
static List< LayerInventory > listInv
Definition: MOD.cs:7
static void ResetResources()
Definition: MOD.cs:28
static Action< DirectoryInfo > OnAddPcc
Definition: MOD.cs:20
Material mat
Definition: MeshPass.cs:21
void ClearCache()
Definition: ModItem.cs:65
static bool IsInitialized
Definition: ModManager.cs:29
override void Init(string path, string defaultPackage="_Elona")
Definition: ModManager.cs:31
IEnumerator RefreshMods(Action onComplete, bool syncMods)
Definition: ModManager.cs:103
static bool disableMod
Definition: ModManager.cs:17
static List< object > ListPluginObject
Definition: ModManager.cs:15
Chara chara
Definition: Player.cs:1275
void Init()
Definition: RenderData.cs:95
Definition: Scene.cs:8
void OnLateUpdate()
Definition: Scene.cs:752
CameraSupport camSupport
Definition: Scene.cs:41
ActionMode actionMode
Definition: Scene.cs:79
void OnUpdate()
Definition: Scene.cs:367
void InitPass()
Definition: Scene.cs:1044
GameScreenNoMap screenNoMap
Definition: Scene.cs:97
void Init(Mode newMode)
Definition: Scene.cs:178
Mode
Definition: Scene.cs:10
void OnEndOfFrame()
Definition: ScreenGuide.cs:37
List< CardRow > rows
Definition: SourceCard.cs:7
Dictionary< string, string > fuzzyAlias
LangGeneral langGeneral
Definition: SourceManager.cs:8
SourceCard cards
void ImportSourceTexts()
SourceElement elements
void OnChangeLang()
static SourcePrefInspector Instance
static Dictionary< string, SpawnList > allList
Definition: SpawnList.cs:6
static Dictionary< string, SpriteData > dict
static Dictionary< string, SpriteReplacer > dictSkins
static void Add(Sprite sprite)
Definition: SpriteSheet.cs:10
static Dictionary< string, Sprite > dict
Definition: SpriteSheet.cs:6
static HashSet< string > loadedPath
Definition: SpriteSheet.cs:8
Definition: Steam.cs:10
SteamworksBehaviour steamworks
Definition: Steam.cs:13
void Init()
Definition: Steam.cs:26
void RefreshTextures()
void OnDropFile(List< string > paths)
static void Init()
Definition: TileType.cs:289
static Action actionTooltip
Definition: UIButton.cs:184
static WidgetMinimap Instance
static void SetDirty()
Definition: Widget.cs:7
Definition: Window.cs:13
static Dictionary< string, SaveData > dictData
Definition: Window.cs:594
void OnChangeResolution()
void ApplySkin()
string GetText()
Definition: Version.cs:16