Hiding Fluff

Revealing a hidden mob is now its own proc. You can pass special fluff messages to mobs with this when they are revealed.
Now a mob is revealed when they die, are grabbed/grab something and when they buckle to something.
This commit is contained in:
KasparoVy
2018-08-04 21:11:03 -04:00
parent 115bfa2dc3
commit e86fddfe07
5 changed files with 19 additions and 8 deletions
+5 -1
View File
@@ -142,18 +142,23 @@
. = buckle_mob(M, forced)
if(.)
var/reveal_message
if(!silent)
if(M == user)
reveal_message = "<span class='notice'>You come out of hiding and buckle yourself to [src].</span>"
M.visible_message(\
"<span class='notice'>[M.name] buckles themselves to [src].</span>",\
"<span class='notice'>You buckle yourself to [src].</span>",\
"<span class='notice'>You hear metal clanking.</span>")
else
reveal_message = "<span class='notice'>You are revealed as you are buckled to [src].</span>"
M.visible_message(\
"<span class='danger'>[M.name] is buckled to [src] by [user.name]!</span>",\
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
"<span class='notice'>You hear metal clanking.</span>")
M.reveal(silent, reveal_message) //Reveal people so they aren't buckled to chairs from behind.
/atom/movable/proc/user_unbuckle_mob(mob/living/buckled_mob, mob/user)
var/mob/living/M = unbuckle_mob(buckled_mob)
if(M)
@@ -193,4 +198,3 @@
riding_datum.handle_vehicle_layer()
riding_datum.handle_vehicle_offsets()
//VOREStation Add End
@@ -1555,9 +1555,8 @@
/mob/living/carbon/human/proc/update_icon_special() //For things such as teshari hiding and whatnot.
if(status_flags & HIDING) // Hiding? Carry on.
if(stat == DEAD || paralysis || weakened || stunned || restrained()) //stunned/knocked down by something that isn't the rest verb? Note: This was tried with INCAPACITATION_STUNNED, but that refused to work.
reset_plane_and_layer()
status_flags &= ~HIDING
if(stat == DEAD || paralysis || weakened || stunned || restrained() || buckled || LAZYLEN(grabbed_by)) //stunned/knocked down by something that isn't the rest verb? Note: This was tried with INCAPACITATION_STUNNED, but that refused to work.
reveal(TRUE) //Reveal them silently.
else
layer = HIDING_LAYER
+1
View File
@@ -1,5 +1,6 @@
/mob/living/death()
clear_fullscreens()
reveal(TRUE) //Silently reveal the mob if they were hidden.
//VOREStation Edit - Mob spawner stuff
if(source_spawner)
source_spawner.get_death_report(src)
+9 -4
View File
@@ -1,15 +1,20 @@
/mob/living/proc/reveal(var/silent, var/message = "<span class='warning'>You have been revealed! You are no longer hidden.</span>")
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"
if(stat == DEAD || paralysis || weakened || stunned || restrained())
if(stat == DEAD || paralysis || weakened || stunned || restrained() || buckled || LAZYLEN(grabbed_by))
return
if(status_flags & HIDING)
status_flags &= ~HIDING
reset_plane_and_layer()
to_chat(src,"<span class='notice'>You have stopped hiding.</span>")
reveal("<span class='notice'>You have stopped hiding.</span>")
else
status_flags |= HIDING
layer = HIDING_LAYER //Just above cables with their 2.44
+2
View File
@@ -47,6 +47,8 @@
return
affecting.grabbed_by += src
affecting.reveal("<span class='warning'>You are revealed as [assailant] grabs you.</span>")
assailant.reveal("<span class='warning'>You reveal yourself as you grab [affecting].</span>")
hud = new /obj/screen/grab(src)
hud.icon_state = "reinforce"