Compose buildings from definitions and capabilities
This commit is contained in:
parent
1721edd123
commit
0504b24d8d
46 changed files with 1091 additions and 878 deletions
|
|
@ -50,7 +50,7 @@ func get_building_fleet_is_on() -> Node2D:
|
|||
func _spawn(record: Dictionary) -> void:
|
||||
var b: Node2D = building_scene.instantiate()
|
||||
b.position = record.position
|
||||
b.building_type = record.type
|
||||
b.definition_id = record.type
|
||||
b.building_id = int(record.get("id", 0))
|
||||
# Deferred for the same reason as the other field spawners: this can run
|
||||
# from inside a parent's _ready() chain, where a direct add_child() is
|
||||
|
|
|
|||
Loading…
Reference in a new issue