diff --git a/.vscode/launch.json b/.vscode/launch.json index 9a277f85c..ef76cb5cb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -28,5 +28,6 @@ "request": "launch", "program": "${workspaceRoot}/export/debug/macos/bin/Funkin.app/Contents/MacOS/Funkin", "preLaunchTask": "debug: mac" + } ] } diff --git a/source/funkin/modding/base/ScriptedFlxState.hx b/source/funkin/modding/base/ScriptedFlxState.hx new file mode 100644 index 000000000..7be51230b --- /dev/null +++ b/source/funkin/modding/base/ScriptedFlxState.hx @@ -0,0 +1,8 @@ +package funkin.modding.base; + +import flixel.FlxState; +import funkin.modding.IHook; + +// This doesn't work and is still a WIP +// @:hscriptClass +// class ScriptedFlxState extends FlxState implements IHook {} diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 1b4e652ec..20e39edb5 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -6,10 +6,8 @@ import flixel.FlxSprite; import flixel.FlxState; import flixel.FlxSubState; import flixel.addons.transition.FlxTransitionableState; -import flixel.addons.transition.FlxTransitionableState; import flixel.group.FlxGroup; import flixel.math.FlxMath; -import flixel.math.FlxPoint; import flixel.math.FlxRect; import flixel.text.FlxText; import flixel.tweens.FlxEase; @@ -19,21 +17,14 @@ import flixel.util.FlxColor; import flixel.util.FlxSort; import flixel.util.FlxTimer; import funkin.Note; -import funkin.Note; import funkin.Section.SwagSection; -import funkin.Section.SwagSection; -import funkin.SongLoad.SwagSong; import funkin.SongLoad.SwagSong; import funkin.charting.ChartingState; import funkin.modding.IHook; -import funkin.modding.IHook; import funkin.modding.events.ScriptEvent; import funkin.modding.events.ScriptEventDispatcher; -import funkin.modding.module.ModuleHandler; import funkin.play.HealthIcon; import funkin.play.Strumline.StrumlineArrow; -import funkin.play.Strumline.StrumlineArrow; -import funkin.play.Strumline.StrumlineStyle; import funkin.play.Strumline.StrumlineStyle; import funkin.play.character.BaseCharacter; import funkin.play.character.CharacterData; @@ -1106,6 +1097,10 @@ class PlayState extends MusicBeatState implements IHook FlxG.watch.addQuick("beatShit", curBeat); FlxG.watch.addQuick("stepShit", curStep); + if (currentStage != null) + { + FlxG.watch.addQuick("bfAnim", currentStage.getBoyfriend().getCurrentAnimation()); + } FlxG.watch.addQuick("songPos", Conductor.songPosition); if (currentSong.song == 'Fresh') diff --git a/source/funkin/play/character/MultiSparrowCharacter.hx b/source/funkin/play/character/MultiSparrowCharacter.hx index 160bc1c5d..eaadc3080 100644 --- a/source/funkin/play/character/MultiSparrowCharacter.hx +++ b/source/funkin/play/character/MultiSparrowCharacter.hx @@ -176,6 +176,9 @@ class MultiSparrowCharacter extends BaseCharacter public override function playAnimation(name:String, restart:Bool = false, ?ignoreOther:Bool = false):Void { + if (!this.canPlayOtherAnims) + return; + loadFramesByAnimName(name); super.playAnimation(name, restart, ignoreOther); } diff --git a/source/funkin/play/stage/Bopper.hx b/source/funkin/play/stage/Bopper.hx index 525ab0f91..95b9cfea2 100644 --- a/source/funkin/play/stage/Bopper.hx +++ b/source/funkin/play/stage/Bopper.hx @@ -1,6 +1,5 @@ package funkin.play.stage; -import flixel.FlxG; import flixel.FlxSprite; import funkin.modding.IScriptedClass.IPlayStateScriptedClass; import funkin.modding.events.ScriptEvent; @@ -196,9 +195,6 @@ class Bopper extends FlxSprite implements IPlayStateScriptedClass */ public function playAnimation(name:String, restart:Bool = false, ?ignoreOther:Bool = false):Void { - if (ignoreOther == null) - ignoreOther = false; - if (!canPlayOtherAnims) return;