From 93a0f58f21a40973791f975a238596a3525a69d1 Mon Sep 17 00:00:00 2001 From: Ryal Date: Mon, 5 Apr 2021 07:56:57 -0700 Subject: [PATCH] Honkbot tweaks (#15808) --- code/modules/crafting/recipes.dm | 7 +++++++ .../instruments/objs/items/instruments.dm | 10 ++++++++++ .../mob/living/simple_animal/bot/honkbot.dm | 20 +++++++++++++++---- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index 1be2504d387..3905458d864 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -361,6 +361,13 @@ /obj/item/bikehorn) category = CAT_MISC +/datum/crafting_recipe/sad_trombone + name = "Sad trombone" + result = list(/obj/item/instrument/trombone/sad) + time = 20 + reqs = list(/obj/item/stack/sheet/mineral/bananium = 5) + category = CAT_MISC + /datum/crafting_recipe/blackcarpet name = "Black Carpet" result = list(/obj/item/stack/tile/carpet/black) diff --git a/code/modules/instruments/objs/items/instruments.dm b/code/modules/instruments/objs/items/instruments.dm index 9920a808fc0..ec41f9578a7 100644 --- a/code/modules/instruments/objs/items/instruments.dm +++ b/code/modules/instruments/objs/items/instruments.dm @@ -135,6 +135,16 @@ playsound (src, 'sound/instruments/trombone/Cn4.mid', 100,1,-1) ..() +/obj/item/instrument/trombone/sad + name = "sad trombone" + desc = "Wah. Waah. Waaah. Waaaaaaah." + force = 0 + attack_verb = list("Wahed", "Waahed", "Waaahed", "Honked") + +/obj/item/instrument/trombone/sad/attack(mob/living/carbon/C, mob/user) + playsound(loc, 'sound/misc/sadtrombone.ogg', 50, 1, -1) + ..() + /obj/item/instrument/recorder name = "recorder" desc = "Just like in school, playing ability and all." diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index 6c9d9d38bee..84a87fbd51f 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -101,6 +101,14 @@ addtimer(CALLBACK(src, .proc/react_buzz), 5) return ..() +/mob/living/simple_animal/bot/honkbot/attackby(obj/item/W, mob/user, params) + ..() + if(istype(W, /obj/item/weldingtool) && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry. + return + if(!istype(W, /obj/item/screwdriver) && (W.force) && (!target) && (W.damtype != STAMINA) ) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass. + retaliate(user) + addtimer(CALLBACK(src, .proc/react_buzz), 5) + /mob/living/simple_animal/bot/honkbot/emag_act(mob/user) ..() if(emagged == 2) @@ -167,6 +175,9 @@ sensor_blink() if(!spam_flag) if(ishuman(C)) + var/mob/living/carbon/human/H = C + if(H.check_ear_prot() >= HEARING_PROTECTION_MAJOR) + return C.stuttering = 20 //stammer C.AdjustEarDamage(0, 5) //far less damage than the H.O.N.K. C.Jitter(50) @@ -202,6 +213,7 @@ // if can't reach perp for long enough, go idle if(frustration >= 5) //gives up easier than beepsky walk_to(src, 0) + playsound(loc, 'sound/misc/sadtrombone.ogg', 25, 1, -1) back_to_idle() return if(target) // make sure target exists @@ -257,14 +269,12 @@ if((C.name == oldtarget_name) && (world.time < last_found + 100)) continue - if(threatlevel <= 3) + if(threatlevel <= 3 && emagged <= 1) if(C in view(4, src)) //keep the range short for patrolling if(!spam_flag) bike_horn() - else if(threatlevel >= 10) - bike_horn() //just spam the shit outta this else if(threatlevel >= 4) - if(!spam_flag) + if(!spam_flag || emagged > 1) target = C oldtarget_name = C.name bike_horn() @@ -275,6 +285,8 @@ break else continue + else if(emagged > 1) + bike_horn() //just spam the shit outta this /mob/living/simple_animal/bot/honkbot/explode() //doesn't drop cardboard nor its assembly, since its a very frail material. walk_to(src, 0)