Elin Decompiled Documentation EA 23.356.1 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 != Lang.LangCode.None)
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>(0, Portrait.loadOption);
188 Portrait.modOverlays = new ModItemList<Sprite>(0, Portrait.loadOption);
189 Portrait.modFull = new ModItemList<Sprite>(0, Portrait.loadOptionFull);
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?.LoadPrefAndFixDensity();
454 }
455 if (RenderObject.syncList != null)
456 {
457 foreach (ISyncScreen sync in RenderObject.syncList)
458 {
459 if (sync is CardRenderer { hasActor: not false } cardRenderer && !cardRenderer.actor.isPCC)
460 {
461 cardRenderer.actor.ReloadSprite();
462 }
463 }
464 }
466 }
467 });
468 });
469 }
470 if (IsGameStarted && debug.enable)
471 {
472 foreach (PCC.Part value2 in pccs.allParts.Values)
473 {
474 foreach (ModItem<Texture2D> value3 in value2.modTextures.Values)
475 {
476 value3.ClearCache();
477 }
478 }
479 CharaActorPCC[] array = UnityEngine.Object.FindObjectsOfType<CharaActorPCC>();
480 for (int num = 0; num < array.Length; num++)
481 {
482 array[num].provider.Rebuild();
483 }
484 }
485 EInput.Consume();
486 EInput.dragHack = 0f;
488 }
489
490 public void OnApplicationQuit()
491 {
492 try
493 {
494 Widget[] componentsInChildren = ui.widgets.GetComponentsInChildren<Widget>(includeInactive: true);
495 foreach (Widget widget in componentsInChildren)
496 {
497 if (widget.gameObject != null)
498 {
499 UnityEngine.Object.Destroy(widget.gameObject);
500 }
501 }
502 IO.PrintLog();
503 }
504 catch (Exception ex)
505 {
506 Debug.Log("Exception:" + ex);
507 }
508 try
509 {
510 if (SteamAPI.IsSteamRunning())
511 {
512 SteamAPI.Shutdown();
513 }
514 }
515 catch (Exception ex2)
516 {
517 Debug.Log("Exception:" + ex2);
518 }
519 try
520 {
521 IO.DeleteDirectory(CorePath.Temp);
523 }
524 catch (Exception ex3)
525 {
526 Debug.Log("Exception:" + ex3);
527 }
528 }
529
530 public void ResetRuntime()
531 {
532 BaseCore.resetRuntime = false;
533 BiomeProfile.forceInitialize = true;
534 WidgetHotbar.registering = false;
535 WidgetHotbar.registeringItem = null;
536 WordGen.initialized = false;
537 RecipeManager.rebuild = true;
538 BookList.dict = null;
539 BottleMessageList.list = null;
540 SpawnList.allList.Clear();
541 }
542
543 public void Init()
544 {
545 Debug.Log("Initializing:" + langCode + "/" + forceLangCode);
546 StartCoroutine("OnEndOfFrame");
547 InvokeRepeating("Update100ms", 0.1f, 0.1f);
548 UnityEngine.Object.DestroyImmediate(ui.layoutLang.gameObject);
549 GameIO.Init();
551 if (config.lang.IsEmpty())
552 {
553 config.lang = "EN";
554 }
555 SetLang(config.lang);
556 refs.Init();
557 debug.Init();
558 SpriteSheet.Add("Media/Graphics/Icon/icons_48");
559 Cal.Init();
560 Colors.Init();
561 gameSetting.Init();
562 PCCManager.current.Init();
563 SpriteVariationManager.current.Init();
564 scene.InitPass();
565 textures.Init();
566 textures.RefreshTextures();
568 SoundManager.current.Reset();
569 if (debug.validatePref)
570 {
572 }
573 if (debug.startScene == CoreDebug.StartScene.Title)
574 {
575 scene.Init(Scene.Mode.Title);
576 }
577 else
578 {
579 debug.QuickStart();
580 }
581 ui.HideCover(2f);
582 initialized = true;
583 }
584
585 public void Quit()
586 {
587 Application.Quit();
588 Debug.Log("Quit");
589 }
590
591 public override void ConsumeInput()
592 {
593 EInput.Consume();
594 }
595
596 public static Core SetCurrent(Core _current = null)
597 {
598 if ((bool)Instance)
599 {
600 return Instance;
601 }
602 Instance = _current ?? UnityEngine.Object.FindObjectOfType<Core>();
603 BaseCore.Instance = Instance;
604 if ((bool)Instance)
605 {
606 Instance.SetReferences();
607 }
608 return Instance;
609 }
610
611 public static Core GetCurrent()
612 {
613 return Instance ?? SetCurrent();
614 }
615
616 public void SetReferences()
617 {
618 CorePath.Init();
619 SourceData.dataPath = CorePath.packageCore + "/Data/Source/";
620 Instance = (EClass.core = (EMono.core = this));
621 SkinManager._Instance = skins;
622 PathManager.Instance = pathManager;
623 EffectManager.Instance = effects;
624 sources.InitLang();
625 }
626
628 {
629 if (releaseMode != m)
630 {
631 releaseMode = m;
632 debug = Resources.Load<CoreDebug>("_Debug " + releaseMode);
633 }
634 }
635
636 private IEnumerator OnEndOfFrame()
637 {
638 while (true)
639 {
640 yield return new WaitForEndOfFrame();
641 if ((bool)screen.guide)
642 {
643 screen.guide.OnEndOfFrame();
644 }
645 }
646 }
647
648 private void Update100ms()
649 {
650 if (IsGameStarted)
651 {
652 game.updater.Update100ms();
653 }
654 }
655
656 public void OnChangeResolution()
657 {
658 if (config != null)
659 {
660 config.OnChangeResolution();
661 }
662 screen.RefreshScreenSize();
663 lastScreenWidth = Screen.width;
664 lastScreenHeight = Screen.height;
665 IChangeResolution[] componentsInChildren = ui.GetComponentsInChildren<IChangeResolution>();
666 for (int i = 0; i < componentsInChildren.Length; i++)
667 {
668 componentsInChildren[i].OnChangeResolution();
669 }
670 scene.camSupport.OnChangeResolution();
671 }
672
673 public void Halt()
674 {
675 }
676
677 public override void FreezeScreen(float duration = 0.2f)
678 {
679 ui.FreezeScreen(duration);
680 }
681
682 public override void UnfreezeScreen()
683 {
684 ui.UnfreezeScreen();
685 }
686
687 public override void RebuildBGMList()
688 {
689 refs.RebuildBGMList();
690 }
691
692 public override void StopEventSystem(Component c, Action action, float duration = 0.12f)
693 {
694 eventSystem.enabled = false;
695 c.transform.DOScale(new Vector3(1f, 0f, 1f), duration).OnKill(delegate
696 {
697 eventSystem.enabled = true;
698 }).OnComplete(delegate
699 {
700 action();
701 })
702 .SetEase(Ease.Linear);
703 }
704
705 public override void StopEventSystem(float duration = 0.2f)
706 {
707 eventSystem.enabled = false;
708 TweenUtil.Tween(duration, null, delegate
709 {
710 eventSystem.enabled = true;
711 });
712 }
713
714 public void SetLang(string langCode, bool force = false)
715 {
716 if (!(Lang.langCode == langCode) || !sources || !sources.langGeneral)
717 {
718 Lang.Init(langCode);
719 AliasGen.list = null;
720 NameGen.list = null;
721 WordGen.initialized = false;
722 sources.OnChangeLang();
723 if (game != null && !IsGameStarted)
724 {
725 game.Kill();
726 }
727 config.OnSetLang();
728 mods.InitLang();
729 if (!Lang.isBuiltin)
730 {
731 sources.ImportSourceTexts();
732 }
733 BaseModManager.PublishEvent("elin.source.lang_set", langCode);
734 }
735 }
736
737 public static int[] ParseElements(string str)
738 {
739 if (string.IsNullOrEmpty(str))
740 {
741 return Array.Empty<int>();
742 }
743 string[] array = str.Replace("\n", "").Split(',');
744 int[] array2 = new int[array.Length * 2];
745 for (int i = 0; i < array.Length; i++)
746 {
747 string[] array3 = array[i].Split('/');
748 array2[i * 2] = GetElement(array3[0]);
749 array2[i * 2 + 1] = ((!int.TryParse(array3.TryGet(1, returnNull: true), out var result)) ? 1 : result);
750 }
751 return array2;
752 }
753
754 public static int GetElement(string id)
755 {
756 SetCurrent();
757 if (sourceElement == null)
758 {
759 sourceElement = UnityEngine.Object.FindObjectOfType<SourceManager>().GetComponent<SourceManager>().elements;
760 }
761 if (!sourceElement.initialized)
762 {
763 sourceElement.Init();
764 }
765 id = id?.Trim() ?? "_void";
766 if (!sourceElement.alias.TryGetValue(id, out var value))
767 {
768 if (sourceElement.fuzzyAlias.TryGetValue(id, out var value2))
769 {
770 Debug.Log("#element lookup: '" + id + "' -> '" + value2 + "'");
771 value = sourceElement.alias[value2];
772 }
773 else
774 {
775 Debug.LogWarning("#element not found: '" + id + "'");
776 value = sourceElement.rows[0];
777 }
778 }
779 return value.id;
780 }
781
782 public void ApplySkins()
783 {
784 IUISkin[] componentsInChildren = ui.GetComponentsInChildren<IUISkin>(includeInactive: true);
785 for (int i = 0; i < componentsInChildren.Length; i++)
786 {
787 componentsInChildren[i].ApplySkin();
788 }
789 }
790
791 public static IniData GetElinIni()
792 {
793 string pathIni = CorePath.PathIni;
794 string ie = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
795 try
796 {
797 FileIniDataParser fileIniDataParser = new FileIniDataParser();
798 if (!File.Exists(pathIni))
799 {
800 File.CreateText(pathIni).Close();
801 }
802 IniData iniData = fileIniDataParser.ReadFile(pathIni, Encoding.UTF8);
803 if (iniData.GetKey("pass").IsEmpty())
804 {
805 string text = "";
806 for (int i = 0; i < 4; i++)
807 {
808 text += ie.RandomItem();
809 }
810 iniData.Global["pass"] = text;
811 fileIniDataParser.WriteFile(pathIni, iniData);
812 }
813 return iniData;
814 }
815 catch (Exception message)
816 {
817 Debug.Log(message);
818 Debug.Log("exception: Failed to parse:" + pathIni);
819 IO.DeleteFile(pathIni);
820 File.CreateText(pathIni).Close();
821 return null;
822 }
823 }
824
825 public static void SaveElinIni(IniData ini)
826 {
827 new FileIniDataParser().WriteFile(CorePath.PathIni, ini);
828 }
829
830 public static void TryWarnMod(Action action, bool warn = true)
831 {
832 if (warn)
833 {
834 IniData ini = GetElinIni();
835 if (ini.Global["agreed_usercontens_usage_terms"] != "yes")
836 {
837 string[] items = new string[3] { "readTerms", "agree", "disagree" };
838 Dialog.List("dialogTermsOfUseUGC".lang(), items, (string j) => j, delegate(int c, string d)
839 {
840 switch (c)
841 {
842 case 0:
843 LayerHelp.Toggle("custom", "terms2");
844 return false;
845 case 1:
846 ini.Global["agreed_usercontens_usage_terms"] = "yes";
847 SaveElinIni(ini);
848 action();
849 break;
850 }
851 return true;
852 }, canCancel: true);
853 return;
854 }
855 }
856 action();
857 }
858
859 public static void TryWarnUpload(Action action)
860 {
861 IniData ini = GetElinIni();
862 if (ini.Global["agreed_usercontents_upload_terms"] != "yes")
863 {
864 string[] items = new string[3] { "readTerms", "agree", "disagree" };
865 Dialog.List("dialogTermsOfUse".lang(), items, (string j) => j, delegate(int c, string d)
866 {
867 switch (c)
868 {
869 case 0:
870 LayerHelp.Toggle("custom", "terms");
871 return false;
872 case 1:
873 ini.Global["agreed_usercontents_upload_terms"] = "yes";
874 SaveElinIni(ini);
875 action();
876 break;
877 }
878 return true;
879 }, canCancel: true);
880 }
881 else
882 {
883 action();
884 }
885 }
886}
if(!match.Success)
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
BaseTileMap tileMap
static void PublishEvent(string eventId, object data=null)
RenderDataObjDummy rendererObjDummy
Definition: BaseTileMap.cs:227
MeshPass passBlock
Definition: BaseTileMap.cs:147
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6645
SpriteProvider provider
Definition: CharaActorPCC.cs:9
static HashSet< string > assemblies
Definition: ClassCache.cs:54
static CoreConfig TryLoadConfig()
Definition: CoreConfig.cs:682
GraphicSetting graphic
Definition: CoreConfig.cs:627
static string path
Definition: CoreConfig.cs:656
OtherSetting other
Definition: CoreConfig.cs:639
static void Init()
Definition: CoreConfig.cs:732
bool showSceneSelector
Definition: CoreDebug.cs:125
bool ignorePool
Definition: CoreDebug.cs:133
string command
Definition: CoreDebug.cs:152
bool enable
Definition: CoreDebug.cs:302
bool skipModSync
Definition: CoreDebug.cs:128
void UpdateAlways()
Definition: CoreDebug.cs:841
Lang.LangCode langCode
Definition: CoreDebug.cs:130
static string PathIni
Definition: CorePath.cs:212
static string Temp
Definition: CorePath.cs:210
static string rootMod
Definition: CorePath.cs:165
static void Init()
Definition: CorePath.cs:222
static string RootSave
Definition: CorePath.cs:202
Definition: Core.cs:14
override void StopEventSystem(float duration=0.2f)
Definition: Core.cs:705
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:585
GameSetting gameSetting
Definition: Core.cs:47
IEnumerator OnEndOfFrame()
Definition: Core.cs:636
Game game
Definition: Core.cs:72
override void RebuildBGMList()
Definition: Core.cs:687
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:692
EffectManager effects
Definition: Core.cs:37
static float avgDelta
Definition: Core.cs:19
static int GetElement(string id)
Definition: Core.cs:754
static void SaveElinIni(IniData ini)
Definition: Core.cs:825
void Init()
Definition: Core.cs:543
void Update()
Definition: Core.cs:302
void ResetRuntime()
Definition: Core.cs:530
SourceManager sources
Definition: Core.cs:33
static Core SetCurrent(Core _current=null)
Definition: Core.cs:596
float skinTimer
Definition: Core.cs:84
override void ConsumeInput()
Definition: Core.cs:591
static void TryWarnUpload(Action action)
Definition: Core.cs:859
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:490
void Halt()
Definition: Core.cs:673
static int[] ParseElements(string str)
Definition: Core.cs:737
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:656
bool initialized
Definition: Core.cs:75
override void Awake()
Definition: Core.cs:100
void SetReleaseMode(ReleaseMode m)
Definition: Core.cs:627
Scene scene
Definition: Core.cs:65
static IniData GetElinIni()
Definition: Core.cs:791
void ApplySkins()
Definition: Core.cs:782
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:677
void Update100ms()
Definition: Core.cs:648
GameData gamedata
Definition: Core.cs:49
string[] launchArgs
Definition: Core.cs:78
override void UnfreezeScreen()
Definition: Core.cs:682
bool IsGameStarted
Definition: Core.cs:87
void SetReferences()
Definition: Core.cs:616
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:714
static void TryWarnMod(Action action, bool warn=true)
Definition: Core.cs:830
bool trial
Definition: Core.cs:61
static float delta
Definition: Core.cs:17
static Core GetCurrent()
Definition: Core.cs:611
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
Definition: Game.cs:9
new Player player
Definition: Game.cs:180
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:70
LangCode
Definition: Lang.cs:9
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:32
static Action< DirectoryInfo > OnAddPcc
Definition: MOD.cs:24
Material mat
Definition: MeshPass.cs:21
void ClearCache()
Definition: ModItem.cs:69
static bool IsInitialized
Definition: ModManager.cs:59
override void Init(string path, string defaultPackage="_Elona")
Definition: ModManager.cs:63
IEnumerator RefreshMods(Action onComplete, bool syncMods)
Definition: ModManager.cs:345
static bool disableMod
Definition: ModManager.cs:41
static List< object > ListPluginObject
Definition: ModManager.cs:39
Chara chara
Definition: Player.cs:1278
static readonly SpriteLoadOption loadOption
Definition: Portrait.cs:12
static readonly SpriteLoadOption loadOptionFull
Definition: Portrait.cs:17
void Init()
Definition: RenderData.cs:95
static List< ISyncScreen > syncList
Definition: RenderObject.cs:24
Definition: Scene.cs:8
void OnLateUpdate()
Definition: Scene.cs:751
ActionMode actionMode
Definition: Scene.cs:79
void OnUpdate()
Definition: Scene.cs:366
GameScreenNoMap screenNoMap
Definition: Scene.cs:97
Mode
Definition: Scene.cs:10
List< CardRow > rows
Definition: SourceCard.cs:7
SourceCard cards
SourceElement elements
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:12
SteamworksBehaviour steamworks
Definition: Steam.cs:15
void Init()
Definition: Steam.cs:28
void RefreshTextures()
void OnDropFile(List< string > paths)
static void Apply()
Definition: TileManager.cs:87
static void Init()
Definition: TileType.cs:303
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:34