mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-08 07:52:54 +00:00
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous. There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this. Hi codeowners! Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
127 lines
2.9 KiB
Plaintext
127 lines
2.9 KiB
Plaintext
//Dead mobs can exist whenever. This is needful
|
|
|
|
INITIALIZE_IMMEDIATE(/mob/dead)
|
|
|
|
/mob/dead
|
|
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
|
move_resist = INFINITY
|
|
throwforce = 0
|
|
|
|
/mob/dead/Initialize()
|
|
SHOULD_CALL_PARENT(FALSE)
|
|
if(flags_1 & INITIALIZED_1)
|
|
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
|
flags_1 |= INITIALIZED_1
|
|
tag = "mob_[next_mob_id++]"
|
|
add_to_mob_list()
|
|
|
|
prepare_huds()
|
|
|
|
if(length(CONFIG_GET(keyed_list/cross_server)))
|
|
add_verb(src, /mob/dead/proc/server_hop)
|
|
set_focus(src)
|
|
return INITIALIZE_HINT_NORMAL
|
|
|
|
/mob/dead/canUseStorage()
|
|
return FALSE
|
|
|
|
/mob/dead/forceMove(atom/destination)
|
|
var/turf/old_turf = get_turf(src)
|
|
var/turf/new_turf = get_turf(destination)
|
|
if (old_turf?.z != new_turf?.z)
|
|
onTransitZ(old_turf?.z, new_turf?.z)
|
|
var/oldloc = loc
|
|
loc = destination
|
|
Moved(oldloc, NONE, TRUE)
|
|
|
|
/mob/dead/get_status_tab_items()
|
|
. = ..()
|
|
. += ""
|
|
. += "Game Mode: [SSticker.hide_mode ? "Secret" : "[GLOB.master_mode]"]"
|
|
|
|
if(SSticker.HasRoundStarted())
|
|
return
|
|
|
|
var/time_remaining = SSticker.GetTimeLeft()
|
|
if(time_remaining > 0)
|
|
. += "Time To Start: [round(time_remaining/10)]s"
|
|
else if(time_remaining == -10)
|
|
. += "Time To Start: DELAYED"
|
|
else
|
|
. += "Time To Start: SOON"
|
|
|
|
. += "Players: [SSticker.totalPlayers]"
|
|
if(client.holder)
|
|
. += "Players Ready: [SSticker.totalPlayersReady]"
|
|
|
|
/mob/dead/proc/server_hop()
|
|
set category = "OOC"
|
|
set name = "Server Hop!"
|
|
set desc= "Jump to the other server"
|
|
if(notransform)
|
|
return
|
|
var/list/our_id = CONFIG_GET(string/cross_comms_name)
|
|
var/list/csa = CONFIG_GET(keyed_list/cross_server) - our_id
|
|
var/pick
|
|
switch(csa.len)
|
|
if(0)
|
|
remove_verb(src, /mob/dead/proc/server_hop)
|
|
to_chat(src, "<span class='notice'>Server Hop has been disabled.</span>")
|
|
if(1)
|
|
pick = csa[1]
|
|
else
|
|
pick = input(src, "Pick a server to jump to", "Server Hop") as null|anything in csa
|
|
|
|
if(!pick)
|
|
return
|
|
|
|
var/addr = csa[pick]
|
|
|
|
if(alert(src, "Jump to server [pick] ([addr])?", "Server Hop", "Yes", "No") != "Yes")
|
|
return
|
|
|
|
var/client/C = client
|
|
to_chat(C, "<span class='notice'>Sending you to [pick].</span>")
|
|
new /atom/movable/screen/splash(C)
|
|
|
|
notransform = TRUE
|
|
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]")
|
|
|
|
/mob/dead/proc/update_z(new_z) // 1+ to register, null to unregister
|
|
if (registered_z != new_z)
|
|
if (registered_z)
|
|
SSmobs.dead_players_by_zlevel[registered_z] -= src
|
|
if (client)
|
|
if (new_z)
|
|
SSmobs.dead_players_by_zlevel[new_z] += src
|
|
registered_z = new_z
|
|
else
|
|
registered_z = null
|
|
|
|
/mob/dead/Login()
|
|
. = ..()
|
|
if(!. || !client)
|
|
return FALSE
|
|
var/turf/T = get_turf(src)
|
|
if (isturf(T))
|
|
update_z(T.z)
|
|
|
|
/mob/dead/auto_deadmin_on_login()
|
|
return
|
|
|
|
/mob/dead/Logout()
|
|
update_z(null)
|
|
return ..()
|
|
|
|
/mob/dead/onTransitZ(old_z,new_z)
|
|
..()
|
|
update_z(new_z)
|