Merge pull request #609 from Citadel-Station-13/upstream-merge-26625

[MIRROR] Server hop can now be used in lobby
This commit is contained in:
LetterJay
2017-05-01 07:39:35 -05:00
committed by GitHub
2 changed files with 31 additions and 27 deletions
+31 -1
View File
@@ -2,6 +2,11 @@
INITIALIZE_IMMEDIATE(/mob/dead)
/mob/dead/Initialize()
. = ..()
if(config.cross_allowed)
verbs += /mob/dead/proc/server_hop
/mob/dead/dust() //ghosts can't be vaporised.
return
@@ -9,4 +14,29 @@ INITIALIZE_IMMEDIATE(/mob/dead)
return
/mob/dead/ConveyorMove() //lol
return
return
/mob/dead/proc/server_hop()
set category = "OOC"
set name = "Server Hop!"
set desc= "Jump to the other server"
if(notransform)
return
if(!config.cross_allowed)
verbs -= /mob/dead/proc/server_hop
to_chat(src, "<span class='notice'>Server Hop has been disabled.</span>")
return
if (alert(src, "Jump to server running at [config.cross_address]?", "Server Hop", "Yes", "No") != "Yes")
return 0
if (client && config.cross_allowed)
to_chat(src, "<span class='notice'>Sending you to [config.cross_address].</span>")
new /obj/screen/splash(client)
notransform = TRUE
sleep(29) //let the animation play
notransform = FALSE
winset(src, null, "command=.options") //other wise the user never knows if byond is downloading resources
client << link(config.cross_address + "?server_hop=[key]")
else
to_chat(src, "<span class='error'>There is no other server configured!</span>")