@@ -248,51 +248,52 @@ class FunkinLua {
248248 PlayState .instance .initPlayfield (field );
249249 });
250250
251+ // // mod manager
251252 Lua_helper .add_callback (lua , " setPercent" , function (modName : String , val : Float , player : Int = - 1 )
252- {
253- PlayState .instance .modManager .setPercent (modName , val , player );
254- });
255-
256- Lua_helper .add_callback (lua , " addBlankMod" , function (modName : String , defaultVal : Float = 0 , player : Int = - 1 )
257- {
258- PlayState .instance .modManager .quickRegister (new SubModifier (modName , PlayState .instance .modManager ));
259- PlayState .instance .modManager .setValue (modName , defaultVal );
253+ PlayState .instance .modManager .setPercent (modName , val , player )
254+ );
255+
256+ Lua_helper .add_callback (lua , " addBlankMod" , function (modName : String , defaultVal : Float = 0 , player : Int = - 1 ) {
257+ PlayState .instance .modManager .registerBlankMod (modName , defaultVal , player );
260258 });
261-
259+
262260 Lua_helper .add_callback (lua , " setValue" , function (modName : String , val : Float , player : Int = - 1 )
263- {
264- PlayState .instance .modManager .setValue (modName , val , player );
265- });
266-
261+ PlayState .instance .modManager .setValue (modName , val , player )
262+ );
263+
267264 Lua_helper .add_callback (lua , " getPercent" , function (modName : String , player : Int )
268- {
269- return PlayState .instance .modManager .getPercent (modName , player );
270- });
271-
265+ return PlayState .instance .modManager .getPercent (modName , player )
266+ );
267+
272268 Lua_helper .add_callback (lua , " getValue" , function (modName : String , player : Int )
273- {
274- return PlayState .instance .modManager .getValue (modName , player );
269+ return PlayState .instance .modManager .getValue (modName , player )
270+ );
271+
272+ Lua_helper .add_callback (lua , " setCurrentValue" , function (modName : String , val : Float , player : Int ){
273+ return PlayState .instance .modManager .setCurrentValue (modName , val , player );
275274 });
276275
277- Lua_helper .add_callback (lua , " queueSet" , function (step : Float , modName : String , target : Float , player : Int = - 1 )
278- {
279- PlayState .instance .modManager .queueSet (step , modName , target , player );
276+ Lua_helper .add_callback (lua , " getTargetValue" , function (modName : String , player : Int ){
277+ return PlayState .instance .modManager .getTargetValue (modName , player );
280278 });
281-
279+
280+ Lua_helper .add_callback (lua , " queueSet" , function (step : Float , modName : String , target : Float , player : Int = - 1 )
281+ PlayState .instance .modManager .queueSet (step , modName , target , player )
282+ );
283+
282284 Lua_helper .add_callback (lua , " queueSetP" , function (step : Float , modName : String , perc : Float , player : Int = - 1 )
283- {
284- PlayState .instance .modManager .queueSetP (step , modName , perc , player );
285- });
286-
287- Lua_helper .add_callback (lua , " queueEase" , function (step : Float , endStep : Float , modName : String , percent : Float , style : String = ' linear' , player : Int = - 1 , ? startVal : Float ) // lua is autistic and can only accept 5 args
288- {
289- PlayState .instance .modManager .queueEase (step , endStep , modName , percent , style , player , startVal );
290- });
285+ PlayState .instance .modManager .queueSetP (step , modName , perc , player )
286+ );
291287
292- Lua_helper .add_callback (lua , " queueEaseP" , function (step : Float , endStep : Float , modName : String , percent : Float , style : String = ' linear' , player : Int = - 1 , ? startVal : Float ) // lua is autistic and can only accept 5 args
293- {
294- PlayState .instance .modManager .queueEaseP (step , endStep , modName , percent , style , player , startVal );
295- });
288+ Lua_helper .add_callback (lua , " queueEase" ,
289+ function (step : Float , endStep : Float , modName : String , percent : Float , style : String = ' linear' , player : Int = - 1 , ? startVal : Float )
290+ PlayState .instance .modManager .queueEase (step , endStep , modName , percent , style , player , startVal )
291+ );
292+
293+ Lua_helper .add_callback (lua , " queueEaseP" ,
294+ function (step : Float , endStep : Float , modName : String , percent : Float , style : String = ' linear' , player : Int = - 1 , ? startVal : Float )
295+ PlayState .instance .modManager .queueEaseP (step , endStep , modName , percent , style , player , startVal )
296+ );
296297
297298 //
298299 Lua_helper .add_callback (lua , " getRunningScripts" , function () {
@@ -1343,7 +1344,7 @@ class FunkinLua {
13431344 if (! Assets .exists (path , TEXT ))
13441345 #end
13451346 #end
1346- path = Paths .getPath (' data/ $songPath / $dialogueFile .json' , TEXT );
1347+ path = Paths .getPath (' data/ $songPath / $dialogueFile .json' , TEXT );
13471348
13481349 luaTrace (' startDialogue: Trying to load dialogue: ' + path );
13491350
0 commit comments