Port language: Textual renderer shows when a berth is being operated
This commit is contained in:
parent
cc89fe96c1
commit
a89fe4bb71
1 changed files with 4 additions and 1 deletions
|
|
@ -67,6 +67,9 @@ def render_port_textual(od):
|
||||||
for _, berth_state in od.get_all_instances("BerthState", include_subtypes=False):
|
for _, berth_state in od.get_all_instances("BerthState", include_subtypes=False):
|
||||||
berth = state_to_design(od, berth_state)
|
berth = state_to_design(od, berth_state)
|
||||||
name = od.get_name(berth)
|
name = od.get_name(berth)
|
||||||
txt += f'berth "{name}" {"🚢"*get_num_ships(od, berth)} {od.get_slot_value(berth_state, "status")}\n'
|
operated_descr = ""
|
||||||
|
if len(od.get_incoming(berth, "isOperating")):
|
||||||
|
operated_descr = " and being operated"
|
||||||
|
txt += f'berth "{name}" {"🚢"*get_num_ships(od, berth)} {od.get_slot_value(berth_state, "status")}{operated_descr}\n'
|
||||||
|
|
||||||
return txt
|
return txt
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue