Debug menu, reorganized game scene
This commit is contained in:
14
resources/console_commands/list_scenes_command.gd
Normal file
14
resources/console_commands/list_scenes_command.gd
Normal file
@@ -0,0 +1,14 @@
|
||||
class_name ListScenesCommand extends ConsoleCommand
|
||||
|
||||
func get_command_name() -> String:
|
||||
return "list_scenes"
|
||||
|
||||
func get_help_text() -> String:
|
||||
return "Lists available scenes for swapping"
|
||||
|
||||
func run(args: Array, context: Dictionary) -> String:
|
||||
var registry: Array = context["scene_registry"]
|
||||
var lines: PackedStringArray = []
|
||||
for entry: Dictionary in registry:
|
||||
lines.append(entry["name"])
|
||||
return "\n".join(lines)
|
||||
Reference in New Issue
Block a user