Skip to content

Commit

Permalink
Fix aghosting
Browse files Browse the repository at this point in the history
  • Loading branch information
PsyCommando committed Oct 12, 2024
1 parent 8be1771 commit 577fdc1
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions mods/persistence/modules/mob/observer/ghost/ghost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@
. = ..()
verbs -= /mob/living/verb/ghost

/mob/ghostize(var/can_reenter_corpse = FALSE)
if(can_reenter_corpse && key && check_rights(R_ADMIN, 0, src)) // Allow admins to ghost.
hide_fullscreens()
var/mob/observer/ghost/ghost = new(src) //Transfer safety to observer spawning proc.
ghost.can_reenter_corpse = can_reenter_corpse
ghost.timeofdeath = src.stat == DEAD ? src.timeofdeath : world.time
ghost.key = key
if(ghost.client && !ghost.client.holder && !get_config_value(/decl/config/toggle/antag_hud_allowed)) // For new ghosts we remove the verb from even showing up if it's not allowed.
ghost.verbs -= /mob/observer/ghost/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
return ghost

return
//Only admins can ghost
/mob/ghostize(var/_can_reenter_corpse = CORPSE_CAN_REENTER)
if(!check_rights(R_ADMIN, 0, src))
return
return ..()

/datum/movement_handler/mob/death/DoMove()
return // no ghosting.

0 comments on commit 577fdc1

Please sign in to comment.