Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap Server Verb #1429

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions modular_ss220/title_screen/code/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
client.change_title_screen_notice()

else if(href_list["swap_server"])
swap_server()
client.swap_server()

else if(href_list["wiki"])
if(tgui_alert(usr, "Хотите открыть нашу вики?", "Вики", list("Да", "Нет")) != "Да")
Expand All @@ -45,7 +45,9 @@
winset(client, "paramapwindow.map", "focus=true")
return

/mob/new_player/proc/swap_server()
/client/verb/swap_server()
set category = "OOC"
set name = "Swap Server"
var/list/servers = GLOB.configuration.ss220_misc.cross_server_list
if(length(servers) == 0)
return
Expand All @@ -62,12 +64,12 @@
server_name = servers[1]
server_ip = servers[server_name]

var/confirm = tgui_alert(src, "Вы уверены что хотите перейти на [server_name] ([server_ip])?", "Смена сервера!", list("Поехали", "Побуду тут..."))
var/confirm = tgui_alert(usr, "Вы уверены что хотите перейти на [server_name] ([server_ip])?", "Смена сервера!", list("Поехали", "Побуду тут..."))
if(confirm != "Поехали")
return

to_chat_immediate(src, "Удачной охоты, сталкер.")
client << link(server_ip)
to_chat_immediate(usr, "Удачной охоты, сталкер.")
src << link(server_ip)

/datum/preferences/process_link(mob/user, list/href_list)
. = ..()
Expand Down
Loading