From 9d99cf2c13e050cc5ceae0938687a010cace1f85 Mon Sep 17 00:00:00 2001 From: Alphas00 <154434082+Alphas00@users.noreply.github.com> Date: Thu, 6 Jun 2024 19:55:08 +0200 Subject: [PATCH] Bee Pacification Injecting bees with 5u of pax now makes them unable to ever sting --- code/modules/hydroponics/beekeeping/beebox.dm | 2 ++ .../mob/living/simple_animal/hostile/bees.dm | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm index a058601c..52cb8dad 100644 --- a/code/modules/hydroponics/beekeeping/beebox.dm +++ b/code/modules/hydroponics/beekeeping/beebox.dm @@ -108,6 +108,8 @@ var/mob/living/simple_animal/hostile/poison/bees/B = new(get_turf(src)) B.beehome = src B.assign_reagent(queen_bee.beegent) + if(queen_bee.paxed) + B.paxed = TRUE bees += B diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index 7da4cbc2..89264441 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -55,6 +55,8 @@ var/static/beehometypecache = typecacheof(/obj/structure/beebox) var/static/hydroponicstypecache = typecacheof(/obj/machinery/hydroponics) + var/paxed = FALSE + /mob/living/simple_animal/hostile/poison/bees/Initialize() . = ..() generate_bee_visuals() @@ -135,13 +137,13 @@ wanted_objects -= beehometypecache //so we don't attack beeboxes when not going home return //no don't attack the goddamm box else - . = ..() - if(. && beegent && isliving(target)) - var/mob/living/L = target - if(L.reagents) - beegent.reaction_mob(L, INJECT) - L.reagents.add_reagent(beegent.type, rand(1,5)) - + if(!paxed) + . = ..() + if(. && beegent && isliving(target)) + var/mob/living/L = target + if(L.reagents) + beegent.reaction_mob(L, INJECT) + L.reagents.add_reagent(beegent.type, rand(1,5)) /mob/living/simple_animal/hostile/poison/bees/proc/assign_reagent(datum/reagent/R) if(istype(R)) @@ -249,7 +251,6 @@ icon = 'icons/mob/bees.dmi' var/mob/living/simple_animal/hostile/poison/bees/queen/queen - /obj/item/queen_bee/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/syringe)) var/obj/item/reagent_containers/syringe/S = I @@ -265,6 +266,10 @@ user.visible_message("[user] injects [src] with royal bee jelly, causing it to split into two bees, MORE BEES!","You inject [src] with royal bee jelly, causing it to split into two bees, MORE BEES!") else to_chat(user, "You don't have enough royal bee jelly to split a bee in two!") + if(S.reagents.get_reagent_amount(/datum/reagent/pax) >= 5 && !queen.paxed) + user.visible_message("[user] injects [src] with something, it looks relaxed!","You inject [src] with pax, it look relaxed!") + S.reagents.remove_reagent(/datum/reagent/pax, 5) + queen.paxed = TRUE else var/datum/reagent/R = GLOB.chemical_reagents_list[S.reagents.get_master_reagent_id()] if(R && S.reagents.has_reagent(R.type, 5))