Elin Decompiled Documentation EA 23.352.1 Stable
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 , ToggleLog
}
 
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 ApplyPortraitAA ()
 
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 (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
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< FontSource > customFonts
 
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 
ToggleLog 

Definition at line 13 of file CoreConfig.cs.

◆ GameFuncBuild

Enumerator
None 
ExitBuildMode 
Rotate 
ToggleFreepos 
SnapFreepos 
ToggleRoof 
ToggleSlope 
ToggleWall 
TogglePicker 
ToggleBuildLight 

Definition at line 35 of file CoreConfig.cs.

◆ ScreenSnapType

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

Definition at line 49 of file CoreConfig.cs.

Member Function Documentation

◆ Apply()

void CoreConfig.Apply ( )
inline

Definition at line 887 of file CoreConfig.cs.

888 {
889 if (!ignoreApply)
890 {
892 ApplyFPS();
893 Application.runInBackground = Application.isEditor || other.runBackground;
894 ApplyVolume();
895 ApplyGrading();
896 ApplyHUD();
898 Window.openLastTab = ui.openLastTab;
899 Layer.closeOnRightClick = ui.rightClickClose;
900 RenderObject.animeSetting = EClass.core.gameSetting.render.anime;
901 RenderObject.renderSetting = (RenderData.renderSetting = EClass.core.gameSetting.render);
902 TC._setting = EClass.core.gameSetting.render.tc;
903 UIScrollView.sensitivity = ui.ScrollSensitivity;
904 UIContextMenu.closeOnMouseLeave = ui.closePopupOnMouseLeave;
905 EClass.core.canvas.pixelPerfect = graphic.pixelperfectUI;
907 CharaRenderer._animeFrame = EClass.setting.render.anime.animeStep[test.animeFrame];
908 CharaRenderer._animeFramePCC = EClass.setting.render.anime.animeStep[test.animeFramePCC];
909 CharaRenderer.smoothmove = camera.smoothMove;
910 CharaRenderer._animeFramePC = (camera.smoothMove ? 6000 : camera.moveframe);
911 Scene.skipAnime = true;
912 QualitySettings.maxQueuedFrames = 0;
913 PopManager.outlineAlpha = ui.outlineAlpha;
914 Window.animateWindow = ui.animeWindow;
915 EInput.rightScroll = game.rightScroll;
916 EInput.buttonScroll = (game.rightScroll ? EInput.rightMouse : EInput.middleMouse);
917 EInput.antiMissClick = 0.1f * (float)other.antiMissClick;
918 camSupport.bloom.enabled = graphic.bloom;
920 camSupport.cam.allowHDR = graphic.hdr;
921 ApplyScale();
924 EClass.core.effects.effects.usePool = test.cacheEffect;
925 }
926 }
void RefreshScreenSize()
BloomOptimized bloom
Beautify beautify
EInput.KeyMapManager keys
Definition: CoreConfig.cs:262
bool ignoreApply
Definition: CoreConfig.cs:652
void ApplyVolume()
Definition: CoreConfig.cs:1029
new GameConfig game
Definition: CoreConfig.cs:629
void ApplyGrading()
Definition: CoreConfig.cs:989
void ApplyResolution(bool force=false)
Definition: CoreConfig.cs:934
void ApplyScale()
Definition: CoreConfig.cs:947
GraphicSetting graphic
Definition: CoreConfig.cs:627
void ApplyHUD()
Definition: CoreConfig.cs:968
CameraConfig camera
Definition: CoreConfig.cs:637
void ApplyFPS(bool force=false)
Definition: CoreConfig.cs:865
void ApplyPortraitAA()
Definition: CoreConfig.cs:928
OtherSetting other
Definition: CoreConfig.cs:639
new UISetting ui
Definition: CoreConfig.cs:621
CameraSupport camSupport
Definition: CoreConfig.cs:671
InputSetting input
Definition: CoreConfig.cs:635
GameSetting gameSetting
Definition: Core.cs:47
EffectManager effects
Definition: Core.cs:37
Definition: EClass.cs:6
static Core core
Definition: EClass.cs:7
static BaseGameScreen screen
Definition: EClass.cs:33
static GameSetting setting
Definition: EClass.cs:35
Definition: EInput.cs:8
static ButtonState middleMouse
Definition: EInput.cs:364
static void SetKeyMap(KeyMapManager _keys)
Definition: EInput.cs:444
RenderSetting render
Definition: GameSetting.cs:348

References GameSetting.RenderSetting.anime, CoreConfig.Test.animeFrame, CoreConfig.Test.animeFramePCC, GameSetting.RenderSetting.AnimeSetting.animeStep, CoreConfig.UISetting.animeWindow, CoreConfig.OtherSetting.antiMissClick, ApplyFPS(), ApplyGrading(), ApplyHUD(), ApplyPortraitAA(), ApplyResolution(), ApplyScale(), ApplyVolume(), CameraSupport.beautify, CameraSupport.bloom, CoreConfig.GraphicSetting.bloom, CoreConfig.Test.bloom2, CoreConfig.Test.cacheEffect, CameraSupport.cam, camera, camSupport, CoreConfig.UISetting.closePopupOnMouseLeave, EClass.core, Core.effects, game, Core.gameSetting, graphic, CoreConfig.GraphicSetting.hdr, ignoreApply, input, CoreConfig.InputSetting.keys, EffectManager.KillAll(), 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 865 of file CoreConfig.cs.

866 {
867 if (EClass.core.IsGameStarted || force)
868 {
869 if (graphic.vsync)
870 {
871 QualitySettings.vSyncCount = 1;
872 Application.targetFrameRate = 60;
873 }
874 else
875 {
876 QualitySettings.vSyncCount = 0;
877 Application.targetFrameRate = _framerates[graphic.fps];
878 }
879 }
880 else
881 {
882 QualitySettings.vSyncCount = 0;
883 Application.targetFrameRate = 60;
884 }
885 }
int[] _framerates
Definition: CoreConfig.cs:654
bool IsGameStarted
Definition: Core.cs:87

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

990 {
991 PostEffectProfile postEffectProfile = GetPostEffectProfile();
992 ScreenGrading grading = camSupport.grading;
993 grading.userSaturation = graphic.saturation + postEffectProfile.Saturation;
994 grading.userBrightness = graphic.brightness + postEffectProfile.Brightness;
995 grading.userContrast = graphic.contrast + postEffectProfile.Contrast;
996 camSupport.beautify.saturate = graphic.vibrance + grading.profile.Vibrance;
997 camSupport.kuwahara.enabled = graphic.kuwahara;
998 camSupport.blur.enabled = graphic.blur > 0;
999 camSupport.blur.Amount = 0.01f * (float)graphic.blur;
1001 {
1003 }
1006 postEffectProfile.Apply(EClass.scene.cam);
1007 }
if(!match.Success)
void OnChangeResolution()
ScreenGrading grading
void RefreshUIBrightness()
Definition: CoreConfig.cs:1009
PostEffectProfile GetPostEffectProfile(bool replaceWorld=false)
Definition: CoreConfig.cs:979
static Scene scene
Definition: EClass.cs:31
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 968 of file CoreConfig.cs.

969 {
970 }

Referenced by Apply().

◆ ApplyPortraitAA()

void CoreConfig.ApplyPortraitAA ( )
inline

Definition at line 928 of file CoreConfig.cs.

929 {
930 Portrait.loadOption.mipmap = (test.aaPortraitFilter ? new Vector2Int?(Portrait.standardSize) : ((Vector2Int?)null));
931 Portrait.loadOptionFull.mipmap = (test.aaPortraitFilter ? new Vector2Int?(Portrait.standardFullSize) : ((Vector2Int?)null));
932 }
static readonly Vector2Int standardFullSize
Definition: Portrait.cs:10
static readonly Vector2Int standardSize
Definition: Portrait.cs:8

References Portrait.standardFullSize, and Portrait.standardSize.

Referenced by Apply().

◆ ApplyResolution()

void CoreConfig.ApplyResolution ( bool  force = false)
inline

Definition at line 934 of file CoreConfig.cs.

935 {
937 {
938 force = true;
939 }
940 if (force)
941 {
942 Screen.SetResolution(graphic.w, graphic.h, graphic.fullScreen);
943 }
944 Screen.fullScreen = graphic.fullScreen;
945 }

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

948 {
949 float num = (float)ui.scale * 0.05f;
950 if (ui.autoscale)
951 {
952 float a = 0.55f;
953 float b = num + 0.05f;
954 num = 0.01f * (float)Mathf.RoundToInt(Mathf.Lerp(a, b, (float)Screen.height / 1080f) * 100f);
955 }
956 if (ui.secureMinWidth && Screen.width < EClass.core.ui.minWidth)
957 {
958 float num2 = (float)Screen.width / (float)EClass.core.ui.minWidth;
959 if (num2 < num)
960 {
961 num = num2;
962 }
963 }
964 Debug.Log("#UI ApplyScale:" + num);
965 EClass.core.canvas.GetComponent<CanvasScaler>().scaleFactor = num;
966 }
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 1063 of file CoreConfig.cs.

1064 {
1065 Core.Instance.ui.skins.SetMainSkin(test.idSkin);
1067 }
Definition: Core.cs:14
static new Core Instance
Definition: Core.cs:15
void ApplySkins()
Definition: Core.cs:782

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

1030 {
1031 SetVolume("VolumeMaster", sound.volumeMaster);
1032 SetVolume("VolumeBGM", EClass.Sound.muteBGM ? 0f : sound.volumeBGM);
1033 SetVolume("VolumeSpatialBGM", sound.volumeBGM);
1034 SetVolume("VolumeSFX", sound.volumeSFX);
1035 SetVolume("VolumeAmbience", sound.volumeAMB);
1037 }
SoundSetting sound
Definition: CoreConfig.cs:623
void SetVolume(string id, float v)
Definition: CoreConfig.cs:1047
void SetBGMInterval()
Definition: CoreConfig.cs:1039
static SoundManager Sound
Definition: EClass.cs:47

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

674 {
675 if (!File.Exists(path) || (EClass.debug.useNewConfig && Application.isEditor))
676 {
677 return false;
678 }
679 return true;
680 }
static string path
Definition: CoreConfig.cs:656
bool useNewConfig
Definition: CoreDebug.cs:140
static CoreDebug debug
Definition: EClass.cs:49

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

◆ GetPostEffectProfile()

PostEffectProfile CoreConfig.GetPostEffectProfile ( bool  replaceWorld = false)
inline

Definition at line 979 of file CoreConfig.cs.

980 {
981 string text = graphic.idPostProfile.IsEmpty("None");
982 if (replaceWorld && EClass.core.IsGameStarted && EClass.core.game.activeZone.IsRegion && text != "None")
983 {
984 text = "NFAA";
985 }
986 return ResourceCache.Load<PostEffectProfile>("Scene/Profile/PostEffect/" + text);
987 }
Game game
Definition: Core.cs:72
Zone activeZone
Definition: Game.cs:252
virtual bool IsRegion
Definition: Spatial.cs:515

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

762 {
764 }
string rewardCode
Definition: CoreConfig.cs:611
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 732 of file CoreConfig.cs.

733 {
734 if (EClass.core.config == null)
735 {
736 Debug.Log("Creating new config.");
737 CoreConfig coreConfig = (EClass.core.config = IO.DeepCopy(EClass.setting.config));
738 coreConfig.SetLang(EClass.core.langCode);
739 if (!Application.isEditor || !EClass.debug.useNewConfig)
740 {
741 coreConfig.Save();
742 }
744 if (EClass.debug.enable)
745 {
746 coreConfig.other.showTestOptions = true;
747 coreConfig.test.showNumbers = true;
748 coreConfig.game.waiter = 0;
749 coreConfig.game.advancedMenu = true;
750 }
751 }
753 }
string langCode
Definition: BaseCore.cs:25
void OnInit()
Definition: CoreConfig.cs:755
void Save()
Definition: CoreConfig.cs:852
void SetLang(string id)
Definition: CoreConfig.cs:834
bool enable
Definition: CoreDebug.cs:302
CoreConfig config
Definition: Core.cs:70
CoreConfig config
Definition: GameSetting.cs:384
Definition: IO.cs:10

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

728 {
729 return v.minor >= 22;
730 }

Referenced by TryLoadConfig().

◆ OnChangeResolution()

void CoreConfig.OnChangeResolution ( )
inline

Definition at line 860 of file CoreConfig.cs.

861 {
862 ApplyScale();
863 }

References ApplyScale().

◆ OnInit()

void CoreConfig.OnInit ( )
inline

Definition at line 755 of file CoreConfig.cs.

756 {
757 EClass.core.ui.skins.SetMainSkin(test.idSkin);
758 Apply();
759 }
void Apply()
Definition: CoreConfig.cs:887

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

1053 {
1055 ApplyFont();
1056 }
void InitFont()
Definition: SkinManager.cs:109
static SkinManager Instance
Definition: SkinManager.cs:78

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

◆ RefreshUIBrightness()

void CoreConfig.RefreshUIBrightness ( )
inline

Definition at line 1009 of file CoreConfig.cs.

1010 {
1011 ScreenGrading grading = camSupport.grading;
1012 float num = 0f;
1013 float num2 = 0f;
1015 {
1017 {
1018 num -= 0.05f * ui.dynamicBrightnessMod;
1019 }
1020 }
1021 else
1022 {
1023 num = -0.05f;
1024 }
1025 Shader.SetGlobalFloat("_UIBrightness", 0.01f * (float)ui.brightness + grading.profile.uiBrightness + num);
1026 Shader.SetGlobalFloat("_UIContrast", 0.01f * (float)ui.contrast + grading.profile.uiContrast + EClass.core.ui.lightContrast + num2);
1027 }
bool IsNight
Definition: Date.cs:112
static World world
Definition: EClass.cs:41
static Map _map
Definition: EClass.cs:19
bool indoor
Definition: MapConfig.cs:29
MapConfig config
Definition: Map.cs:40
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 766 of file CoreConfig.cs.

767 {
768 string text = EClass.core.config.lang;
769 string text2 = EClass.core.config.rewardCode;
770 EClass.core.config = IO.DeepCopy(EClass.setting.config);
773 EClass.core.config.rewardCode = text2;
774 }
string lang
Definition: CoreConfig.cs:605
void OnReset()
Definition: CoreConfig.cs:826

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

795 {
796 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
797 EClass.core.config.game = coreConfig.game;
798 EClass.core.config.net = coreConfig.net;
799 EClass.core.config.backer = coreConfig.backer;
801 }
NetSetting net
Definition: CoreConfig.cs:631
BackerContentConfig backer
Definition: CoreConfig.cs:633

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

777 {
778 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
779 EClass.core.config.ui = coreConfig.ui;
780 EClass.core.config.font = coreConfig.font;
781 EClass.core.config.sound = coreConfig.sound;
784 }

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

◆ ResetGraphics()

static void CoreConfig.ResetGraphics ( )
inlinestatic

Definition at line 786 of file CoreConfig.cs.

787 {
788 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
789 EClass.core.config.graphic = coreConfig.graphic;
792 }

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

804 {
805 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
806 EClass.core.config.input = coreConfig.input;
807 EClass.core.config.camera = coreConfig.camera;
809 }

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

812 {
813 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
814 EClass.core.config.fix = coreConfig.fix;
815 EClass.core.config.other = coreConfig.other;
817 }

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

820 {
821 CoreConfig coreConfig = IO.DeepCopy(EClass.setting.config);
822 EClass.core.config.test = coreConfig.test;
824 }

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

Referenced by LayerConfig.OnInit().

◆ Save()

void CoreConfig.Save ( )
inline

Definition at line 852 of file CoreConfig.cs.

853 {
855 IO.SaveFile(path, this, compress: false, IO.jsWriteConfig);
857 Debug.Log("Config saved to " + path);
858 }
Version version
Definition: BaseCore.cs:17
Version version
Definition: CoreConfig.cs:603
static string VersionFile
Definition: CorePath.cs:180
static JsonSerializerSettings jsWriteConfig
Definition: IO.cs:38
static void SaveFile(string path, object obj, bool compress=false, JsonSerializerSettings setting=null)
Definition: IO.cs:88

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

1040 {
1042 {
1043 EClass._map.plDay.interval = other.bgmInterval * 5f;
1044 }
1045 }

References EClass.core, and Core.IsGameStarted.

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

◆ SetLang()

void CoreConfig.SetLang ( string  id)
inline

Definition at line 834 of file CoreConfig.cs.

835 {
836 lang = id;
837 }

References lang.

Referenced by Init(), and Reset().

◆ SetVolume()

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

Definition at line 1047 of file CoreConfig.cs.

1048 {
1049 SoundManager.current.mixer.SetFloat(id, Mathf.Log((v < 0.01f) ? 0.01f : v) * 20f);
1050 }

Referenced by ApplyVolume().

◆ TryLoadConfig()

static CoreConfig CoreConfig.TryLoadConfig ( )
inlinestatic

Definition at line 682 of file CoreConfig.cs.

683 {
684 if (!File.Exists(path) || (EClass.debug.useNewConfig && Application.isEditor))
685 {
686 return null;
687 }
688 if (!File.Exists(CorePath.VersionFile))
689 {
690 return null;
691 }
692 CoreConfig coreConfig = IO.LoadFile<CoreConfig>(path);
693 if (!IsCompatible(coreConfig.version))
694 {
695 Debug.Log("Config version is different. deleting:" + coreConfig.version.ToString() + "/" + EClass.core.version.GetText());
696 return null;
697 }
698 if (coreConfig.game.backupInterval == 0)
699 {
700 coreConfig.game.numBackup = 5;
701 coreConfig.game.backupInterval = 8;
702 coreConfig.game.autoBackup = true;
703 }
704 if (coreConfig.version.IsBelow(0, 23, 138))
705 {
706 coreConfig.test.extraToneMTP = 1;
707 }
708 if (coreConfig.version.IsBelow(0, 23, 63))
709 {
710 coreConfig.graphic.floorEx = true;
711 }
712 if (coreConfig.version.IsBelow(0, 22, 17))
713 {
714 coreConfig.game.tutorial = true;
715 }
716 if (coreConfig.version.IsBelow(0, 22, 24))
717 {
718 coreConfig.ui.balloonBG = true;
719 }
720 if (coreConfig.version.IsBelow(0, 23, 282))
721 {
722 coreConfig.input.keys.chat.key = KeyCode.Return;
723 }
724 return coreConfig;
725 }
static bool IsCompatible(Version v)
Definition: CoreConfig.cs:727
string GetText()
Definition: Version.cs:34
bool IsBelow(int _major, int _minor, int _batch)
Definition: Version.cs:49

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

840 {
842 {
843 int num = (int)(EClass.player.stats.timeElapsed / 3600.0);
844 if (num > maxPlayedHours)
845 {
846 maxPlayedHours = num;
847 Save();
848 }
849 }
850 }
int maxPlayedHours
Definition: CoreConfig.cs:613
static Player player
Definition: EClass.cs:13
double timeElapsed
Definition: Player.cs:66
Stats stats
Definition: Player.cs:1086

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

Referenced by ApplyFPS().

◆ backer

◆ camera

◆ cloud

bool CoreConfig.cloud

Definition at line 619 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 645 of file CoreConfig.cs.

◆ emailReport

string CoreConfig.emailReport

Definition at line 609 of file CoreConfig.cs.

Referenced by LayerFeedback.OnInit().

◆ fix

Fix CoreConfig.fix

◆ font

FontSetting CoreConfig.font

Definition at line 625 of file CoreConfig.cs.

Referenced by ApplyFont(), and ResetGeneral().

◆ game

◆ graphic

◆ helpFlags

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

Definition at line 647 of file CoreConfig.cs.

Referenced by ELayer.TryShowHelp().

◆ ignoreApply

bool CoreConfig.ignoreApply

Definition at line 652 of file CoreConfig.cs.

Referenced by Apply().

◆ ignoreLinuxModWarning

bool CoreConfig.ignoreLinuxModWarning

Definition at line 617 of file CoreConfig.cs.

Referenced by Scene.TryWarnLinuxMod().

◆ ignoreParallelsWarning

bool CoreConfig.ignoreParallelsWarning

Definition at line 615 of file CoreConfig.cs.

Referenced by Scene.TryWarnMacScreen().

◆ input

◆ lang

string CoreConfig.lang = "JP"

◆ maxPlayedHours

int CoreConfig.maxPlayedHours

Definition at line 613 of file CoreConfig.cs.

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

◆ nameReport

string CoreConfig.nameReport

Definition at line 607 of file CoreConfig.cs.

Referenced by LayerFeedback.OnInit().

◆ net

NetSetting CoreConfig.net

◆ other

◆ rewardCode

string CoreConfig.rewardCode

Definition at line 611 of file CoreConfig.cs.

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

◆ sound

SoundSetting CoreConfig.sound

Definition at line 623 of file CoreConfig.cs.

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

◆ test

◆ ui

◆ version

Version CoreConfig.version

Definition at line 603 of file CoreConfig.cs.

Referenced by Save(), and TryLoadConfig().

Property Documentation

◆ camSupport

CameraSupport CoreConfig.camSupport
get

Definition at line 671 of file CoreConfig.cs.

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

◆ path

string CoreConfig.path
staticget

Definition at line 656 of file CoreConfig.cs.

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

◆ ZoomStep

int CoreConfig.ZoomStep
staticget

Definition at line 658 of file CoreConfig.cs.

659 {
660 get
661 {
662 if (!EClass.debug.enable)
663 {
664 return 5;
665 }
666 return 5;
667 }
668 }

Referenced by HotItemContext.Show().


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