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

Being held at gunpoint stops you from using your headset #440

Merged
merged 2 commits into from
Mar 6, 2024
Merged
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
11 changes: 11 additions & 0 deletions code/datums/components/gunpoint.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
COMSIG_MOB_FIRED_GUN,
COMSIG_MOVABLE_SET_GRAB_STATE,
COMSIG_LIVING_START_PULL), PROC_REF(trigger_reaction))
RegisterSignal(targ, COMSIG_MOVABLE_USING_RADIO, PROC_REF(radio_trigger_reaction)) // NON-MODULE CHANGE
RegisterSignal(targ, COMSIG_ATOM_EXAMINE, PROC_REF(examine_target))
RegisterSignal(targ, COMSIG_LIVING_PRE_MOB_BUMP, PROC_REF(block_bumps_target))
RegisterSignals(targ, list(COMSIG_LIVING_DISARM_HIT, COMSIG_LIVING_GET_PULLED), PROC_REF(cancel))
Expand Down Expand Up @@ -151,6 +152,16 @@
SIGNAL_HANDLER
INVOKE_ASYNC(src, PROC_REF(async_trigger_reaction))

// NON-MODULE CHANGE
/datum/component/gunpoint/proc/radio_trigger_reaction(datum/source, obj/item/radio)
SIGNAL_HANDLER
if(radio.loc != source)
return NONE
INVOKE_ASYNC(src, PROC_REF(async_trigger_reaction))
to_chat(source, span_warning("You fail to reach [radio]!"))
return COMPONENT_CANNOT_USE_RADIO
// NON-MODULE CHANGE END

/datum/component/gunpoint/proc/async_trigger_reaction()
var/mob/living/shooter = parent
shooter.remove_status_effect(/datum/status_effect/holdup) // try doing these before the trigger gets pulled since the target (or shooter even) may not exist after pulling the trigger, dig?
Expand Down
Loading