Files
CHOMPStation2/code/modules/mob/living/living_powers.dm
CHOMPStation2StaffMirrorBot a245b8687f [MIRROR] usr to user part two (#10015)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-01-31 22:27:34 +01:00

41 lines
1.5 KiB
Plaintext

/mob/living/proc/reveal(var/silent, var/message = span_warning("You have been revealed! You are no longer hidden."))
if(status_flags & HIDING)
status_flags &= ~HIDING
reset_plane_and_layer()
if(!silent && message)
to_chat(src, message)
/mob/living/proc/hide()
set name = "Hide"
set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
set category = "Abilities.General"
if(stat == DEAD || paralysis || weakened || stunned || restrained() || buckled || LAZYLEN(grabbed_by) || has_buckled_mobs()) //VORE EDIT: Check for has_buckled_mobs() (taur riding)
return
if(status_flags & HIDING)
reveal(FALSE, span_notice("You have stopped hiding."))
else
status_flags |= HIDING
layer = HIDING_LAYER //Just above cables with their 2.44
plane = OBJ_PLANE
to_chat(src,span_notice("You are now hiding."))
/mob/living/proc/toggle_selfsurgery()
set name = "Allow Self Surgery"
set desc = "Toggles the 'safeties' on self-surgery, allowing you to do so."
set category = "Object"
allow_self_surgery = !allow_self_surgery
to_chat(src, span_notice("You will [allow_self_surgery ? "now" : "no longer"] attempt to operate upon yourself."))
log_admin("DEBUG \[[world.timeofday]\]: [src.ckey ? "[src.name]:([src.ckey])" : "[src.name]"] has [allow_self_surgery ? "Enabled" : "Disabled"] self surgery.")
//ChompEDIT START - re-assert our layer and plane
/mob/living/Moved(var/atom/oldloc, direct, forced, movetime)
. = ..()
if(status_flags & HIDING)
layer = HIDING_LAYER
plane = OBJ_PLANE
//ChompEDIT END