diff --git a/src/game/engine/src/entities/city.gd b/src/game/engine/src/entities/city.gd index cbf268c3..115c6aba 100644 --- a/src/game/engine/src/entities/city.gd +++ b/src/game/engine/src/entities/city.gd @@ -46,6 +46,28 @@ var production_queue: Array = [] ## Accumulated hammers toward the current production_queue[0]. var production_progress: int = 0 +# ── Property accessors (used by renderers) ───────────────────────── + +var population: int: + get: + return get_population() + +var hp: int: + get: + return get_hp() + set(v): + set_hp(v) + +var max_hp: int: + get: + return get_max_hp() + set(v): + set_max_hp(v) + +var owned_tiles: Array: + get: + return get_owned_tiles() + ## The Rust GdCity instance. var _gd_city: RefCounted = null @@ -86,29 +108,6 @@ func rename_city(new_name: String) -> void: _gd_city.call("rename", new_name) -# ── Property accessors (used by renderers) ───────────────────────── - -var population: int: - get: - return get_population() - -var hp: int: - get: - return get_hp() - set(v): - set_hp(v) - -var max_hp: int: - get: - return get_max_hp() - set(v): - set_max_hp(v) - -var owned_tiles: Array: - get: - return get_owned_tiles() - - # ── Getters (delegate to Rust) ────────────────────────────────────── func get_population() -> int: