Overworld map loading

This commit is contained in:
2025-05-08 22:18:05 -05:00
parent 703f70bcf0
commit 50ee75e997
13 changed files with 72 additions and 21 deletions

View File

@@ -1,13 +1,16 @@
extends Node
const MAPS:Dictionary[String, String] = {
"TestMap": "res://scenes/Maps/TestMap.tscn"
"TestMap": "res://scenes/Maps/TestMap/TestMap.tscn"
};
var currentMap:String = "";
signal mapChanged(mapHandle:String, mapScene:String);
func setMap(map:String) -> void:
if MAPS.has(map):
currentMap = map
else:
push_error("Map not found: " + map)
assert(MAPS.has(map), "Map not found: " + map)
if currentMap == map:
return
currentMap = map
mapChanged.emit(map, MAPS[map])