Merge pull request #6247 from mistyLuminescence/zruntime

Fixes runtime and GPS problem with invalid Z-levels
This commit is contained in:
Atermonera
2019-07-01 16:45:44 -08:00
committed by VirgoBot
parent 75d6e509d2
commit 58c2b2311e
3 changed files with 43 additions and 2 deletions
@@ -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)