Elin Decompiled Documentation EA 23.271 Nightly Patch 1
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 private bool? lastFullScreen;
78
79 private float nextResolutionUpdate;
80
81 private float skinTimer;
82
83 public bool IsGameStarted
84 {
85 get
86 {
87 if (game != null)
88 {
89 return game.activeZone != null;
90 }
91 return false;
92 }
93 }
94
95 public override float uiScale => ui.canvasScaler.scaleFactor;
96
97 protected override void Awake()
98 {
99 base.Awake();
100 Debug.Log("Core Awake");
101 Debug.Log("Version:" + version.GetText());
102 QualitySettings.vSyncCount = 0;
103 Application.targetFrameRate = 60;
104 IO.CreateDirectory(CorePath.Temp);
105 SetCurrent();
106 Lang.langCode = "";
107 if (Application.isEditor && debug.langCode != 0)
108 {
109 forceLangCode = debug.langCode.ToString();
110 }
111 string[] array = (Application.isEditor ? debug.command.Split(',') : Environment.GetCommandLineArgs());
112 for (int i = 0; i < array.Length; i++)
113 {
114 string text = array[i];
115 text = text.Replace("-", "").ToUpper();
116 Debug.Log("Commandline args:" + text);
117 if (text.StartsWith("LANG_"))
118 {
119 forceLangCode = text.Replace("LANG_", "");
120 continue;
121 }
122 switch (text)
123 {
124 case "DEV":
125 releaseMode = ReleaseMode.Debug;
126 break;
127 case "UPDATE_LANG":
128 Lang.runUpdate = true;
129 break;
130 case "NOMOD":
131 ModManager.disableMod = true;
132 break;
133 }
134 }
135 NewsList.dict = null;
136 InvOwner.Trader = (InvOwner.Main = null);
137 SpriteSheet.dict.Clear();
138 SpriteSheet.loadedPath.Clear();
140 LayerDrama.haltPlaylist = false;
141 LayerDrama.keepBGM = false;
142 BaseModManager.isInitialized = false;
143 Net.isUploading = false;
144 MapPiece.initialized = false;
145 ActPlan.warning = false;
146 Game.isPaused = false;
147 if (Application.isEditor && BaseCore.resetRuntime)
148 {
149 ResetRuntime();
150 }
151 Window.dictData.Clear();
152 LayerInventory.listInv.Clear();
153 debug = Resources.Load<CoreDebug>("_Debug " + releaseMode);
154 debug.enable = releaseMode != ReleaseMode.Public;
155 if (useUImat)
156 {
157 Canvas.GetDefaultCanvasMaterial().CopyPropertiesFromMaterial(matUI);
158 Canvas.GetDefaultCanvasMaterial().shader = matUI.shader;
159 }
160 if (!ui)
161 {
162 ui = Util.Instantiate<UI>("UI/UI");
163 }
164 if (!scene)
165 {
166 scene = Util.Instantiate<Scene>("Scene/Scene");
167 }
169 ui.ShowCover();
170 canvas = ui.canvas;
171 ui.OnCoreStart();
172 BaseCore.BlockInput = () => ui.IsDragging;
173 CommandRegistry.assemblies.Add(typeof(Core).Assembly);
174 SoundData.EditorPlaySpatial = delegate(SoundData a)
175 {
176 game.player.chara.PlaySound(a.name);
177 };
178 SoundManager.funcCanPlayBGM = () => !LayerDrama.haltPlaylist && !LayerDrama.keepBGM;
180 MOD.langs.Clear();
181 MOD.OnAddPcc = pccs.Add;
182 MOD.listTalk = new TalkDataList();
183 MOD.tones = new ToneDataList();
184 MOD.listMaps.Clear();
185 MOD.listPartialMaps.Clear();
186 Portrait.modPortraitBGFs = new ModItemList<Sprite>();
187 Portrait.modPortraitBGs = new ModItemList<Sprite>();
188 Portrait.modPortraits = new ModItemList<Sprite>();
189 Portrait.modOverlays = new ModItemList<Sprite>();
190 Portrait.modFull = new ModItemList<Sprite>();
191 Portrait.dictList = new Dictionary<string, List<ModItem<Sprite>>>();
192 TileType.Init();
194 Debug.Log(steam.steamworks.settings.applicationId);
195 }
196
197 private void Start()
198 {
200 Debug.Log("Loading Config:" + CoreConfig.path + " - " + config);
201 if (config != null && config.other.disableMods)
202 {
203 ModManager.disableMod = true;
204 }
205 try
206 {
207 steam.Init();
208 }
209 catch
210 {
211 }
212 StartCase();
213 }
214
215 public void StartCase()
216 {
217 Debug.Log("StartCase:" + ModManager.IsInitialized);
219 {
221 StartCoroutine(mods.RefreshMods(delegate
222 {
223 MOD.actorSources.Initialize();
224 SpriteReplacer.dictSkins.Clear();
225 SpriteReplacer.ListSkins();
226 StartCase();
228 return;
229 }
230 Debug.Log("Plugins:" + ModManager.ListPluginObject.Count);
231 foreach (object item in ModManager.ListPluginObject)
232 {
233 Component component = item as Component;
234 if (!component)
235 {
236 Debug.Log("no go");
237 continue;
238 }
239 GameObject obj = component.gameObject;
240 obj.SendMessage("OnStartCore");
241 Component[] componentsInChildren = obj.GetComponentsInChildren<Component>();
242 foreach (Component component2 in componentsInChildren)
243 {
244 Debug.Log(component2.GetType().Assembly.GetName().Name);
245 ClassCache.assemblies.Add(component2.GetType().Assembly.GetName().Name);
246 }
247 break;
248 }
249 sources.Init();
250 if (!forceLangCode.IsEmpty())
251 {
253 }
254 else if (config == null)
255 {
256 Debug.Log("Config doesn't exist.");
257 try
258 {
259 if (debug.enable || !SteamAPI.IsSteamRunning())
260 {
261 BookList.dict = null;
262 BottleMessageList.list = null;
263 ui.ShowLang();
264 return;
265 }
266 string currentGameLanguage = SteamApps.GetCurrentGameLanguage();
267 if (!(currentGameLanguage == "chinese"))
268 {
269 if (!(currentGameLanguage == "japanese"))
270 {
271 BookList.dict = null;
272 BottleMessageList.list = null;
273 ui.ShowLang();
274 return;
275 }
276 langCode = "JP";
277 }
278 else
279 {
280 langCode = "CN";
281 }
282 }
283 catch (Exception message)
284 {
285 Debug.Log(message);
286 }
287 }
288 if (debug.showSceneSelector || (Input.GetKey(KeyCode.LeftShift) && debug.enable))
289 {
290 ui.ShowSceneSelector();
291 }
292 else
293 {
294 Init();
295 }
296 }
297
298 private void FixedUpdate()
299 {
300 fixedFrame += 1f;
301 }
302
303 public void Update()
304 {
305 frame++;
306 SoundManager.requestCount = 0;
308 EInput.uiMousePosition = Input.mousePosition / ui.canvasScaler.scaleFactor;
309 if (!initialized)
310 {
311 return;
312 }
313 ui.OnUpdate();
315 PoolManager.ignorePool = debug.ignorePool;
316 if ((bool)screen.tileMap && !screen.tileMap.passBlock.mat.mainTexture)
317 {
319 }
320 if (useUImat)
321 {
322 Canvas.GetDefaultCanvasMaterial().CopyPropertiesFromMaterial(matUI);
323 }
324 avgDelta += (Time.smoothDeltaTime - delta) * 0.1f;
325 delta = Time.smoothDeltaTime;
326 if (delta > 0.1f)
327 {
328 delta = 0.1f;
329 }
330 EInput.delta = (ButtonState.delta = delta);
331 if (lastFullScreen != Screen.fullScreen)
332 {
333 int width = Display.main.systemWidth;
334 int height = Display.main.systemHeight;
335 if (config != null && config.graphic.fixedResolution)
336 {
337 width = config.graphic.w;
338 height = config.graphic.h;
339 }
340 if (Screen.fullScreen)
341 {
342 Screen.SetResolution(width, height, fullscreen: true);
343 }
344 lastFullScreen = Screen.fullScreen;
346 }
347 if (nextResolutionUpdate <= 0f)
348 {
349 if (config != null && config.graphic.fixedResolution)
350 {
351 int w = config.graphic.w;
352 int h = config.graphic.h;
353 if (Screen.width != w || Screen.height != h)
354 {
355 Screen.SetResolution(w, h, Screen.fullScreen);
356 }
357 }
358 if (Screen.width != lastScreenWidth || Screen.height != lastScreenHeight)
359 {
361 }
363 }
364 else
365 {
367 }
368 if (IsGameStarted)
369 {
370 game.OnUpdate();
372 gameDelta = (FlockChild.delta = (ui.IsPauseGame ? 0f : gameDeltaNoPause));
373 }
374 else
375 {
376 gameDelta = 0f;
377 }
378 scene.OnUpdate();
379 if (actionsNextFrame.Count > 0)
380 {
381 for (int num = actionsNextFrame.Count - 1; num >= 0; num--)
382 {
383 actionsNextFrame[num]();
384 actionsNextFrame.RemoveAt(num);
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 && row.replacer.data != null)
447 {
448 row.replacer.data.GetSprite();
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 mods.InitLang();
553 if (!Lang.isBuiltin)
554 {
555 sources.ImportSourceTexts();
556 }
557 PCCManager.current.Init();
558 SpriteVariationManager.current.Init();
559 scene.InitPass();
560 textures.Init();
561 textures.RefreshTextures();
562 SoundManager.current.Reset();
563 if (debug.validatePref)
564 {
566 }
567 if (debug.startScene == CoreDebug.StartScene.Title)
568 {
569 scene.Init(Scene.Mode.Title);
570 }
571 else
572 {
573 debug.QuickStart();
574 }
575 ui.HideCover(2f);
576 initialized = true;
577 }
578
579 public void Quit()
580 {
581 Application.Quit();
582 Debug.Log("Quit");
583 }
584
585 public override void ConsumeInput()
586 {
587 EInput.Consume();
588 }
589
590 public static Core SetCurrent(Core _current = null)
591 {
592 if ((bool)Instance)
593 {
594 return Instance;
595 }
596 Instance = _current ?? UnityEngine.Object.FindObjectOfType<Core>();
597 BaseCore.Instance = Instance;
598 if ((bool)Instance)
599 {
600 Instance.SetReferences();
601 }
602 return Instance;
603 }
604
605 public static Core GetCurrent()
606 {
607 return Instance ?? SetCurrent();
608 }
609
610 public void SetReferences()
611 {
612 CorePath.Init();
613 SourceData.dataPath = CorePath.packageCore + "/Data/Source/";
614 Instance = (EClass.core = (EMono.core = this));
615 SkinManager._Instance = skins;
616 PathManager.Instance = pathManager;
617 EffectManager.Instance = effects;
618 sources.InitLang();
619 }
620
622 {
623 if (releaseMode != m)
624 {
625 releaseMode = m;
626 debug = Resources.Load<CoreDebug>("_Debug " + releaseMode);
627 }
628 }
629
630 private IEnumerator OnEndOfFrame()
631 {
632 while (true)
633 {
634 yield return new WaitForEndOfFrame();
635 if ((bool)screen.guide)
636 {
637 screen.guide.OnEndOfFrame();
638 }
639 }
640 }
641
642 private void Update100ms()
643 {
644 if (IsGameStarted)
645 {
646 game.updater.Update100ms();
647 }
648 }
649
650 public void OnChangeResolution()
651 {
652 if (config != null)
653 {
654 config.OnChangeResolution();
655 }
656 screen.RefreshScreenSize();
657 lastScreenWidth = Screen.width;
658 lastScreenHeight = Screen.height;
659 IChangeResolution[] componentsInChildren = ui.GetComponentsInChildren<IChangeResolution>();
660 for (int i = 0; i < componentsInChildren.Length; i++)
661 {
662 componentsInChildren[i].OnChangeResolution();
663 }
665 }
666
667 public void Halt()
668 {
669 }
670
671 public override void FreezeScreen(float duration = 0.3f)
672 {
673 ui.FreezeScreen(duration);
674 }
675
676 public override void UnfreezeScreen()
677 {
678 ui.UnfreezeScreen();
679 }
680
681 public override void RebuildBGMList()
682 {
683 refs.RebuildBGMList();
684 }
685
686 public override void StopEventSystem(Component c, Action action, float duration = 0.12f)
687 {
688 eventSystem.enabled = false;
689 c.transform.DOScale(new Vector3(1f, 0f, 1f), duration).OnKill(delegate
690 {
691 eventSystem.enabled = true;
692 }).OnComplete(delegate
693 {
694 action();
695 })
696 .SetEase(Ease.Linear);
697 }
698
699 public override void StopEventSystem(float duration = 0.2f)
700 {
701 eventSystem.enabled = false;
702 TweenUtil.Tween(duration, null, delegate
703 {
704 eventSystem.enabled = true;
705 });
706 }
707
708 public void SetLang(string langCode, bool force = false)
709 {
710 if (!(Lang.langCode == langCode) || !sources || !sources.langGeneral)
711 {
712 Lang.Init(langCode);
713 AliasGen.list = null;
714 NameGen.list = null;
715 WordGen.initialized = false;
716 sources.OnChangeLang();
717 if (game != null && !IsGameStarted)
718 {
719 game.Kill();
720 }
721 config.OnSetLang();
722 }
723 }
724
725 public static int[] ParseElements(string str)
726 {
727 if (string.IsNullOrEmpty(str))
728 {
729 return new int[0];
730 }
731 string[] array = str.Replace("\n", "").Split(',');
732 int[] array2 = new int[array.Length * 2];
733 for (int i = 0; i < array.Length; i++)
734 {
735 string[] array3 = array[i].Split('/');
736 array2[i * 2] = GetElement(array3[0]);
737 array2[i * 2 + 1] = ((array3.Length == 1) ? 1 : int.Parse(array3[1]));
738 }
739 return array2;
740 }
741
742 public static int GetElement(string id)
743 {
744 SetCurrent();
745 if (sourceElement == null)
746 {
747 sourceElement = UnityEngine.Object.FindObjectOfType<SourceManager>().GetComponent<SourceManager>().elements;
748 }
749 if (!sourceElement.initialized)
750 {
751 sourceElement.Init();
752 }
753 if (!sourceElement.alias.TryGetValue(id ?? "_void", out var value))
754 {
755 Debug.LogError("exception:" + id);
756 value = sourceElement.rows[0];
757 }
758 return value.id;
759 }
760
761 public void ApplySkins()
762 {
763 IUISkin[] componentsInChildren = ui.GetComponentsInChildren<IUISkin>(includeInactive: true);
764 for (int i = 0; i < componentsInChildren.Length; i++)
765 {
766 componentsInChildren[i].ApplySkin();
767 }
768 }
769
770 public static IniData GetElinIni()
771 {
772 string pathIni = CorePath.PathIni;
773 string ie = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
774 try
775 {
776 FileIniDataParser fileIniDataParser = new FileIniDataParser();
777 if (!File.Exists(pathIni))
778 {
779 File.CreateText(pathIni).Close();
780 }
781 IniData iniData = fileIniDataParser.ReadFile(pathIni, Encoding.UTF8);
782 if (iniData.GetKey("pass").IsEmpty())
783 {
784 string text = "";
785 for (int i = 0; i < 4; i++)
786 {
787 text += ie.RandomItem();
788 }
789 iniData.Global["pass"] = text;
790 fileIniDataParser.WriteFile(pathIni, iniData);
791 }
792 return iniData;
793 }
794 catch (Exception message)
795 {
796 Debug.Log(message);
797 Debug.Log("exception: Failed to parse:" + pathIni);
798 IO.DeleteFile(pathIni);
799 File.CreateText(pathIni).Close();
800 return null;
801 }
802 }
803
804 public static void SaveElinIni(IniData ini)
805 {
806 new FileIniDataParser().WriteFile(CorePath.PathIni, ini);
807 }
808
809 public static void TryWarnMod(Action action, bool warn = true)
810 {
811 if (warn)
812 {
813 IniData ini = GetElinIni();
814 if (ini.Global["agreed_usercontens_usage_terms"] != "yes")
815 {
816 string[] items = new string[3] { "readTerms", "agree", "disagree" };
817 Dialog.List("dialogTermsOfUseUGC".lang(), items, (string j) => j, delegate(int c, string d)
818 {
819 switch (c)
820 {
821 case 0:
822 LayerHelp.Toggle("custom", "terms2");
823 return false;
824 case 1:
825 ini.Global["agreed_usercontens_usage_terms"] = "yes";
826 SaveElinIni(ini);
827 action();
828 break;
829 }
830 return true;
831 }, canCancel: true);
832 return;
833 }
834 }
835 action();
836 }
837
838 public static void TryWarnUpload(Action action)
839 {
840 IniData ini = GetElinIni();
841 if (ini.Global["agreed_usercontents_upload_terms"] != "yes")
842 {
843 string[] items = new string[3] { "readTerms", "agree", "disagree" };
844 Dialog.List("dialogTermsOfUse".lang(), items, (string j) => j, delegate(int c, string d)
845 {
846 switch (c)
847 {
848 case 0:
849 LayerHelp.Toggle("custom", "terms");
850 return false;
851 case 1:
852 ini.Global["agreed_usercontents_upload_terms"] = "yes";
853 SaveElinIni(ini);
854 action();
855 break;
856 }
857 return true;
858 }, canCancel: true);
859 }
860 else
861 {
862 action();
863 }
864 }
865}
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
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:6318
SpriteProvider provider
Definition: CharaActorPCC.cs:9
static HashSet< string > assemblies
Definition: ClassCache.cs:52
static CoreConfig TryLoadConfig()
Definition: CoreConfig.cs:662
GraphicSetting graphic
Definition: CoreConfig.cs:607
string lang
Definition: CoreConfig.cs:585
void OnChangeResolution()
Definition: CoreConfig.cs:836
static string path
Definition: CoreConfig.cs:636
OtherSetting other
Definition: CoreConfig.cs:619
void OnSetLang()
Definition: CoreConfig.cs:1019
static void Init()
Definition: CoreConfig.cs:708
void Init()
Definition: CoreDebug.cs:328
bool showSceneSelector
Definition: CoreDebug.cs:109
bool ignorePool
Definition: CoreDebug.cs:117
string command
Definition: CoreDebug.cs:136
bool validatePref
Definition: CoreDebug.cs:250
void QuickStart()
Definition: CoreDebug.cs:334
bool enable
Definition: CoreDebug.cs:286
bool skipModSync
Definition: CoreDebug.cs:112
void UpdateAlways()
Definition: CoreDebug.cs:805
Lang.LangCode langCode
Definition: CoreDebug.cs:114
StartScene startScene
Definition: CoreDebug.cs:96
static string PathIni
Definition: CorePath.cs:216
static string Temp
Definition: CorePath.cs:214
static string rootMod
Definition: CorePath.cs:173
static void Init()
Definition: CorePath.cs:224
static string RootSave
Definition: CorePath.cs:210
void RebuildBGMList()
Definition: CoreRef.cs:445
void Init()
Definition: CoreRef.cs:425
Definition: Core.cs:14
override void StopEventSystem(float duration=0.2f)
Definition: Core.cs:699
void StartCase()
Definition: Core.cs:215
override float uiScale
Definition: Core.cs:95
float nextResolutionUpdate
Definition: Core.cs:79
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:579
GameSetting gameSetting
Definition: Core.cs:47
IEnumerator OnEndOfFrame()
Definition: Core.cs:630
Game game
Definition: Core.cs:72
override void RebuildBGMList()
Definition: Core.cs:681
static SourceElement sourceElement
Definition: Core.cs:29
void OnApplicationFocus(bool focus)
Definition: Core.cs:411
void FixedUpdate()
Definition: Core.cs:298
override void StopEventSystem(Component c, Action action, float duration=0.12f)
Definition: Core.cs:686
EffectManager effects
Definition: Core.cs:37
static float avgDelta
Definition: Core.cs:19
static int GetElement(string id)
Definition: Core.cs:742
static void SaveElinIni(IniData ini)
Definition: Core.cs:804
override void FreezeScreen(float duration=0.3f)
Definition: Core.cs:671
void Init()
Definition: Core.cs:533
void Update()
Definition: Core.cs:303
void ResetRuntime()
Definition: Core.cs:520
SourceManager sources
Definition: Core.cs:33
static Core SetCurrent(Core _current=null)
Definition: Core.cs:590
float skinTimer
Definition: Core.cs:81
override void ConsumeInput()
Definition: Core.cs:585
static void TryWarnUpload(Action action)
Definition: Core.cs:838
CoreDebug debug
Definition: Core.cs:31
SkinManager skins
Definition: Core.cs:43
Steam steam
Definition: Core.cs:57
void Start()
Definition: Core.cs:197
TextureManager textures
Definition: Core.cs:45
void OnApplicationQuit()
Definition: Core.cs:480
void Halt()
Definition: Core.cs:667
static int[] ParseElements(string str)
Definition: Core.cs:725
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:650
bool initialized
Definition: Core.cs:75
override void Awake()
Definition: Core.cs:97
void SetReleaseMode(ReleaseMode m)
Definition: Core.cs:621
Scene scene
Definition: Core.cs:65
static IniData GetElinIni()
Definition: Core.cs:770
void ApplySkins()
Definition: Core.cs:761
BaseGameScreen screen
Definition: Core.cs:67
static float fixedFrame
Definition: Core.cs:25
static bool spiked
Definition: Core.cs:27
void Update100ms()
Definition: Core.cs:642
GameData gamedata
Definition: Core.cs:49
override void UnfreezeScreen()
Definition: Core.cs:676
bool IsGameStarted
Definition: Core.cs:84
void SetReferences()
Definition: Core.cs:610
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:708
static void TryWarnMod(Action action, bool warn=true)
Definition: Core.cs:809
bool trial
Definition: Core.cs:61
static float delta
Definition: Core.cs:17
static Core GetCurrent()
Definition: Core.cs:605
CoreConfig config
Definition: Core.cs:70
bool useUImat
Definition: Core.cs:59
bool? lastFullScreen
Definition: Core.cs:77
Definition: Dialog.cs:7
Definition: EInput.cs:8
static void Consume(int _skipFrame)
Definition: EInput.cs:656
static void DisableIME()
Definition: EInput.cs:454
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:353
void Update100ms()
Definition: GameUpdater.cs:387
Definition: Game.cs:9
new Player player
Definition: Game.cs:180
void Kill()
Definition: Game.cs:1105
GameUpdater updater
Definition: Game.cs:250
void OnUpdate()
Definition: Game.cs:298
static void UpdateEventData()
Definition: Lang.cs:6
static string langCode
Definition: Lang.cs:28
static void Init(string lang)
Definition: Lang.cs:71
static bool isBuiltin
Definition: Lang.cs:42
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 Dictionary< string, LangSetting > langs
Definition: MOD.cs:8
static List< FileInfo > listMaps
Definition: MOD.cs:20
static List< FileInfo > listPartialMaps
Definition: MOD.cs:22
Material mat
Definition: MeshPass.cs:21
void ClearCache()
Definition: ModItem.cs:65
static bool IsInitialized
Definition: ModManager.cs:33
override void Init(string path, string defaultPackage="_Elona")
Definition: ModManager.cs:35
IEnumerator RefreshMods(Action onComplete, bool syncMods)
Definition: ModManager.cs:95
static bool disableMod
Definition: ModManager.cs:25
static List< object > ListPluginObject
Definition: ModManager.cs:23
Chara chara
Definition: Player.cs:1205
void Init()
Definition: RenderData.cs:94
Definition: Scene.cs:8
void OnLateUpdate()
Definition: Scene.cs:749
CameraSupport camSupport
Definition: Scene.cs:41
ActionMode actionMode
Definition: Scene.cs:79
void OnUpdate()
Definition: Scene.cs:365
void InitPass()
Definition: Scene.cs:1041
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:6
LangGeneral langGeneral
Definition: SourceManager.cs:6
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:8
SteamworksBehaviour steamworks
Definition: Steam.cs:11
void Init()
Definition: Steam.cs:24
void RefreshTextures()
void OnDropFile(List< string > paths)
static void Init()
Definition: TileType.cs:285
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