1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-09-01 03:15:53 +00:00
Funkin/source/funkin/util/plugins/ForceCrashPlugin.hx
2025-08-14 14:34:55 -04:00

39 lines
790 B
Haxe

package funkin.util.plugins;
import flixel.FlxBasic;
/**
* A plugin which forcibly crashes the application.
* TODO: Should we disable this in release builds?
*/
@:nullSafety
class ForceCrashPlugin extends FlxBasic
{
public function new()
{
super();
}
public static function initialize():Void
{
FlxG.plugins.addPlugin(new ForceCrashPlugin());
}
public override function update(elapsed:Float):Void
{
super.update(elapsed);
// Ctrl + Alt + Shift + L = Crash the game for debugging purposes
if (InputUtil.allPressedWithDebounce([CONTROL, ALT, SHIFT, L]))
{
// TODO: Make this message 87% funnier.
throw "DEBUG: Crashing the game via debug keybind!";
}
}
public override function destroy():Void
{
super.destroy();
}
}