Merge branch 'master' into upstream-merge-26776
This commit is contained in:
@@ -1,42 +1,51 @@
|
||||
//Dead mobs can exist whenever. This is needful
|
||||
|
||||
INITIALIZE_IMMEDIATE(/mob/dead)
|
||||
|
||||
/mob/dead/Initialize()
|
||||
. = ..()
|
||||
if(config.cross_allowed)
|
||||
verbs += /mob/dead/proc/server_hop
|
||||
|
||||
INITIALIZE_IMMEDIATE(/mob/dead)
|
||||
/mob/dead/dust() //ghosts can't be vaporised.
|
||||
return
|
||||
|
||||
/mob/dead/gib() //ghosts can't be gibbed.
|
||||
return
|
||||
|
||||
|
||||
/mob/dead/Initialize()
|
||||
|
||||
if(initialized)
|
||||
|
||||
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
||||
/mob/dead/ConveyorMove() //lol
|
||||
return
|
||||
|
||||
initialized = TRUE
|
||||
|
||||
tag = "mob_[next_mob_id++]"
|
||||
|
||||
GLOB.mob_list += src
|
||||
|
||||
|
||||
prepare_huds()
|
||||
|
||||
|
||||
if(config.cross_allowed)
|
||||
|
||||
verbs += /mob/dead/proc/server_hop
|
||||
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
/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>")
|
||||
|
||||
/mob/dead/dust() //ghosts can't be vaporised.
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/dead/gib() //ghosts can't be gibbed.
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/dead/ConveyorMove() //lol
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/dead/proc/server_hop()
|
||||
|
||||
set category = "OOC"
|
||||
|
||||
set name = "Server Hop!"
|
||||
@@ -16,12 +16,6 @@
|
||||
var/mob/living/new_character //for instant transfer once the round is set up
|
||||
|
||||
/mob/dead/new_player/Initialize()
|
||||
if(initialized)
|
||||
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
||||
initialized = TRUE
|
||||
tag = "mob_[next_mob_id++]"
|
||||
GLOB.mob_list += src
|
||||
|
||||
if(client && SSticker.state == GAME_STATE_STARTUP)
|
||||
var/obj/screen/splash/S = new(client, TRUE, TRUE)
|
||||
S.Fade(TRUE)
|
||||
@@ -30,7 +24,10 @@
|
||||
loc = pick(GLOB.newplayer_start)
|
||||
else
|
||||
loc = locate(1,1,1)
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
. = ..()
|
||||
|
||||
/mob/dead/new_player/prepare_huds()
|
||||
return
|
||||
|
||||
/mob/dead/new_player/proc/new_player_panel()
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
var/deadchat_name
|
||||
|
||||
/mob/dead/observer/Initialize()
|
||||
invisibility = GLOB.observer_default_invisibility
|
||||
set_invisibility(GLOB.observer_default_invisibility)
|
||||
|
||||
verbs += /mob/dead/observer/proc/dead_tele
|
||||
|
||||
@@ -117,6 +117,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
|
||||
|
||||
GLOB.dead_mob_list += src
|
||||
|
||||
..()
|
||||
@@ -786,13 +787,25 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(!invisibility)
|
||||
to_chat(user, "It seems extremely obvious.")
|
||||
|
||||
/mob/dead/observer/proc/set_invisibility(value)
|
||||
invisibility = value
|
||||
if(!value)
|
||||
set_light(1, 2)
|
||||
else
|
||||
set_light(0, 0)
|
||||
|
||||
// Ghosts have no momentum, being massless ectoplasm
|
||||
/mob/dead/observer/Process_Spacemove(movement_dir)
|
||||
return 1
|
||||
|
||||
/mob/dead/observer/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
if(var_name == "invisibility")
|
||||
set_invisibility(invisibility) // updates light
|
||||
|
||||
/proc/set_observer_default_invisibility(amount, message=null)
|
||||
for(var/mob/dead/observer/G in GLOB.player_list)
|
||||
G.invisibility = amount
|
||||
G.set_invisibility(amount)
|
||||
if(message)
|
||||
to_chat(G, message)
|
||||
GLOB.observer_default_invisibility = amount
|
||||
|
||||
Reference in New Issue
Block a user