mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +00:00
mob folder - camera to dead
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
INITIALIZE_IMMEDIATE(/mob/dead)
|
INITIALIZE_IMMEDIATE(/mob/dead)
|
||||||
|
|
||||||
|
/mob/dead
|
||||||
|
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||||
|
|
||||||
/mob/dead/Initialize()
|
/mob/dead/Initialize()
|
||||||
if(initialized)
|
if(initialized)
|
||||||
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
||||||
@@ -11,8 +14,9 @@ INITIALIZE_IMMEDIATE(/mob/dead)
|
|||||||
|
|
||||||
prepare_huds()
|
prepare_huds()
|
||||||
|
|
||||||
if(CONFIG_GET(string/cross_server_address))
|
if(length(CONFIG_GET(keyed_string_list/cross_server)))
|
||||||
verbs += /mob/dead/proc/server_hop
|
verbs += /mob/dead/proc/server_hop
|
||||||
|
set_focus(src)
|
||||||
return INITIALIZE_HINT_NORMAL
|
return INITIALIZE_HINT_NORMAL
|
||||||
|
|
||||||
/mob/dead/dust() //ghosts can't be vaporised.
|
/mob/dead/dust() //ghosts can't be vaporised.
|
||||||
@@ -45,26 +49,46 @@ INITIALIZE_IMMEDIATE(/mob/dead)
|
|||||||
else
|
else
|
||||||
stat(null, "Time To Start: SOON")
|
stat(null, "Time To Start: SOON")
|
||||||
|
|
||||||
|
stat(null, "Players: [SSticker.totalPlayers]")
|
||||||
|
if(client.holder)
|
||||||
|
stat(null, "Players Ready: [SSticker.totalPlayersReady]")
|
||||||
|
|
||||||
/mob/dead/proc/server_hop()
|
/mob/dead/proc/server_hop()
|
||||||
set category = "OOC"
|
set category = "OOC"
|
||||||
set name = "Server Hop!"
|
set name = "Server Hop!"
|
||||||
set desc= "Jump to the other server"
|
set desc= "Jump to the other server"
|
||||||
if(notransform)
|
if(notransform)
|
||||||
return
|
return
|
||||||
var/csa = CONFIG_GET(string/cross_server_address)
|
var/list/csa = CONFIG_GET(keyed_string_list/cross_server)
|
||||||
if(csa)
|
var/pick
|
||||||
verbs -= /mob/dead/proc/server_hop
|
switch(csa.len)
|
||||||
to_chat(src, "<span class='notice'>Server Hop has been disabled.</span>")
|
if(0)
|
||||||
|
verbs -= /mob/dead/proc/server_hop
|
||||||
|
to_chat(src, "<span class='notice'>Server Hop has been disabled.</span>")
|
||||||
|
if(1)
|
||||||
|
pick = csa[0]
|
||||||
|
else
|
||||||
|
pick = input(src, "Pick a server to jump to", "Server Hop") as null|anything in csa
|
||||||
|
|
||||||
|
if(!pick)
|
||||||
return
|
return
|
||||||
if (alert(src, "Jump to server running at [csa]?", "Server Hop", "Yes", "No") != "Yes")
|
|
||||||
return 0
|
var/addr = csa[pick]
|
||||||
if (client && csa)
|
|
||||||
to_chat(src, "<span class='notice'>Sending you to [csa].</span>")
|
if(alert(src, "Jump to server [pick] ([addr])?", "Server Hop", "Yes", "No") != "Yes")
|
||||||
new /obj/screen/splash(client)
|
return
|
||||||
notransform = TRUE
|
|
||||||
sleep(29) //let the animation play
|
var/client/C = client
|
||||||
notransform = FALSE
|
to_chat(C, "<span class='notice'>Sending you to [pick].</span>")
|
||||||
winset(src, null, "command=.options") //other wise the user never knows if byond is downloading resources
|
new /obj/screen/splash(C)
|
||||||
client << link(csa + "?server_hop=[key]")
|
|
||||||
else
|
notransform = TRUE
|
||||||
to_chat(src, "<span class='error'>There is no other server configured!</span>")
|
sleep(29) //let the animation play
|
||||||
|
notransform = FALSE
|
||||||
|
|
||||||
|
if(!C)
|
||||||
|
return
|
||||||
|
|
||||||
|
winset(src, null, "command=.options") //other wise the user never knows if byond is downloading resources
|
||||||
|
|
||||||
|
C << link("[addr]?server_hop=[key]")
|
||||||
|
|||||||
@@ -73,26 +73,6 @@
|
|||||||
popup.open(0)
|
popup.open(0)
|
||||||
return
|
return
|
||||||
|
|
||||||
/mob/dead/new_player/Stat()
|
|
||||||
..()
|
|
||||||
|
|
||||||
if(statpanel("Lobby"))
|
|
||||||
stat("Game Mode:", (SSticker.hide_mode) ? "Secret" : "[GLOB.master_mode]")
|
|
||||||
stat("Map:", SSmapping.config.map_name)
|
|
||||||
|
|
||||||
if(SSticker.current_state == GAME_STATE_PREGAME)
|
|
||||||
var/time_remaining = SSticker.GetTimeLeft()
|
|
||||||
if(time_remaining > 0)
|
|
||||||
stat("Time To Start:", "[round(time_remaining/10)]s")
|
|
||||||
else if(time_remaining == -10)
|
|
||||||
stat("Time To Start:", "DELAYED")
|
|
||||||
else
|
|
||||||
stat("Time To Start:", "SOON")
|
|
||||||
|
|
||||||
stat("Players:", "[SSticker.totalPlayers]")
|
|
||||||
if(client.holder)
|
|
||||||
stat("Players Ready:", "[SSticker.totalPlayersReady]")
|
|
||||||
|
|
||||||
|
|
||||||
/mob/dead/new_player/Topic(href, href_list[])
|
/mob/dead/new_player/Topic(href, href_list[])
|
||||||
if(src != usr)
|
if(src != usr)
|
||||||
@@ -317,15 +297,13 @@
|
|||||||
return 0
|
return 0
|
||||||
if(job.required_playtime_remaining(client))
|
if(job.required_playtime_remaining(client))
|
||||||
return 0
|
return 0
|
||||||
if(CONFIG_GET(flag/enforce_human_authority) && !client.prefs.pref_species.qualifies_for_rank(rank, client.prefs.features))
|
|
||||||
return 0
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
/mob/dead/new_player/proc/AttemptLateSpawn(rank)
|
/mob/dead/new_player/proc/AttemptLateSpawn(rank)
|
||||||
if(!IsJobAvailable(rank))
|
if(!IsJobAvailable(rank))
|
||||||
alert(src, "[rank] is not available. Please try another.")
|
alert(src, "[rank] is not available. Please try another.")
|
||||||
return 0
|
return FALSE
|
||||||
|
|
||||||
if(SSticker.late_join_disabled)
|
if(SSticker.late_join_disabled)
|
||||||
alert(src, "An administrator has disabled late join spawning.")
|
alert(src, "An administrator has disabled late join spawning.")
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
//The mob should have a gender you want before running this proc. Will run fine without H
|
|
||||||
|
//The mob should have a gender you want before running this proc. Will run fine without H
|
||||||
/datum/preferences/proc/random_character(gender_override)
|
/datum/preferences/proc/random_character(gender_override)
|
||||||
if(gender_override)
|
if(gender_override)
|
||||||
gender = gender_override
|
gender = gender_override
|
||||||
@@ -19,7 +20,7 @@
|
|||||||
features = random_features()
|
features = random_features()
|
||||||
age = rand(AGE_MIN,AGE_MAX)
|
age = rand(AGE_MIN,AGE_MAX)
|
||||||
|
|
||||||
/datum/preferences/proc/update_preview_icon(nude = 0)
|
/datum/preferences/proc/update_preview_icon(nude = FALSE)
|
||||||
// Silicons only need a very basic preview since there is no customization for them.
|
// Silicons only need a very basic preview since there is no customization for them.
|
||||||
if(job_engsec_high)
|
if(job_engsec_high)
|
||||||
switch(job_engsec_high)
|
switch(job_engsec_high)
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
|||||||
density = FALSE
|
density = FALSE
|
||||||
canmove = 0
|
canmove = 0
|
||||||
anchored = TRUE // don't get pushed around
|
anchored = TRUE // don't get pushed around
|
||||||
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
|
||||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||||
see_in_dark = 100
|
see_in_dark = 100
|
||||||
invisibility = INVISIBILITY_OBSERVER
|
invisibility = INVISIBILITY_OBSERVER
|
||||||
@@ -136,13 +135,13 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
|||||||
/mob/dead/observer/narsie_act()
|
/mob/dead/observer/narsie_act()
|
||||||
var/old_color = color
|
var/old_color = color
|
||||||
color = "#960000"
|
color = "#960000"
|
||||||
animate(src, color = old_color, time = 10, flags_1 = ANIMATION_PARALLEL)
|
animate(src, color = old_color, time = 10, flags = ANIMATION_PARALLEL)
|
||||||
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 10)
|
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 10)
|
||||||
|
|
||||||
/mob/dead/observer/ratvar_act()
|
/mob/dead/observer/ratvar_act()
|
||||||
var/old_color = color
|
var/old_color = color
|
||||||
color = "#FAE48C"
|
color = "#FAE48C"
|
||||||
animate(src, color = old_color, time = 10, flags_1 = ANIMATION_PARALLEL)
|
animate(src, color = old_color, time = 10, flags = ANIMATION_PARALLEL)
|
||||||
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 10)
|
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 10)
|
||||||
|
|
||||||
/mob/dead/observer/Destroy()
|
/mob/dead/observer/Destroy()
|
||||||
@@ -767,8 +766,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
|||||||
//Istype so we filter out points of interest that are not mobs
|
//Istype so we filter out points of interest that are not mobs
|
||||||
if(client && mob_eye && istype(mob_eye))
|
if(client && mob_eye && istype(mob_eye))
|
||||||
client.eye = mob_eye
|
client.eye = mob_eye
|
||||||
client.screen = list()
|
|
||||||
if(mob_eye.hud_used)
|
if(mob_eye.hud_used)
|
||||||
|
client.screen = list()
|
||||||
LAZYINITLIST(mob_eye.observers)
|
LAZYINITLIST(mob_eye.observers)
|
||||||
mob_eye.observers |= src
|
mob_eye.observers |= src
|
||||||
mob_eye.hud_used.show_hud(mob_eye.hud_used.hud_version, src)
|
mob_eye.hud_used.show_hud(mob_eye.hud_used.hud_version, src)
|
||||||
|
|||||||
@@ -1,25 +1,28 @@
|
|||||||
/mob/dead/observer/say(message)
|
/mob/dead/observer/say(message)
|
||||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||||
|
|
||||||
if (!message)
|
if (!message)
|
||||||
return
|
return
|
||||||
|
|
||||||
log_talk(src,"Ghost/[src.key] : [message]", LOGSAY)
|
log_talk(src,"Ghost/[src.key] : [message]", LOGSAY)
|
||||||
|
|
||||||
. = src.say_dead(message)
|
if(check_emote(message))
|
||||||
|
return
|
||||||
/mob/dead/observer/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
|
||||||
var/atom/movable/to_follow = speaker
|
. = say_dead(message)
|
||||||
if(radio_freq)
|
|
||||||
var/atom/movable/virtualspeaker/V = speaker
|
/mob/dead/observer/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||||
|
var/atom/movable/to_follow = speaker
|
||||||
if(isAI(V.source))
|
if(radio_freq)
|
||||||
var/mob/living/silicon/ai/S = V.source
|
var/atom/movable/virtualspeaker/V = speaker
|
||||||
to_follow = S.eyeobj
|
|
||||||
else
|
if(isAI(V.source))
|
||||||
to_follow = V.source
|
var/mob/living/silicon/ai/S = V.source
|
||||||
var/link = FOLLOW_LINK(src, to_follow)
|
to_follow = S.eyeobj
|
||||||
// Recompose the message, because it's scrambled by default
|
else
|
||||||
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
to_follow = V.source
|
||||||
to_chat(src, "[link] [message]")
|
var/link = FOLLOW_LINK(src, to_follow)
|
||||||
|
// Recompose the message, because it's scrambled by default
|
||||||
|
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
||||||
|
to_chat(src, "[link] [message]")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user