VORE Edit to Fix Hiding with Taur Buckling

Was broken when taur riding was enabled and required some tweaks.
Took the chance to add a few extra features & fluff up hiding a bit.
If you're grabbed, grab someone, buckle yourself or are buckled by someone else you now become un-hidden. You cannot hide yourself while grabbed or buckled.
There are a few fluff messages for these circumstances but otherwise hiding behaves exactly as it used to.
This commit is contained in:
KasparoVy
2018-08-04 20:51:41 -04:00
parent e86fddfe07
commit 073750516f
4 changed files with 17 additions and 8 deletions

View File

@@ -142,22 +142,29 @@
. = buckle_mob(M, forced) . = buckle_mob(M, forced)
if(.) if(.)
var/reveal_message var/reveal_message = list("buckled_mob" = null, "buckled_to" = null) //VORE EDIT: This being a list and messages existing for the buckle target atom.
if(!silent) if(!silent)
if(M == user) if(M == user)
reveal_message = "<span class='notice'>You come out of hiding and buckle yourself to [src].</span>" reveal_message["buckled_mob"] = "<span class='notice'>You come out of hiding and buckle yourself to [src].</span>" //VORE EDIT
reveal_message["buckled_to"] = "<span class='notice'>You come out of hiding as [M.name] buckles themselves to you.</span>" //VORE EDIT
M.visible_message(\ M.visible_message(\
"<span class='notice'>[M.name] buckles themselves to [src].</span>",\ "<span class='notice'>[M.name] buckles themselves to [src].</span>",\
"<span class='notice'>You buckle yourself to [src].</span>",\ "<span class='notice'>You buckle yourself to [src].</span>",\
"<span class='notice'>You hear metal clanking.</span>") "<span class='notice'>You hear metal clanking.</span>")
else else
reveal_message = "<span class='notice'>You are revealed as you are buckled to [src].</span>" reveal_message["buckled_mob"] = "<span class='notice'>You are revealed as you are buckled to [src].</span>" //VORE EDIT
reveal_message["buckled_to"] = "<span class='notice'>You are revealed as [M.name] is buckled to you.</span>" //VORE EDIT
M.visible_message(\ M.visible_message(\
"<span class='danger'>[M.name] is buckled to [src] by [user.name]!</span>",\ "<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='danger'>You are buckled to [src] by [user.name]!</span>",\
"<span class='notice'>You hear metal clanking.</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. M.reveal(silent, reveal_message["buckled_mob"]) //Reveal people so they aren't buckled to chairs from behind. //VORE EDIT, list arg instead of simple message var for buckled mob
//Vore edit start
var/mob/living/L = src
if(istype(L))
L.reveal(silent, reveal_message["buckled_to"])
//Vore edit end
/atom/movable/proc/user_unbuckle_mob(mob/living/buckled_mob, mob/user) /atom/movable/proc/user_unbuckle_mob(mob/living/buckled_mob, mob/user)
var/mob/living/M = unbuckle_mob(buckled_mob) var/mob/living/M = unbuckle_mob(buckled_mob)

View File

@@ -1555,8 +1555,8 @@
/mob/living/carbon/human/proc/update_icon_special() //For things such as teshari hiding and whatnot. /mob/living/carbon/human/proc/update_icon_special() //For things such as teshari hiding and whatnot.
if(status_flags & HIDING) // Hiding? Carry on. if(status_flags & HIDING) // Hiding? Carry on.
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. if(stat == DEAD || paralysis || weakened || stunned || restrained() || buckled || LAZYLEN(grabbed_by) || has_buckled_mobs()) //stunned/knocked down by something that isn't the rest verb? Note: This was tried with INCAPACITATION_STUNNED, but that refused to work. //VORE EDIT: Check for has_buckled_mobs() (taur riding)
reveal(TRUE) //Reveal them silently. reveal(null)
else else
layer = HIDING_LAYER layer = HIDING_LAYER

View File

@@ -10,7 +10,7 @@
set desc = "Allows to hide beneath tables or certain items. Toggled on or off." set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
set category = "Abilities" set category = "Abilities"
if(stat == DEAD || paralysis || weakened || stunned || restrained() || buckled || LAZYLEN(grabbed_by)) if(stat == DEAD || paralysis || weakened || stunned || restrained() || buckled || LAZYLEN(grabbed_by) || has_buckled_mobs()) //VORE EDIT: Check for has_buckled_mobs() (taur riding)
return return
if(status_flags & HIDING) if(status_flags & HIDING)

View File

@@ -11,6 +11,8 @@
else else
ridden.layer = initial(ridden.layer) ridden.layer = initial(ridden.layer)
else else
var/mob/living/L = ridden
if(!(istype(L) && (L.status_flags & HIDING)))
ridden.layer = initial(ridden.layer) ridden.layer = initial(ridden.layer)
/datum/riding/taur/ride_check(mob/living/M) /datum/riding/taur/ride_check(mob/living/M)