From 66b60b4dc19dad2067e1041a1f1628316611f8e0 Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 24 Jul 2026 15:39:58 -0400 Subject: [PATCH] Migrate hailer to the new attack chain. (#32265) * Migrate hailer to the new attack chain. * Apply suggestion from CRUNCH review. Github, please no funny business. Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Signed-off-by: Alan * Add fingerprint to whistle too. Why not. --------- Signed-off-by: Alan Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> --- code/game/objects/items/devices/whistle.dm | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/devices/whistle.dm b/code/game/objects/items/devices/whistle.dm index c88f79c44ca..b373a86d6dd 100644 --- a/code/game/objects/items/devices/whistle.dm +++ b/code/game/objects/items/devices/whistle.dm @@ -11,25 +11,32 @@ flags = CONDUCT var/next_use_time var/spamcheck = FALSE + new_attack_chain = TRUE -/obj/item/hailer/attack_self__legacy__attackchain(mob/living/carbon/user as mob) +/obj/item/hailer/activate_self(mob/living/carbon/user) if(world.time < next_use_time) - return + return ..() if(emagged) - playsound(get_turf(src), 'sound/voice/binsult.ogg', 100, TRUE, vary = 0)//hueheuheuheuheuheuhe + playsound(get_turf(src), 'sound/voice/binsult.ogg', 100, TRUE, vary = 0) // Hueheuheuheuheuheuhe. user.visible_message(SPAN_WARNING("[user]'s [name] gurgles, \"FUCK YOUR CUNT YOU SHIT EATING CUNT TILL YOU ARE A MASS EATING SHIT CUNT. EAT PENISES IN YOUR FUCK FACE AND SHIT OUT ABORTIONS TO FUCK UP SHIT IN YOUR ASS YOU COCK FUCK SHIT MONKEY FROM THE DEPTHS OF SHIT\"")) else playsound(get_turf(src), 'sound/voice/halt.ogg', 100, TRUE, vary = 0) user.visible_message(SPAN_WARNING("[user]'s [name] rasps, \"Halt! Security!\"")) + add_fingerprint(user) next_use_time = world.time + USE_COOLDOWN + return ITEM_INTERACT_COMPLETE -/obj/item/hailer/emag_act(user as mob) +/obj/item/hailer/emag_act(mob/user) + add_fingerprint(user) if(!emagged) - to_chat(user, SPAN_WARNING("You overload \the [src]'s voice synthesizer.")) + to_chat(user, SPAN_WARNING("You overload [src]'s voice synthesizer!")) emagged = TRUE return TRUE + to_chat(user, SPAN_NOTICE("You load [src]'s voice synthesizer a normal amount.")) + emagged = FALSE + return TRUE #undef USE_COOLDOWN @@ -57,6 +64,7 @@ if(!COOLDOWN_FINISHED(src, whistle_cooldown)) return ITEM_INTERACT_COMPLETE + add_fingerprint(user) playsound(src, pick('sound/items/whistle1.ogg', 'sound/items/whistle2.ogg', 'sound/items/whistle3.ogg'), 25) COOLDOWN_START(src, whistle_cooldown, 4 SECONDS) return ITEM_INTERACT_COMPLETE