Hide roster when no sortie choices
This commit is contained in:
@@ -1556,6 +1556,21 @@ func has_deployment_roster() -> bool:
|
||||
)
|
||||
|
||||
|
||||
func has_deployment_roster_choices() -> bool:
|
||||
if not has_deployment_roster():
|
||||
return false
|
||||
var deployed_count := get_deployed_player_count()
|
||||
var max_units := get_deployment_max_units()
|
||||
for unit in get_player_units(true):
|
||||
if bool(unit.get("required_deployment", false)):
|
||||
continue
|
||||
if bool(unit.get("deployed", true)):
|
||||
return true
|
||||
if deployed_count < max_units:
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
func get_deployed_player_count() -> int:
|
||||
return get_player_units(false).size()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user