Fixes Z-level fuckery

This commit is contained in:
if there were two guys on the moon
2019-06-29 00:16:15 +01:00
parent b15f753856
commit 2f710a202f
3 changed files with 43 additions and 2 deletions

View File

@@ -42,6 +42,10 @@
for(var/z in (data["map_levels"] | T.z)) // Always show crew from the current Z even if we can't show a map
data["crewmembers"] += crew_repository.health_data(z)
if(!data["map_levels"].len)
to_chat(user, "<span class='warning'>The crew monitor doesn't seem like it'll work here.</span>")
return
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 800, state = state)