diff --git a/Assets/Cryville/Crtr/ChartPlayer.cs b/Assets/Cryville/Crtr/ChartPlayer.cs index a63e004..bb20bce 100644 --- a/Assets/Cryville/Crtr/ChartPlayer.cs +++ b/Assets/Cryville/Crtr/ChartPlayer.cs @@ -309,7 +309,6 @@ namespace Cryville.Crtr { autoRenderStep = renderStep == 0; soundOffset = Settings.Default.SoundOffset; startOffset = Settings.Default.StartOffset; - sv = Settings.Default.ScrollVelocity; firstFrame = true; texloaddone = false; Game.NetworkTaskWorker.SuspendBackgroundTasks(); @@ -333,10 +332,12 @@ namespace Cryville.Crtr { FileInfo chartFile = new FileInfo( Game.GameDataPath + "/charts/" + Settings.Default.LoadChart ); + FileInfo rulesetFile = new FileInfo( Game.GameDataPath + "/rulesets/" + Settings.Default.LoadRuleset ); if (!rulesetFile.Exists) throw new FileNotFoundException("Ruleset for the chart not found\nMake sure you have imported the ruleset"); + FileInfo rulesetConfigFile = new FileInfo( Game.GameDataPath + "/config/rulesets/" + Settings.Default.LoadRulesetConfig ); @@ -346,6 +347,8 @@ namespace Cryville.Crtr { MissingMemberHandling = MissingMemberHandling.Error }); } + sv = _rscfg.generic.ScrollVelocity; + FileInfo skinFile = new FileInfo( string.Format("{0}/skins/{1}/{2}/.umgs", Game.GameDataPath, rulesetFile.Directory.Name, _rscfg.generic.Skin) ); diff --git a/Assets/Cryville/Crtr/Config/RulesetConfig.cs b/Assets/Cryville/Crtr/Config/RulesetConfig.cs index 707ec7f..2175831 100644 --- a/Assets/Cryville/Crtr/Config/RulesetConfig.cs +++ b/Assets/Cryville/Crtr/Config/RulesetConfig.cs @@ -1,12 +1,26 @@ -using Newtonsoft.Json; +using Cryville.Common.ComponentModel; +using Newtonsoft.Json; +using System; using System.Collections.Generic; +using System.ComponentModel; namespace Cryville.Crtr.Config { public class RulesetConfig { public Generic generic = new Generic(); public class Generic { + [Category("basic")] [JsonProperty("skin")] public string Skin { get; set; } + + [Category("deprecated")][Obsolete] + [JsonProperty("scroll_velocity")][DefaultValue(1)] + [LogarithmicScale][Step(0.5f)][Precision(1e-1)] + public float ScrollVelocity { get; set; } + + public Generic() { + Skin = ""; + ScrollVelocity = 1; + } } public Dictionary inputs = new Dictionary(); diff --git a/Assets/Cryville/Crtr/Settings.cs b/Assets/Cryville/Crtr/Settings.cs index ec4c7eb..068ff51 100644 --- a/Assets/Cryville/Crtr/Settings.cs +++ b/Assets/Cryville/Crtr/Settings.cs @@ -131,17 +131,6 @@ namespace Cryville.Crtr { } } - [Category("gameplay")] - [LogarithmicScale][Step(0.5f)][Precision(1e-1)] - public float ScrollVelocity { - get { - return PlayerPrefs.GetFloat("ScrollVelocity", 1); - } - set { - PlayerPrefs.SetFloat("ScrollVelocity", value); - } - } - [Category("gameplay")] [Step(0.04f)][Precision(1e-3)] public float SoundOffset {