Refine context actions and preserve fleet landings
This commit is contained in:
parent
18a7d44db4
commit
663648d949
20 changed files with 197 additions and 103 deletions
|
|
@ -21,8 +21,12 @@ func _initialize() -> void:
|
|||
])
|
||||
return
|
||||
var provider: Node = building.visual.get_node_or_null("ActionProvider")
|
||||
if provider == null or not provider.actions.has("transfer"):
|
||||
_fail("%s has no composed action provider" % definition.definition_id)
|
||||
if definition.definition_id == GameState.BUILDING_TRANSPORT_HUB:
|
||||
if provider != null or not building.available_actions().is_empty():
|
||||
_fail("transport hub composed a manual action")
|
||||
return
|
||||
elif provider == null or not provider.actions.has("transfer"):
|
||||
_fail("%s has no composed transfer action" % definition.definition_id)
|
||||
return
|
||||
building.free()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue