Files
Bubberstation/modular_skyrat/modules/server_overflow/code/server_connect_panel.dm
Gandalf 49a1a276e7 CROSSLINK + Population control cap (#9979)
* Ew

* Update login.dm

* Update code/modules/mob/dead/new_player/login.dm

Co-authored-by: OrionTheFox <76465278+OrionTheFox@users.noreply.github.com>

* Oogleboogle

* E

* EEE

* Update client_procs.dm

* E

* E

* E

* Update communications.dm

* Update communications.dm

* E

* Update chat_link.dm

* EEEE

* EEE

* Update communications.dm

* EEE

* 0

* E

* Update skyrat_config.txt

* EEEE

* E

* E

* E

* E

* 0

* Update code/modules/admin/verbs/adminhelp.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/master_files/code/_onclick/hud/new_player.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/modules/server_overflow/code/client_procs.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update tgui/packages/tgui/interfaces/ServerControlPanel.js

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* You missed one

Co-authored-by: OrionTheFox <76465278+OrionTheFox@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2021-12-25 19:08:27 +00:00

40 lines
1013 B
Plaintext

GLOBAL_DATUM(server_control_panel, /datum/server_control_panel)
/datum/server_control_panel
/datum/server_control_panel/New()
. = ..()
/datum/server_control_panel/ui_state(mob/user)
return GLOB.always_state
/datum/server_control_panel/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
ui = new(user, src, "ServerControlPanel")
ui.open()
/datum/server_control_panel/ui_data(mob/user)
var/list/data = list()
data["player_cap"] = CONFIG_GET(number/player_hard_cap)
data["connections"] = TGS_CLIENT_COUNT
data["overflow_server_name"] = "Overflow Server"
data["servers"] = list()
var/list/servers = CONFIG_GET(keyed_list/cross_server)
for(var/server_name in servers)
data["servers"] += list(list(
"name" = server_name,
"ip" = servers[server_name],
))
/mob/dead/new_player/proc/show_connection_panel()
if(!GLOB.server_control_panel)
GLOB.server_control_panel = new /datum/server_control_panel(src)
GLOB.server_control_panel.ui_interact(src)