Elin Decompiled Documentation EA 23.130 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 (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 compressSave
 
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 848 of file CoreConfig.cs.

849 {
850 if (!ignoreApply)
851 {
853 ApplyFPS();
854 Application.runInBackground = Application.isEditor || other.runBackground;
855 ApplyVolume();
856 ApplyGrading();
857 ApplyHUD();
859 Window.openLastTab = ui.openLastTab;
860 Layer.closeOnRightClick = ui.rightClickClose;
861 RenderObject.animeSetting = EClass.core.gameSetting.render.anime;
862 RenderObject.renderSetting = (RenderData.renderSetting = EClass.core.gameSetting.render);
863 TC._setting = EClass.core.gameSetting.render.tc;
864 UIScrollView.sensitivity = ui.ScrollSensitivity;
865 UIContextMenu.closeOnMouseLeave = ui.closePopupOnMouseLeave;
866 EClass.core.canvas.pixelPerfect = graphic.pixelperfectUI;
868 CharaRenderer._animeFrame = EClass.setting.render.anime.animeStep[test.animeFrame];
869 CharaRenderer._animeFramePCC = EClass.setting.render.anime.animeStep[test.animeFramePCC];
870 CharaRenderer.smoothmove = camera.smoothMove;
871 CharaRenderer._animeFramePC = (camera.smoothMove ? 6000 : camera.moveframe);
872 Scene.skipAnime = true;
873 QualitySettings.maxQueuedFrames = 0;
874 PopManager.outlineAlpha = ui.outlineAlpha;
875 Window.animateWindow = ui.animeWindow;
876 EInput.rightScroll = game.rightScroll;
877 EInput.buttonScroll = (game.rightScroll ? EInput.rightMouse : EInput.middleMouse);
878 EInput.antiMissClick = 0.1f * (float)other.antiMissClick;
879 camSupport.bloom.enabled = graphic.bloom;
881 camSupport.cam.allowHDR = graphic.hdr;
882 ApplyScale();
883 }
884 }
void RefreshScreenSize()
BloomOptimized bloom
Beautify beautify
EInput.KeyMapManager keys
Definition: CoreConfig.cs:259
bool ignoreApply
Definition: CoreConfig.cs:621
void ApplyVolume()
Definition: CoreConfig.cs:981
new GameConfig game
Definition: CoreConfig.cs:598
void ApplyGrading()
Definition: CoreConfig.cs:941
void ApplyResolution(bool force=false)
Definition: CoreConfig.cs:886
void ApplyScale()
Definition: CoreConfig.cs:899
GraphicSetting graphic
Definition: CoreConfig.cs:596
void ApplyHUD()
Definition: CoreConfig.cs:920
CameraConfig camera
Definition: CoreConfig.cs:606
void ApplyFPS(bool force=false)
Definition: CoreConfig.cs:826
OtherSetting other
Definition: CoreConfig.cs:608
new UISetting ui
Definition: CoreConfig.cs:590
CameraSupport camSupport
Definition: CoreConfig.cs:640
InputSetting input
Definition: CoreConfig.cs:604
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 826 of file CoreConfig.cs.

827 {
828 if (EClass.core.IsGameStarted || force)
829 {
830 if (graphic.vsync)
831 {
832 QualitySettings.vSyncCount = 1;
833 Application.targetFrameRate = 60;
834 }
835 else
836 {
837 QualitySettings.vSyncCount = 0;
838 Application.targetFrameRate = _framerates[graphic.fps];
839 }
840 }
841 else
842 {
843 QualitySettings.vSyncCount = 0;
844 Application.targetFrameRate = 60;
845 }
846 }
int[] _framerates
Definition: CoreConfig.cs:623
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 941 of file CoreConfig.cs.

942 {
943 PostEffectProfile postEffectProfile = GetPostEffectProfile();
944 ScreenGrading grading = camSupport.grading;
945 grading.userSaturation = graphic.saturation + postEffectProfile.Saturation;
946 grading.userBrightness = graphic.brightness + postEffectProfile.Brightness;
947 grading.userContrast = graphic.contrast + postEffectProfile.Contrast;
948 camSupport.beautify.saturate = graphic.vibrance + grading.profile.Vibrance;
949 camSupport.kuwahara.enabled = graphic.kuwahara;
950 camSupport.blur.enabled = graphic.blur > 0;
951 camSupport.blur.Amount = 0.01f * (float)graphic.blur;
953 {
955 }
958 postEffectProfile.Apply(EClass.scene.cam);
959 }
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
void OnChangeResolution()
ScreenGrading grading
void RefreshUIBrightness()
Definition: CoreConfig.cs:961
PostEffectProfile GetPostEffectProfile(bool replaceWorld=false)
Definition: CoreConfig.cs:931
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 920 of file CoreConfig.cs.

921 {
922 }

Referenced by Apply().

◆ ApplyResolution()

void CoreConfig.ApplyResolution ( bool  force = false)
inline

Definition at line 886 of file CoreConfig.cs.

887 {
889 {
890 force = true;
891 }
892 if (force)
893 {
894 Screen.SetResolution(graphic.w, graphic.h, graphic.fullScreen);
895 }
896 Screen.fullScreen = graphic.fullScreen;
897 }

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 899 of file CoreConfig.cs.

900 {
901 float num = (float)ui.scale * 0.05f;
902 if (ui.autoscale)
903 {
904 float a = 0.55f;
905 float b = num + 0.05f;
906 num = 0.01f * (float)Mathf.RoundToInt(Mathf.Lerp(a, b, (float)Screen.height / 1080f) * 100f);
907 }
908 if (ui.secureMinWidth && Screen.width < EClass.core.ui.minWidth)
909 {
910 float num2 = (float)Screen.width / (float)EClass.core.ui.minWidth;
911 if (num2 < num)
912 {
913 num = num2;
914 }
915 }
916 Debug.Log("#UI ApplyScale:" + num);
917 EClass.core.canvas.GetComponent<CanvasScaler>().scaleFactor = num;
918 }
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 1015 of file CoreConfig.cs.

1016 {
1017 Core.Instance.ui.skins.SetMainSkin(test.idSkin);
1019 }
Definition: Core.cs:14
static new Core Instance
Definition: Core.cs:15
void ApplySkins()
Definition: Core.cs:750

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 981 of file CoreConfig.cs.

982 {
983 SetVolume("VolumeMaster", sound.volumeMaster);
984 SetVolume("VolumeBGM", EClass.Sound.muteBGM ? 0f : sound.volumeBGM);
985 SetVolume("VolumeSpatialBGM", sound.volumeBGM);
986 SetVolume("VolumeSFX", sound.volumeSFX);
987 SetVolume("VolumeAmbience", sound.volumeAMB);
989 }
SoundSetting sound
Definition: CoreConfig.cs:592
void SetVolume(string id, float v)
Definition: CoreConfig.cs:999
void SetBGMInterval()
Definition: CoreConfig.cs:991
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 642 of file CoreConfig.cs.

643 {
644 if (!File.Exists(path) || (EClass.debug.useNewConfig && Application.isEditor))
645 {
646 return false;
647 }
648 return true;
649 }
static string path
Definition: CoreConfig.cs:625
bool useNewConfig
Definition: CoreDebug.cs:123
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 931 of file CoreConfig.cs.

932 {
933 string text = graphic.idPostProfile.IsEmpty("None");
934 if (replaceWorld && EClass.core.IsGameStarted && EClass.core.game.activeZone.IsRegion && text != "None")
935 {
936 text = "NFAA";
937 }
938 return ResourceCache.Load<PostEffectProfile>("Scene/Profile/PostEffect/" + text);
939 }
Game game
Definition: Core.cs:72
Zone activeZone
Definition: Game.cs:245
virtual bool IsRegion
Definition: Spatial.cs:501

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 722 of file CoreConfig.cs.

723 {
725 }
string rewardCode
Definition: CoreConfig.cs:578
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 693 of file CoreConfig.cs.

694 {
695 if (EClass.core.config == null)
696 {
697 Debug.Log("Creating new config.");
698 CoreConfig coreConfig = (EClass.core.config = IO.DeepCopy(EClass.setting.config));
699 coreConfig.SetLang(EClass.core.langCode);
700 if (!Application.isEditor || !EClass.debug.useNewConfig)
701 {
702 coreConfig.Save();
703 }
705 if (EClass.debug.enable)
706 {
707 coreConfig.other.showTestOptions = true;
708 coreConfig.test.showNumbers = true;
709 coreConfig.game.waiter = 0;
710 coreConfig.game.advancedMenu = true;
711 }
712 }
714 }
string langCode
Definition: BaseCore.cs:25
void OnInit()
Definition: CoreConfig.cs:716
void Save()
Definition: CoreConfig.cs:813
void SetLang(string id)
Definition: CoreConfig.cs:795
bool enable
Definition: CoreDebug.cs:285
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 688 of file CoreConfig.cs.

689 {
690 return v.minor >= 22;
691 }

Referenced by TryLoadConfig().

◆ OnChangeResolution()

void CoreConfig.OnChangeResolution ( )
inline

Definition at line 821 of file CoreConfig.cs.

822 {
823 ApplyScale();
824 }

References ApplyScale().

Referenced by Core.OnChangeResolution().

◆ OnInit()

void CoreConfig.OnInit ( )
inline

Definition at line 716 of file CoreConfig.cs.

717 {
718 EClass.core.ui.skins.SetMainSkin(test.idSkin);
719 Apply();
720 }
void Apply()
Definition: CoreConfig.cs:848

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 1004 of file CoreConfig.cs.

1005 {
1007 ApplyFont();
1008 }
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 961 of file CoreConfig.cs.

962 {
963 ScreenGrading grading = camSupport.grading;
964 float num = 0f;
965 float num2 = 0f;
967 {
969 {
970 num -= 0.05f * ui.dynamicBrightnessMod;
971 }
972 }
973 else
974 {
975 num = -0.05f;
976 }
977 Shader.SetGlobalFloat("_UIBrightness", 0.01f * (float)ui.brightness + grading.profile.uiBrightness + num);
978 Shader.SetGlobalFloat("_UIContrast", 0.01f * (float)ui.contrast + grading.profile.uiContrast + EClass.core.ui.lightContrast + num2);
979 }
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 727 of file CoreConfig.cs.

728 {
729 string text = EClass.core.config.lang;
730 string text2 = EClass.core.config.rewardCode;
731 EClass.core.config = IO.DeepCopy(EClass.setting.config);
734 EClass.core.config.rewardCode = text2;
735 }
string lang
Definition: CoreConfig.cs:572
void OnReset()
Definition: CoreConfig.cs:787

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 755 of file CoreConfig.cs.

756 {
757 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
758 EClass.core.config.game = coreConfig.game;
759 EClass.core.config.net = coreConfig.net;
760 EClass.core.config.backer = coreConfig.backer;
762 }
NetSetting net
Definition: CoreConfig.cs:600
BackerContentConfig backer
Definition: CoreConfig.cs:602

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 737 of file CoreConfig.cs.

738 {
739 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
740 EClass.core.config.ui = coreConfig.ui;
741 EClass.core.config.font = coreConfig.font;
742 EClass.core.config.sound = coreConfig.sound;
745 }

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

◆ ResetGraphics()

static void CoreConfig.ResetGraphics ( )
inlinestatic

Definition at line 747 of file CoreConfig.cs.

748 {
749 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
750 EClass.core.config.graphic = coreConfig.graphic;
753 }

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 764 of file CoreConfig.cs.

765 {
766 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
767 EClass.core.config.input = coreConfig.input;
768 EClass.core.config.camera = coreConfig.camera;
770 }

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 772 of file CoreConfig.cs.

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

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 780 of file CoreConfig.cs.

781 {
782 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
783 EClass.core.config.test = coreConfig.test;
785 }

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

Referenced by LayerConfig.OnInit().

◆ Save()

void CoreConfig.Save ( )
inline

Definition at line 813 of file CoreConfig.cs.

814 {
816 IO.SaveFile(path, this, compress: false, IO.jsWriteConfig);
818 Debug.Log("Config saved to " + path);
819 }
Version version
Definition: BaseCore.cs:17
Version version
Definition: CoreConfig.cs:570
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 991 of file CoreConfig.cs.

992 {
994 {
995 EClass._map.plDay.interval = other.bgmInterval * 5f;
996 }
997 }

References EClass.core, and Core.IsGameStarted.

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

◆ SetLang()

void CoreConfig.SetLang ( string  id)
inline

Definition at line 795 of file CoreConfig.cs.

796 {
797 lang = id;
798 }

References lang.

Referenced by Init(), and Reset().

◆ SetVolume()

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

Definition at line 999 of file CoreConfig.cs.

1000 {
1001 SoundManager.current.mixer.SetFloat(id, Mathf.Log((v < 0.01f) ? 0.01f : v) * 20f);
1002 }

Referenced by ApplyVolume().

◆ TryLoadConfig()

static CoreConfig CoreConfig.TryLoadConfig ( )
inlinestatic

Definition at line 651 of file CoreConfig.cs.

652 {
653 if (!File.Exists(path) || (EClass.debug.useNewConfig && Application.isEditor))
654 {
655 return null;
656 }
657 if (!File.Exists(CorePath.VersionFile))
658 {
659 return null;
660 }
661 CoreConfig coreConfig = IO.LoadFile<CoreConfig>(path);
662 if (!IsCompatible(coreConfig.version))
663 {
664 Debug.Log("Config version is different. deleting:" + coreConfig.version.ToString() + "/" + EClass.core.version.GetText());
665 return null;
666 }
667 if (coreConfig.game.backupInterval == 0)
668 {
669 coreConfig.game.numBackup = 5;
670 coreConfig.game.backupInterval = 8;
671 coreConfig.game.autoBackup = true;
672 }
673 if (coreConfig.version.IsBelow(0, 23, 63))
674 {
675 coreConfig.graphic.floorEx = true;
676 }
677 if (coreConfig.version.IsBelow(0, 22, 17))
678 {
679 coreConfig.game.tutorial = true;
680 }
681 if (coreConfig.version.IsBelow(0, 22, 24))
682 {
683 coreConfig.ui.balloonBG = true;
684 }
685 return coreConfig;
686 }
static bool IsCompatible(Version v)
Definition: CoreConfig.cs:688
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 800 of file CoreConfig.cs.

801 {
803 {
804 int num = (int)(EClass.player.stats.timeElapsed / 3600.0);
805 if (num > maxPlayedHours)
806 {
807 maxPlayedHours = num;
808 Save();
809 }
810 }
811 }
int maxPlayedHours
Definition: CoreConfig.cs:580
static Player player
Definition: EClass.cs:12
double timeElapsed
Definition: Player.cs:62
Stats stats
Definition: Player.cs:832

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 623 of file CoreConfig.cs.

Referenced by ApplyFPS().

◆ backer

◆ camera

◆ cloud

bool CoreConfig.cloud

Definition at line 588 of file CoreConfig.cs.

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

◆ colors

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

◆ compressSave

bool CoreConfig.compressSave

Definition at line 582 of file CoreConfig.cs.

◆ customFonts

List<FontSource> CoreConfig.customFonts

Definition at line 614 of file CoreConfig.cs.

◆ emailReport

string CoreConfig.emailReport

Definition at line 576 of file CoreConfig.cs.

Referenced by LayerFeedback.OnInit().

◆ fix

Fix CoreConfig.fix

◆ font

FontSetting CoreConfig.font

Definition at line 594 of file CoreConfig.cs.

Referenced by ApplyFont(), and ResetGeneral().

◆ game

◆ graphic

◆ helpFlags

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

Definition at line 616 of file CoreConfig.cs.

Referenced by ELayer.TryShowHelp().

◆ ignoreApply

bool CoreConfig.ignoreApply

Definition at line 621 of file CoreConfig.cs.

Referenced by Apply().

◆ ignoreLinuxModWarning

bool CoreConfig.ignoreLinuxModWarning

Definition at line 586 of file CoreConfig.cs.

Referenced by Scene.TryWarnLinuxMod().

◆ ignoreParallelsWarning

bool CoreConfig.ignoreParallelsWarning

Definition at line 584 of file CoreConfig.cs.

Referenced by Scene.TryWarnMacScreen().

◆ input

◆ lang

string CoreConfig.lang = "JP"

Definition at line 572 of file CoreConfig.cs.

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

◆ maxPlayedHours

int CoreConfig.maxPlayedHours

Definition at line 580 of file CoreConfig.cs.

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

◆ nameReport

string CoreConfig.nameReport

Definition at line 574 of file CoreConfig.cs.

Referenced by LayerFeedback.OnInit().

◆ net

NetSetting CoreConfig.net

Definition at line 600 of file CoreConfig.cs.

Referenced by Scene.OnUpdate(), ResetGame(), and ActEffect.Wish().

◆ other

◆ rewardCode

string CoreConfig.rewardCode

Definition at line 578 of file CoreConfig.cs.

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

◆ sound

◆ test

◆ ui

◆ version

Version CoreConfig.version

Definition at line 570 of file CoreConfig.cs.

Referenced by Save(), and TryLoadConfig().

Property Documentation

◆ camSupport

CameraSupport CoreConfig.camSupport
get

Definition at line 640 of file CoreConfig.cs.

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

◆ path

string CoreConfig.path
staticget

Definition at line 625 of file CoreConfig.cs.

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

◆ ZoomStep

int CoreConfig.ZoomStep
staticget

Definition at line 627 of file CoreConfig.cs.

628 {
629 get
630 {
631 if (!EClass.debug.enable)
632 {
633 return 5;
634 }
635 return 5;
636 }
637 }

Referenced by HotItemContext.Show().


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