fix(@projects/@magic-civilization): 🐛 update city initialization logic

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Natalie 2026-05-10 04:04:22 -07:00
parent aafa51283c
commit 049c9098cc

View file

@ -73,12 +73,13 @@ func _ready() -> void:
unit.id = "unit_%d_warrior" % i
player.units.append(unit)
var city: CityScript = CityScript.new()
city.player_index = i
var city: CityScript = CityScript.new("city_%d_capital" % i)
city.owner_index = i
city.position = start
city.id = "city_%d_capital" % i
city.city_name = "%s Capital" % player.player_name
city.population = 3 + i
if "city_name" in city:
city.city_name = "%s Capital" % player.player_name
if "population" in city:
city.population = 3 + i
player.cities.append(city)
# Build the renderers as direct children — no SubViewport hierarchy.