@tool extends Node # Bootstrap: loads and runs validate_map.gd from the main scene. # Usage: # 1. Set project.godot run/main_scene to this scene # 2. godot --path client [-- ] # 3. Then restore the original main_scene func _ready() -> void: var args := OS.get_cmdline_user_args() if args.is_empty(): print("Usage: godot --path client [-- ]") print("") print("If no scene_path given, validates the default scene.") get_tree().quit(1) return var scene_path := args[0] # Load and run the validate_map.gd script var validator_script := load("res://tools/validate_map.gd") if validator_script == null: push_error("Failed to load validator script") get_tree().quit(1) return var validator := Node.new() validator.set_script(validator_script) add_child(validator)