Fix simulation_server_stub Entity class conflict + ServerConfig load timing

- Renamed inner class Entity→StubEntity (Godot has native Entity class)
- Added await ServerConfig.config_loaded before reading map_list in server_main.gd
- Config loads via call_deferred, so _ready() must wait for signal
This commit is contained in:
2026-07-02 10:24:32 -04:00
parent 4a5264c5b0
commit db477b4c48
4 changed files with 59 additions and 6 deletions
+4
View File
@@ -40,6 +40,10 @@ var _game_server: Node = null
# Lifecycle
# ---------------------------------------------------------------------------
func _ready() -> void:
# Wait for ServerConfig to finish (it loads via call_deferred)
if ServerConfig and ServerConfig.has_signal(&"config_loaded"):
await ServerConfig.config_loaded
# Config driven — ServerConfig singleton loaded at autoload time.
# Allow port override via env var for backwards compatibility
# (container/VPS deployments that set SERVER_PORT).