diff --git a/source/backend/ClientPrefs.hx b/source/backend/ClientPrefs.hx index cf5e00b..1b42b09 100644 --- a/source/backend/ClientPrefs.hx +++ b/source/backend/ClientPrefs.hx @@ -206,10 +206,11 @@ class ClientPrefs { if(FlxG.save.data.volume != null){ FlxG.sound.volume = FlxG.save.data.volume; - } + }else FlxG.sound.volume = 1; + if (FlxG.save.data.mute != null){ FlxG.sound.muted = FlxG.save.data.mute; - } + }else FlxG.sound.muted = false; for (key in Reflect.fields(data)){ if (key != 'gameplaySettings' && Reflect.hasField(FlxG.save.data, key)) diff --git a/source/backend/KadeEngineData.hx b/source/backend/KadeEngineData.hx index e38ee01..5142258 100644 --- a/source/backend/KadeEngineData.hx +++ b/source/backend/KadeEngineData.hx @@ -38,11 +38,10 @@ class KadeEngineData if (FlxG.save.data.fpsRain == null) FlxG.save.data.fpsRain = false; - if (FlxG.save.data.fpsCap == null) + /*if (FlxG.save.data.fpsCap == null) FlxG.save.data.fpsCap = 120; - if (FlxG.save.data.fpsCap > 285 || FlxG.save.data.fpsCap < 60) - FlxG.save.data.fpsCap = 120; // baby proof so you can't hard lock ur copy of kade engine + FlxG.save.data.fpsCap = 120; // baby proof so you can't hard lock ur copy of kade engine*/ if (FlxG.save.data.scrollSpeed == null) FlxG.save.data.scrollSpeed = 1; diff --git a/source/luafiles/ModchartState.hx b/source/luafiles/ModchartState.hx index 9eca025..bb1812f 100644 --- a/source/luafiles/ModchartState.hx +++ b/source/luafiles/ModchartState.hx @@ -1361,6 +1361,15 @@ class ModchartState LuaUtils.cameraFromString(camera).filtersEnabled = bool; }); + Lua_helper.add_callback(lua, "setVar", function(varName:String, value:Dynamic) { + PlayState.instance.variables.set(varName, value); + return value; + }); + + Lua_helper.add_callback(lua, "getVar", function(varName:String) { + return PlayState.instance.variables.get(varName); + }); + Lua_helper.add_callback(lua, "addLuaScript", function(luaFile:String, ?ignoreAlreadyRunning:Bool = false, ?traceMsg:Bool = true) { //would be dope asf. var cervix = luaFile + ".lua"; var doPush = false; diff --git a/source/states/TitleState.hx b/source/states/TitleState.hx index ab0f60e..44676cb 100644 --- a/source/states/TitleState.hx +++ b/source/states/TitleState.hx @@ -60,6 +60,9 @@ class TitleState extends MusicBeatState trace("Loaded " + openfl.Assets.getLibrary("default").assetsLoaded + " assets (DEFAULT)"); } + openfl.Lib.current.stage.frameRate = 120;//oop + Main.curFPS = Std.int(120);//sie. + backend.PlayerSettings.init(); #if windows