diff --git a/code/modules/mob/living/simple_animal/bees.dm b/code/modules/mob/living/simple_animal/bees.dm deleted file mode 100644 index 959444ea5e4..00000000000 --- a/code/modules/mob/living/simple_animal/bees.dm +++ /dev/null @@ -1,180 +0,0 @@ - -/mob/living/simple_animal/bee - name = "bees" - icon = 'icons/obj/apiary_bees_etc.dmi' - icon_state = "bees1" - icon_living = "bees1" - icon_dead = "bees1" - var/strength = 1 - var/feral = 0 - var/mut = 0 - var/toxic = 0 - var/turf/target_turf - var/mob/target_mob - var/obj/machinery/apiary/parent - pass_flags = PASSTABLE - turns_per_move = 6 - var/obj/machinery/portable_atmospherics/hydroponics/my_hydrotray - - // Allow final solutions. - minbodytemp = 0 - maxbodytemp = 360 - -/mob/living/simple_animal/bee/New(loc, var/obj/machinery/apiary/new_parent) - ..() - parent = new_parent - -/mob/living/simple_animal/bee/Destroy() - if(parent) - parent.owned_bee_swarms.Remove(src) - return ..() - -/mob/living/simple_animal/bee/process_ai() - //if we're strong enough, sting some people - var/mob/living/carbon/human/M = target_mob - var/sting_prob = 100 // Bees will always try to sting. - if(M in view(src,1)) // Can I see my target? - if(prob(max(feral * 10, 0))) // Am I mad enough to want to sting? And yes, when I initially appear, I AM mad enough - var/obj/item/clothing/worn_suit = M.wear_suit - var/obj/item/clothing/worn_helmet = M.head - if(worn_suit) // Are you wearing clothes? - sting_prob -= min(worn_suit.armor["bio"],70) // Is it sealed? I can't get to 70% of your body. - if(worn_helmet) - sting_prob -= min(worn_helmet.armor["bio"],30) // Is your helmet sealed? I can't get to 30% of your body. - if( prob(sting_prob) && (M.stat == CONSCIOUS || (M.stat == UNCONSCIOUS && prob(25))) ) // Try to sting! If you're not moving, think about stinging. - M.apply_damage(min(strength,2)+mut, BRUTE, sharp=1) // Stinging. The more mutated I am, the harder I sting. - M.apply_damage((round(feral/10,1)*(max((round(strength/20,1)),1)))+toxic, TOX) // Bee venom based on how angry I am and how many there are of me! - to_chat(M, "\red You have been stung!") - - //if we're chasing someone, get a little bit angry - if(target_mob && prob(10)) - feral++ - - //calm down a little bit - if(feral > 0) - if(prob(feral * 10)) - feral -= 1 - else - //if feral is less than 0, we're becalmed by smoke or steam - if(feral < 0) - feral += 1 - - if(target_mob) - target_mob = null - target_turf = null - if(strength > 5) - //calm down and spread out a little - var/mob/living/simple_animal/bee/B = new(get_turf(pick(orange(src,1)))) - B.strength = rand(1,5) - src.strength -= B.strength - if(src.strength <= 5) - src.icon_living = "bees[src.strength]" - B.icon_living = "bees[B.strength]" - if(src.parent) - B.parent = src.parent - src.parent.owned_bee_swarms.Add(B) - - //make some noise - if(prob(0.5)) - src.visible_message("\blue [pick("Buzzzz.","Hmmmmm.","Bzzz.")]") - - //smoke, water and steam calms us down - var/calming = 0 - var/list/calmers = list(/obj/effect/effect/chem_smoke, \ - /obj/effect/effect/water, \ - /obj/effect/effect/foam, \ - /obj/effect/effect/steam, \ - /obj/effect/mist) - - for(var/obj/effect/check_effect in src.loc) - if(check_effect.type in calmers) - calming = 1 - break - - if(calming) - if(feral > 0) - src.visible_message("\blue The bees calm down!") - feral = -10 - target_mob = null - target_turf = null - wander = 1 - - for(var/mob/living/simple_animal/bee/B in src.loc) - if(B == src) - continue - - if(feral > 0) - src.strength += B.strength - qdel(B) - src.icon_living = "bees[src.strength]" - if(strength > 5) - icon_living = "bees_swarm" - else if(prob(10)) - //make the other swarm of bees stronger, then move away - var/total_bees = B.strength + src.strength - if(total_bees < 10) - B.strength = min(5, total_bees) - src.strength = total_bees - B.strength - - B.icon_living = "bees[B.strength]" - if(src.strength <= 0) - qdel(src) - return - src.icon_living = "bees[B.strength]" - var/turf/simulated/floor/T = get_turf(get_step(src, pick(1,2,4,8))) - density = 1 - if(T.Enter(src, get_turf(src))) - src.loc = T - density = 0 - break - - if(target_mob) - if(target_mob in view(src,7)) - target_turf = get_turf(target_mob) - wander = 0 - - else // My target's gone! But I might still be pissed! You there. You look like a good stinging target! - for(var/mob/living/carbon/G in view(src,7)) - target_mob = G - break - - if(target_turf) - if (!(DirBlocked(get_step(src, get_dir(src,target_turf)),get_dir(src,target_turf)))) // Check for windows and doors! - Move(get_step(src, get_dir(src,target_turf))) - if (prob(0.1)) - src.visible_message("\blue The bees swarm after [target_mob]!") - if(src.loc == target_turf) - target_turf = null - wander = 1 - else - //find some flowers, harvest - //angry bee swarms don't hang around - if(feral > 0) - turns_per_move = rand(1,3) - else if(feral < 0) - turns_since_move = 0 - else if(!my_hydrotray || my_hydrotray.loc != src.loc || my_hydrotray.dead || !my_hydrotray.seed) - var/obj/machinery/portable_atmospherics/hydroponics/my_hydrotray = locate() in src.loc - if(my_hydrotray) - if(!my_hydrotray.dead && my_hydrotray.seed) - turns_per_move = rand(20,50) - else - my_hydrotray = null - - pixel_x = rand(-12,12) - pixel_y = rand(-12,12) - -/mob/living/simple_animal/bee/handle_state_icons() - if(!parent && prob(10)) - strength -= 1 - if(strength <= 0) - qdel(src) - else if(strength <= 5) - icon_living = "bees[strength]" - - //debugging - /*icon_living = "[strength]" - if(strength > 5) - icon_living = "unknown"*/ - - ..() \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index fdf97a7b0a2..f90d2f5bfa1 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -171,9 +171,13 @@ if(prob(BEE_POLLINATE_PEST_CHANCE)) Hydro.pestlevel = max(0, --Hydro.pestlevel) if(prob(BEE_POLLINATE_YIELD_CHANCE)) //Yield mod is HELLA powerful, but quite rare + if(!isnull(plant_controller.seeds[Hydro.seed.name])) + Hydro.seed = Hydro.seed.diverge() var/seed_yield = Hydro.seed.get_trait(TRAIT_YIELD) Hydro.seed.set_trait(TRAIT_YIELD, seed_yield + 1, 10, 0) if(prob(BEE_POLLINATE_POTENTCY_CHANCE)) + if(!isnull(plant_controller.seeds[Hydro.seed.name])) + Hydro.seed = Hydro.seed.diverge() var/seed_potency = Hydro.seed.get_trait(TRAIT_POTENCY) Hydro.seed.set_trait(TRAIT_POTENCY, seed_potency + 1, 200, 0)