Reorganized files, started splitting up unit

This commit is contained in:
gamer147
2026-04-08 18:28:52 -04:00
parent 24134cfa33
commit c192d48bc4
70 changed files with 528 additions and 56 deletions

View File

@@ -0,0 +1,21 @@
class_name SwapCommand extends ConsoleCommand
func get_command_name() -> String:
return "swap"
func get_help_text() -> String:
return "swap <name> - Swap to a scene by name (use list_scenes to see options)"
func run(args: Array, context: Dictionary) -> String:
if args.size() == 0:
return "Usage: swap <scene name>"
var search_name := " ".join(args).to_lower()
var registry: Array = context["scene_registry"]
for entry: Dictionary in registry:
if entry["name"].to_lower() == search_name:
var debug_menu: DebugMenu = context["debug_menu"]
debug_menu.swap_scene(entry)
return ""
return "Scene not found: %s" % search_name