From 30f96474921cc2606abf33865259d9fe796ed5e1 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Fri, 14 Aug 2026 00:18:40 -0400 Subject: [PATCH 01/21] should just commit now before it gets crazy --- .../code/modules/mob/living/living.dm | 2 + .../code/components/violation_observer.dm | 10 --- .../code/fields/violation_check_aoe.dm | 86 ------------------- .../masquerade/code/subsystem/masquerade.dm | 20 ++--- tgstation.dme | 1 - 5 files changed, 9 insertions(+), 110 deletions(-) delete mode 100644 modular_darkpack/modules/masquerade/code/fields/violation_check_aoe.dm diff --git a/modular_darkpack/master_files/code/modules/mob/living/living.dm b/modular_darkpack/master_files/code/modules/mob/living/living.dm index ffc42bb4bc1b..a7f4545027d2 100644 --- a/modular_darkpack/master_files/code/modules/mob/living/living.dm +++ b/modular_darkpack/master_files/code/modules/mob/living/living.dm @@ -3,12 +3,14 @@ storyteller_stats = create_new_stat_prefs(storyteller_stats) become_area_sensitive(ZONE_TRAIT) update_zone_hud(src, get_area(src)) // AREAS - (Zone hud) + RegisterSignal(src, COMSIG_MASQUERADE_VIOLATION, PROC_REF(on_masquerade_violation)) /mob/living/Destroy(force) storyteller_stats = null beastmaster_minions = null minion_command_components = null QDEL_LAZYLIST(splats) + UnregisterSignal(src, COMSIG_MASQUERADE_VIOLATION) return ..() /mob/living/set_pull_offsets(mob/living/mob_to_set, grab_state = GRAB_PASSIVE, animate = TRUE) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index ef92364d0b4d..243fee33a8f6 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -2,14 +2,11 @@ // Usually NPCs or cameras. /datum/component/violation_observer dupe_mode = COMPONENT_DUPE_UNIQUE - var/datum/proximity_monitor/advanced/violation_check_aoe/area_of_effect /// Time between us checking for violations COOLDOWN_DECLARE(scan_cooldown) var/list/breached_players /datum/component/violation_observer/Initialize(add_area_of_effect) //Only add the AOE checker for NPCs and camera objects. - if(add_area_of_effect) - area_of_effect = new(parent, 7, TRUE, src) breached_players = new() /datum/component/violation_observer/RegisterWithParent() @@ -18,16 +15,9 @@ RegisterSignals(parent, list(COMSIG_LIVING_DEATH, COMSIG_ALL_MASQUERADE_REINFORCE), PROC_REF(on_death)) /datum/component/violation_observer/UnregisterFromParent(force, silent) - QDEL_NULL(area_of_effect) breached_players = null UnregisterSignal(parent, list(COMSIG_SEEN_MASQUERADE_VIOLATION, COMSIG_MASQUERADE_REINFORCE, COMSIG_LIVING_DEATH, COMSIG_ALL_MASQUERADE_REINFORCE)) -/datum/component/violation_observer/proc/toggle_area_of_effect(origin = parent) - if(area_of_effect) - QDEL_NULL(area_of_effect) - else - area_of_effect = new(origin, 7, TRUE, src) - /datum/component/violation_observer/proc/on_observed_violation(atom/source, mob/living/player_breacher) SIGNAL_HANDLER diff --git a/modular_darkpack/modules/masquerade/code/fields/violation_check_aoe.dm b/modular_darkpack/modules/masquerade/code/fields/violation_check_aoe.dm deleted file mode 100644 index 718ca64b60d6..000000000000 --- a/modular_darkpack/modules/masquerade/code/fields/violation_check_aoe.dm +++ /dev/null @@ -1,86 +0,0 @@ -/datum/proximity_monitor/advanced/violation_check_aoe - edge_is_a_field = TRUE - var/datum/component/violation_observer/violation_observer_callback - var/list/tracking_mobs - -/datum/proximity_monitor/advanced/violation_check_aoe/New(atom/_host, range, _ignore_if_not_on_turf = TRUE, _violation_observer_callback) - . = ..() - violation_observer_callback = _violation_observer_callback - tracking_mobs = new() - -/datum/proximity_monitor/advanced/violation_check_aoe/Destroy() - violation_observer_callback = null - for(var/mob in tracking_mobs) - UnregisterSignal(mob, COMSIG_MASQUERADE_VIOLATION) - tracking_mobs = null - return ..() - -/datum/proximity_monitor/advanced/violation_check_aoe/on_entered(turf/source, atom/movable/entered, turf/old_loc) - . = ..() - if(QDELETED(src)) - return - if(!isliving(entered)) - return - if(isnpc(entered)) //only track non-NPCs - return - if(entered == host) - return - if(entered in tracking_mobs) - return - tracking_mobs |= entered - RegisterSignal(entered, COMSIG_MASQUERADE_VIOLATION, PROC_REF(violation_observer_breach_callback)) - if(iscarbon(entered)) - var/mob/living/carbon/entered_mob = entered - if(HAS_TRAIT(entered_mob, TRAIT_MASQUERADE_VIOLATING_FACE) && !(entered_mob.obscured_slots & HIDEFACE)) - SEND_SIGNAL(entered_mob, COMSIG_MASQUERADE_VIOLATION) - else if(HAS_TRAIT(entered_mob, TRAIT_MASQUERADE_VIOLATING_EYES) && !entered_mob.is_eyes_covered()) - SEND_SIGNAL(entered_mob, COMSIG_MASQUERADE_VIOLATION) - -/datum/proximity_monitor/advanced/violation_check_aoe/on_uncrossed(turf/source, atom/movable/gone, direction) - . = ..() - if(QDELETED(src)) - return - if(!isliving(gone)) - return - if(isnpc(gone)) //only track non-NPCs - return - if(gone == host) - return - if(!(gone in tracking_mobs)) - return - tracking_mobs -= gone - UnregisterSignal(gone, COMSIG_MASQUERADE_VIOLATION) - -/datum/proximity_monitor/advanced/violation_check_aoe/on_z_change() - if(QDELETED(src)) - return - for(var/mob in tracking_mobs) - UnregisterSignal(mob, COMSIG_MASQUERADE_VIOLATION) - tracking_mobs -= mob - -/datum/proximity_monitor/advanced/violation_check_aoe/cleanup_field_turf(turf/target) - if(QDELETED(src)) - return - for(var/mob/living/living_mob in target.contents) - UnregisterSignal(living_mob, COMSIG_MASQUERADE_VIOLATION) - tracking_mobs -= living_mob - -/datum/proximity_monitor/advanced/violation_check_aoe/proc/violation_observer_breach_callback(mob/living/source) - SIGNAL_HANDLER - - var/mob/living/host_mob = host - if(!host_mob) - return - if(host_mob.incapacitated || IS_UNCONSCIOUS_OR_CRIT(host_mob) || host_mob.IsSleeping() || host_mob.IsParalyzed()) - return - if(HAS_TRAIT(source, TRAIT_OBFUSCATED)) - return - if(!check_zone_masquerade(host_mob)) - return - if(!can_see(host_mob, source, 7)) - return - if(!COOLDOWN_FINISHED(source, masquerade_timer)) - return - COOLDOWN_START(source, masquerade_timer, 10 SECONDS) - if(violation_observer_callback) - SEND_SIGNAL(violation_observer_callback.parent, COMSIG_SEEN_MASQUERADE_VIOLATION, source) diff --git a/modular_darkpack/modules/masquerade/code/subsystem/masquerade.dm b/modular_darkpack/modules/masquerade/code/subsystem/masquerade.dm index 38e329cfa188..9bb5ed94fd12 100644 --- a/modular_darkpack/modules/masquerade/code/subsystem/masquerade.dm +++ b/modular_darkpack/modules/masquerade/code/subsystem/masquerade.dm @@ -45,11 +45,10 @@ SUBSYSTEM_DEF(masquerade) * player_breacher - The player which caused the masquerade breach. * reason - Optional, the reason for the breach. For example, */ -/datum/controller/subsystem/masquerade/proc/masquerade_reinforce(atom/source, mob/living/player_breacher, reason) +/datum/controller/subsystem/masquerade/proc/masquerade_reinforce(atom/source, mob/living/player_breacher) . = FALSE for(var/masquerade_breach in masquerade_breachers) var/breach_sources = masquerade_breach[2] - var/breach_reasons = masquerade_breach[3] var/source_matches = FALSE // breach_sources can be a list if there is more than one blood skull, handle for that @@ -58,17 +57,12 @@ SUBSYSTEM_DEF(masquerade) else source_matches = (source == breach_sources) - if(source_matches || reason == "debug") - if(!reason || (reason in masquerade_breach) || (reason == MASQUERADE_REASON_PREFERENCES) || (reason == "debug")) - // Only require blood hunt skull for "Preferences" (round-persistent) breaches - if(breach_reasons == MASQUERADE_REASON_PREFERENCES && !istype(source, /obj/item/blood_hunt)) - continue - - masquerade_breachers -= list(masquerade_breach) - masquerade_level = min(MASQUERADE_MAX_LEVEL, masquerade_level + 1) - player_breacher.masquerade_score = min(5, player_breacher.masquerade_score + 1) - . = TRUE - break + if(source_matches) + masquerade_breachers -= list(masquerade_breach) + masquerade_level = min(MASQUERADE_MAX_LEVEL, masquerade_level + 1) + player_breacher.masquerade_score = min(5, player_breacher.masquerade_score + 1) + . = TRUE + break if(player_breacher.masquerade_score == 5) //Doesn't matter if they weren't in one of these lists. GLOB.veil_breakers_list -= player_breacher GLOB.masquerade_breakers_list -= player_breacher diff --git a/tgstation.dme b/tgstation.dme index 115998a78e88..09a296d947fc 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -7697,7 +7697,6 @@ #include "modular_darkpack\modules\masquerade\code\word_checker.dm" #include "modular_darkpack\modules\masquerade\code\components\masquerade_hud.dm" #include "modular_darkpack\modules\masquerade\code\components\violation_observer.dm" -#include "modular_darkpack\modules\masquerade\code\fields\violation_check_aoe.dm" #include "modular_darkpack\modules\masquerade\code\subsystem\bloodhunt.dm" #include "modular_darkpack\modules\masquerade\code\subsystem\masquerade.dm" #include "modular_darkpack\modules\matrix\code\job.dm" From 342aea7b22216e82eec8168e4c0f540c6698adec Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Fri, 14 Aug 2026 00:19:55 -0400 Subject: [PATCH 02/21] removing reason --- .../masquerade/code/components/violation_observer.dm | 8 ++++---- .../modules/masquerade/code/subsystem/masquerade.dm | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index 243fee33a8f6..2ebb6b433ba9 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -18,7 +18,7 @@ breached_players = null UnregisterSignal(parent, list(COMSIG_SEEN_MASQUERADE_VIOLATION, COMSIG_MASQUERADE_REINFORCE, COMSIG_LIVING_DEATH, COMSIG_ALL_MASQUERADE_REINFORCE)) -/datum/component/violation_observer/proc/on_observed_violation(atom/source, mob/living/player_breacher) +/atom/proc/on_observed_violation(atom/source, mob/living/player_breacher) SIGNAL_HANDLER if(!source || !player_breacher || ismundane(player_breacher)) //Humans cant break the masquerade. Because reasons. @@ -44,7 +44,7 @@ return TRUE -/datum/component/violation_observer/proc/on_masquerade_violation_reinforced(atom/source, mob/living/player_breacher) +/atom/proc/on_masquerade_violation_reinforced(atom/source, mob/living/player_breacher) SIGNAL_HANDLER if(player_breacher in breached_players) @@ -56,7 +56,7 @@ return TRUE -/datum/component/violation_observer/proc/on_death(atom/source) +/atom/proc/on_death(atom/source) SIGNAL_HANDLER for(var/player_breacher in breached_players) @@ -66,7 +66,7 @@ breached_players -= player_breacher UnregisterSignal(player_breacher, COMSIG_LIVING_DEATH) -/datum/component/violation_observer/proc/on_breacher_death(mob/living/dead_breacher, gibbed) +/atom/proc/on_breacher_death(mob/living/dead_breacher, gibbed) SIGNAL_HANDLER if(dead_breacher in breached_players) diff --git a/modular_darkpack/modules/masquerade/code/subsystem/masquerade.dm b/modular_darkpack/modules/masquerade/code/subsystem/masquerade.dm index 9bb5ed94fd12..c42f751f8bc2 100644 --- a/modular_darkpack/modules/masquerade/code/subsystem/masquerade.dm +++ b/modular_darkpack/modules/masquerade/code/subsystem/masquerade.dm @@ -84,13 +84,13 @@ SUBSYSTEM_DEF(masquerade) * player_breacher - The player which caused the masquerade breach. * reason - The reason for the breach. For example, */ -/datum/controller/subsystem/masquerade/proc/masquerade_breach(atom/source, mob/living/player_breacher, reason) - log_game("[player_breacher] has caused a masquerade breach in front of [source] by [reason]") +/datum/controller/subsystem/masquerade/proc/masquerade_breach(atom/source, mob/living/player_breacher) + log_game("[player_breacher] has caused a masquerade breach in front of [source]") var/pre_breach_score = player_breacher.masquerade_score if(pre_breach_score == 0) return player_breacher.masquerade_score = max(0, player_breacher.masquerade_score - 1) - masquerade_breachers += list(list(player_breacher, source, reason)) + masquerade_breachers += list(list(player_breacher, source)) if(get_vampire_splat(player_breacher)) GLOB.masquerade_breakers_list |= player_breacher GLOB.supernatural_breakers_list |= player_breacher @@ -155,7 +155,7 @@ SUBSYSTEM_DEF(masquerade) var/list/masquerade_breach_list = masquerade_breach if(islist(masquerade_breach_list[2])) //If its the skull list, then its a long term masq breach. Clear it. for(var/atom/list_object as anything in masquerade_breach_list[2]) - SSmasquerade.masquerade_reinforce(list_object, masquerade_breach_list[1], MASQUERADE_REASON_PREFERENCES) + SSmasquerade.masquerade_reinforce(list_object, masquerade_breach_list[1]) return else var/atom/object = masquerade_breach_list[2] @@ -177,7 +177,7 @@ SUBSYSTEM_DEF(masquerade) var/list/masquerade_breach_list = masquerade_breach if(islist(masquerade_breach_list[2])) //If its the skull list, then its a long term masq breach. Clear it. for(var/atom/list_object as anything in masquerade_breach_list[2]) - SSmasquerade.masquerade_reinforce(list_object, masquerade_breach_list[1], MASQUERADE_REASON_PREFERENCES) + SSmasquerade.masquerade_reinforce(list_object, masquerade_breach_list[1]) else var/atom/object = masquerade_breach_list[2] SEND_SIGNAL(object, COMSIG_ALL_MASQUERADE_REINFORCE) From c7ab7922fd180ba26854e4cbe8c7547d00bac1e9 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Fri, 14 Aug 2026 15:14:00 -0400 Subject: [PATCH 03/21] Update violation_observer.dm --- .../code/components/violation_observer.dm | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index 2ebb6b433ba9..d702793e21be 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -38,7 +38,6 @@ animate(exclamation, pixel_z = 32, alpha = 255, time = 0.5 SECONDS, easing = ELASTIC_EASING) source.AddComponent(/datum/component/masquerade_hud, player_breacher) - breached_players += player_breacher SSmasquerade.masquerade_breach(source, player_breacher, (isliving(source) ? MASQUERADE_REASON_NPC : MASQUERADE_REASON_OBJECT)) RegisterSignal(player_breacher, COMSIG_LIVING_DEATH, PROC_REF(on_breacher_death)) @@ -47,34 +46,40 @@ /atom/proc/on_masquerade_violation_reinforced(atom/source, mob/living/player_breacher) SIGNAL_HANDLER - if(player_breacher in breached_players) - SEND_SIGNAL(source, COMSIG_MASQUERADE_HUD_DELETE, player_breacher) - SSmasquerade.masquerade_reinforce(source, player_breacher) - source.observe_masquerade_reinforce(player_breacher) - breached_players -= player_breacher + for(var/breach in SSmasquerade.masquerade_breachers) + if(breach[1] != player_breacher) + continue + if(breach[2] != src) + continue + SEND_SIGNAL(src, COMSIG_MASQUERADE_HUD_DELETE, player_breacher) + SSmasquerade.masquerade_reinforce(src, player_breacher) + src.observe_masquerade_reinforce(player_breacher) UnregisterSignal(player_breacher, COMSIG_LIVING_DEATH) return TRUE -/atom/proc/on_death(atom/source) +/atom/proc/on_death() SIGNAL_HANDLER - for(var/player_breacher in breached_players) - SEND_SIGNAL(source, COMSIG_MASQUERADE_HUD_DELETE, player_breacher) - SSmasquerade.masquerade_reinforce(source, player_breacher) - source.observe_masquerade_reinforce(player_breacher) - breached_players -= player_breacher + for(var/breach in SSmasquerade.masquerade_breachers) + var/mob/living/player_breacher = breach[1] + var/atom/breach_witness = breach[2] + if(breach_witness != src) + continue + SEND_SIGNAL(src, COMSIG_MASQUERADE_HUD_DELETE, player_breacher) + SSmasquerade.masquerade_reinforce(src, player_breacher) + observe_masquerade_reinforce(player_breacher) UnregisterSignal(player_breacher, COMSIG_LIVING_DEATH) /atom/proc/on_breacher_death(mob/living/dead_breacher, gibbed) SIGNAL_HANDLER - if(dead_breacher in breached_players) - var/atom/parent_atom = parent - SEND_SIGNAL(parent, COMSIG_MASQUERADE_HUD_DELETE, dead_breacher) - SSmasquerade.masquerade_reinforce(parent, dead_breacher) - parent_atom.observe_masquerade_reinforce(dead_breacher) - breached_players -= dead_breacher + for(var/breach in SSmasquerade.masquerade_breachers) + if(breach[1] != dead_breacher) + continue + SEND_SIGNAL(src, COMSIG_MASQUERADE_HUD_DELETE, dead_breacher) + SSmasquerade.masquerade_reinforce(src, dead_breacher) + observe_masquerade_reinforce(dead_breacher) UnregisterSignal(dead_breacher, COMSIG_LIVING_DEATH) /atom/proc/observe_masquerade_violation(player_breacher) From bd9e2e8b700bbb9214e0fdf9e95df480cb5044e2 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Fri, 14 Aug 2026 16:10:05 -0400 Subject: [PATCH 04/21] Update violation_observer.dm --- .../modules/masquerade/code/components/violation_observer.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index d702793e21be..e9c2d232fb19 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -18,6 +18,8 @@ breached_players = null UnregisterSignal(parent, list(COMSIG_SEEN_MASQUERADE_VIOLATION, COMSIG_MASQUERADE_REINFORCE, COMSIG_LIVING_DEATH, COMSIG_ALL_MASQUERADE_REINFORCE)) + +// violate. sent by comsig_masquerade_violation, checks for mob/living/carbon/human/npc /atom/proc/on_observed_violation(atom/source, mob/living/player_breacher) SIGNAL_HANDLER From fd38c231314a87551a3858f7787685bc06d7a01c Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Sat, 15 Aug 2026 19:27:05 -0400 Subject: [PATCH 05/21] just pulling the trigger... --- .../code/components/violation_observer.dm | 33 +++++++------------ 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index e9c2d232fb19..05383594d1d7 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -1,23 +1,14 @@ -// Used for things that detect masquerade violations. -// Usually NPCs or cameras. -/datum/component/violation_observer - dupe_mode = COMPONENT_DUPE_UNIQUE - /// Time between us checking for violations - COOLDOWN_DECLARE(scan_cooldown) - var/list/breached_players - -/datum/component/violation_observer/Initialize(add_area_of_effect) //Only add the AOE checker for NPCs and camera objects. - breached_players = new() - -/datum/component/violation_observer/RegisterWithParent() - RegisterSignal(parent, COMSIG_SEEN_MASQUERADE_VIOLATION, PROC_REF(on_observed_violation)) - RegisterSignal(parent, COMSIG_MASQUERADE_REINFORCE, PROC_REF(on_masquerade_violation_reinforced)) - RegisterSignals(parent, list(COMSIG_LIVING_DEATH, COMSIG_ALL_MASQUERADE_REINFORCE), PROC_REF(on_death)) - -/datum/component/violation_observer/UnregisterFromParent(force, silent) - breached_players = null - UnregisterSignal(parent, list(COMSIG_SEEN_MASQUERADE_VIOLATION, COMSIG_MASQUERADE_REINFORCE, COMSIG_LIVING_DEATH, COMSIG_ALL_MASQUERADE_REINFORCE)) - +/atom + var/violation_observer = FALSE + +/atom/proc/toggle_masquerade_sensitivity() + violation_observer = !violation_observer + if(violation_observer) + RegisterSignal(src, COMSIG_SEEN_MASQUERADE_VIOLATION, PROC_REF(on_observed_violation)) + RegisterSignal(src, COMSIG_MASQUERADE_REINFORCE, PROC_REF(on_masquerade_violation_reinforced)) + RegisterSignals(src, list(COMSIG_LIVING_DEATH, COMSIG_ALL_MASQUERADE_REINFORCE), PROC_REF(on_masquerade_witness_death)) + else + UnregisterSignal(src, list(COMSIG_SEEN_MASQUERADE_VIOLATION, COMSIG_MASQUERADE_REINFORCE, COMSIG_LIVING_DEATH, COMSIG_ALL_MASQUERADE_REINFORCE)) // violate. sent by comsig_masquerade_violation, checks for mob/living/carbon/human/npc /atom/proc/on_observed_violation(atom/source, mob/living/player_breacher) @@ -60,7 +51,7 @@ return TRUE -/atom/proc/on_death() +/atom/proc/on_masquerade_witness_death() SIGNAL_HANDLER for(var/breach in SSmasquerade.masquerade_breachers) From 7a7a0577b179d1d35f05ebe1d6840e36e71cb3e2 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Sat, 15 Aug 2026 19:53:02 -0400 Subject: [PATCH 06/21] for now --- .../modules/bodycameras/code/bodycamera.dm | 11 +++-------- .../modules/masquerade/code/blood_hunt_skull.dm | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/modular_darkpack/modules/bodycameras/code/bodycamera.dm b/modular_darkpack/modules/bodycameras/code/bodycamera.dm index 7bd499ea3509..9740a046fdb0 100644 --- a/modular_darkpack/modules/bodycameras/code/bodycamera.dm +++ b/modular_darkpack/modules/bodycameras/code/bodycamera.dm @@ -1,3 +1,4 @@ + /** * Bodycamera Upgrade * @@ -21,10 +22,6 @@ var/obj/machinery/camera/bodycamera/builtin_bodycamera var/static/mutable_appearance/equipped_overlay = mutable_appearance('modular_darkpack/modules/bodycameras/icons/bodycamera_overlay.dmi', "bodycamera") -/obj/item/bodycam_upgrade/Initialize(mapload) - . = ..() - AddComponent(/datum/component/violation_observer, FALSE) - /obj/item/bodycam_upgrade/examine_more(mob/user) . = ..() . += list(span_notice("You can use [name] on any outerwear to install it, automatically turning on if the outerwear is equipped.")) @@ -107,10 +104,9 @@ playsound(loc, 'sound/machines/beep/beep.ogg', get_clamped_volume(), TRUE, -1) builtin_bodycamera.network = network //sync the network of the camera to us, the upgrade. builtin_bodycamera.camera_enabled = TRUE - var/datum/component/violation_observer/violation_component = src.GetComponent(/datum/component/violation_observer) var/obj/item/clothing = loc var/mob/living/carbon/wearer = iscarbon(clothing.loc) // interacting_with_atom forces us to be on an /obj/item/clothing on a mob - violation_component.toggle_area_of_effect(wearer) + wearer.toggle_masquerade_sensitivity() log_game("BODYCAM TOGGLE: [(user ? key_name(user) : "SYSTEM")] turned ON [src] ([builtin_bodycamera.c_tag]) at [loc_name(src)].") ///Turns the camera off. Will be silent if 'user' is null. @@ -120,8 +116,7 @@ playsound(loc, 'sound/machines/beep/beep.ogg', get_clamped_volume(), TRUE, -1) if(builtin_bodycamera) builtin_bodycamera.camera_enabled = FALSE - var/datum/component/violation_observer/violation_component = src.GetComponent(/datum/component/violation_observer) - violation_component.toggle_area_of_effect() + wearer.toggle_masquerade_sensitivity() log_game("BODYCAM TOGGLE: [(user ? key_name(user) : "SYSTEM")] turned OFF [src] at [loc_name(src)].") /** diff --git a/modular_darkpack/modules/masquerade/code/blood_hunt_skull.dm b/modular_darkpack/modules/masquerade/code/blood_hunt_skull.dm index 5402893aa83e..f25bb3de2b85 100644 --- a/modular_darkpack/modules/masquerade/code/blood_hunt_skull.dm +++ b/modular_darkpack/modules/masquerade/code/blood_hunt_skull.dm @@ -17,7 +17,6 @@ . = ..() REGISTER_REQUIRED_MAP_ITEM(1, 1) GLOB.blood_hunt_announcers += src - AddComponent(/datum/component/violation_observer, FALSE) /obj/item/blood_hunt/Destroy(force) GLOB.blood_hunt_announcers -= src From c700d94c442bf268fd50c146dfa717e51279fb04 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Sat, 15 Aug 2026 20:05:58 -0400 Subject: [PATCH 07/21] HEAVY ON THE FOR NOW. --- modular_darkpack/modules/bodycameras/code/bodycamera.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modular_darkpack/modules/bodycameras/code/bodycamera.dm b/modular_darkpack/modules/bodycameras/code/bodycamera.dm index 9740a046fdb0..2d1834e756ab 100644 --- a/modular_darkpack/modules/bodycameras/code/bodycamera.dm +++ b/modular_darkpack/modules/bodycameras/code/bodycamera.dm @@ -21,6 +21,8 @@ ///The camera itself, made when we need it and deleted on Destroy. Installed into the clothing item directly. var/obj/machinery/camera/bodycamera/builtin_bodycamera var/static/mutable_appearance/equipped_overlay = mutable_appearance('modular_darkpack/modules/bodycameras/icons/bodycamera_overlay.dmi', "bodycamera") + // the guy wearing it , temporary var until i figure out something better + var/mob/living/carbon/wearer /obj/item/bodycam_upgrade/examine_more(mob/user) . = ..() @@ -105,7 +107,9 @@ builtin_bodycamera.network = network //sync the network of the camera to us, the upgrade. builtin_bodycamera.camera_enabled = TRUE var/obj/item/clothing = loc - var/mob/living/carbon/wearer = iscarbon(clothing.loc) // interacting_with_atom forces us to be on an /obj/item/clothing on a mob + if(!iscarbon(clothing.loc)) + return + wearer = clothing.loc // interacting_with_atom forces us to be on an /obj/item/clothing on a mob wearer.toggle_masquerade_sensitivity() log_game("BODYCAM TOGGLE: [(user ? key_name(user) : "SYSTEM")] turned ON [src] ([builtin_bodycamera.c_tag]) at [loc_name(src)].") @@ -117,6 +121,7 @@ if(builtin_bodycamera) builtin_bodycamera.camera_enabled = FALSE wearer.toggle_masquerade_sensitivity() + wearer = null log_game("BODYCAM TOGGLE: [(user ? key_name(user) : "SYSTEM")] turned OFF [src] at [loc_name(src)].") /** From 9660a805b36c4030143d89ff00499e8636a3bbef Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Thu, 20 Aug 2026 21:19:34 -0400 Subject: [PATCH 08/21] ok now for npcs --- .../code/modules/mob/living/carbon/human/initialize.dm | 1 - .../master_files/code/modules/mob/living/living.dm | 2 +- .../masquerade/code/components/violation_observer.dm | 10 ++++++++-- modular_darkpack/modules/phones/code/_phone.dm | 1 - modular_darkpack/modules/phones/code/phone_procs.dm | 2 ++ 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/modular_darkpack/master_files/code/modules/mob/living/carbon/human/initialize.dm b/modular_darkpack/master_files/code/modules/mob/living/carbon/human/initialize.dm index 73c76af769fd..f5bfc09a7ecb 100644 --- a/modular_darkpack/master_files/code/modules/mob/living/carbon/human/initialize.dm +++ b/modular_darkpack/master_files/code/modules/mob/living/carbon/human/initialize.dm @@ -3,7 +3,6 @@ //Initializes Jumping on the player AddComponent(/datum/component/jumper) - AddComponent(/datum/component/violation_observer, violation_aoe) if(CONFIG_GET(flag/swing_combat)) AddElement(/datum/element/swing_attack) else if(CONFIG_GET(flag/directional_combat)) diff --git a/modular_darkpack/master_files/code/modules/mob/living/living.dm b/modular_darkpack/master_files/code/modules/mob/living/living.dm index a7f4545027d2..5938c2c4edb9 100644 --- a/modular_darkpack/master_files/code/modules/mob/living/living.dm +++ b/modular_darkpack/master_files/code/modules/mob/living/living.dm @@ -3,7 +3,7 @@ storyteller_stats = create_new_stat_prefs(storyteller_stats) become_area_sensitive(ZONE_TRAIT) update_zone_hud(src, get_area(src)) // AREAS - (Zone hud) - RegisterSignal(src, COMSIG_MASQUERADE_VIOLATION, PROC_REF(on_masquerade_violation)) + RegisterSignal(src, COMSIG_MASQUERADE_VIOLATION, TYPE_PROC_REF(/atom/movable, on_masquerade_violation)) /mob/living/Destroy(force) storyteller_stats = null diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index 05383594d1d7..75ccb6cc8732 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -1,7 +1,7 @@ -/atom +/atom/movable var/violation_observer = FALSE -/atom/proc/toggle_masquerade_sensitivity() +/atom/movable/proc/toggle_masquerade_sensitivity() violation_observer = !violation_observer if(violation_observer) RegisterSignal(src, COMSIG_SEEN_MASQUERADE_VIOLATION, PROC_REF(on_observed_violation)) @@ -11,6 +11,12 @@ UnregisterSignal(src, list(COMSIG_SEEN_MASQUERADE_VIOLATION, COMSIG_MASQUERADE_REINFORCE, COMSIG_LIVING_DEATH, COMSIG_ALL_MASQUERADE_REINFORCE)) // violate. sent by comsig_masquerade_violation, checks for mob/living/carbon/human/npc +/atom/movable/proc/on_masquerade_violation() + for(var/atom/movable/moving_atom in orange(7, loc)) + if(!violation_observer) + continue + SEND_SIGNAL(moving_atom, COMSIG_SEEN_MASQUERADE_VIOLATION, src) + /atom/proc/on_observed_violation(atom/source, mob/living/player_breacher) SIGNAL_HANDLER diff --git a/modular_darkpack/modules/phones/code/_phone.dm b/modular_darkpack/modules/phones/code/_phone.dm index 324235d8ba13..b9a92caeafe9 100644 --- a/modular_darkpack/modules/phones/code/_phone.dm +++ b/modular_darkpack/modules/phones/code/_phone.dm @@ -81,7 +81,6 @@ wiki_book = new() become_hearing_sensitive(ROUNDSTART_TRAIT) RegisterSignal(src, COMSIG_MOVABLE_HEAR, PROC_REF(handle_hearing)) - AddComponent(/datum/component/violation_observer, FALSE) phone_background = "BG_[rand(1,18)]" // pick a random phone background when spawned /obj/item/smartphone/proc/update_initialized_contacts() diff --git a/modular_darkpack/modules/phones/code/phone_procs.dm b/modular_darkpack/modules/phones/code/phone_procs.dm index db3423e400a0..314f1bd1f98d 100644 --- a/modular_darkpack/modules/phones/code/phone_procs.dm +++ b/modular_darkpack/modules/phones/code/phone_procs.dm @@ -195,6 +195,7 @@ set_phone_state(PHONE_IN_CALL) calling_smartphone.set_phone_state(PHONE_IN_CALL) + toggle_masquerade_sensitivity() phone_radio.canhear_range = 1 calling_smartphone.phone_radio.canhear_range = 1 muted = FALSE @@ -222,6 +223,7 @@ // Set proper phone state. set_phone_state(PHONE_AVAILABLE) calling_smartphone.set_phone_state(PHONE_AVAILABLE) + toggle_masquerade_sensitivity() // Internal only proc, used for setting a phone's internal radio. /obj/item/smartphone/proc/set_phone_radio(enabled) From 0e6fcc5b66c56efb5cfbfd34a0105b4ab92ca4a5 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Thu, 20 Aug 2026 21:22:51 -0400 Subject: [PATCH 09/21] here we go --- .../modules/masquerade/code/components/violation_observer.dm | 3 +++ modular_darkpack/modules/npc/code/human/__npc.dm | 2 ++ 2 files changed, 5 insertions(+) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index 75ccb6cc8732..db9ba1005b62 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -12,6 +12,9 @@ // violate. sent by comsig_masquerade_violation, checks for mob/living/carbon/human/npc /atom/movable/proc/on_masquerade_violation() + var/area/breacher_area = get_area(src) + if(breacher_area.zone_type != ZONE_MASQUERADE) + return for(var/atom/movable/moving_atom in orange(7, loc)) if(!violation_observer) continue diff --git a/modular_darkpack/modules/npc/code/human/__npc.dm b/modular_darkpack/modules/npc/code/human/__npc.dm index 7a5625e2ef01..1fb6298a65e0 100644 --- a/modular_darkpack/modules/npc/code/human/__npc.dm +++ b/modular_darkpack/modules/npc/code/human/__npc.dm @@ -90,6 +90,8 @@ RegisterSignal(src, COMSIG_LIVING_MOB_BUMPED, PROC_REF(handle_bumped)) // Be annoyed if helped RegisterSignal(src, COMSIG_CARBON_HELP_ACT, PROC_REF(handle_helped)) + //all npcs are masquerade violators by default so flip it to true + toggle_masquerade_sensitivity() return INITIALIZE_HINT_LATELOAD /mob/living/carbon/human/npc/LateInitialize(mapload) From 863cc7a04e210da68652a4cdebf72f2481b18568 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Thu, 20 Aug 2026 21:57:34 -0400 Subject: [PATCH 10/21] more commitz --- .../masquerade/code/components/violation_observer.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index db9ba1005b62..bf59b11c8006 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -12,11 +12,13 @@ // violate. sent by comsig_masquerade_violation, checks for mob/living/carbon/human/npc /atom/movable/proc/on_masquerade_violation() - var/area/breacher_area = get_area(src) + var/area/vtm/breacher_area = get_area(src) + if(!istype(breacher_area, /area/vtm)) + return if(breacher_area.zone_type != ZONE_MASQUERADE) return for(var/atom/movable/moving_atom in orange(7, loc)) - if(!violation_observer) + if(!moving_atom.violation_observer) continue SEND_SIGNAL(moving_atom, COMSIG_SEEN_MASQUERADE_VIOLATION, src) From 1db8c5756d8f6ea8901f0eda7c30c9b31ce4fba5 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Thu, 20 Aug 2026 22:11:42 -0400 Subject: [PATCH 11/21] view() instead of orange()? --- .../modules/masquerade/code/components/violation_observer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index bf59b11c8006..b9d34b0fab5a 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -17,7 +17,7 @@ return if(breacher_area.zone_type != ZONE_MASQUERADE) return - for(var/atom/movable/moving_atom in orange(7, loc)) + for(var/atom/movable/moving_atom in view(7, loc)) if(!moving_atom.violation_observer) continue SEND_SIGNAL(moving_atom, COMSIG_SEEN_MASQUERADE_VIOLATION, src) From ee6cd2560c9010eae1dbdec2c5a90cbd27ae74a8 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Thu, 20 Aug 2026 22:28:37 -0400 Subject: [PATCH 12/21] Update violation_observer.dm --- .../modules/masquerade/code/components/violation_observer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index b9d34b0fab5a..be102b3e9164 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -43,7 +43,7 @@ source.AddComponent(/datum/component/masquerade_hud, player_breacher) SSmasquerade.masquerade_breach(source, player_breacher, (isliving(source) ? MASQUERADE_REASON_NPC : MASQUERADE_REASON_OBJECT)) - RegisterSignal(player_breacher, COMSIG_LIVING_DEATH, PROC_REF(on_breacher_death)) + RegisterSignal(player_breacher, COMSIG_LIVING_DEATH, PROC_REF(on_breacher_death), override = TRUE) // override is for breaching multiple times on the same violation observer - on_breacher_death handles all violations, not just the breach created here return TRUE From 38a725d0b7001ca77c0cd89e03f26d64d8cedfb3 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Thu, 20 Aug 2026 22:34:08 -0400 Subject: [PATCH 13/21] clarifying the comment --- .../modules/masquerade/code/components/violation_observer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index be102b3e9164..4e185bbd2496 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -43,7 +43,7 @@ source.AddComponent(/datum/component/masquerade_hud, player_breacher) SSmasquerade.masquerade_breach(source, player_breacher, (isliving(source) ? MASQUERADE_REASON_NPC : MASQUERADE_REASON_OBJECT)) - RegisterSignal(player_breacher, COMSIG_LIVING_DEATH, PROC_REF(on_breacher_death), override = TRUE) // override is for breaching multiple times on the same violation observer - on_breacher_death handles all violations, not just the breach created here + RegisterSignal(player_breacher, COMSIG_LIVING_DEATH, PROC_REF(on_breacher_death), override = TRUE) // override is for breaching multiple times on the same violation observer - on_breacher_death handles all violations, not just the breach created here, so we only need one register return TRUE From 6a6eb771fc63e958470d2939432f4c3f7bb2fd17 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Fri, 21 Aug 2026 00:36:52 -0400 Subject: [PATCH 14/21] Update violation_observer.dm --- .../code/components/violation_observer.dm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index 4e185bbd2496..1510de2aedc7 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -10,7 +10,6 @@ else UnregisterSignal(src, list(COMSIG_SEEN_MASQUERADE_VIOLATION, COMSIG_MASQUERADE_REINFORCE, COMSIG_LIVING_DEATH, COMSIG_ALL_MASQUERADE_REINFORCE)) -// violate. sent by comsig_masquerade_violation, checks for mob/living/carbon/human/npc /atom/movable/proc/on_masquerade_violation() var/area/vtm/breacher_area = get_area(src) if(!istype(breacher_area, /area/vtm)) @@ -22,7 +21,7 @@ continue SEND_SIGNAL(moving_atom, COMSIG_SEEN_MASQUERADE_VIOLATION, src) -/atom/proc/on_observed_violation(atom/source, mob/living/player_breacher) +/atom/movable/proc/on_observed_violation(atom/source, mob/living/player_breacher) SIGNAL_HANDLER if(!source || !player_breacher || ismundane(player_breacher)) //Humans cant break the masquerade. Because reasons. @@ -47,7 +46,7 @@ return TRUE -/atom/proc/on_masquerade_violation_reinforced(atom/source, mob/living/player_breacher) +/atom/movable/proc/on_masquerade_violation_reinforced(atom/source, mob/living/player_breacher) SIGNAL_HANDLER for(var/breach in SSmasquerade.masquerade_breachers) @@ -62,7 +61,7 @@ return TRUE -/atom/proc/on_masquerade_witness_death() +/atom/movable/proc/on_masquerade_witness_death() SIGNAL_HANDLER for(var/breach in SSmasquerade.masquerade_breachers) @@ -75,7 +74,7 @@ observe_masquerade_reinforce(player_breacher) UnregisterSignal(player_breacher, COMSIG_LIVING_DEATH) -/atom/proc/on_breacher_death(mob/living/dead_breacher, gibbed) +/atom/movable/proc/on_breacher_death(mob/living/dead_breacher, gibbed) SIGNAL_HANDLER for(var/breach in SSmasquerade.masquerade_breachers) @@ -86,7 +85,7 @@ observe_masquerade_reinforce(dead_breacher) UnregisterSignal(dead_breacher, COMSIG_LIVING_DEATH) -/atom/proc/observe_masquerade_violation(player_breacher) +/atom/movable/proc/observe_masquerade_violation(player_breacher) do_alert_animation() if(get_werewolf_splat(player_breacher)) to_chat(player_breacher, span_userdanger(span_bold("VEIL VIOLATION"))) @@ -95,7 +94,7 @@ playsound(player_breacher, 'modular_darkpack/modules/masquerade/sound/masquerade_violation.ogg', 50, FALSE, -5) to_chat(player_breacher, span_userdanger(span_bold("MASQUERADE VIOLATION"))) -/atom/proc/observe_masquerade_reinforce(player_breacher) +/atom/movable/proc/observe_masquerade_reinforce(player_breacher) if(get_werewolf_splat(player_breacher)) to_chat(player_breacher, span_big(span_boldnicegreen("VEIL REINFORCED"))) playsound(player_breacher, 'modular_darkpack/modules/masquerade/sound/humanity_gain.ogg', 50, FALSE, -5) From 5168c31de767b4815dc297509042684ffeeafe3e Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Fri, 21 Aug 2026 00:51:39 -0400 Subject: [PATCH 15/21] Update violation_observer.dm --- .../modules/masquerade/code/components/violation_observer.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index 1510de2aedc7..fcac40e7610e 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -85,7 +85,7 @@ observe_masquerade_reinforce(dead_breacher) UnregisterSignal(dead_breacher, COMSIG_LIVING_DEATH) -/atom/movable/proc/observe_masquerade_violation(player_breacher) +/atom/proc/observe_masquerade_violation(player_breacher) do_alert_animation() if(get_werewolf_splat(player_breacher)) to_chat(player_breacher, span_userdanger(span_bold("VEIL VIOLATION"))) @@ -94,7 +94,7 @@ playsound(player_breacher, 'modular_darkpack/modules/masquerade/sound/masquerade_violation.ogg', 50, FALSE, -5) to_chat(player_breacher, span_userdanger(span_bold("MASQUERADE VIOLATION"))) -/atom/movable/proc/observe_masquerade_reinforce(player_breacher) +/atom/proc/observe_masquerade_reinforce(player_breacher) if(get_werewolf_splat(player_breacher)) to_chat(player_breacher, span_big(span_boldnicegreen("VEIL REINFORCED"))) playsound(player_breacher, 'modular_darkpack/modules/masquerade/sound/humanity_gain.ogg', 50, FALSE, -5) From fb2e25cc6a12e99faf87795338496703a06e1861 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Fri, 21 Aug 2026 01:04:37 -0400 Subject: [PATCH 16/21] Update phone_procs.dm --- modular_darkpack/modules/phones/code/phone_procs.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modular_darkpack/modules/phones/code/phone_procs.dm b/modular_darkpack/modules/phones/code/phone_procs.dm index 314f1bd1f98d..726f78415a67 100644 --- a/modular_darkpack/modules/phones/code/phone_procs.dm +++ b/modular_darkpack/modules/phones/code/phone_procs.dm @@ -196,6 +196,8 @@ calling_smartphone.set_phone_state(PHONE_IN_CALL) toggle_masquerade_sensitivity() + calling_smartphone.toggle_masquerade_sensitivity() + phone_radio.canhear_range = 1 calling_smartphone.phone_radio.canhear_range = 1 muted = FALSE From f4e5aedd9281c3a7d4addb976bb936b3864ba74f Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Fri, 21 Aug 2026 01:05:25 -0400 Subject: [PATCH 17/21] Update bodycamera.dm --- modular_darkpack/modules/bodycameras/code/bodycamera.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/modular_darkpack/modules/bodycameras/code/bodycamera.dm b/modular_darkpack/modules/bodycameras/code/bodycamera.dm index 2d1834e756ab..dd82bbd4ecc1 100644 --- a/modular_darkpack/modules/bodycameras/code/bodycamera.dm +++ b/modular_darkpack/modules/bodycameras/code/bodycamera.dm @@ -1,4 +1,3 @@ - /** * Bodycamera Upgrade * From b627c2d97ed5b2bccdfcecb82a53c5e55ca732f1 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Fri, 21 Aug 2026 01:20:40 -0400 Subject: [PATCH 18/21] arg for toggle masquerade sens --- .../modules/bodycameras/code/bodycamera.dm | 4 ++-- .../code/components/violation_observer.dm | 13 +++++++++++-- modular_darkpack/modules/npc/code/human/__npc.dm | 2 +- modular_darkpack/modules/phones/code/phone_procs.dm | 10 +++++++--- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/modular_darkpack/modules/bodycameras/code/bodycamera.dm b/modular_darkpack/modules/bodycameras/code/bodycamera.dm index dd82bbd4ecc1..f4d4bc771da9 100644 --- a/modular_darkpack/modules/bodycameras/code/bodycamera.dm +++ b/modular_darkpack/modules/bodycameras/code/bodycamera.dm @@ -109,7 +109,7 @@ if(!iscarbon(clothing.loc)) return wearer = clothing.loc // interacting_with_atom forces us to be on an /obj/item/clothing on a mob - wearer.toggle_masquerade_sensitivity() + wearer.toggle_masquerade_sensitivity(TRUE) log_game("BODYCAM TOGGLE: [(user ? key_name(user) : "SYSTEM")] turned ON [src] ([builtin_bodycamera.c_tag]) at [loc_name(src)].") ///Turns the camera off. Will be silent if 'user' is null. @@ -119,7 +119,7 @@ playsound(loc, 'sound/machines/beep/beep.ogg', get_clamped_volume(), TRUE, -1) if(builtin_bodycamera) builtin_bodycamera.camera_enabled = FALSE - wearer.toggle_masquerade_sensitivity() + wearer.toggle_masquerade_sensitivity(FALSE) wearer = null log_game("BODYCAM TOGGLE: [(user ? key_name(user) : "SYSTEM")] turned OFF [src] at [loc_name(src)].") diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index fcac40e7610e..9e95a3672f85 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -1,8 +1,17 @@ /atom/movable var/violation_observer = FALSE -/atom/movable/proc/toggle_masquerade_sensitivity() - violation_observer = !violation_observer +/atom/movable/proc/toggle_masquerade_sensitivity(new_listening_state) + // don't proceed if we're toggling to TRUE on something already listening + if(!isnull(new_listening_state) && new_listening_state == violation_observer) + return + + // if we don't pass an arg just flip the switch + if(isnull(new_listening_state)) + violation_observer = !violation_observer + else + violation_observer = new_listening_state + if(violation_observer) RegisterSignal(src, COMSIG_SEEN_MASQUERADE_VIOLATION, PROC_REF(on_observed_violation)) RegisterSignal(src, COMSIG_MASQUERADE_REINFORCE, PROC_REF(on_masquerade_violation_reinforced)) diff --git a/modular_darkpack/modules/npc/code/human/__npc.dm b/modular_darkpack/modules/npc/code/human/__npc.dm index 1fb6298a65e0..dd10e1f09d6c 100644 --- a/modular_darkpack/modules/npc/code/human/__npc.dm +++ b/modular_darkpack/modules/npc/code/human/__npc.dm @@ -91,7 +91,7 @@ // Be annoyed if helped RegisterSignal(src, COMSIG_CARBON_HELP_ACT, PROC_REF(handle_helped)) //all npcs are masquerade violators by default so flip it to true - toggle_masquerade_sensitivity() + toggle_masquerade_sensitivity(TRUE) return INITIALIZE_HINT_LATELOAD /mob/living/carbon/human/npc/LateInitialize(mapload) diff --git a/modular_darkpack/modules/phones/code/phone_procs.dm b/modular_darkpack/modules/phones/code/phone_procs.dm index 726f78415a67..b3afc2b90fb2 100644 --- a/modular_darkpack/modules/phones/code/phone_procs.dm +++ b/modular_darkpack/modules/phones/code/phone_procs.dm @@ -195,8 +195,9 @@ set_phone_state(PHONE_IN_CALL) calling_smartphone.set_phone_state(PHONE_IN_CALL) - toggle_masquerade_sensitivity() - calling_smartphone.toggle_masquerade_sensitivity() + // turn masq stuff on + toggle_masquerade_sensitivity(TRUE) + calling_smartphone.toggle_masquerade_sensitivity(TRUE) phone_radio.canhear_range = 1 calling_smartphone.phone_radio.canhear_range = 1 @@ -225,7 +226,10 @@ // Set proper phone state. set_phone_state(PHONE_AVAILABLE) calling_smartphone.set_phone_state(PHONE_AVAILABLE) - toggle_masquerade_sensitivity() + + // turn masq stuff off + toggle_masquerade_sensitivity(FALSE) + calling_smartphone.toggle_masquerade_sensitivity(FALSE) // Internal only proc, used for setting a phone's internal radio. /obj/item/smartphone/proc/set_phone_radio(enabled) From a57450f5793ebd1657195b66aada1a488766b097 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Fri, 21 Aug 2026 01:24:26 -0400 Subject: [PATCH 19/21] Update __npc.dm --- modular_darkpack/modules/npc/code/human/__npc.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_darkpack/modules/npc/code/human/__npc.dm b/modular_darkpack/modules/npc/code/human/__npc.dm index dd10e1f09d6c..00b9119b6356 100644 --- a/modular_darkpack/modules/npc/code/human/__npc.dm +++ b/modular_darkpack/modules/npc/code/human/__npc.dm @@ -90,7 +90,7 @@ RegisterSignal(src, COMSIG_LIVING_MOB_BUMPED, PROC_REF(handle_bumped)) // Be annoyed if helped RegisterSignal(src, COMSIG_CARBON_HELP_ACT, PROC_REF(handle_helped)) - //all npcs are masquerade violators by default so flip it to true + // all npcs are masquerade violators by default so flip it to true toggle_masquerade_sensitivity(TRUE) return INITIALIZE_HINT_LATELOAD From c84a1c9371788a0405f3e39296d7568b3cfaf787 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Fri, 21 Aug 2026 01:47:00 -0400 Subject: [PATCH 20/21] arer they alive --- .../modules/masquerade/code/components/violation_observer.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index 9e95a3672f85..967014b3331f 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -38,6 +38,8 @@ if(isliving(source)) var/mob/living/mob_parent = source + if(mob_parent.stat == DEAD) + return if(!INCAPACITATED_IGNORING(mob_parent, INCAPABLE_RESTRAINTS)) mob_parent.face_atom(player_breacher) source.observe_masquerade_violation(player_breacher) From 2ab87014122a3d7a5097dc9ebff227cdd84b43f6 Mon Sep 17 00:00:00 2001 From: chazzyjazzy Date: Tue, 25 Aug 2026 01:55:34 -0400 Subject: [PATCH 21/21] ok heres some shitg --- .../masquerade/code/components/violation_observer.dm | 8 ++++++-- .../powers/code/discipline/__discipline_power.dm | 2 ++ .../code/splats/__vampire_splat.dm | 11 +++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm index 967014b3331f..59e48434d31b 100644 --- a/modular_darkpack/modules/masquerade/code/components/violation_observer.dm +++ b/modular_darkpack/modules/masquerade/code/components/violation_observer.dm @@ -1,5 +1,6 @@ /atom/movable var/violation_observer = FALSE + COOLDOWN_DECLARE(masquerade_violation_cooldown) /atom/movable/proc/toggle_masquerade_sensitivity(new_listening_state) // don't proceed if we're toggling to TRUE on something already listening @@ -20,6 +21,8 @@ UnregisterSignal(src, list(COMSIG_SEEN_MASQUERADE_VIOLATION, COMSIG_MASQUERADE_REINFORCE, COMSIG_LIVING_DEATH, COMSIG_ALL_MASQUERADE_REINFORCE)) /atom/movable/proc/on_masquerade_violation() + if(!COOLDOWN_FINISHED(src, masquerade_violation_cooldown)) + return var/area/vtm/breacher_area = get_area(src) if(!istype(breacher_area, /area/vtm)) return @@ -29,8 +32,9 @@ if(!moving_atom.violation_observer) continue SEND_SIGNAL(moving_atom, COMSIG_SEEN_MASQUERADE_VIOLATION, src) + COOLDOWN_START(src, masquerade_violation_cooldown, 1 TURNS) -/atom/movable/proc/on_observed_violation(atom/source, mob/living/player_breacher) +/atom/movable/proc/on_observed_violation(atom/source, atom/movable/player_breacher) SIGNAL_HANDLER if(!source || !player_breacher || ismundane(player_breacher)) //Humans cant break the masquerade. Because reasons. @@ -57,7 +61,7 @@ return TRUE -/atom/movable/proc/on_masquerade_violation_reinforced(atom/source, mob/living/player_breacher) +/atom/movable/proc/on_masquerade_violation_reinforced(atom/source, atom/movable/player_breacher) SIGNAL_HANDLER for(var/breach in SSmasquerade.masquerade_breachers) diff --git a/modular_darkpack/modules/powers/code/discipline/__discipline_power.dm b/modular_darkpack/modules/powers/code/discipline/__discipline_power.dm index 78508bef81a1..c209932f2363 100644 --- a/modular_darkpack/modules/powers/code/discipline/__discipline_power.dm +++ b/modular_darkpack/modules/powers/code/discipline/__discipline_power.dm @@ -726,6 +726,8 @@ to_chat(owner, span_warning("You don't have enough blood to keep [src] active!")) try_deactivate(target) + SEND_SIGNAL(owner, COMSIG_MASQUERADE_VIOLATION) + /** * Overridable proc that allows for extra modular code * in refreshing behaviour. Can do custom checks to see if activation diff --git a/modular_darkpack/modules/vampire_the_masquerade/code/splats/__vampire_splat.dm b/modular_darkpack/modules/vampire_the_masquerade/code/splats/__vampire_splat.dm index 566f0957b074..9d67cdc6e559 100644 --- a/modular_darkpack/modules/vampire_the_masquerade/code/splats/__vampire_splat.dm +++ b/modular_darkpack/modules/vampire_the_masquerade/code/splats/__vampire_splat.dm @@ -3,6 +3,7 @@ power_type = /datum/discipline COOLDOWN_DECLARE(passive_bp_drain_cooldown) + COOLDOWN_DECLARE(check_masq_violating_cooldown) /datum/splat/vampire/splat_life(seconds_per_tick) @@ -10,6 +11,16 @@ if(COOLDOWN_FINISHED(src, passive_bp_drain_cooldown)) owner.adjust_blood_pool(-1) COOLDOWN_START(src, passive_bp_drain_cooldown, CONFIG_GET(number/passive_bp_drain_timer)) + + if(COOLDOWN_FINISHED(src, check_masq_violating_cooldown)) + if(HAS_TRAIT(owner, TRAIT_MASQUERADE_VIOLATING_FACE) && (iscarbon(owner) ? !(owner.obscured_slots & HIDEFACE) : TRUE)) + SEND_SIGNAL(owner, COMSIG_MASQUERADE_VIOLATION) + + if(HAS_TRAIT(owner, TRAIT_MASQUERADE_VIOLATING_EYES) && (iscarbon(owner) ? !(owner.obscured_slots & HIDEEYES) : TRUE)) + SEND_SIGNAL(owner, COMSIG_MASQUERADE_VIOLATION) + + COOLDOWN_START(src, check_masq_violating_cooldown, 1 TURNS) + return /datum/splat/vampire/proc/get_discipline_power(datum/discipline_power/discipline_power_type)