From 7c687a459574d9e2cacd4d2bfeca7146eff65111 Mon Sep 17 00:00:00 2001 From: nevimer <77420409+nevimer@users.noreply.github.com> Date: Thu, 18 Jan 2024 15:52:10 -0500 Subject: [PATCH] Add Relays to the Menu Bar (#1007) ## About The Pull Request Add's relays to the menu bar. ## Why It's Good For The Game Latency. ## Proof Of Testing ## Changelog :cl: add: Shortcuts to internet relays are now on the top menu bar. /:cl: --- interface/skin.dmf | 5 ++++- modular_zubbers/code/__DEFINES/send2relay.dm | 18 ++++++++++++++++++ tgstation.dme | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 modular_zubbers/code/__DEFINES/send2relay.dm diff --git a/interface/skin.dmf b/interface/skin.dmf index 0c21e5d6663..42c2ba66060 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -53,7 +53,10 @@ menu "menu" command = "Hotkeys-Help" category = "&Help" saved-params = "is-checked" - + elem "Use Internet Routing Relay" + name = "Internet Routing Relays" + command = "go2relay" + saved-params = "is-checked" window "mainwindow" elem "mainwindow" diff --git a/modular_zubbers/code/__DEFINES/send2relay.dm b/modular_zubbers/code/__DEFINES/send2relay.dm new file mode 100644 index 00000000000..01a74b93c91 --- /dev/null +++ b/modular_zubbers/code/__DEFINES/send2relay.dm @@ -0,0 +1,18 @@ +#define US_EAST_RELAY "byond://useast.bubberstation.org:3000" +#define US_WEST_RELAY "byond://uswest.bubberstation.org:3000" +#define SYDNEY_RELAY "byond://sydney.bubberstation.org:3000" +#define EU_RELAY "byond://germany.bubberstation.org:3000" +#define NO_RELAY "byond://game.bubberstation.org:3000" + +/client/verb/go2relay() + var/list/static/relays = list( + US_EAST_RELAY = "Connect to US-East (Virginia)", + US_WEST_RELAY = "Connect to US-West (Oregon)", + SYDNEY_RELAY = "Connect to Sydney, Australia", + EU_RELAY = "Connect to Europe (Germany, Alternative)", + NO_RELAY = "No Relay", + ) + var/choice = tgui_input_list(usr, "Which relay do you wish to use?", "Relay choice", relays) + usr << link(choice) + sleep(1 SECONDS) + winset(usr, null, "command=.quit") diff --git a/tgstation.dme b/tgstation.dme index 9a72f43d491..9cc2fa5268c 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -8053,6 +8053,7 @@ #include "modular_skyrat\modules\xenos_skyrat_redo\code\xeno_types\spitter.dm" #include "modular_skyrat\modules\xenos_skyrat_redo\code\xeno_types\warrior.dm" #include "modular_zubbers\code\__DEFINES\bloodsucker.dm" +#include "modular_zubbers\code\__DEFINES\send2relay.dm" #include "modular_zubbers\code\__DEFINES\traits.dm" #include "modular_zubbers\code\__DEFINES\votes.dm" #include "modular_zubbers\code\_globalvars\lists\_maintenance_loot.dm"