Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some 1.0 fixes #15360

Open
wants to merge 8 commits into
base: experimental
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove text arg from getLuaObject
  • Loading branch information
LarryFrosty committed Aug 31, 2024
commit 2404a3fa034807553a4000b22108e9cc813e53c2
4 changes: 2 additions & 2 deletions source/psychlua/DeprecatedFunctions.hx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class DeprecatedFunctions

Lua_helper.add_callback(lua, "objectPlayAnimation", function(obj:String, name:String, forced:Bool = false, ?startFrame:Int = 0) {
FunkinLua.luaTrace("objectPlayAnimation is deprecated! Use playAnim instead", false, true);
if(PlayState.instance.getLuaObject(obj,false) != null) {
PlayState.instance.getLuaObject(obj,false).animation.play(name, forced, false, startFrame);
if(PlayState.instance.getLuaObject(obj) != null) {
PlayState.instance.getLuaObject(obj).animation.play(name, forced, false, startFrame);
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions source/psychlua/FunkinLua.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1007,8 +1007,8 @@ class FunkinLua {
});

Lua_helper.add_callback(lua, "setScrollFactor", function(obj:String, scrollX:Float, scrollY:Float) {
if(game.getLuaObject(obj,false)!=null) {
game.getLuaObject(obj,false).scrollFactor.set(scrollX, scrollY);
if(game.getLuaObject(obj) != null) {
game.getLuaObject(obj).scrollFactor.set(scrollX, scrollY);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ class PlayState extends MusicBeatState
#end
}

public function getLuaObject(tag:String, text:Bool=true):Dynamic
public function getLuaObject(tag:String):Dynamic
return variables.get(tag);

function startCharacterPos(char:Character, ?gfCheck:Bool = false) {
Expand Down
Loading