mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Cleanups and tweaks observer code (#30250)
* observer cleanup * this * bit more * Update tgui.bundle.js
This commit is contained in:
@@ -148,6 +148,7 @@
|
||||
if(selected_outfit)
|
||||
new_human.equipOutfit(selected_outfit)
|
||||
|
||||
// used by admins
|
||||
/obj/structure/ghost_beacon
|
||||
name = "ethereal beacon"
|
||||
desc = "A structure that draws ethereal attention when active. Use an empty hand to activate."
|
||||
@@ -161,7 +162,6 @@
|
||||
var/alert_title = "Ethereal Beacon Active!"
|
||||
var/atom/attack_atom
|
||||
|
||||
|
||||
/obj/structure/ghost_beacon/Initialize(mapload)
|
||||
. = ..()
|
||||
last_ghost_alert = world.time
|
||||
|
||||
@@ -616,18 +616,15 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
if(C.id == id && !C.cremating)
|
||||
C.cremate(user)
|
||||
|
||||
|
||||
/mob/proc/update_morgue()
|
||||
if(stat == DEAD)
|
||||
var/obj/structure/morgue/morgue
|
||||
var/mob/living/C = src
|
||||
var/mob/dead/observer/G = src
|
||||
if(istype(G) && G.can_reenter_corpse && G.mind) //We're a ghost, let's find our corpse
|
||||
C = G.mind.current
|
||||
if(istype(C)) //We found our corpse, is it inside a morgue?
|
||||
morgue = get(C.loc, /obj/structure/morgue)
|
||||
if(morgue)
|
||||
morgue.update_icon(UPDATE_OVERLAYS)
|
||||
var/mob/living/corpse = src
|
||||
var/mob/dead/observer/ghost = src
|
||||
if(istype(ghost) && ghost.ghost_flags & GHOST_CAN_REENTER && ghost.mind) //We're a ghost, let's find our corpse
|
||||
corpse = ghost.mind.current
|
||||
if(istype(corpse)) //We found our corpse, is it inside a morgue?
|
||||
var/obj/structure/morgue/morgue = get(corpse.loc, /obj/structure/morgue)
|
||||
morgue?.update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
#undef EXTENDED_TRAY
|
||||
#undef EMPTY_MORGUE
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
ADD_TRAIT(user, SCRYING, SCRYING_ORB)
|
||||
user.visible_message("<span class='notice'>[user] stares into [src], [user.p_their()] eyes glazing over.</span>",
|
||||
"<span class='danger'>You stare into [src], you can see the entire universe!</span>")
|
||||
ghost = user.ghostize(TRUE, COLOR_BLUE, "Magic Spirit of [user.name]")
|
||||
ghost = user.ghostize(ghost_name = "Magic Spirit of [user.name]", ghost_color = COLOR_BLUE)
|
||||
while(!QDELETED(user))
|
||||
if(user.key || QDELETED(src))
|
||||
user.visible_message("<span class='notice'>[user] blinks, returning to the world around [user.p_them()].</span>",
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
to_chat(buckled_mob, "<span class='ghostalert'>You may now click on the ghost prompt on your screen to leave your body. You will be alerted when you're removed from the nest.</span>")
|
||||
if(tgui_alert(buckled_mob, "You may now ghost and keep respawnability, you will be notified if you leave the nest, would you like to do so?", "Ghosting", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
buckled_mob.ghostize(TRUE)
|
||||
buckled_mob.ghostize()
|
||||
|
||||
/obj/structure/bed/nest/post_buckle_mob(mob/living/M)
|
||||
M.pixel_y = 0
|
||||
|
||||
Reference in New Issue
Block a user