extends Node const MAPS_FOLDER = "res://levels/" const WEAPONS_FOLDER = "res://weapons/" var weapons: Dictionary[StringName,WeaponResource] var maps: Dictionary[StringName,PackedScene] signal loaded func _ready() -> void: for file in ResourceLoader.list_directory(WEAPONS_FOLDER): if file.ends_with(".tres"): weapons[file.trim_suffix(".tres")] = load(WEAPONS_FOLDER+ file) for file in ResourceLoader.list_directory(MAPS_FOLDER): if file.ends_with(".tscn"): maps[file.trim_suffix(".tscn")] = load(MAPS_FOLDER+ file) loaded.emit()