diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index 0370a84baba..63a883b4d00 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -31,7 +31,6 @@ move_to_delay = 0 obj_damage = 0 environment_smash = 0 - mouse_opacity = MOUSE_OPACITY_OPAQUE pass_flags = PASSTABLE | PASSGRILLE | PASSMOB density = FALSE mob_size = MOB_SIZE_TINY @@ -51,6 +50,8 @@ var/isqueen = FALSE var/bee_syndicate = FALSE var/icon_base = "bee" + var/last_attack = 0 + var/opacity_time = 1 MINUTES var/static/list/bee_icons = list() var/static/beehometypecache = typecacheof(/obj/structure/beebox) var/static/hydroponicstypecache = typecacheof(/obj/machinery/hydroponics) @@ -162,6 +163,7 @@ else . = ..() if(. && isliving(target) && (!client || a_intent == INTENT_HARM)) + make_opaque() var/mob/living/L = target if(L.reagents) if(beegent) @@ -170,6 +172,23 @@ else L.reagents.add_reagent("spidertoxin", 5) +/mob/living/simple_animal/hostile/poison/bees/proc/make_opaque() + // If a bee attacks someone, make it very easy to hit for a while + last_attack = world.time + mouse_opacity = MOUSE_OPACITY_OPAQUE + +/mob/living/simple_animal/hostile/poison/bees/Life(seconds, times_fired) + . = ..() + if(mind || (mouse_opacity == initial(mouse_opacity))) + return + var/diff = world.time - last_attack + if(diff >= opacity_time) + mouse_opacity = initial(mouse_opacity) + +/mob/living/simple_animal/hostile/poison/bees/sentience_act() + . = ..() + make_opaque() + /mob/living/simple_animal/hostile/poison/bees/proc/assign_reagent(datum/reagent/R) if(istype(R)) beegent = R @@ -233,6 +252,7 @@ desc = "She's the queen of bees, BZZ BZZ" icon_base = "queen" isqueen = TRUE + mouse_opacity = MOUSE_OPACITY_OPAQUE //the Queen doesn't leave the box on her own, and she CERTAINLY doesn't pollinate by herself @@ -324,6 +344,7 @@ search_objects = FALSE //these bees don't care about trivial things like plants, especially when there is havoc to sow bee_syndicate = TRUE var/list/master_and_friends = list() + mouse_opacity = MOUSE_OPACITY_OPAQUE /mob/living/simple_animal/hostile/poison/bees/syndi/New() beegent = GLOB.chemical_reagents_list["facid"] //Prepare to die