Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary mute now also prevents hive death messages #5748

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@
#define TRAIT_DAZED "dazed"
/// Apply this to identify a mob as merged with weeds
#define TRAIT_MERGED_WITH_WEEDS "merged_with_weeds"
/// Apply this to identify a mob as temporarily muted
#define TRAIT_TEMPORARILY_MUTED "temporarily_muted"

// SPECIES TRAITS
/// Knowledge of Yautja technology
Expand Down Expand Up @@ -422,6 +424,8 @@ GLOBAL_LIST(trait_name_map)
///Status trait coming from ability
#define TRAIT_SOURCE_ABILITY(ability) "t_s_ability_[ability]"
#define TRAIT_SOURCE_LIMB(limb) "t_s_limb_[limb]"
///Status trait coming from temporary_mute
#define TRAIT_SOURCE_TEMPORARY_MUTE "t_s_temporary_mute"
///Status trait forced by the xeno action charge
#define TRAIT_SOURCE_XENO_ACTION_CHARGE "t_s_xeno_action_charge"
///Status trait coming from a xeno nest
Expand Down
2 changes: 2 additions & 0 deletions code/datums/components/temporary_mute.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
RegisterSignal(parent, COMSIG_XENO_TRY_HIVEMIND_TALK, PROC_REF(on_hivemind))
RegisterSignal(parent, COMSIG_MOB_TRY_EMOTE, PROC_REF(on_emote))
RegisterSignal(parent, COMSIG_MOB_TRY_POINT, PROC_REF(on_point))
ADD_TRAIT(parent, TRAIT_TEMPORARILY_MUTED, TRAIT_SOURCE_TEMPORARY_MUTE)

/datum/component/temporary_mute/UnregisterFromParent()
..()
Expand All @@ -37,6 +38,7 @@
UnregisterSignal(parent, COMSIG_MOB_TRY_POINT)
if(on_unmute_message)
to_chat(parent, SPAN_NOTICE(on_unmute_message))
REMOVE_TRAIT(parent, TRAIT_TEMPORARILY_MUTED, TRAIT_SOURCE_TEMPORARY_MUTE)

/datum/component/temporary_mute/proc/on_speak(
mob/user,
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
playsound(loc, prob(50) == 1 ? 'sound/voice/alien_death.ogg' : 'sound/voice/alien_death2.ogg', 25, 1)
var/area/A = get_area(src)
if(hive && hive.living_xeno_queen)
xeno_message("Hive: [src] has <b>died</b>[A? " at [sanitize_area(A.name)]":""]! [banished ? "They were banished from the hive." : ""]", death_fontsize, hivenumber)
if(!HAS_TRAIT(src, TRAIT_TEMPORARILY_MUTED))
xeno_message("Hive: [src] has <b>died</b>[A? " at [sanitize_area(A.name)]":""]! [banished ? "They were banished from the hive." : ""]", death_fontsize, hivenumber)

if(hive && IS_XENO_LEADER(src)) //Strip them from the Xeno leader list, if they are indexed in here
hive.remove_hive_leader(src)
Expand Down
Loading