mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Tweaks voice analyzers, pulsing a grenade's bomb wire now uses the grenade's timer delay. (#52710)
Makes suicide bombing with voice analyzers harder, while keeping the more fun behavior by adding some tells and delays. Things attached to a grenade's pulse wire use the grenades timer, rather then just insta booming.
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
|
||||
/obj/item/assembly/voice/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, list/message_mods = list())
|
||||
. = ..()
|
||||
if(message_mods[WHISPER_MODE]) //Too quiet lad
|
||||
return
|
||||
if(speaker == src)
|
||||
return
|
||||
|
||||
@@ -40,7 +42,7 @@
|
||||
record_speech(speaker, raw_message, message_language)
|
||||
else
|
||||
if(check_activation(speaker, raw_message))
|
||||
addtimer(CALLBACK(src, .proc/pulse, 0), 10)
|
||||
send_pulse()
|
||||
|
||||
/obj/item/assembly/voice/proc/record_speech(atom/movable/speaker, raw_message, datum/language/message_language)
|
||||
switch(mode)
|
||||
@@ -58,7 +60,7 @@
|
||||
say("Your voice pattern is saved.", message_language)
|
||||
if(VOICE_SENSOR_MODE)
|
||||
if(length(raw_message))
|
||||
addtimer(CALLBACK(src, .proc/pulse, 0), 10)
|
||||
send_pulse()
|
||||
|
||||
/obj/item/assembly/voice/proc/check_activation(atom/movable/speaker, raw_message)
|
||||
. = FALSE
|
||||
@@ -76,6 +78,11 @@
|
||||
if(length(raw_message))
|
||||
. = TRUE
|
||||
|
||||
/obj/item/assembly/voice/proc/send_pulse()
|
||||
visible_message("clicks", visible_message_flags = EMOTE_MESSAGE)
|
||||
playsound(src, 'licensed_sound/Sampling-Plus-1.0/whirthunk.ogg', 30)
|
||||
addtimer(CALLBACK(src, .proc/pulse), 2 SECONDS)
|
||||
|
||||
/obj/item/assembly/voice/multitool_act(mob/living/user, obj/item/I)
|
||||
..()
|
||||
mode %= modes.len
|
||||
|
||||
Reference in New Issue
Block a user