Skip to content

Commit

Permalink
Disable UI if nothing is configured
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed Feb 22, 2024
1 parent 7bdd18e commit d33cf14
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/modules/tgui_panel/ping_relay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ GLOBAL_DATUM_INIT(relays_panel, /datum/ping_relay_tgui, new)
GLOB.relays_panel.tgui_interact(client.mob)

/datum/ping_relay_tgui/tgui_interact(mob/user, datum/tgui/ui)
var/list/relay_ping_conf = CONFIG_GET(keyed_list/connection_relay_ping)
if(!length(relay_ping_conf))
to_chat(user, "There are no relays configured to test.")
return

ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "PingRelaysPanel", "Relay Pings")
Expand Down

0 comments on commit d33cf14

Please sign in to comment.