Elin Decompiled Documentation EA 23.192 Nightly
Loading...
Searching...
No Matches
CoreConfig Class Reference
Inheritance diagram for CoreConfig:
EClass

Classes

class  BackerContentConfig
 
class  CameraConfig
 
class  CustomFont
 
class  Fix
 
class  FontSetting
 
class  GameConfig
 
class  GraphicSetting
 
class  InputSetting
 
class  NetSetting
 
class  OtherSetting
 
class  SoundSetting
 
class  Test
 
class  UISetting
 

Public Types

enum  GameFunc {
  None , ToggleZoom , ShowInv , ShowChara ,
  ShowAbility , ToggleBuild , ShowJournal , EmuShift ,
  EmuAlt , AllAction , ToggleNoRoof , OpenAllyInv ,
  Talk , EmptyHand , Fire , SwitchHotbar ,
  PropertySearch
}
 
enum  GameFuncBuild {
  None , ExitBuildMode , Rotate , ToggleFreepos ,
  SnapFreepos , ToggleRoof , ToggleSlope , ToggleWall ,
  TogglePicker , ToggleBuildLight
}
 
enum  ScreenSnapType {
  None , Default , Floor , Ceil ,
  Hack3 , Hack4 , Hack5 , Hack6 ,
  Hack7 , Hack8 , Hack9 , Grid
}
 

Public Member Functions

void OnInit ()
 
bool HasBackerRewardCode ()
 
void OnReset ()
 
void SetLang (string id)
 
void TryUpdatePlayedHour ()
 
void Save ()
 
void OnChangeResolution ()
 
void ApplyFPS (bool force=false)
 
void Apply ()
 
void ApplyResolution (bool force=false)
 
void ApplyScale ()
 
void ApplyHUD ()
 
void ApplyZoom (float a)
 
PostEffectProfile GetPostEffectProfile (bool replaceWorld=false)
 
void ApplyGrading ()
 
void RefreshUIBrightness ()
 
void ApplyVolume ()
 
void SetBGMInterval ()
 
void SetVolume (string id, float v)
 
void OnSetLang ()
 
void ApplyFont ()
 
void ApplySkin ()
 

Static Public Member Functions

static bool Exist ()
 
static CoreConfig TryLoadConfig ()
 
static bool IsCompatible (Version v)
 
static void Init ()
 
static void Reset ()
 
static void ResetGeneral ()
 
static void ResetGraphics ()
 
static void ResetGame ()
 
static void ResetInput ()
 
static void ResetOther ()
 
static void ResetTest ()
 
- 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

Version version
 
string lang = "JP"
 
string nameReport
 
string emailReport
 
string rewardCode
 
int maxPlayedHours
 
bool ignoreParallelsWarning
 
bool ignoreLinuxModWarning
 
bool cloud
 
new UISetting ui
 
SoundSetting sound
 
FontSetting font
 
GraphicSetting graphic
 
new GameConfig game
 
NetSetting net
 
BackerContentConfig backer
 
InputSetting input
 
CameraConfig camera
 
OtherSetting other
 
Fix fix
 
Test test
 
List< FontSourcecustomFonts
 
HashSet< string > helpFlags = new HashSet<string>()
 
int[] colors = new int[10]
 
bool ignoreApply
 

Properties

static string path [get]
 
static int ZoomStep [get]
 
CameraSupport camSupport [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 Attributes

int[] _framerates = new int[4] { 120, 60, 30, 15 }
 

Additional Inherited Members

- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 11 of file CoreConfig.cs.

Member Enumeration Documentation

◆ GameFunc

Enumerator
None 
ToggleZoom 
ShowInv 
ShowChara 
ShowAbility 
ToggleBuild 
ShowJournal 
EmuShift 
EmuAlt 
AllAction 
ToggleNoRoof 
OpenAllyInv 
Talk 
EmptyHand 
Fire 
SwitchHotbar 
PropertySearch 

Definition at line 13 of file CoreConfig.cs.

◆ GameFuncBuild

Enumerator
None 
ExitBuildMode 
Rotate 
ToggleFreepos 
SnapFreepos 
ToggleRoof 
ToggleSlope 
ToggleWall 
TogglePicker 
ToggleBuildLight 

Definition at line 34 of file CoreConfig.cs.

◆ ScreenSnapType

Enumerator
None 
Default 
Floor 
Ceil 
Hack3 
Hack4 
Hack5 
Hack6 
Hack7 
Hack8 
Hack9 
Grid 

Definition at line 48 of file CoreConfig.cs.

Member Function Documentation

◆ Apply()

void CoreConfig.Apply ( )
inline

Definition at line 856 of file CoreConfig.cs.

857 {
858 if (!ignoreApply)
859 {
861 ApplyFPS();
862 Application.runInBackground = Application.isEditor || other.runBackground;
863 ApplyVolume();
864 ApplyGrading();
865 ApplyHUD();
867 Window.openLastTab = ui.openLastTab;
868 Layer.closeOnRightClick = ui.rightClickClose;
869 RenderObject.animeSetting = EClass.core.gameSetting.render.anime;
870 RenderObject.renderSetting = (RenderData.renderSetting = EClass.core.gameSetting.render);
871 TC._setting = EClass.core.gameSetting.render.tc;
872 UIScrollView.sensitivity = ui.ScrollSensitivity;
873 UIContextMenu.closeOnMouseLeave = ui.closePopupOnMouseLeave;
874 EClass.core.canvas.pixelPerfect = graphic.pixelperfectUI;
876 CharaRenderer._animeFrame = EClass.setting.render.anime.animeStep[test.animeFrame];
877 CharaRenderer._animeFramePCC = EClass.setting.render.anime.animeStep[test.animeFramePCC];
878 CharaRenderer.smoothmove = camera.smoothMove;
879 CharaRenderer._animeFramePC = (camera.smoothMove ? 6000 : camera.moveframe);
880 Scene.skipAnime = true;
881 QualitySettings.maxQueuedFrames = 0;
882 PopManager.outlineAlpha = ui.outlineAlpha;
883 Window.animateWindow = ui.animeWindow;
884 EInput.rightScroll = game.rightScroll;
885 EInput.buttonScroll = (game.rightScroll ? EInput.rightMouse : EInput.middleMouse);
886 EInput.antiMissClick = 0.1f * (float)other.antiMissClick;
887 camSupport.bloom.enabled = graphic.bloom;
889 camSupport.cam.allowHDR = graphic.hdr;
890 ApplyScale();
891 }
892 }
void RefreshScreenSize()
BloomOptimized bloom
Beautify beautify
EInput.KeyMapManager keys
Definition: CoreConfig.cs:259
bool ignoreApply
Definition: CoreConfig.cs:625
void ApplyVolume()
Definition: CoreConfig.cs:989
new GameConfig game
Definition: CoreConfig.cs:602
void ApplyGrading()
Definition: CoreConfig.cs:949
void ApplyResolution(bool force=false)
Definition: CoreConfig.cs:894
void ApplyScale()
Definition: CoreConfig.cs:907
GraphicSetting graphic
Definition: CoreConfig.cs:600
void ApplyHUD()
Definition: CoreConfig.cs:928
CameraConfig camera
Definition: CoreConfig.cs:610
void ApplyFPS(bool force=false)
Definition: CoreConfig.cs:834
OtherSetting other
Definition: CoreConfig.cs:612
new UISetting ui
Definition: CoreConfig.cs:594
CameraSupport camSupport
Definition: CoreConfig.cs:644
InputSetting input
Definition: CoreConfig.cs:608
GameSetting gameSetting
Definition: Core.cs:47
Definition: EClass.cs:5
static Core core
Definition: EClass.cs:6
static BaseGameScreen screen
Definition: EClass.cs:32
static GameSetting setting
Definition: EClass.cs:34
Definition: EInput.cs:8
static ButtonState middleMouse
Definition: EInput.cs:353
static void SetKeyMap(KeyMapManager _keys)
Definition: EInput.cs:433
RenderSetting render
Definition: GameSetting.cs:301

References GameSetting.RenderSetting.anime, CoreConfig.Test.animeFrame, CoreConfig.Test.animeFramePCC, GameSetting.RenderSetting.AnimeSetting.animeStep, CoreConfig.UISetting.animeWindow, CoreConfig.OtherSetting.antiMissClick, ApplyFPS(), ApplyGrading(), ApplyHUD(), ApplyResolution(), ApplyScale(), ApplyVolume(), CameraSupport.beautify, CameraSupport.bloom, CoreConfig.GraphicSetting.bloom, CoreConfig.Test.bloom2, CameraSupport.cam, camera, camSupport, CoreConfig.UISetting.closePopupOnMouseLeave, EClass.core, game, Core.gameSetting, graphic, CoreConfig.GraphicSetting.hdr, ignoreApply, input, CoreConfig.InputSetting.keys, EInput.middleMouse, CoreConfig.CameraConfig.moveframe, CoreConfig.UISetting.openLastTab, other, CoreConfig.UISetting.outlineAlpha, CoreConfig.GraphicSetting.pixelperfectUI, BaseGameScreen.RefreshScreenSize(), GameSetting.render, CoreConfig.UISetting.rightClickClose, CoreConfig.GameConfig.rightScroll, CoreConfig.OtherSetting.runBackground, EClass.screen, CoreConfig.UISetting.ScrollSensitivity, EInput.SetKeyMap(), EClass.setting, CoreConfig.CameraConfig.smoothMove, GameSetting.RenderSetting.tc, test, and ui.

Referenced by OnInit(), LayerConfig.OnKill(), OnReset(), LayerConfig.Refresh(), ResetGame(), ResetGeneral(), ResetGraphics(), ResetInput(), ResetOther(), and ResetTest().

◆ ApplyFont()

void CoreConfig.ApplyFont ( )
inline

◆ ApplyFPS()

void CoreConfig.ApplyFPS ( bool  force = false)
inline

Definition at line 834 of file CoreConfig.cs.

835 {
836 if (EClass.core.IsGameStarted || force)
837 {
838 if (graphic.vsync)
839 {
840 QualitySettings.vSyncCount = 1;
841 Application.targetFrameRate = 60;
842 }
843 else
844 {
845 QualitySettings.vSyncCount = 0;
846 Application.targetFrameRate = _framerates[graphic.fps];
847 }
848 }
849 else
850 {
851 QualitySettings.vSyncCount = 0;
852 Application.targetFrameRate = 60;
853 }
854 }
int[] _framerates
Definition: CoreConfig.cs:627
bool IsGameStarted
Definition: Core.cs:84

References _framerates, EClass.core, CoreConfig.GraphicSetting.fps, graphic, Core.IsGameStarted, and CoreConfig.GraphicSetting.vsync.

Referenced by Apply(), and Game.OnGameInstantiated().

◆ ApplyGrading()

void CoreConfig.ApplyGrading ( )
inline

Definition at line 949 of file CoreConfig.cs.

950 {
951 PostEffectProfile postEffectProfile = GetPostEffectProfile();
952 ScreenGrading grading = camSupport.grading;
953 grading.userSaturation = graphic.saturation + postEffectProfile.Saturation;
954 grading.userBrightness = graphic.brightness + postEffectProfile.Brightness;
955 grading.userContrast = graphic.contrast + postEffectProfile.Contrast;
956 camSupport.beautify.saturate = graphic.vibrance + grading.profile.Vibrance;
957 camSupport.kuwahara.enabled = graphic.kuwahara;
958 camSupport.blur.enabled = graphic.blur > 0;
959 camSupport.blur.Amount = 0.01f * (float)graphic.blur;
961 {
963 }
966 postEffectProfile.Apply(EClass.scene.cam);
967 }
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
void OnChangeResolution()
ScreenGrading grading
void RefreshUIBrightness()
Definition: CoreConfig.cs:969
PostEffectProfile GetPostEffectProfile(bool replaceWorld=false)
Definition: CoreConfig.cs:939
static Scene scene
Definition: EClass.cs:30
void Apply(Camera cam)
Camera cam
Definition: Scene.cs:37

References PostEffectProfile.Apply(), CoreConfig.GraphicSetting.blur, PostEffectProfile.Brightness, Scene.cam, camSupport, PostEffectProfile.Contrast, EClass.core, GetPostEffectProfile(), CameraSupport.grading, graphic, if(), Core.IsGameStarted, CoreConfig.GraphicSetting.kuwahara, CameraSupport.OnChangeResolution(), BaseGameScreen.RefreshGrading(), RefreshUIBrightness(), PostEffectProfile.Saturation, EClass.scene, and EClass.screen.

Referenced by Apply(), Scene.Init(), AM_Cinema.OnDeactivate(), and LayerConfig.Refresh().

◆ ApplyHUD()

void CoreConfig.ApplyHUD ( )
inline

Definition at line 928 of file CoreConfig.cs.

929 {
930 }

Referenced by Apply().

◆ ApplyResolution()

void CoreConfig.ApplyResolution ( bool  force = false)
inline

Definition at line 894 of file CoreConfig.cs.

895 {
897 {
898 force = true;
899 }
900 if (force)
901 {
902 Screen.SetResolution(graphic.w, graphic.h, graphic.fullScreen);
903 }
904 Screen.fullScreen = graphic.fullScreen;
905 }

References CoreConfig.GraphicSetting.fixedResolution, CoreConfig.GraphicSetting.fullScreen, graphic, CoreConfig.GraphicSetting.h, and CoreConfig.GraphicSetting.w.

Referenced by Apply().

◆ ApplyScale()

void CoreConfig.ApplyScale ( )
inline

Definition at line 907 of file CoreConfig.cs.

908 {
909 float num = (float)ui.scale * 0.05f;
910 if (ui.autoscale)
911 {
912 float a = 0.55f;
913 float b = num + 0.05f;
914 num = 0.01f * (float)Mathf.RoundToInt(Mathf.Lerp(a, b, (float)Screen.height / 1080f) * 100f);
915 }
916 if (ui.secureMinWidth && Screen.width < EClass.core.ui.minWidth)
917 {
918 float num2 = (float)Screen.width / (float)EClass.core.ui.minWidth;
919 if (num2 < num)
920 {
921 num = num2;
922 }
923 }
924 Debug.Log("#UI ApplyScale:" + num);
925 EClass.core.canvas.GetComponent<CanvasScaler>().scaleFactor = num;
926 }
Canvas canvas
Definition: BaseCore.cs:34

References CoreConfig.UISetting.autoscale, BaseCore.canvas, EClass.core, Debug, if(), CoreConfig.UISetting.scale, CoreConfig.UISetting.secureMinWidth, Core.ui, and ui.

Referenced by Apply(), OnChangeResolution(), and LayerConfig.Refresh().

◆ ApplySkin()

void CoreConfig.ApplySkin ( )
inline

Definition at line 1023 of file CoreConfig.cs.

1024 {
1025 Core.Instance.ui.skins.SetMainSkin(test.idSkin);
1027 }
Definition: Core.cs:14
static new Core Instance
Definition: Core.cs:15
void ApplySkins()
Definition: Core.cs:757

References Core.ApplySkins(), EClass.core, CoreConfig.Test.idSkin, Core.Instance, test, and Core.ui.

Referenced by OnReset().

◆ ApplyVolume()

void CoreConfig.ApplyVolume ( )
inline

Definition at line 989 of file CoreConfig.cs.

990 {
991 SetVolume("VolumeMaster", sound.volumeMaster);
992 SetVolume("VolumeBGM", EClass.Sound.muteBGM ? 0f : sound.volumeBGM);
993 SetVolume("VolumeSpatialBGM", sound.volumeBGM);
994 SetVolume("VolumeSFX", sound.volumeSFX);
995 SetVolume("VolumeAmbience", sound.volumeAMB);
997 }
SoundSetting sound
Definition: CoreConfig.cs:596
void SetVolume(string id, float v)
Definition: CoreConfig.cs:1007
void SetBGMInterval()
Definition: CoreConfig.cs:999
static SoundManager Sound
Definition: EClass.cs:46

References SetBGMInterval(), SetVolume(), sound, EClass.Sound, CoreConfig.SoundSetting.volumeAMB, CoreConfig.SoundSetting.volumeBGM, CoreConfig.SoundSetting.volumeMaster, and CoreConfig.SoundSetting.volumeSFX.

Referenced by Apply(), LayerConfig.Refresh(), and Scene.ToggleMuteBGM().

◆ ApplyZoom()

void CoreConfig.ApplyZoom ( float  a)
inline

◆ Exist()

static bool CoreConfig.Exist ( )
inlinestatic

Definition at line 646 of file CoreConfig.cs.

647 {
648 if (!File.Exists(path) || (EClass.debug.useNewConfig && Application.isEditor))
649 {
650 return false;
651 }
652 return true;
653 }
static string path
Definition: CoreConfig.cs:629
bool useNewConfig
Definition: CoreDebug.cs:124
static CoreDebug debug
Definition: EClass.cs:48

References EClass.debug, path, and CoreDebug.useNewConfig.

◆ GetPostEffectProfile()

PostEffectProfile CoreConfig.GetPostEffectProfile ( bool  replaceWorld = false)
inline

Definition at line 939 of file CoreConfig.cs.

940 {
941 string text = graphic.idPostProfile.IsEmpty("None");
942 if (replaceWorld && EClass.core.IsGameStarted && EClass.core.game.activeZone.IsRegion && text != "None")
943 {
944 text = "NFAA";
945 }
946 return ResourceCache.Load<PostEffectProfile>("Scene/Profile/PostEffect/" + text);
947 }
Game game
Definition: Core.cs:72
Zone activeZone
Definition: Game.cs:248
virtual bool IsRegion
Definition: Spatial.cs:503

References Game.activeZone, EClass.core, Core.game, graphic, CoreConfig.GraphicSetting.idPostProfile, Core.IsGameStarted, and Spatial.IsRegion.

Referenced by ApplyGrading(), Init(), OnReset(), and ResetGraphics().

◆ HasBackerRewardCode()

bool CoreConfig.HasBackerRewardCode ( )
inline

Definition at line 730 of file CoreConfig.cs.

731 {
733 }
string rewardCode
Definition: CoreConfig.cs:584
static bool IsValid(string code)
Definition: ElinEncoder.cs:48

References ElinEncoder.IsValid(), and rewardCode.

Referenced by Steam.HasDLC().

◆ Init()

static void CoreConfig.Init ( )
inlinestatic

Definition at line 701 of file CoreConfig.cs.

702 {
703 if (EClass.core.config == null)
704 {
705 Debug.Log("Creating new config.");
706 CoreConfig coreConfig = (EClass.core.config = IO.DeepCopy(EClass.setting.config));
707 coreConfig.SetLang(EClass.core.langCode);
708 if (!Application.isEditor || !EClass.debug.useNewConfig)
709 {
710 coreConfig.Save();
711 }
713 if (EClass.debug.enable)
714 {
715 coreConfig.other.showTestOptions = true;
716 coreConfig.test.showNumbers = true;
717 coreConfig.game.waiter = 0;
718 coreConfig.game.advancedMenu = true;
719 }
720 }
722 }
string langCode
Definition: BaseCore.cs:25
void OnInit()
Definition: CoreConfig.cs:724
void Save()
Definition: CoreConfig.cs:821
void SetLang(string id)
Definition: CoreConfig.cs:803
bool enable
Definition: CoreDebug.cs:286
CoreConfig config
Definition: Core.cs:70
CoreConfig config
Definition: GameSetting.cs:337
Definition: IO.cs:11

References Core.config, GameSetting.config, EClass.core, EClass.debug, Debug, CoreDebug.enable, GetPostEffectProfile(), BaseCore.langCode, PostEffectProfile.OnChangeProfile(), OnInit(), Save(), SetLang(), EClass.setting, and CoreDebug.useNewConfig.

Referenced by Core.Init().

◆ IsCompatible()

static bool CoreConfig.IsCompatible ( Version  v)
inlinestatic

Definition at line 696 of file CoreConfig.cs.

697 {
698 return v.minor >= 22;
699 }

Referenced by TryLoadConfig().

◆ OnChangeResolution()

void CoreConfig.OnChangeResolution ( )
inline

Definition at line 829 of file CoreConfig.cs.

830 {
831 ApplyScale();
832 }

References ApplyScale().

Referenced by Core.OnChangeResolution().

◆ OnInit()

void CoreConfig.OnInit ( )
inline

Definition at line 724 of file CoreConfig.cs.

725 {
726 EClass.core.ui.skins.SetMainSkin(test.idSkin);
727 Apply();
728 }
void Apply()
Definition: CoreConfig.cs:856

References Apply(), EClass.core, CoreConfig.Test.idSkin, test, and Core.ui.

Referenced by Init().

◆ OnReset()

void CoreConfig.OnReset ( )
inline

◆ OnSetLang()

void CoreConfig.OnSetLang ( )
inline

Definition at line 1012 of file CoreConfig.cs.

1013 {
1015 ApplyFont();
1016 }
void InitFont()
Definition: SkinManager.cs:109
static SkinManager Instance
Definition: SkinManager.cs:78

References ApplyFont(), SkinManager.InitFont(), and SkinManager.Instance.

Referenced by Core.SetLang().

◆ RefreshUIBrightness()

void CoreConfig.RefreshUIBrightness ( )
inline

Definition at line 969 of file CoreConfig.cs.

970 {
971 ScreenGrading grading = camSupport.grading;
972 float num = 0f;
973 float num2 = 0f;
975 {
977 {
978 num -= 0.05f * ui.dynamicBrightnessMod;
979 }
980 }
981 else
982 {
983 num = -0.05f;
984 }
985 Shader.SetGlobalFloat("_UIBrightness", 0.01f * (float)ui.brightness + grading.profile.uiBrightness + num);
986 Shader.SetGlobalFloat("_UIContrast", 0.01f * (float)ui.contrast + grading.profile.uiContrast + EClass.core.ui.lightContrast + num2);
987 }
bool IsNight
Definition: Date.cs:112
static World world
Definition: EClass.cs:40
static Map _map
Definition: EClass.cs:18
bool indoor
Definition: MapConfig.cs:29
MapConfig config
Definition: Map.cs:37
GameDate date
Definition: World.cs:6

References EClass._map, CoreConfig.UISetting.brightness, camSupport, Map.config, CoreConfig.UISetting.contrast, EClass.core, World.date, CoreConfig.UISetting.dynamicBrightness, CoreConfig.UISetting.dynamicBrightnessMod, CameraSupport.grading, MapConfig.indoor, Core.IsGameStarted, Date.IsNight, Core.ui, ui, and EClass.world.

Referenced by BaseGameScreen.Activate(), ApplyGrading(), and BaseGameScreen.RefreshGrading().

◆ Reset()

static void CoreConfig.Reset ( )
inlinestatic

Definition at line 735 of file CoreConfig.cs.

736 {
737 string text = EClass.core.config.lang;
738 string text2 = EClass.core.config.rewardCode;
739 EClass.core.config = IO.DeepCopy(EClass.setting.config);
742 EClass.core.config.rewardCode = text2;
743 }
string lang
Definition: CoreConfig.cs:578
void OnReset()
Definition: CoreConfig.cs:795

References Core.config, GameSetting.config, EClass.core, lang, OnReset(), rewardCode, SetLang(), and EClass.setting.

Referenced by GameSetting.ApplyConfig().

◆ ResetGame()

static void CoreConfig.ResetGame ( )
inlinestatic

Definition at line 763 of file CoreConfig.cs.

764 {
765 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
766 EClass.core.config.game = coreConfig.game;
767 EClass.core.config.net = coreConfig.net;
768 EClass.core.config.backer = coreConfig.backer;
770 }
NetSetting net
Definition: CoreConfig.cs:604
BackerContentConfig backer
Definition: CoreConfig.cs:606

References Apply(), backer, Core.config, GameSetting.config, EClass.core, game, net, and EClass.setting.

Referenced by LayerConfig.OnInit().

◆ ResetGeneral()

static void CoreConfig.ResetGeneral ( )
inlinestatic

Definition at line 745 of file CoreConfig.cs.

746 {
747 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
748 EClass.core.config.ui = coreConfig.ui;
749 EClass.core.config.font = coreConfig.font;
750 EClass.core.config.sound = coreConfig.sound;
753 }

References Apply(), ApplyFont(), Core.config, GameSetting.config, EClass.core, font, EClass.setting, sound, and ui.

◆ ResetGraphics()

static void CoreConfig.ResetGraphics ( )
inlinestatic

Definition at line 755 of file CoreConfig.cs.

756 {
757 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
758 EClass.core.config.graphic = coreConfig.graphic;
761 }

References Apply(), Core.config, GameSetting.config, EClass.core, GetPostEffectProfile(), graphic, PostEffectProfile.OnChangeProfile(), and EClass.setting.

Referenced by LayerConfig.OnInit().

◆ ResetInput()

static void CoreConfig.ResetInput ( )
inlinestatic

Definition at line 772 of file CoreConfig.cs.

773 {
774 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
775 EClass.core.config.input = coreConfig.input;
776 EClass.core.config.camera = coreConfig.camera;
778 }

References Apply(), camera, Core.config, GameSetting.config, EClass.core, input, and EClass.setting.

Referenced by LayerConfig.OnInit().

◆ ResetOther()

static void CoreConfig.ResetOther ( )
inlinestatic

Definition at line 780 of file CoreConfig.cs.

781 {
782 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
783 EClass.core.config.fix = coreConfig.fix;
784 EClass.core.config.other = coreConfig.other;
786 }

References Apply(), Core.config, GameSetting.config, EClass.core, fix, other, and EClass.setting.

Referenced by LayerConfig.OnInit().

◆ ResetTest()

static void CoreConfig.ResetTest ( )
inlinestatic

Definition at line 788 of file CoreConfig.cs.

789 {
790 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
791 EClass.core.config.test = coreConfig.test;
793 }

References Apply(), Core.config, GameSetting.config, EClass.core, EClass.setting, and test.

Referenced by LayerConfig.OnInit().

◆ Save()

void CoreConfig.Save ( )
inline

Definition at line 821 of file CoreConfig.cs.

822 {
824 IO.SaveFile(path, this, compress: false, IO.jsWriteConfig);
826 Debug.Log("Config saved to " + path);
827 }
Version version
Definition: BaseCore.cs:17
Version version
Definition: CoreConfig.cs:576
static string VersionFile
Definition: CorePath.cs:184
static JsonSerializerSettings jsWriteConfig
Definition: IO.cs:39
static void SaveFile(string path, object obj, bool compress=false, JsonSerializerSettings setting=null)
Definition: IO.cs:89

References EClass.core, Debug, path, version, BaseCore.version, and CorePath.VersionFile.

Referenced by Init(), LayerMod.OnInit(), LayerConfig.OnKill(), LayerConfig.Refresh(), and TryUpdatePlayedHour().

◆ SetBGMInterval()

void CoreConfig.SetBGMInterval ( )
inline

Definition at line 999 of file CoreConfig.cs.

1000 {
1002 {
1003 EClass._map.plDay.interval = other.bgmInterval * 5f;
1004 }
1005 }

References EClass.core, and Core.IsGameStarted.

Referenced by ApplyVolume(), and Zone.RefreshBGM().

◆ SetLang()

void CoreConfig.SetLang ( string  id)
inline

Definition at line 803 of file CoreConfig.cs.

804 {
805 lang = id;
806 }

References lang.

Referenced by Init(), and Reset().

◆ SetVolume()

void CoreConfig.SetVolume ( string  id,
float  v 
)
inline

Definition at line 1007 of file CoreConfig.cs.

1008 {
1009 SoundManager.current.mixer.SetFloat(id, Mathf.Log((v < 0.01f) ? 0.01f : v) * 20f);
1010 }

Referenced by ApplyVolume().

◆ TryLoadConfig()

static CoreConfig CoreConfig.TryLoadConfig ( )
inlinestatic

Definition at line 655 of file CoreConfig.cs.

656 {
657 if (!File.Exists(path) || (EClass.debug.useNewConfig && Application.isEditor))
658 {
659 return null;
660 }
661 if (!File.Exists(CorePath.VersionFile))
662 {
663 return null;
664 }
665 CoreConfig coreConfig = IO.LoadFile<CoreConfig>(path);
666 if (!IsCompatible(coreConfig.version))
667 {
668 Debug.Log("Config version is different. deleting:" + coreConfig.version.ToString() + "/" + EClass.core.version.GetText());
669 return null;
670 }
671 if (coreConfig.game.backupInterval == 0)
672 {
673 coreConfig.game.numBackup = 5;
674 coreConfig.game.backupInterval = 8;
675 coreConfig.game.autoBackup = true;
676 }
677 if (coreConfig.version.IsBelow(0, 23, 138))
678 {
679 coreConfig.test.extraToneMTP = 1;
680 }
681 if (coreConfig.version.IsBelow(0, 23, 63))
682 {
683 coreConfig.graphic.floorEx = true;
684 }
685 if (coreConfig.version.IsBelow(0, 22, 17))
686 {
687 coreConfig.game.tutorial = true;
688 }
689 if (coreConfig.version.IsBelow(0, 22, 24))
690 {
691 coreConfig.ui.balloonBG = true;
692 }
693 return coreConfig;
694 }
static bool IsCompatible(Version v)
Definition: CoreConfig.cs:696
string GetText()
Definition: Version.cs:16
bool IsBelow(int _major, int _minor, int _batch)
Definition: Version.cs:31

References CoreConfig.GameConfig.backupInterval, EClass.core, EClass.debug, Debug, game, Version.GetText(), Version.IsBelow(), IsCompatible(), path, CoreDebug.useNewConfig, version, BaseCore.version, and CorePath.VersionFile.

Referenced by Core.Start().

◆ TryUpdatePlayedHour()

void CoreConfig.TryUpdatePlayedHour ( )
inline

Definition at line 808 of file CoreConfig.cs.

809 {
811 {
812 int num = (int)(EClass.player.stats.timeElapsed / 3600.0);
813 if (num > maxPlayedHours)
814 {
815 maxPlayedHours = num;
816 Save();
817 }
818 }
819 }
int maxPlayedHours
Definition: CoreConfig.cs:586
static Player player
Definition: EClass.cs:12
double timeElapsed
Definition: Player.cs:66
Stats stats
Definition: Player.cs:936

References EClass.core, Core.IsGameStarted, maxPlayedHours, EClass.player, Save(), Player.stats, and Player.Stats.timeElapsed.

Referenced by Game.Save().

Member Data Documentation

◆ _framerates

int [] CoreConfig._framerates = new int[4] { 120, 60, 30, 15 }
private

Definition at line 627 of file CoreConfig.cs.

Referenced by ApplyFPS().

◆ backer

◆ camera

◆ cloud

bool CoreConfig.cloud

Definition at line 592 of file CoreConfig.cs.

Referenced by LayerLoadGame.Init(), and LayerFeedback.OnInit().

◆ colors

int [] CoreConfig.colors = new int[10]

◆ customFonts

List<FontSource> CoreConfig.customFonts

Definition at line 618 of file CoreConfig.cs.

◆ emailReport

string CoreConfig.emailReport

Definition at line 582 of file CoreConfig.cs.

Referenced by LayerFeedback.OnInit().

◆ fix

Fix CoreConfig.fix

◆ font

FontSetting CoreConfig.font

Definition at line 598 of file CoreConfig.cs.

Referenced by ApplyFont(), and ResetGeneral().

◆ game

◆ graphic

◆ helpFlags

HashSet<string> CoreConfig.helpFlags = new HashSet<string>()

Definition at line 620 of file CoreConfig.cs.

Referenced by ELayer.TryShowHelp().

◆ ignoreApply

bool CoreConfig.ignoreApply

Definition at line 625 of file CoreConfig.cs.

Referenced by Apply().

◆ ignoreLinuxModWarning

bool CoreConfig.ignoreLinuxModWarning

Definition at line 590 of file CoreConfig.cs.

Referenced by Scene.TryWarnLinuxMod().

◆ ignoreParallelsWarning

bool CoreConfig.ignoreParallelsWarning

Definition at line 588 of file CoreConfig.cs.

Referenced by Scene.TryWarnMacScreen().

◆ input

◆ lang

string CoreConfig.lang = "JP"

Definition at line 578 of file CoreConfig.cs.

Referenced by Core.Init(), LayerFeedback.OnInit(), LayerConfig.Refresh(), Reset(), and SetLang().

◆ maxPlayedHours

int CoreConfig.maxPlayedHours

Definition at line 586 of file CoreConfig.cs.

Referenced by UI.ToggleFeedback(), and TryUpdatePlayedHour().

◆ nameReport

string CoreConfig.nameReport

Definition at line 580 of file CoreConfig.cs.

Referenced by LayerFeedback.OnInit().

◆ net

◆ other

◆ rewardCode

string CoreConfig.rewardCode

Definition at line 584 of file CoreConfig.cs.

Referenced by HasBackerRewardCode(), Reset(), and UI.ToggleFeedback().

◆ sound

SoundSetting CoreConfig.sound

Definition at line 596 of file CoreConfig.cs.

Referenced by ApplyVolume(), LayerConfig.Refresh(), ResetGeneral(), and Scene.ToggleMuteBGM().

◆ test

◆ ui

◆ version

Version CoreConfig.version

Definition at line 576 of file CoreConfig.cs.

Referenced by Save(), and TryLoadConfig().

Property Documentation

◆ camSupport

CameraSupport CoreConfig.camSupport
get

Definition at line 644 of file CoreConfig.cs.

Referenced by Apply(), ApplyGrading(), ApplyZoom(), and RefreshUIBrightness().

◆ path

string CoreConfig.path
staticget

Definition at line 629 of file CoreConfig.cs.

Referenced by Exist(), Save(), Core.Start(), and TryLoadConfig().

◆ ZoomStep

int CoreConfig.ZoomStep
staticget

Definition at line 631 of file CoreConfig.cs.

632 {
633 get
634 {
635 if (!EClass.debug.enable)
636 {
637 return 5;
638 }
639 return 5;
640 }
641 }

Referenced by HotItemContext.Show().


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