mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 23:17:02 +01:00
Fiber Garrote now mutes all emotes when garroting target (#20393)
* added check for STATUS_EFFECT_SILENCED when we want to emit emote sound. If /mob/living has this flag, emote wont emit sound. Less ways to spam sounds when you supposed to be silent
* Revert "added check for STATUS_EFFECT_SILENCED when we want to emit emote sound. If /mob/living has this flag, emote wont emit sound. Less ways to spam sounds when you supposed to be silent"
This reverts commit bc093ba01f.
* new status effect absolute silence, applying when using fiber garrote to silence all emote sounds
* comments update, status set function standartisation
* Update code/datums/emote.dm
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
---------
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -124,6 +124,7 @@
|
||||
#define STATUS_EFFECT_DROWSINESS /datum/status_effect/transient/drowsiness
|
||||
#define STATUS_EFFECT_DRUNKENNESS /datum/status_effect/transient/drunkenness
|
||||
#define STATUS_EFFECT_SILENCED /datum/status_effect/transient/silence
|
||||
#define STATUS_EFFECT_ABSSILENCED /datum/status_effect/transient/silence/absolute
|
||||
#define STATUS_EFFECT_JITTER /datum/status_effect/transient/jittery
|
||||
#define STATUS_EFFECT_CULT_SLUR /datum/status_effect/transient/cult_slurring
|
||||
#define STATUS_EFFECT_STAMMER /datum/status_effect/transient/stammering
|
||||
|
||||
@@ -593,6 +593,10 @@
|
||||
return FALSE
|
||||
if((emote_type & EMOTE_MOUTH) && !can_vocalize_emotes(user))
|
||||
return FALSE
|
||||
if(isliving(user))
|
||||
var/mob/living/liveuser = user
|
||||
if(liveuser.has_status_effect(STATUS_EFFECT_ABSSILENCED))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/emote/proc/remove_ending_punctuation(msg)
|
||||
|
||||
@@ -674,6 +674,9 @@
|
||||
. = ..()
|
||||
REMOVE_TRAIT(owner, TRAIT_MUTE, id)
|
||||
|
||||
/datum/status_effect/transient/silence/absolute // this one will mute all emote sounds including gasps
|
||||
id = "abssilenced"
|
||||
|
||||
/datum/status_effect/transient/jittery
|
||||
id = "jittering"
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
return
|
||||
|
||||
|
||||
strangling.Silence(6 SECONDS) // Non-improvised effects
|
||||
strangling.AbsoluteSilence(6 SECONDS) // Non-improvised effects
|
||||
strangling.apply_damage(4, OXY, "head")
|
||||
|
||||
|
||||
|
||||
@@ -416,6 +416,15 @@ STATUS EFFECTS
|
||||
/mob/living/proc/SetSilence(amount)
|
||||
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_SILENCED, amount)
|
||||
|
||||
/mob/living/proc/AmountAbsoluteSilenced()
|
||||
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_ABSSILENCED)
|
||||
|
||||
/mob/living/proc/AbsoluteSilence(amount)
|
||||
SetAbsoluteSilence(max(amount, AmountAbsoluteSilenced()))
|
||||
|
||||
/mob/living/proc/SetAbsoluteSilence(amount)
|
||||
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_ABSSILENCED, amount)
|
||||
|
||||
/mob/living/proc/AdjustSilence(amount, bound_lower = 0, bound_upper = INFINITY)
|
||||
SetSilence(directional_bounded_sum(AmountSilenced(), amount, bound_lower, bound_upper))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user