new tween function, and a couple luaTrace changes. testing is needed for the function

This commit is contained in:
Stinko
2025-04-30 14:46:06 -04:00
committed by GitHub
parent 4d47c9f511
commit da084f4d3d

View File

@@ -278,7 +278,7 @@ class FunkinLua {
#if (!flash && MODS_ALLOWED && sys)
return initLuaShader(name, glslVersion);
#else
luaTrace("initLuaShader: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("initLuaShader | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
#end
return false;
});
@@ -289,7 +289,7 @@ class FunkinLua {
#if (!flash && MODS_ALLOWED && sys)
if(!PlayState.instance.runtimeShaders.exists(shader) && !initLuaShader(shader))
{
luaTrace('setSpriteShader: Shader $shader is missing! Make sure you\'ve initalized your shader first!', false, false, FlxColor.RED);
luaTrace('setSpriteShader | Shader $shader is missing! Make sure you\'ve initalized your shader first!', false, false, FlxColor.RED);
return false;
}
@@ -305,7 +305,7 @@ class FunkinLua {
return true;
}
#else
luaTrace("setSpriteShader: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("setSpriteShader | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
#end
return false;
});
@@ -333,7 +333,7 @@ class FunkinLua {
#if (!flash && MODS_ALLOWED && sys)
if (!funk.runtimeShaders.exists(shader) && !funk.initLuaShader(shader)) {
luaTrace('addShaderToCam: Shader $shader is missing! Make sure you\'ve initalized your shader first!', false, false, FlxColor.RED);
luaTrace('addShaderToCam | Shader $shader is missing! Make sure you\'ve initalized your shader first!', false, false, FlxColor.RED);
return false;
}
@@ -348,7 +348,7 @@ class FunkinLua {
}
return true;
#else
luaTrace("addShaderToCam: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("addShaderToCam | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
#end
return false;
});
@@ -358,12 +358,12 @@ class FunkinLua {
final camera = getCam(cam);
@:privateAccess {
if(!storedFilters.exists(shader)) {
luaTrace('removeCamShader: $shader does not exist!', false, false, FlxColor.YELLOW);
luaTrace('removeCamShader | $shader does not exist!', false, false, FlxColor.YELLOW);
return false;
}
if (camera.filters == null) {
luaTrace('removeCamShader: camera $cam does not have any shaders!', false, false, FlxColor.YELLOW);
luaTrace('removeCamShader | camera $cam does not have any shaders!', false, false, FlxColor.YELLOW);
return false;
}
@@ -372,7 +372,7 @@ class FunkinLua {
return true;
}
#else
luaTrace('removeCamShader: Platform unsupported for Runtime Shaders!', false, false, FlxColor.RED);
luaTrace('removeCamShader | Platform unsupported for Runtime Shaders!', false, false, FlxColor.RED);
#end
return false;
});
@@ -386,7 +386,7 @@ class FunkinLua {
}
return shader.getBool(prop);
#else
luaTrace("getShaderBool: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("getShaderBool | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
return null;
#end
});
@@ -399,7 +399,7 @@ class FunkinLua {
}
return shader.getBoolArray(prop);
#else
luaTrace("getShaderBoolArray: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("getShaderBoolArray | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
return null;
#end
});
@@ -412,7 +412,7 @@ class FunkinLua {
}
return shader.getInt(prop);
#else
luaTrace("getShaderInt: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("getShaderInt | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
return null;
#end
});
@@ -425,7 +425,7 @@ class FunkinLua {
}
return shader.getIntArray(prop);
#else
luaTrace("getShaderIntArray: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("getShaderIntArray | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
return null;
#end
});
@@ -438,7 +438,7 @@ class FunkinLua {
}
return shader.getFloat(prop);
#else
luaTrace("getShaderFloat: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("getShaderFloat | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
return null;
#end
});
@@ -451,7 +451,7 @@ class FunkinLua {
}
return shader.getFloatArray(prop);
#else
luaTrace("getShaderFloatArray: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("getShaderFloatArray | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
return null;
#end
});
@@ -464,7 +464,7 @@ class FunkinLua {
shader.setBool(prop, value);
#else
luaTrace("setShaderBool: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("setShaderBool | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
#end
});
Lua_helper.add_callback(lua, "setShaderBoolArray", function(obj:String, prop:String, values:Dynamic) {
@@ -474,7 +474,7 @@ class FunkinLua {
shader.setBoolArray(prop, values);
#else
luaTrace("setShaderBoolArray: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("setShaderBoolArray | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
#end
});
Lua_helper.add_callback(lua, "setShaderInt", function(obj:String, prop:String, value:Int) {
@@ -484,7 +484,7 @@ class FunkinLua {
shader.setInt(prop, value);
#else
luaTrace("setShaderInt: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("setShaderInt | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
#end
});
Lua_helper.add_callback(lua, "setShaderIntArray", function(obj:String, prop:String, values:Dynamic) {
@@ -494,7 +494,7 @@ class FunkinLua {
shader.setIntArray(prop, values);
#else
luaTrace("setShaderIntArray: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("setShaderIntArray | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
#end
});
Lua_helper.add_callback(lua, "setShaderFloat", function(obj:String, prop:String, value:Float) {
@@ -504,7 +504,7 @@ class FunkinLua {
shader.setFloat(prop, value);
#else
luaTrace("setShaderFloat: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("setShaderFloat | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
#end
});
Lua_helper.add_callback(lua, "setShaderFloatArray", function(obj:String, prop:String, values:Dynamic) {
@@ -514,7 +514,7 @@ class FunkinLua {
shader.setFloatArray(prop, values);
#else
luaTrace("setShaderFloatArray: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("setShaderFloatArray | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
#end
});
@@ -531,7 +531,7 @@ class FunkinLua {
shader.setSampler2D(prop, value.bitmap);
}
#else
luaTrace("setShaderSampler2D: Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
luaTrace("setShaderSampler2D | Platform unsupported for Runtime Shaders!", false, false, FlxColor.RED);
#end
});
@@ -886,7 +886,7 @@ class FunkinLua {
{
if(luaInstance.scriptName == cervix)
{
luaTrace('addLuaScript: The script "' + cervix + '" is already running!');
luaTrace('addLuaScript | The script "' + cervix + '" is already running!');
return;
}
}
@@ -894,7 +894,7 @@ class FunkinLua {
PlayState.instance.luaArray.push(new FunkinLua(cervix));
return;
}
luaTrace("addLuaScript: Script doesn't exist!", false, false, FlxColor.RED);
luaTrace("addLuaScript | Script doesn't exist!", false, false, FlxColor.RED);
});
Lua_helper.add_callback(lua, "removeLuaScript", function(luaFile:String, ?ignoreAlreadyRunning:Bool = false) { //would be dope asf.
var cervix = luaFile + ".lua";
@@ -940,7 +940,7 @@ class FunkinLua {
}
return;
}
luaTrace("removeLuaScript: Script doesn't exist!", false, false, FlxColor.RED);
luaTrace("removeLuaScript | Script doesn't exist!", false, false, FlxColor.RED);
});
Lua_helper.add_callback(lua, "runHaxeCode", function(codeToRun:String) {
@@ -1067,7 +1067,7 @@ class FunkinLua {
result = getGroupStuff(leArray, variable);
return result;
}
luaTrace("getPropertyFromGroup: Object #" + index + " from group: " + obj + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("getPropertyFromGroup | Object #" + index + " from group: " + obj + " doesn't exist!", false, false, FlxColor.RED);
return null;
});
Lua_helper.add_callback(lua, "setPropertyFromGroup", function(obj:String, index:Int, variable:Dynamic, value:Dynamic) {
@@ -1142,7 +1142,7 @@ class FunkinLua {
{
return getInstance().members.indexOf(leObj);
}
luaTrace("getObjectOrder: Object " + obj + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("getObjectOrder | Object " + obj + " doesn't exist!", false, false, FlxColor.RED);
return -1;
});
Lua_helper.add_callback(lua, "setObjectOrder", function(obj:String, position:Int) {
@@ -1157,7 +1157,7 @@ class FunkinLua {
getInstance().insert(position, leObj);
return;
}
luaTrace("setObjectOrder: Object " + obj + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("setObjectOrder | Object " + obj + " doesn't exist!", false, false, FlxColor.RED);
});
// gay ass tweens
@@ -1171,7 +1171,20 @@ class FunkinLua {
}
}));
} else {
luaTrace('doTweenX: Couldnt find object: ' + vars, false, false, FlxColor.RED);
luaTrace('doTweenX | Couldnt find object: ' + vars, false, false, FlxColor.RED);
}
});
Lua_helper.add_callback(lua, "doTweenScale", function(tag:String, vars:String, value:Dynamic, duration:Float, ease:String) {
var penisExam:Dynamic = tweenShit(tag, vars);
if(penisExam != null) {
PlayState.instance.modchartTweens.set(tag, FlxTween.tween(penisExam, {"scale.x": value,"scale.y": value}, duration / PlayState.instance.playbackRate, {ease: getFlxEaseByString(ease),
onComplete: function(twn:FlxTween) {
PlayState.instance.callOnLuas('onTweenCompleted', [tag]);
PlayState.instance.modchartTweens.remove(tag);
}
}));
} else {
luaTrace('doTweenScale | Couldnt find object: ' + vars, false, false, FlxColor.RED);
}
});
Lua_helper.add_callback(lua, "doTweenY", function(tag:String, vars:String, value:Dynamic, duration:Float, ease:String) {
@@ -1184,7 +1197,7 @@ class FunkinLua {
}
}));
} else {
luaTrace('doTweenY: Couldnt find object: ' + vars, false, false, FlxColor.RED);
luaTrace('doTweenY | Couldnt find object: ' + vars, false, false, FlxColor.RED);
}
});
Lua_helper.add_callback(lua, "doTweenAngle", function(tag:String, vars:String, value:Dynamic, duration:Float, ease:String) {
@@ -1197,7 +1210,7 @@ class FunkinLua {
}
}));
} else {
luaTrace('doTweenAngle: Couldnt find object: ' + vars, false, false, FlxColor.RED);
luaTrace('doTweenAngle | Couldnt find object: ' + vars, false, false, FlxColor.RED);
}
});
Lua_helper.add_callback(lua, "doTweenAlpha", function(tag:String, vars:String, value:Dynamic, duration:Float, ease:String) {
@@ -1210,7 +1223,7 @@ class FunkinLua {
}
}));
} else {
luaTrace('doTweenAlpha: Couldnt find object: ' + vars, false, false, FlxColor.RED);
luaTrace('doTweenAlpha | Couldnt find object: ' + vars, false, false, FlxColor.RED);
}
});
Lua_helper.add_callback(lua, "doTweenZoom", function(tag:String, vars:String, value:Dynamic, duration:Float, ease:String) {
@@ -1223,7 +1236,7 @@ class FunkinLua {
}
}));
} else {
luaTrace('doTweenZoom: Couldnt find object: ' + vars, false, false, FlxColor.RED);
luaTrace('doTweenZoom | Couldnt find object: ' + vars, false, false, FlxColor.RED);
}
});
Lua_helper.add_callback(lua, "doTweenColor", function(tag:String, vars:String, targetColor:String, duration:Float, ease:String) {
@@ -1241,7 +1254,7 @@ class FunkinLua {
}
}));
} else {
luaTrace('doTweenColor: Couldnt find object: ' + vars, false, false, FlxColor.RED);
luaTrace('doTweenColor | Couldnt find object: ' + vars, false, false, FlxColor.RED);
}
});
@@ -2036,7 +2049,7 @@ class FunkinLua {
if(updateHitbox) poop.updateHitbox();
return;
}
luaTrace('setGraphicSize: Couldnt find object: ' + obj, false, false, FlxColor.RED);
luaTrace('setGraphicSize | Couldnt find object: ' + obj, false, false, FlxColor.RED);
});
Lua_helper.add_callback(lua, "scaleObject", function(obj:String, x:Float, y:Float, updateHitbox:Bool = true) {
if(PlayState.instance.getLuaObject(obj)!=null) {
@@ -2057,7 +2070,7 @@ class FunkinLua {
if(updateHitbox) poop.updateHitbox();
return;
}
luaTrace('scaleObject: Couldnt find object: ' + obj, false, false, FlxColor.RED);
luaTrace('scaleObject | Couldnt find object: ' + obj, false, false, FlxColor.RED);
});
Lua_helper.add_callback(lua, "updateHitbox", function(obj:String) {
if(PlayState.instance.getLuaObject(obj)!=null) {
@@ -2071,7 +2084,7 @@ class FunkinLua {
poop.updateHitbox();
return;
}
luaTrace('updateHitbox: Couldnt find object: ' + obj, false, false, FlxColor.RED);
luaTrace('updateHitbox | Couldnt find object: ' + obj, false, false, FlxColor.RED);
});
Lua_helper.add_callback(lua, "updateHitboxFromGroup", function(group:String, index:Int) {
if(Std.isOfType(Reflect.getProperty(getInstance(), group), FlxTypedGroup)) {
@@ -2156,7 +2169,7 @@ class FunkinLua {
object.cameras = [cameraFromString(camera)];
return true;
}
luaTrace("setObjectCamera: Object " + obj + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("setObjectCamera | Object " + obj + " doesn't exist!", false, false, FlxColor.RED);
return false;
});
Lua_helper.add_callback(lua, "setBlendMode", function(obj:String, blend:String = '') {
@@ -2176,7 +2189,7 @@ class FunkinLua {
spr.blend = blendModeFromString(blend);
return true;
}
luaTrace("setBlendMode: Object " + obj + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("setBlendMode | Object " + obj + " doesn't exist!", false, false, FlxColor.RED);
return false;
});
Lua_helper.add_callback(lua, "screenCenter", function(obj:String, pos:String = 'xy') {
@@ -2205,7 +2218,7 @@ class FunkinLua {
return;
}
}
luaTrace("screenCenter: Object " + obj + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("screenCenter | Object " + obj + " doesn't exist!", false, false, FlxColor.RED);
});
Lua_helper.add_callback(lua, "objectsOverlap", function(obj1:String, obj2:String) {
var namesArray:Array<String> = [obj1, obj2];
@@ -2269,7 +2282,7 @@ class FunkinLua {
#end
path = Paths.json(Paths.formatToSongPath(PlayState.SONG.song) + '/' + dialogueFile);
luaTrace('startDialogue: Trying to load dialogue: ' + path);
luaTrace('startDialogue | Trying to load dialogue: ' + path);
#if MODS_ALLOWED
if(FileSystem.exists(path))
@@ -2280,13 +2293,13 @@ class FunkinLua {
var shit:DialogueFile = DialogueBoxPsych.parseDialogue(path);
if(shit.dialogue.length > 0) {
PlayState.instance.startDialogue(shit, music);
luaTrace('startDialogue: Successfully loaded dialogue', false, false, FlxColor.GREEN);
luaTrace('startDialogue | Successfully loaded dialogue', false, false, FlxColor.GREEN);
return true;
} else {
luaTrace('startDialogue: Your dialogue file is badly formatted!', false, false, FlxColor.RED);
luaTrace('startDialogue | Your dialogue file is badly formatted!', false, false, FlxColor.RED);
}
} else {
luaTrace('startDialogue: Dialogue file not found', false, false, FlxColor.RED);
luaTrace('startDialogue | Dialogue file not found', false, false, FlxColor.RED);
if(PlayState.instance.endingSong) {
PlayState.instance.endSong();
} else {
@@ -2301,7 +2314,7 @@ class FunkinLua {
PlayState.instance.startVideo(videoFile);
return true;
} else {
luaTrace('startVideo: Video file not found: ' + videoFile, false, false, FlxColor.RED);
luaTrace('startVideo | Video file not found: ' + videoFile, false, false, FlxColor.RED);
}
return false;
@@ -2453,7 +2466,7 @@ class FunkinLua {
obj.text = text;
return true;
}
luaTrace("setTextString: Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("setTextString | Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
return false;
});
Lua_helper.add_callback(lua, "setTextSize", function(tag:String, size:Int) {
@@ -2463,7 +2476,7 @@ class FunkinLua {
obj.size = size;
return true;
}
luaTrace("setTextSize: Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("setTextSize | Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
return false;
});
Lua_helper.add_callback(lua, "setTextWidth", function(tag:String, width:Float) {
@@ -2473,7 +2486,7 @@ class FunkinLua {
obj.fieldWidth = width;
return true;
}
luaTrace("setTextWidth: Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("setTextWidth | Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
return false;
});
Lua_helper.add_callback(lua, "setTextBorder", function(tag:String, size:Int, color:String) {
@@ -2487,7 +2500,7 @@ class FunkinLua {
obj.borderColor = colorNum;
return true;
}
luaTrace("setTextBorder: Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("setTextBorder | Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
return false;
});
Lua_helper.add_callback(lua, "setTextColor", function(tag:String, color:String) {
@@ -2500,7 +2513,7 @@ class FunkinLua {
obj.color = colorNum;
return true;
}
luaTrace("setTextColor: Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("setTextColor | Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
return false;
});
Lua_helper.add_callback(lua, "setTextFont", function(tag:String, newFont:String) {
@@ -2510,7 +2523,7 @@ class FunkinLua {
obj.font = Paths.font(newFont);
return true;
}
luaTrace("setTextFont: Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("setTextFont | Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
return false;
});
Lua_helper.add_callback(lua, "setTextItalic", function(tag:String, italic:Bool) {
@@ -2520,7 +2533,7 @@ class FunkinLua {
obj.italic = italic;
return true;
}
luaTrace("setTextItalic: Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("setTextItalic | Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
return false;
});
Lua_helper.add_callback(lua, "setTextAlignment", function(tag:String, alignment:String = 'left') {
@@ -2537,7 +2550,7 @@ class FunkinLua {
}
return true;
}
luaTrace("setTextAlignment: Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("setTextAlignment | Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
return false;
});
@@ -2547,7 +2560,7 @@ class FunkinLua {
{
return obj.text;
}
luaTrace("getTextString: Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("getTextString | Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
return null;
});
Lua_helper.add_callback(lua, "getTextSize", function(tag:String) {
@@ -2556,7 +2569,7 @@ class FunkinLua {
{
return obj.size;
}
luaTrace("getTextSize: Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("getTextSize | Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
return -1;
});
Lua_helper.add_callback(lua, "getTextFont", function(tag:String) {
@@ -2565,7 +2578,7 @@ class FunkinLua {
{
return obj.font;
}
luaTrace("getTextFont: Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("getTextFont | Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
return null;
});
Lua_helper.add_callback(lua, "getTextWidth", function(tag:String) {
@@ -2574,7 +2587,7 @@ class FunkinLua {
{
return obj.fieldWidth;
}
luaTrace("getTextWidth: Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
luaTrace("getTextWidth | Object " + tag + " doesn't exist!", false, false, FlxColor.RED);
return 0;
});
@@ -2609,7 +2622,7 @@ class FunkinLua {
PlayState.instance.modchartSaves.set(name, save);
return;
}
luaTrace('initSaveData: Save file already initialized: ' + name);
luaTrace('initSaveData | Save file already initialized: ' + name);
});
Lua_helper.add_callback(lua, "flushSaveData", function(name:String) {
if(PlayState.instance.modchartSaves.exists(name))
@@ -2617,7 +2630,7 @@ class FunkinLua {
PlayState.instance.modchartSaves.get(name).flush();
return;
}
luaTrace('flushSaveData: Save file not initialized: ' + name, false, false, FlxColor.RED);
luaTrace('flushSaveData | Save file not initialized: ' + name, false, false, FlxColor.RED);
});
Lua_helper.add_callback(lua, "getDataFromSave", function(name:String, field:String, ?defaultValue:Dynamic = null) {
if(PlayState.instance.modchartSaves.exists(name))
@@ -2625,7 +2638,7 @@ class FunkinLua {
var retVal:Dynamic = Reflect.field(PlayState.instance.modchartSaves.get(name).data, field);
return retVal;
}
luaTrace('getDataFromSave: Save file not initialized: ' + name, false, false, FlxColor.RED);
luaTrace('getDataFromSave | Save file not initialized: ' + name, false, false, FlxColor.RED);
return defaultValue;
});
Lua_helper.add_callback(lua, "setDataFromSave", function(name:String, field:String, value:Dynamic) {
@@ -2634,7 +2647,7 @@ class FunkinLua {
Reflect.setField(PlayState.instance.modchartSaves.get(name).data, field, value);
return;
}
luaTrace('setDataFromSave: Save file not initialized: ' + name, false, false, FlxColor.RED);
luaTrace('setDataFromSave | Save file not initialized: ' + name, false, false, FlxColor.RED);
});
Lua_helper.add_callback(lua, "checkFileExists", function(filename:String, ?absolute:Bool = false) {
@@ -2668,7 +2681,7 @@ class FunkinLua {
return true;
} catch (e:Dynamic) {
luaTrace("saveFile: Error trying to save " + path + ": " + e, false, false, FlxColor.RED);
luaTrace("saveFile | Error trying to save " + path + ": " + e, false, false, FlxColor.RED);
}
return false;
});
@@ -2694,7 +2707,7 @@ class FunkinLua {
return true;
}
} catch (e:Dynamic) {
luaTrace("deleteFile: Error trying to delete " + path + ": " + e, false, false, FlxColor.RED);
luaTrace("deleteFile | Error trying to delete " + path + ": " + e, false, false, FlxColor.RED);
}
return false;
});
@@ -2777,7 +2790,7 @@ class FunkinLua {
PlayState.instance.modchartSprites.get(tag).cameras = [cameraFromString(camera)];
return true;
}
luaTrace("Lua sprite with tag: " + tag + " doesn't exist!");
luaTrace("Lua sprite with tag | " + tag + " doesn't exist!");
return false;
});
Lua_helper.add_callback(lua, "setLuaSpriteScrollFactor", function(tag:String, scrollX:Float, scrollY:Float) {
@@ -2828,7 +2841,7 @@ class FunkinLua {
Reflect.setProperty(PlayState.instance.modchartSprites.get(tag), variable, value);
return true;
}
luaTrace("setPropertyLuaSprite: Lua sprite with tag: " + tag + " doesn't exist!");
luaTrace("setPropertyLuaSprite | Lua sprite with tag: " + tag + " doesn't exist!");
return false;
});
Lua_helper.add_callback(lua, "musicFadeIn", function(duration:Float, fromValue:Float = 0, toValue:Float = 1) {