This reverts commitb2accb91d0, reversing changes made to8e7a65a184.
@@ -135,7 +135,6 @@
|
||||
#define RICE "rice"
|
||||
#define CHERRYJELLY "cherryjelly"
|
||||
#define HONEY "honey"
|
||||
#define ROYALJELLY "royaljelly"
|
||||
#define DIPPING_SAUCE "dippingsauce"
|
||||
#define DISCOUNT "discount"
|
||||
#define IRRADIATEDBEANS "irradiatedbeans"
|
||||
|
||||
@@ -675,32 +675,6 @@ SEE_PIXELS 256
|
||||
#define HOSTILE_STANCE_ATTACKING 4
|
||||
#define HOSTILE_STANCE_TIRED 5
|
||||
|
||||
#define BEE_ROAMING 0
|
||||
#define BEE_OUT_FOR_PLANTS 1
|
||||
#define BEE_OUT_FOR_ENEMIES 2
|
||||
#define BEE_HEADING_HOME 3
|
||||
#define BEE_SWARM 4
|
||||
|
||||
#define LOC_KITCHEN 0
|
||||
#define LOC_ATMOS 1
|
||||
#define LOC_INCIN 2
|
||||
#define LOC_CHAPEL 3
|
||||
#define LOC_LIBRARY 4
|
||||
#define LOC_HYDRO 5
|
||||
#define LOC_VAULT 6
|
||||
#define LOC_TECH 7
|
||||
|
||||
#define VERM_MICE 0
|
||||
#define VERM_LIZARDS 1
|
||||
#define VERM_SPIDERS 2
|
||||
#define VERM_SLIMES 3
|
||||
#define VERM_BATS 4
|
||||
#define VERM_BORERS 5
|
||||
#define VERM_MIMICS 6
|
||||
#define VERM_ROACHES 7
|
||||
#define VERM_GREMLINS 8
|
||||
#define VERM_BEES 9
|
||||
|
||||
#define ROUNDSTART_LOGOUT_REPORT_TIME 6000 //Amount of time (in deciseconds) after the rounds starts, that the player disconnect report is issued.
|
||||
|
||||
//Damage things
|
||||
|
||||
@@ -1793,8 +1793,8 @@ var/list/all_supply_groups = list("Supplies","Clothing","Security","Hospitality"
|
||||
/datum/supply_packs/bee_keeper
|
||||
name = "Beekeeping kit"
|
||||
contains = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/beezeez,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/beezeez,
|
||||
/obj/item/beezeez,
|
||||
/obj/item/beezeez,
|
||||
/obj/item/weapon/bee_net,
|
||||
/obj/item/weapon/extinguisher/mini,
|
||||
/obj/item/apiary,
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//http://www.youtube.com/watch?v=-1GadTfGFvU
|
||||
//i could have done these as just an ordinary plant, but fuck it - there would have been too much snowflake code
|
||||
|
||||
/*
|
||||
|
||||
> apiary tray
|
||||
> angry-bee hive
|
||||
|
||||
*/
|
||||
#define HONEYCOMB_COST 15
|
||||
|
||||
/obj/machinery/apiary
|
||||
name = "apiary tray"
|
||||
@@ -13,160 +9,89 @@
|
||||
icon_state = "hydrotray3"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/beezeez = 0//beezeez removes 1 toxic and adds 1 nutrilevel per cycle
|
||||
var/nutrilevel = 0//consumed every round based on how many bees the apiary is sustaining.
|
||||
var/nutrilevel = 0
|
||||
var/yieldmod = 1
|
||||
var/damage = 1
|
||||
var/mut = 1
|
||||
var/toxic = 0
|
||||
|
||||
var/dead = 0
|
||||
var/health = -1
|
||||
var/maxhealth = 100
|
||||
var/lastcycle = 0
|
||||
var/cycledelay = 100
|
||||
var/list/pollen = list()//mostly unused for now. but might come handy later if we want to check what plants where pollinated by an apiary's bees
|
||||
|
||||
var/queen_bees_inside = 0
|
||||
var/worker_bees_inside = 0
|
||||
var/list/bees_outside_hive = list()
|
||||
var/beezeez = 0
|
||||
var/swarming = 0
|
||||
var/honey_level = 0
|
||||
|
||||
var/bees_in_hive = 0
|
||||
var/list/owned_bee_swarms = list()
|
||||
var/hydrotray_type = /obj/machinery/portable_atmospherics/hydroponics
|
||||
|
||||
var/obj/item/weapon/reagent_containers/glass/consume = null
|
||||
|
||||
var/wild = 0
|
||||
|
||||
machine_flags = WRENCHMOVE
|
||||
machine_flags = FIXED2WORK | WRENCHMOVE
|
||||
|
||||
//overwrite this after it's created if the apiary needs a custom machinery sprite
|
||||
/obj/machinery/apiary/New()
|
||||
..()
|
||||
overlays += image('icons/obj/apiary_bees_etc.dmi', icon_state="apiary")
|
||||
create_reagents(100)
|
||||
consume = new()
|
||||
|
||||
/obj/machinery/apiary/Destroy()
|
||||
for (var/datum/bee/B in bees_outside_hive)
|
||||
B.home = null
|
||||
if (B.mob)
|
||||
B.mob.home = null
|
||||
..()
|
||||
|
||||
/obj/machinery/apiary/update_icon()
|
||||
overlays.len = 0
|
||||
overlays += image('icons/obj/apiary_bees_etc.dmi', icon_state="apiary")
|
||||
|
||||
var/image/I = null
|
||||
switch(reagents.total_volume)
|
||||
if(30 to 60)
|
||||
I = image('icons/obj/apiary_bees_etc.dmi', icon_state="honey_1")
|
||||
if(60 to 90)
|
||||
I = image('icons/obj/apiary_bees_etc.dmi', icon_state="honey_2")
|
||||
if(90 to INFINITY)
|
||||
I = image('icons/obj/apiary_bees_etc.dmi', icon_state="honey_3")
|
||||
if(!I)
|
||||
return
|
||||
I.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
overlays += I
|
||||
overlays += image('icons/obj/apiary_bees_etc.dmi', icon_state="apiary0")
|
||||
|
||||
/obj/machinery/apiary/examine(mob/user)
|
||||
..()
|
||||
if(!worker_bees_inside && !queen_bees_inside)
|
||||
to_chat(user, "<span class='info'>There doesn't seem to be any bees in it.</span>")
|
||||
if(health > 0)
|
||||
to_chat(user, "You can hear a loud buzzing coming from the inside.")
|
||||
else
|
||||
if(worker_bees_inside < 10)
|
||||
to_chat(user, "<span class='info'>You can hear a few bees buzzing inside.</span>")
|
||||
else if(worker_bees_inside > 35)
|
||||
to_chat(user, "<span class='danger'>The bees are over-crowded!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>You hear a loud buzzing from the inside.</span>")
|
||||
to_chat(user, "There doesn't seem to be any bees in it.")
|
||||
|
||||
if(nutrilevel < 0)
|
||||
to_chat(user, "<span class='danger'>The bees inside appear to be starving.</span>")
|
||||
else if(nutrilevel < 10)
|
||||
to_chat(user, "<span class='warning'>The bees inside appear to be low on food reserves.</span>")
|
||||
|
||||
if(beezeez > 0)
|
||||
to_chat(user, "<span class='info'>The bees are collecting the beezeez pellets.</span>")
|
||||
|
||||
if(toxic > 5)
|
||||
if (toxic < 33)
|
||||
to_chat(user, "<span class='warning'>The bees look a bit on edge, their diet might be toxic.</span>")
|
||||
else if (toxic < 50)
|
||||
to_chat(user, "<span class='warning'>The bees are starting to act violent, the hive's toxicity is rising.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>The bees are violent and exhausted, the hive's toxicity is reaching critical levels.</span>")
|
||||
|
||||
switch(reagents.total_volume)
|
||||
if(30 to 60)
|
||||
switch(honey_level)
|
||||
if(1)
|
||||
to_chat(user, "<span class='info'>Looks like there's a bit of honey in it.</span>")
|
||||
if(60 to 90)
|
||||
if(2)
|
||||
to_chat(user, "<span class='info'>There's a decent amount of honey dripping from it!</span>")
|
||||
if(90 to INFINITY)
|
||||
if(3)
|
||||
to_chat(user, "<span class='info'>It's full of honey!</span>")
|
||||
|
||||
/obj/machinery/apiary/Cross(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
if(air_group || (height==0))
|
||||
return 1
|
||||
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/apiary/bullet_act(var/obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
|
||||
if(istype(Proj ,/obj/item/projectile/energy/floramut))
|
||||
damage = round(rand(0,3))//0, 1, or 2 brute damage per stings...per bee in a swarm
|
||||
mut++
|
||||
else if(istype(Proj ,/obj/item/projectile/energy/florayield))
|
||||
if(!yieldmod)
|
||||
yieldmod += 1
|
||||
// to_chat(world, "Yield increased by 1, from 0, to a total of [myseed.yield]")
|
||||
else if (prob(1/(yieldmod * yieldmod) *100))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2...
|
||||
yieldmod += 1
|
||||
// to_chat(world, "Yield increased by 1, to a total of [myseed.yield]")
|
||||
else
|
||||
..()
|
||||
if(src)
|
||||
angry_swarm()
|
||||
return
|
||||
|
||||
/obj/machinery/apiary/hitby(AM as mob|obj)
|
||||
..()
|
||||
visible_message("<span class='warning'>\The [src] was hit by \the [AM].</span>", 1)
|
||||
angry_swarm()
|
||||
|
||||
/obj/machinery/apiary/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(istype(O, /obj/item/device/analyzer/plant_analyzer))
|
||||
to_chat(user, "<span class='warning'>That's not a plant you dummy. You can get basic info about \the [src] by simply examining it.</span>")
|
||||
return
|
||||
if (wild)
|
||||
return
|
||||
if(istype(O, /obj/item/queen_bee))
|
||||
if(user.drop_item(O))
|
||||
nutrilevel = max(15,nutrilevel+15)
|
||||
queen_bees_inside++
|
||||
qdel(O)
|
||||
to_chat(user, "<span class='notice'>You carefully insert the queen into [src], she gets busy managing the hive.</span>")
|
||||
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/beezeez))
|
||||
var/i = O.reagents.trans_id_to(consume,NUTRIMENT,3)
|
||||
if (i)
|
||||
beezeez += i * 10
|
||||
if(queen_bees_inside || worker_bees_inside)
|
||||
to_chat(user, "<span class='notice'>You pour the BeezEez into \the [src]. A relaxed humming appears to pick up.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You pour the BeezEez into \the [src]. Now it just needs some bees.</span>")
|
||||
if(health > 0)
|
||||
to_chat(user, "<span class='warning'>There is already a queen in there.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There is no BeezEez in \the [O].</span>")
|
||||
user.drop_from_inventory(O)
|
||||
var/obj/item/trash/beezeez/TrashItem = new /obj/item/trash/beezeez(user)
|
||||
user.put_in_hands(TrashItem)
|
||||
if(user.drop_item(O))
|
||||
health = 10
|
||||
nutrilevel = min(10,nutrilevel+10)
|
||||
qdel(O)
|
||||
to_chat(user, "<span class='notice'>You carefully insert the queen into [src], she gets busy making a hive.</span>")
|
||||
bees_in_hive = 0
|
||||
else if(istype(O, /obj/item/beezeez))
|
||||
beezeez += 100
|
||||
nutrilevel += 10
|
||||
user.drop_item(O)
|
||||
if(health > 0)
|
||||
to_chat(user, "<span class='notice'>You insert [O] into [src]. A relaxed humming appears to pick up.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You insert [O] into [src]. Now it just needs some bees.</span>")
|
||||
qdel(O)
|
||||
else if(istype(O, /obj/item/weapon/hatchet))
|
||||
if(reagents.total_volume > 0)
|
||||
user.visible_message("<span class='notice'>\the [user] begins harvesting the honeycombs.</span>","<span class='danger'>You begin harvesting the honeycombs.</span>")
|
||||
if(health > 0)
|
||||
user.visible_message("<span class='danger'>\the [user] begins harvesting the honeycombs, the bees don't like that.</span>","<span class='danger'>You begin harvesting the honeycombs, the bees don't like that.</span>")
|
||||
angry_swarm(user)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You begin to dislodge the dead apiary from the tray.</span>")
|
||||
|
||||
if(queen_bees_inside || worker_bees_inside)
|
||||
user.visible_message("<span class='danger'>The bees don't like that.</span>")
|
||||
angry_swarm(user)
|
||||
|
||||
if(do_after(user, src, 50))
|
||||
var/obj/machinery/created_tray = new hydrotray_type(src.loc)
|
||||
created_tray.component_parts = list()
|
||||
@@ -178,370 +103,180 @@
|
||||
I.forceMove(created_tray)
|
||||
contents -= I
|
||||
new /obj/item/apiary(src.loc)
|
||||
|
||||
if(harvest_honeycombs())
|
||||
if(health > 0)
|
||||
while(health > HONEYCOMB_COST)
|
||||
health -= HONEYCOMB_COST
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/honeycomb/H = new(src.loc)
|
||||
if(toxic > 0)
|
||||
H.reagents.add_reagent(TOXIN, toxic)
|
||||
if(honey_level >= 3)
|
||||
new/obj/item/queen_bee(src.loc)
|
||||
to_chat(user, "<span class='notice'>You successfully harvest the honeycombs. The empty apiary can be relocated.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You dislodge the apiary from the tray.</span>")
|
||||
|
||||
if (queen_bees_inside || worker_bees_inside)
|
||||
empty_beehive()
|
||||
|
||||
for (var/datum/bee/B in bees_outside_hive)
|
||||
B.home = null
|
||||
|
||||
qdel(src)
|
||||
|
||||
else if(istype(O, /obj/item/weapon/bee_net))
|
||||
var/obj/item/weapon/bee_net/N = O
|
||||
if(N.caught_bees.len)
|
||||
if(N.caught_bees > 0)
|
||||
to_chat(user, "<span class='notice'>You empty the bees into the apiary.</span>")
|
||||
for (var/datum/bee/B in N.caught_bees)
|
||||
enterHive(B)
|
||||
N.caught_bees = list()
|
||||
bees_in_hive += N.caught_bees
|
||||
N.caught_bees = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no more bees in the net.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>\the [user] hits \the [src] with \the [O]!</span>","<span class='warning'>You hit \the [src] with \the [O]!</span>")
|
||||
angry_swarm(user)
|
||||
|
||||
//Called every time a bee enters the hive.
|
||||
/obj/machinery/apiary/proc/enterHive(var/datum/bee/B)
|
||||
bees_outside_hive.Remove(B)
|
||||
if (istype(B,/datum/bee/queen_bee))
|
||||
queen_bees_inside++
|
||||
var/datum/bee/queen_bee/Q = B
|
||||
if (Q.colonizing)
|
||||
nutrilevel = max(15,nutrilevel+15)
|
||||
/obj/machinery/apiary/Cross(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
if(air_group || (height==0))
|
||||
return 1
|
||||
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
else
|
||||
worker_bees_inside++
|
||||
B.home = src
|
||||
B.state = null
|
||||
B.health = B.maxHealth
|
||||
for (var/datum/seed/S in B.pollens)
|
||||
var/potency = round(S.potency)
|
||||
var/totalreagents = 0
|
||||
for(var/chem in S.chems)
|
||||
var/list/reagent_data = list()
|
||||
if (chem == NUTRIMENT)
|
||||
if (S.products.len && juice_items.Find(S.products[1]))
|
||||
reagent_data = S.chems[chem]
|
||||
else
|
||||
continue
|
||||
else
|
||||
reagent_data = S.chems[chem]
|
||||
var/rtotal = reagent_data[1]
|
||||
if(reagent_data.len > 1 && potency > 0)
|
||||
rtotal += round(potency/reagent_data[2])
|
||||
totalreagents += rtotal
|
||||
|
||||
if(totalreagents)
|
||||
for(var/chem in S.chems)
|
||||
var/list/reagent_data = list()
|
||||
var/chemToAdd = null
|
||||
if (chem == NUTRIMENT)
|
||||
if (S.products.len && juice_items.Find(S.products[1]))
|
||||
var/i = juice_items.Find(S.products[1])
|
||||
chemToAdd = pick(juice_items[juice_items[i]])
|
||||
reagent_data = S.chems[chem]
|
||||
else
|
||||
continue
|
||||
else
|
||||
reagent_data = S.chems[chem]
|
||||
chemToAdd = chem
|
||||
var/rtotal = reagent_data[1]
|
||||
if(reagent_data.len > 1 && potency > 0)
|
||||
rtotal += round(potency/reagent_data[2])
|
||||
var/amountToAdd = min(1, max(0.25, rtotal/4))
|
||||
var/difference = amountToAdd + 0.25 + reagents.total_volume - reagents.maximum_volume
|
||||
if (difference>0)
|
||||
reagents.trans_to(consume, difference)//This allows bees to bring in new reagents even if the hive is full
|
||||
reagents.add_reagent(chemToAdd, amountToAdd * yieldmod)
|
||||
if (!pollen.Find(S))
|
||||
pollen.Add(S)
|
||||
if (istype(B,/datum/bee/queen_bee))
|
||||
reagents.add_reagent(ROYALJELLY,0.5 * yieldmod)
|
||||
else
|
||||
reagents.add_reagent(HONEY,0.5 * yieldmod)
|
||||
reagents.add_reagent(SUGAR, 0.1 * yieldmod)
|
||||
|
||||
if (B.toxins > toxic)
|
||||
toxic += B.toxins * 0.1
|
||||
|
||||
qdel(B)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/apiary/proc/harvest_honeycombs()
|
||||
if (reagents.total_volume < 1)
|
||||
return 0
|
||||
|
||||
var/number_of_honeycombs = min(round(reagents.total_volume / 12.5) + 1 , 8)
|
||||
var/reagents_per_honeycomb = reagents.total_volume / number_of_honeycombs
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
var/image/I = image('icons/obj/food.dmi', icon_state="honeycomb-color")
|
||||
I.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
|
||||
for (var/i = 1 to number_of_honeycombs)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/honeycomb/H = new(T)
|
||||
H.reagents.clear_reagents()
|
||||
H.reagents.add_reagent(NUTRIMENT, 0.5)
|
||||
H.icon_state = "honeycomb-base"
|
||||
H.overlays += I
|
||||
reagents.trans_to(H,reagents_per_honeycomb)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/apiary/proc/empty_beehive()
|
||||
if (!queen_bees_inside && !worker_bees_inside)
|
||||
return
|
||||
var/mob/living/simple_animal/bee/lastBees = getFromPool(/mob/living/simple_animal/bee,get_turf(src))
|
||||
for(var/i = 1 to worker_bees_inside)
|
||||
worker_bees_inside--
|
||||
lastBees.addBee(new/datum/bee(src))
|
||||
for(var/i = 1 to queen_bees_inside)
|
||||
queen_bees_inside--
|
||||
lastBees.addBee(new/datum/bee/queen_bee(src))
|
||||
|
||||
/obj/machinery/apiary/proc/exile_swarm(var/obj/machinery/apiary/A)
|
||||
if (A == src)
|
||||
return 0
|
||||
if (A.queen_bees_inside > 0 || is_type_in_list(/datum/bee/queen_bee,A.bees_outside_hive))
|
||||
return 0
|
||||
var/mob/living/simple_animal/bee/B_mob = getFromPool(/mob/living/simple_animal/bee, get_turf(src), src)
|
||||
var/datum/bee/queen_bee/new_queen = new(src)
|
||||
queen_bees_inside--
|
||||
B_mob.addBee(new_queen)
|
||||
for (var/i = 1 to 10)
|
||||
var/datum/bee/B = new(src)
|
||||
B_mob.addBee(B)
|
||||
worker_bees_inside--
|
||||
new_queen.setHome(A)
|
||||
return 1
|
||||
|
||||
/obj/machinery/apiary/proc/angry_swarm(var/mob/M = null)
|
||||
for(var/datum/bee/B in bees_outside_hive)
|
||||
B.angerAt(M)
|
||||
|
||||
var/mob/living/simple_animal/bee/B_mob = getFromPool(/mob/living/simple_animal/bee, get_turf(src), get_turf(src), src)
|
||||
for (var/i=1 to worker_bees_inside)
|
||||
var/datum/bee/B = new(src)
|
||||
B_mob.addBee(B)
|
||||
worker_bees_inside--
|
||||
bees_outside_hive.Add(B)
|
||||
B.angerAt(M)
|
||||
B_mob.update_icon()
|
||||
|
||||
|
||||
/obj/machinery/apiary/process()
|
||||
if(world.time > (lastcycle + cycledelay))//about 10 seconds by default
|
||||
lastcycle = world.time
|
||||
if(swarming > 0)
|
||||
swarming -= 1
|
||||
if(swarming <= 0)
|
||||
for(var/mob/living/simple_animal/bee/B in src.loc)
|
||||
bees_in_hive += B.strength
|
||||
returnToPool(B)
|
||||
else if(bees_in_hive < 10)
|
||||
for(var/mob/living/simple_animal/bee/B in src.loc)
|
||||
bees_in_hive += B.strength
|
||||
returnToPool(B)
|
||||
|
||||
if(!queen_bees_inside && !worker_bees_inside)//if the apiary is empty, let's not waste time processing it
|
||||
return
|
||||
|
||||
//HANDLE BEEZEEZ
|
||||
if(beezeez)
|
||||
beezeez--
|
||||
nutrilevel++
|
||||
|
||||
if(toxic > 0)
|
||||
toxic--
|
||||
|
||||
|
||||
//HANDLE NUTRILEVEL
|
||||
nutrilevel -= worker_bees_inside / 20 + queen_bees_inside /5 + bees_outside_hive.len / 10 //Bees doing work need more nutrients
|
||||
|
||||
nutrilevel += 5 * reagents.trans_to(consume, reagents.total_volume / 100)
|
||||
|
||||
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if (R.volume < 0.01)
|
||||
if (R == NUTRIMENT) continue
|
||||
reagents.del_reagent(R.id,update_totals=0)
|
||||
|
||||
nutrilevel = min(max(nutrilevel,-10),100)
|
||||
|
||||
//PRODUCING QUEEN BEES
|
||||
if(reagents.get_reagent_amount(ROYALJELLY) >= 0.5 && nutrilevel > 10 && queen_bees_inside <= 0 && worker_bees_inside > 1)
|
||||
queen_bees_inside++
|
||||
reagents.remove_reagent(ROYALJELLY, 0.5)
|
||||
worker_bees_inside--
|
||||
|
||||
|
||||
//PRODUCING WORKER BEES
|
||||
if(nutrilevel > 10 && queen_bees_inside > 0 && worker_bees_inside < 20)
|
||||
worker_bees_inside += queen_bees_inside
|
||||
|
||||
// We're getting in dire need of nutrients, let's starve bees so others can survive
|
||||
else if (nutrilevel < -5 && worker_bees_inside >= 10)
|
||||
nutrilevel += 3
|
||||
worker_bees_inside--
|
||||
new/obj/effect/decal/cleanable/bee(get_turf(src))
|
||||
|
||||
//We're low on nutrients, let's call back some bees to reduce our food costs
|
||||
else if (nutrilevel <= 0 && bees_outside_hive.len > 1)
|
||||
for (var/i = 1 to max(1,round(bees_outside_hive.len/3)))
|
||||
var/datum/bee/B = pick(bees_outside_hive)
|
||||
B.homeCall()
|
||||
|
||||
|
||||
//HANDLE TOXICITY
|
||||
var/list/toxic_reagents = list(
|
||||
TOXIN = 2,
|
||||
STOXIN = 1,
|
||||
FLUORINE = 1,
|
||||
RADIUM = 3,
|
||||
FUEL = 2,
|
||||
VOMIT = 1,
|
||||
BLEACH = 2,
|
||||
PLANTBGONE = 3,
|
||||
PLASMA = 2,
|
||||
SACID = 1,
|
||||
PACID = 3,
|
||||
CYANIDE = 4,
|
||||
AMATOXIN = 2,
|
||||
AMANATIN = 3,
|
||||
POISONBERRYJUICE = 2,
|
||||
CARPOTOXIN = 2,
|
||||
ZOMBIEPOWDER = 3,
|
||||
MINDBREAKER = 1,
|
||||
PLASTICIDE = 2,
|
||||
)
|
||||
|
||||
for(var/datum/reagent/R in consume.reagents.reagent_list)
|
||||
if (toxic_reagents.Find(R.id))
|
||||
toxic += R.volume * toxic_reagents[R.id]
|
||||
if (R.id == MUTAGEN)
|
||||
damage = round(rand(0,3))
|
||||
|
||||
if(toxic > 0)
|
||||
toxic -= 0.1
|
||||
toxic = min(100,max(0,toxic))
|
||||
|
||||
//NOISE
|
||||
if(prob(2))
|
||||
playsound(get_turf(src), 'sound/effects/bees.ogg', min(20+(reagents.total_volume),100), 1)
|
||||
|
||||
update_icon()
|
||||
|
||||
//SENDING OUT BEES
|
||||
if(worker_bees_inside >= 10 && bees_outside_hive.len < 11)
|
||||
var/turf/T = get_turf(src)
|
||||
var/mob/living/simple_animal/bee/B_mob = getFromPool(/mob/living/simple_animal/bee, T, src)
|
||||
var/datum/bee/B = null
|
||||
if (queen_bees_inside > 0 && nutrilevel > 0 && worker_bees_inside > 15 && prob(nutrilevel/3))
|
||||
B = new/datum/bee/queen_bee(src)
|
||||
queen_bees_inside--
|
||||
else
|
||||
B = new(src)
|
||||
worker_bees_inside--
|
||||
bees_outside_hive.Add(B)
|
||||
B_mob.addBee(B)
|
||||
if (toxic > 33 && prob(toxic/1.5))//if our beehive is full of toxicity, bees will become ANGRY
|
||||
B.angerAt()
|
||||
else
|
||||
B.goPollinate()
|
||||
|
||||
if(queen_bees_inside > 1 && worker_bees_inside >= 10)
|
||||
for(var/obj/machinery/apiary/A in range(src,5))
|
||||
if (exile_swarm(A))
|
||||
break
|
||||
|
||||
consume.reagents.clear_reagents()
|
||||
|
||||
///////////////////////////WILD BEEHIVES////////////////////////////
|
||||
|
||||
/obj/machinery/apiary/wild
|
||||
name = "angry-bee hive"
|
||||
icon = 'icons/obj/apiary_bees_etc.dmi'
|
||||
icon_state = "apiary-wild"
|
||||
density = 1
|
||||
anchored = 1
|
||||
nutrilevel = 100
|
||||
damage = 1.5
|
||||
toxic = 25
|
||||
|
||||
cycledelay = 50
|
||||
|
||||
//we'll allow those to start pumping out bees right away
|
||||
queen_bees_inside = 1
|
||||
worker_bees_inside = 20
|
||||
wild = 1
|
||||
|
||||
var/health = 100
|
||||
|
||||
/obj/machinery/apiary/wild/New()
|
||||
..()
|
||||
reagents.add_reagent(ROYALJELLY,5)
|
||||
reagents.add_reagent(HONEY,75)
|
||||
reagents.add_reagent(NUTRIMENT, 4)
|
||||
reagents.add_reagent(SUGAR, 16)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/apiary/wild/bullet_act(var/obj/item/projectile/P)
|
||||
..()
|
||||
if(P.damage && P.damtype != HALLOSS)
|
||||
health -= P.damage
|
||||
updateHealth()
|
||||
|
||||
/obj/machinery/apiary/wild/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(istype(O, /obj/item/queen_bee))
|
||||
to_chat(user, "<span class='warning'>This type of bee hive isn't fit for domesticated bees.</span>")
|
||||
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/beezeez))
|
||||
to_chat(user, "<span class='warning'>These bees don't want your candies, they want your blood!</span>")
|
||||
else if(O.force)
|
||||
user.delayNextAttack(10)
|
||||
to_chat(user,"<span class='warning'>You hit \the [src] with your [O].</span>")
|
||||
if(queen_bees_inside || worker_bees_inside)
|
||||
angry_swarm(user)
|
||||
|
||||
playsound(get_turf(src), O.hitsound, 50, 1, -1)
|
||||
health -= O.force
|
||||
updateHealth()
|
||||
|
||||
/obj/machinery/apiary/wild/proc/updateHealth()
|
||||
if(health <= 0)
|
||||
visible_message("<span class='notice'>\The [src] falls apart.</span>")
|
||||
|
||||
if (queen_bees_inside || worker_bees_inside)
|
||||
empty_beehive()
|
||||
|
||||
for (var/datum/bee/B in bees_outside_hive)
|
||||
B.home = null
|
||||
|
||||
harvest_honeycombs()
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/apiary/wild/process()
|
||||
if(world.time > (lastcycle + cycledelay))
|
||||
lastcycle = world.time
|
||||
|
||||
if(!queen_bees_inside && !worker_bees_inside)
|
||||
if(health < 0)
|
||||
return
|
||||
|
||||
//PRODUCING WORKER BEES
|
||||
if(worker_bees_inside < 20)
|
||||
worker_bees_inside += queen_bees_inside
|
||||
//magical bee formula
|
||||
if(beezeez > 0)
|
||||
beezeez -= 1
|
||||
|
||||
//making noise
|
||||
if(prob(10))
|
||||
playsound(get_turf(src), 'sound/effects/bees.ogg', min(20+(reagents.total_volume),100), 1)
|
||||
nutrilevel += 2
|
||||
health = min(health+1,maxhealth)
|
||||
if(prob(10))
|
||||
toxic = max(0, toxic - 1)
|
||||
|
||||
//sending out bees to KILL
|
||||
if(worker_bees_inside >= 10 && bees_outside_hive.len < 15)
|
||||
//handle nutrients
|
||||
nutrilevel -= bees_in_hive / 10 + owned_bee_swarms.len / 5
|
||||
if(nutrilevel > 0)
|
||||
bees_in_hive += 1 * yieldmod
|
||||
health = min(health+1,maxhealth)
|
||||
else
|
||||
//nutrilevel is less than 1, so we're effectively subtracting here
|
||||
health += max(nutrilevel - 1, round(-health / 2))
|
||||
bees_in_hive += max(nutrilevel - 1, round(-bees_in_hive / 2))
|
||||
if(owned_bee_swarms.len)
|
||||
var/mob/living/simple_animal/bee/B = pick(owned_bee_swarms)
|
||||
B.target_turf = get_turf(src)
|
||||
|
||||
//clear out some toxins
|
||||
if(toxic > 0)
|
||||
toxic -= 1
|
||||
health -= 1
|
||||
|
||||
var/newlevel = 0
|
||||
if(health >= (HONEYCOMB_COST * 6))
|
||||
newlevel = 3
|
||||
else if(health >= (HONEYCOMB_COST * 3))
|
||||
newlevel = 2
|
||||
else if(health >= HONEYCOMB_COST)
|
||||
newlevel = 1
|
||||
else
|
||||
newlevel = 0
|
||||
|
||||
if(newlevel != honey_level)
|
||||
overlays -= image('icons/obj/apiary_bees_etc.dmi', icon_state="apiary[honey_level]")
|
||||
overlays += image('icons/obj/apiary_bees_etc.dmi', icon_state="apiary[newlevel]")
|
||||
honey_level = newlevel
|
||||
|
||||
if(health <= 0)
|
||||
return
|
||||
|
||||
if(prob(2))
|
||||
playsound(get_turf(src), 'sound/effects/bees.ogg', min(20+(20*honey_level),100), 1)
|
||||
|
||||
//make some new bees
|
||||
if(bees_in_hive >= 10 && prob(bees_in_hive * 10))
|
||||
var/turf/T = get_turf(src)
|
||||
var/mob/living/simple_animal/bee/B_mob = getFromPool(/mob/living/simple_animal/bee, T, src)
|
||||
var/datum/bee/B = new(src)
|
||||
worker_bees_inside--
|
||||
bees_outside_hive.Add(B)
|
||||
B_mob.addBee(B)
|
||||
B.angerAt()
|
||||
var/mob/living/simple_animal/bee/B = getFromPool(/mob/living/simple_animal/bee, T, src)
|
||||
owned_bee_swarms.Add(B)
|
||||
B.mut = mut
|
||||
B.toxic = toxic
|
||||
bees_in_hive -= 1
|
||||
|
||||
/obj/machinery/apiary/wild/update_icon()
|
||||
overlays.len = 0
|
||||
return
|
||||
//find some plants, harvest
|
||||
for(var/obj/machinery/portable_atmospherics/hydroponics/H in view(7, src))
|
||||
if(H.seed && !H.dead && prob(owned_bee_swarms.len * 10))
|
||||
src.nutrilevel++
|
||||
if(H.nutrilevel < 10)
|
||||
H.nutrilevel++
|
||||
|
||||
/*if(mut < H.mutation_mod - 1)
|
||||
mut = H.mutation_mod - 1
|
||||
else if(mut > H.mutation_mod - 1)
|
||||
H.mutation_mod = mut*/
|
||||
|
||||
//flowers give us pollen (nutrients)
|
||||
/* - All plants should be giving nutrients to the hive.
|
||||
if(H.myseed.type == /obj/item/seeds/harebell || H.myseed.type == /obj/item/seeds/sunflowerseed)
|
||||
src.nutrilevel++
|
||||
H.nutrilevel++
|
||||
*/
|
||||
//have a few beneficial effects on nearby plants
|
||||
/* - beneficial effects are now applied directly by bees themselves (bees.dm, hydro_tray_process.dm)
|
||||
if(prob(10))
|
||||
H.lastcycle -= 5
|
||||
if(prob(10))
|
||||
if(!isnull(seed_types[H.seed.name]))
|
||||
H.seed = H.seed.diverge(-1)
|
||||
if(H.seed)
|
||||
H.seed.lifespan = max(initial(H.seed.lifespan) * 1.5, H.seed.lifespan + 1)
|
||||
if(prob(10))
|
||||
if(!isnull(seed_types[H.seed.name]))
|
||||
H.seed = H.seed.diverge(-1)
|
||||
if(H.seed)
|
||||
H.seed.endurance = max(initial(H.seed.endurance) * 1.5, H.seed.endurance + 1)
|
||||
if(H.toxins && prob(10))
|
||||
H.toxins = min(0, H.toxins - 1)
|
||||
toxic++
|
||||
*/
|
||||
|
||||
/obj/machinery/apiary/proc/die()
|
||||
if(owned_bee_swarms.len)
|
||||
var/mob/living/simple_animal/bee/B = pick(owned_bee_swarms)
|
||||
B.target_turf = get_turf(src)
|
||||
B.strength -= 1
|
||||
if(B.strength <= 0)
|
||||
returnToPool(B)
|
||||
else if(B.strength <= 5)
|
||||
B.icon_state = "bees[B.strength]"
|
||||
bees_in_hive = 0
|
||||
health = 0
|
||||
|
||||
/obj/machinery/apiary/proc/angry_swarm(var/mob/M = null)
|
||||
for(var/mob/living/simple_animal/bee/B in owned_bee_swarms)
|
||||
B.feral = 25
|
||||
B.target = M
|
||||
|
||||
swarming = 25
|
||||
|
||||
while(bees_in_hive >= 1)
|
||||
var/spawn_strength = round(bees_in_hive)
|
||||
if(bees_in_hive >= 5)
|
||||
spawn_strength = 6
|
||||
var/turf/T = get_turf(src)
|
||||
var/mob/living/simple_animal/bee/B = getFromPool(/mob/living/simple_animal/bee, T, src)
|
||||
B.target = M
|
||||
B.strength = spawn_strength
|
||||
B.feral = 25
|
||||
B.mut = mut
|
||||
B.toxic = toxic
|
||||
bees_in_hive -= spawn_strength
|
||||
|
||||
#undef HONEYCOMB_COST
|
||||
|
||||
@@ -1,21 +1,8 @@
|
||||
|
||||
/*
|
||||
|
||||
> queen bee packet
|
||||
> bee net
|
||||
> moveable apiary
|
||||
> packet of BeezEez
|
||||
> empty packet of BeezEez
|
||||
> honeycomb
|
||||
> The Ins and Outs of Apiculture - A Precise Art
|
||||
|
||||
*/
|
||||
|
||||
/obj/item/queen_bee
|
||||
name = "queen bee packet"
|
||||
desc = "Place her into an apiary so she can get busy."
|
||||
icon = 'icons/obj/apiary_bees_etc.dmi'
|
||||
icon_state = "queen_larvae"
|
||||
icon = 'icons/obj/seeds.dmi'
|
||||
icon_state = "seed-bees"
|
||||
w_class = W_CLASS_TINY
|
||||
|
||||
/obj/item/weapon/bee_net
|
||||
@@ -26,17 +13,17 @@
|
||||
item_state = "bee_net"
|
||||
w_class = W_CLASS_MEDIUM
|
||||
inhand_states = list("left_hand" = 'icons/mob/in-hand/left/beekeeping.dmi', "right_hand" = 'icons/mob/in-hand/right/beekeeping.dmi')
|
||||
var/list/caught_bees = list()
|
||||
var/caught_bees = 0
|
||||
|
||||
/obj/item/weapon/bee_net/examine(mob/user)
|
||||
..()
|
||||
if(caught_bees.len > 0)
|
||||
to_chat(user, "<span class='info'>There's [caught_bees.len] caught bee\s in it!</span>")
|
||||
if(caught_bees)
|
||||
to_chat(user, "<span class='info'>There's [caught_bees] caught bee\s in it!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>It has no bees in it.</span>")
|
||||
|
||||
/obj/item/weapon/bee_net/afterattack(var/atom/A, var/mob/user, var/proximity_flag, var/click_parameters)
|
||||
if(!proximity_flag)
|
||||
/obj/item/weapon/bee_net/afterattack(atom/A as mob|obj|turf|area, mob/living/user)
|
||||
if(get_dist(A,user) > 1)
|
||||
return
|
||||
if(istype(A,/obj/machinery/apiary))
|
||||
return
|
||||
@@ -44,64 +31,61 @@
|
||||
var/caught = 0
|
||||
for(var/mob/living/simple_animal/bee/B in T)
|
||||
caught = 1
|
||||
if(B.calmed > 0 || (B.state != BEE_OUT_FOR_ENEMIES))
|
||||
if (prob(max(0,100-B.bees.len*5)))
|
||||
for (var/datum/bee/BEES in B.bees)
|
||||
caught_bees.Add(BEES)
|
||||
BEES.home = null
|
||||
if (B.home)
|
||||
B.home.bees_outside_hive.Remove(BEES)
|
||||
qdel(B)
|
||||
B = null
|
||||
user.visible_message("<span class='notice'>[user] nets some bees.</span>","<span class='notice'>You net up some of the bees.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] swings at some bees, they don't seem to like it.</span>","<span class='warning'>You swing at some bees, they don't seem to like it.</span>")
|
||||
B.state = BEE_OUT_FOR_ENEMIES
|
||||
B.target = user
|
||||
if(B.feral < 0)
|
||||
caught_bees += B.strength
|
||||
qdel(B)
|
||||
B = null
|
||||
user.visible_message("<span class='notice'>[user] nets some bees.</span>","<span class='notice'>You net up some of the becalmed bees.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] swings at some bees, they don't seem to like it.</span>","<span class='warning'>The bees are too angry to let themselves get caught.</span>")
|
||||
B.state = BEE_OUT_FOR_ENEMIES
|
||||
user.visible_message("<span class='warning'>[user] swings at some bees, they don't seem to like it.</span>","<span class='warning'>You swing at some bees, they don't seem to like it.</span>")
|
||||
B.feral = 5
|
||||
B.target = user
|
||||
if(!caught)
|
||||
to_chat(user, "<span class='warning'>There are no bees in front of you!</span>")
|
||||
|
||||
/obj/item/weapon/bee_net/attack_self(mob/user as mob)
|
||||
empty_bees()
|
||||
var/turf/T = get_step(get_turf(user), user.dir)
|
||||
var/caught = 0
|
||||
for(var/mob/living/simple_animal/bee/B in T)
|
||||
caught = 1
|
||||
if(B.feral < 0)
|
||||
caught_bees += B.strength
|
||||
qdel(B)
|
||||
B = null
|
||||
user.visible_message("<span class='notice'>[user] nets some bees.</span>","<span class='notice'>You net up some of the becalmed bees.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] swings at some bees, they don't seem to like it.</span>","<span class='warning'>You swing at some bees, they don't seem to like it.</span>")
|
||||
B.feral = 5
|
||||
B.target = user
|
||||
if(!caught)
|
||||
to_chat(user, "<span class='warning'>There are no bees in front of you!</span>")
|
||||
|
||||
/obj/item/weapon/bee_net/verb/empty_bees()
|
||||
set src in usr
|
||||
set name = "Empty bee net"
|
||||
set category = "Object"
|
||||
var/mob/living/carbon/M
|
||||
if(isliving(usr))
|
||||
if(iscarbon(usr))
|
||||
M = usr
|
||||
|
||||
if (caught_bees.len > 0)
|
||||
to_chat(M, "<span class='warning'>You empty \the [src]! The bees are furious!</span>")
|
||||
//release a few swarms
|
||||
while(caught_bees.len > 5)
|
||||
var/mob/living/simple_animal/bee/B = new(get_turf(src))
|
||||
for (var/i = 1 to 5)
|
||||
var/datum/bee/BEE = pick(caught_bees)
|
||||
caught_bees.Remove(BEE)
|
||||
BEE.state = BEE_OUT_FOR_ENEMIES
|
||||
B.addBee(BEE)
|
||||
B.state = BEE_OUT_FOR_ENEMIES
|
||||
while(caught_bees > 0)
|
||||
//release a few super massive swarms
|
||||
while(caught_bees > 5)
|
||||
var/mob/living/simple_animal/bee/B = new(src.loc)
|
||||
B.feral = 5
|
||||
B.target = M
|
||||
|
||||
B.strength = 6
|
||||
B.icon_state = "bees_swarm"
|
||||
caught_bees -= 6
|
||||
|
||||
//what's left over
|
||||
var/mob/living/simple_animal/bee/B = new(get_turf(src))
|
||||
while(caught_bees.len > 0)
|
||||
var/datum/bee/BEE = pick(caught_bees)
|
||||
caught_bees.Remove(BEE)
|
||||
BEE.state = BEE_OUT_FOR_ENEMIES
|
||||
B.addBee(BEE)
|
||||
B.state = BEE_OUT_FOR_ENEMIES
|
||||
var/mob/living/simple_animal/bee/B = new(src.loc)
|
||||
B.strength = caught_bees
|
||||
B.icon_state = "bees[B.strength]"
|
||||
B.feral = 5
|
||||
B.target = M
|
||||
else
|
||||
to_chat(M, "<span class='warning'>There are no bees inside the net!</span>")
|
||||
|
||||
caught_bees = 0
|
||||
|
||||
/obj/item/apiary
|
||||
name = "moveable apiary"
|
||||
@@ -110,26 +94,16 @@
|
||||
item_state = "giftbag"
|
||||
w_class = W_CLASS_HUGE
|
||||
|
||||
/obj/item/beezeez
|
||||
name = "bottle of BeezEez"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle17"
|
||||
flags = FPRINT
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/beezeez
|
||||
name = "packet of BeezEez"
|
||||
desc = "Delicious nutrients for domesticated bees. Helps jumpstarting a new colony, and purging an existing one from toxins."
|
||||
icon = 'icons/obj/apiary_bees_etc.dmi'
|
||||
icon_state = "beezeez"
|
||||
trash = /obj/item/trash/beezeez
|
||||
volume = 3
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/beezeez/New()
|
||||
..()
|
||||
reagents.add_reagent(NUTRIMENT, 3)
|
||||
bitesize = 1
|
||||
|
||||
|
||||
/obj/item/trash/beezeez
|
||||
name = "empty packet of BeezEez"
|
||||
icon = 'icons/obj/apiary_bees_etc.dmi'
|
||||
icon_state = "beezeez-empty"
|
||||
|
||||
/obj/item/beezeez/New()
|
||||
. = ..()
|
||||
pixel_x = rand(-5.0, 5) * PIXEL_MULTIPLIER
|
||||
pixel_y = rand(-5.0, 5) * PIXEL_MULTIPLIER
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/honeycomb
|
||||
name = "honeycomb"
|
||||
@@ -143,6 +117,30 @@
|
||||
reagents.add_reagent(SUGAR, 2)
|
||||
bitesize = 2
|
||||
|
||||
/datum/reagent/honey
|
||||
name = "Honey"
|
||||
id = HONEY
|
||||
description = "A golden yellow syrup, loaded with sugary sweetness."
|
||||
color = "#FEAE00"
|
||||
alpha = 200
|
||||
nutriment_factor = 15 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/honey/on_mob_life(var/mob/living/M as mob)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!holder)
|
||||
return
|
||||
H.nutrition += nutriment_factor
|
||||
holder.remove_reagent(src.id, 0.4)
|
||||
if(H.getBruteLoss() && prob(60))
|
||||
H.heal_organ_damage(2, 0)
|
||||
if(H.getFireLoss() && prob(50))
|
||||
H.heal_organ_damage(0, 2)
|
||||
if(H.getToxLoss() && prob(50))
|
||||
H.adjustToxLoss(-2)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/book/manual/hydroponics_beekeeping
|
||||
name = "The Ins and Outs of Apiculture - A Precise Art"
|
||||
icon_state ="bookHydroponicsBees"
|
||||
@@ -161,13 +159,12 @@
|
||||
<body>
|
||||
<h3>Raising Bees</h3>
|
||||
|
||||
Bees are loving but fickle creatures. Don't mess with their hive or annoy them, and you'll avoid their ire.
|
||||
If you must get on their bad side, make sure to equip proper protection gear, or sufficiently impermeable clothing to reduce the chances of getting stung.
|
||||
Bee nets allow you to pick up bees, but if there's a lot of them they might get mad at you, at which point you'll have to calm them first
|
||||
by spraying water over them. For that reason, make sure to carry an extinguisher or water sprayer at all times.
|
||||
Beezeez is a mixture of pollen pellets fit for the nutrition of domesticated bees. Excellent to kickstart a colony, or reduce one's toxicity.
|
||||
Bees are loving but fickle creatures. Don't mess with their hive and stay away from any clusters of them, and you'll avoid their ire.
|
||||
Sometimes, you'll need to dig around in there for those delicious sweeties though - in that case make sure you wear sealed protection gear
|
||||
and carry an extinguisher or smoker with you - any bees chasing you, once calmed down, can thusly be netted and returned safely to the hive.
|
||||
Beezeez is a cure-all panacea for them, use it on an apiary to kickstart it, but use it too much and the hive may grow to apocalyptic proportions.
|
||||
Other than that, bees are excellent pets for all the family and are excellent caretakers of one's garden:
|
||||
having a hive or two around will aid in the longevity and growth rate of plants, but be careful, toxic plants will eventually harm your colony.
|
||||
having a hive or two around will aid in the longevity and growth rate of plants, and aid them in fighting off poisons and disease.
|
||||
|
||||
<h3>Dealing with Feral Bees</h3>
|
||||
|
||||
@@ -185,7 +182,7 @@
|
||||
First you start by deconstructing the apiary with a hatchet. The bees will become aggressive as soon as you begin. Once the apiary is deconstructed, follow the steps in the above
|
||||
section to capture the homeless feral bees and move them to another apiary. Or simply rebuild the apiary that you just deconstructed. The honeycombs harvested this way
|
||||
are full of honey, you can grind them to process the liquid, then place it in a Condimaster to conserve it in a honey pot. Or you can just eat the honeycombs if you feel like it,
|
||||
they are delicious. You can produce a high variety of flavoured honey by having your bees harvest various plants.
|
||||
they are delicious.
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
id="beez"
|
||||
name="Bottle of BeezEez"
|
||||
other_amounts=list(5)
|
||||
result=/obj/item/weapon/reagent_containers/food/snacks/beezeez
|
||||
result=/obj/item/beezeez
|
||||
|
||||
/datum/biogen_recipe/leather
|
||||
category="Leather"
|
||||
|
||||
@@ -1650,7 +1650,7 @@ var/global/num_vending_terminals = 1
|
||||
icon_state = "nutri"
|
||||
icon_deny = "nutri-deny"
|
||||
products = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/beezeez = 20,
|
||||
/obj/item/beezeez = 45,
|
||||
/obj/item/weapon/reagent_containers/glass/fertilizer/ez = 35,
|
||||
/obj/item/weapon/reagent_containers/glass/fertilizer/l4z = 25,
|
||||
/obj/item/weapon/reagent_containers/glass/fertilizer/rh = 15,
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
/obj/item/weapon/grenade/spawnergrenade/beenade
|
||||
name = "bee-nade"
|
||||
icon_state = "beenade"
|
||||
spawner_type = /mob/living/simple_animal/bee/angry
|
||||
spawner_type = /mob/living/simple_animal/bee
|
||||
deliveryamt = 15
|
||||
origin_tech = Tc_MATERIALS + "=3;" + Tc_MAGNETS + "=4;" + Tc_BIOTECH + "=4"
|
||||
|
||||
@@ -86,4 +86,13 @@
|
||||
if(!spawned_atoms || !spawned_atoms.len)
|
||||
return
|
||||
playsound(get_turf(src), 'sound/effects/bees.ogg', 100, 1)
|
||||
|
||||
for(var/A in spawned_atoms)
|
||||
var/mob/living/simple_animal/bee/BEE = A
|
||||
if(!istype(BEE))
|
||||
continue
|
||||
BEE.strength = 1
|
||||
BEE.toxic = 5
|
||||
BEE.mut = 2
|
||||
BEE.feral = 25
|
||||
BEE.icon_state = "bees1-feral"
|
||||
BEE.newTarget()
|
||||
|
||||
@@ -145,24 +145,16 @@
|
||||
|
||||
/obj/item/weapon/storage/briefcase/bees/show_to(mob/user as mob)
|
||||
if(!released)
|
||||
release(user)
|
||||
release()
|
||||
..()
|
||||
|
||||
//You can hit someone with the briefcase, and the bees will swarm at them
|
||||
/obj/item/weapon/storage/briefcase/bees/afterattack(var/atom/target, var/mob/user, var/proximity_flag, var/click_parameters)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
|
||||
if (!isliving(target))
|
||||
return
|
||||
|
||||
if(!released)
|
||||
release(target)
|
||||
|
||||
//The bees will attack whoever opens the briefcase
|
||||
/obj/item/weapon/storage/briefcase/bees/proc/release(var/mob/user)
|
||||
released = TRUE
|
||||
/obj/item/weapon/storage/briefcase/bees/proc/release()
|
||||
visible_message("<span class='danger'>A swarm of bees pours out of \the [src]!</span>")
|
||||
var/mob/living/simple_animal/bee/swarm/BEES = new(get_turf(src))
|
||||
BEES.forceMove(user.loc)
|
||||
BEES.target = user
|
||||
var/mob/living/simple_animal/bee/BEE = new(get_turf(src))
|
||||
BEE.strength = 20
|
||||
BEE.toxic = 5
|
||||
BEE.mut = 2
|
||||
BEE.feral = 25
|
||||
BEE.icon_state = "bees_swarm-feral"
|
||||
BEE.newTarget()
|
||||
released = TRUE
|
||||
|
||||
@@ -784,7 +784,6 @@ var/global/floorIsLava = 0
|
||||
<A href='?src=\ref[src];secretsfun=aliens'>Trigger an Alien infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=alien_silent'>Spawn an Alien silently</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=spiders'>Trigger a Spider infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=vermin_infestation'>Spawn a vermin infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=hostile_infestation'>Spawn a hostile creature infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=carp'>Trigger a Carp migration</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=mobswarm'>Trigger mobs of your choice appearing out of thin air</A><BR>
|
||||
|
||||
@@ -3000,8 +3000,13 @@
|
||||
to_chat(world, "<font size='10' color='red'><b>NOT THE BEES!</b></font>")
|
||||
world << sound('sound/effects/bees.ogg')
|
||||
for(var/mob/living/M in player_list)
|
||||
var/mob/living/simple_animal/bee/swarm/BEE = new(get_turf(M))
|
||||
var/mob/living/simple_animal/bee/BEE = new(get_turf(M))
|
||||
BEE.strength = 16
|
||||
BEE.toxic = 5
|
||||
BEE.mut = 2
|
||||
BEE.feral = 25
|
||||
BEE.target = M
|
||||
BEE.icon_state = "bees_swarm-feral"
|
||||
|
||||
if("virus")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
@@ -3387,38 +3392,6 @@
|
||||
hardcore_mode = 0
|
||||
to_chat(world, "<h5><span class='danger'>Hardcore mode has been disabled</span></h5>")
|
||||
to_chat(world, "<span class='info'>Starvation will no longer kill player-controlled characters.</span>")
|
||||
if("vermin_infestation")
|
||||
var/list/locations = list(
|
||||
"RANDOM" = null,
|
||||
"kitchen" = LOC_KITCHEN,
|
||||
"atmospherics" = LOC_ATMOS,
|
||||
"incinerator" = LOC_INCIN,
|
||||
"chapel" = LOC_CHAPEL,
|
||||
"library" = LOC_LIBRARY,
|
||||
"vault" = LOC_VAULT,
|
||||
"technical storage" = LOC_TECH,
|
||||
)
|
||||
var/list/vermins = list(
|
||||
"RANDOM" = null,
|
||||
"mice" = VERM_MICE,
|
||||
"lizards" = VERM_LIZARDS,
|
||||
"spiders" = VERM_SPIDERS,
|
||||
"slimes" = VERM_SLIMES,
|
||||
"bats" = VERM_BATS,
|
||||
"borers" = VERM_BORERS,
|
||||
"mimics" = VERM_MIMICS,
|
||||
"roaches" = VERM_ROACHES,
|
||||
"gremlins" = VERM_GREMLINS,
|
||||
"bees" = VERM_BEES,
|
||||
)
|
||||
var/ov = vermins[input("What vermin should infest the station?", "Vermin Infestation") in vermins]
|
||||
var/ol = locations[input("Where should they spawn?", "Vermin Infestation") in locations]
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","VI")
|
||||
message_admins("[key_name_admin(usr)] has triggered an infestation of vermins.", 1)
|
||||
var/datum/event/infestation/infestation_event = new()
|
||||
infestation_event.override_location = ol
|
||||
infestation_event.override_vermin = ov
|
||||
if("hostile_infestation")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","HI")
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
#define LOC_KITCHEN 0
|
||||
#define LOC_ATMOS 1
|
||||
#define LOC_INCIN 2
|
||||
#define LOC_CHAPEL 3
|
||||
#define LOC_LIBRARY 4
|
||||
#define LOC_HYDRO 5
|
||||
#define LOC_VAULT 6
|
||||
#define LOC_TECH 7
|
||||
|
||||
#define VERM_MICE 0
|
||||
#define VERM_LIZARDS 1
|
||||
#define VERM_SPIDERS 2
|
||||
#define VERM_SLIMES 3
|
||||
#define VERM_BATS 4
|
||||
#define VERM_BORERS 5
|
||||
#define VERM_MIMICS 6
|
||||
#define VERM_ROACHES 7
|
||||
#define VERM_GREMLINS 8
|
||||
|
||||
/datum/event/infestation
|
||||
announceWhen = 15
|
||||
@@ -6,15 +23,10 @@
|
||||
var/locstring
|
||||
var/vermstring
|
||||
var/vermin = VERM_MICE
|
||||
var/override_location = null
|
||||
var/override_vermin = null
|
||||
|
||||
/datum/event/infestation/start()
|
||||
|
||||
var/location = pick(LOC_KITCHEN, LOC_ATMOS, LOC_INCIN, LOC_CHAPEL, LOC_LIBRARY, LOC_HYDRO, LOC_VAULT, LOC_TECH)
|
||||
if (override_location)
|
||||
location = override_location
|
||||
|
||||
var/spawn_area_type
|
||||
|
||||
//TODO: These locations should be specified by the map datum or by the area. //Area datums, any day now
|
||||
@@ -48,10 +60,7 @@
|
||||
var/list/spawn_types = list()
|
||||
var/max_number = 4
|
||||
|
||||
vermin = pick(VERM_MICE, VERM_LIZARDS, VERM_SPIDERS, VERM_SLIMES, VERM_BATS, VERM_BORERS, VERM_MIMICS, VERM_ROACHES, VERM_GREMLINS, VERM_BEES)
|
||||
|
||||
if (override_vermin)
|
||||
vermin = override_vermin
|
||||
vermin = pick(VERM_MICE, VERM_LIZARDS, VERM_SPIDERS, VERM_SLIMES, VERM_BATS, VERM_BORERS, VERM_MIMICS, VERM_ROACHES, VERM_GREMLINS)
|
||||
|
||||
switch(vermin)
|
||||
if(VERM_MICE)
|
||||
@@ -87,10 +96,6 @@
|
||||
spawn_types = /mob/living/simple_animal/hostile/gremlin
|
||||
vermstring = "gremlins"
|
||||
max_number = 4 //2 to 4
|
||||
if(VERM_BEES)
|
||||
spawn_types = /obj/machinery/apiary/wild
|
||||
vermstring = "angry bees"
|
||||
max_number = 2
|
||||
|
||||
var/number = rand(2, max_number)
|
||||
|
||||
@@ -116,3 +121,20 @@
|
||||
warning = "Drive them away!" //DF reference
|
||||
|
||||
command_alert(new /datum/command_alert/vermin(vermstring, locstring, warning))
|
||||
|
||||
#undef LOC_KITCHEN
|
||||
#undef LOC_ATMOS
|
||||
#undef LOC_INCIN
|
||||
#undef LOC_CHAPEL
|
||||
#undef LOC_LIBRARY
|
||||
#undef LOC_HYDRO
|
||||
#undef LOC_VAULT
|
||||
#undef LOC_TECH
|
||||
|
||||
#undef VERM_MICE
|
||||
#undef VERM_LIZARDS
|
||||
#undef VERM_SPIDERS
|
||||
#undef VERM_SLIMES
|
||||
#undef VERM_BATS
|
||||
#undef VERM_MIMICS
|
||||
#undef VERM_GREMLINS
|
||||
|
||||
@@ -43,8 +43,7 @@
|
||||
var/force_update // Set this to bypass the cycle time check.
|
||||
var/skip_aging = 0 // Don't advance age for the next N cycles.
|
||||
|
||||
var/pollination = 0
|
||||
var/bees = 0 //Are the trays currently affected by the bees' pollination?
|
||||
var/bees = 0 //Are there currently bees above the tray?
|
||||
|
||||
//var/decay_reduction = 0 //How much is mutation decay reduced by?
|
||||
var/weed_coefficient = 1 //Coefficient to the chance of weeds appearing
|
||||
|
||||
@@ -12,12 +12,11 @@
|
||||
return
|
||||
lastcycle = world.time
|
||||
|
||||
if (pollination <= 0)
|
||||
bees = 0
|
||||
else
|
||||
pollination--
|
||||
var/mob/living/simple_animal/bee/BEE = locate() in loc
|
||||
if(BEE && (BEE.feral < 1))
|
||||
bees = 1
|
||||
|
||||
else
|
||||
bees = 0
|
||||
|
||||
// Weeds like water and nutrients, there's a chance the weed population will increase.
|
||||
// Bonus chance if the tray is unoccupied.
|
||||
@@ -215,6 +214,9 @@
|
||||
if(toxins > seed.toxins_tolerance)
|
||||
health -= toxin_uptake
|
||||
toxins -= toxin_uptake * (1+bees)
|
||||
if(BEE && BEE.parent)
|
||||
var/obj/machinery/apiary/A = BEE.parent
|
||||
A.toxic = Clamp(A.toxic + toxin_uptake/2, 0, 25) //gotta be careful where you let your bees hang around
|
||||
if(draw_warnings)
|
||||
update_icon_after_process = 1
|
||||
|
||||
|
||||
@@ -1,140 +1,25 @@
|
||||
//Beekeeping 3.0 on 07/20/2017 by Deity Link
|
||||
|
||||
#define TIME_TO_POLLINATE 4//how long (in seconds) will a bee remain on a plant before moving to the next one
|
||||
#define DURATION_OF_POLLINATION 8//how long (in seconds) will the plant be enhanced by the bees (starts as soon as the bees begin pollination)
|
||||
#define FATIGUE_PER_POLLINATIONS 4//how much extra fatigue does the bee receive from performing a successful pollination (if set to 0, the bee won't stop until there are no more flowers in range)
|
||||
#define FATIGUE_TO_RETURN 20//once reached, the bee will head back to its hive
|
||||
|
||||
#define BOREDOM_TO_RETURN 30//once reached, the bee will head back to its hive
|
||||
|
||||
#define MAX_BEES_PER_SWARM 20//explicit
|
||||
|
||||
/*
|
||||
|
||||
> bee datums
|
||||
> bee corpses
|
||||
> bee mob
|
||||
> bee presets
|
||||
|
||||
*/
|
||||
//////////////////////BEE DATUMS///////////////////////////////////////
|
||||
|
||||
/datum/bee
|
||||
var/mob/living/simple_animal/bee/mob = null
|
||||
var/obj/machinery/apiary/home = null
|
||||
var/damage = 1//the brute damage dealt by a sting. Set when leaving the hive (spawning).
|
||||
var/toxic = 0//the extra toxic damage dealt by a sting. Set when leaving the hive (spawning).
|
||||
var/health = 10
|
||||
var/maxHealth = 10
|
||||
var/list/pollens = list()//flowers (seed_datums) that were pollinated by that bee
|
||||
var/state = BEE_ROAMING
|
||||
var/fatigue = 0//increases after a successful pollination or when searching for flowers in vain
|
||||
var/bored = 0//increases when searching for enemies in vain
|
||||
var/corpse = /obj/effect/decal/cleanable/bee
|
||||
var/toxins = 0
|
||||
|
||||
//When a bee leaves the hive, it takes on the hive's damage and toxic values
|
||||
/datum/bee/New(var/obj/machinery/apiary/spawner = null)
|
||||
..()
|
||||
if (spawner)
|
||||
home = spawner
|
||||
damage = spawner.damage
|
||||
toxic = spawner.toxic
|
||||
|
||||
//call to make bees go look out for plants
|
||||
/datum/bee/proc/goPollinate()
|
||||
state = BEE_OUT_FOR_PLANTS
|
||||
mob.updateState = 1
|
||||
|
||||
//call to make bees go look out for kills. angry bees are red-eyed.
|
||||
/datum/bee/proc/angerAt(var/mob/M = null)
|
||||
if (state == BEE_SWARM)
|
||||
return
|
||||
state = BEE_OUT_FOR_ENEMIES
|
||||
mob.target = M
|
||||
mob.updateState = 1
|
||||
|
||||
//call to make bees go home. Hive-less bees never calm down
|
||||
/datum/bee/proc/homeCall()
|
||||
if (home)
|
||||
state = BEE_HEADING_HOME
|
||||
mob.updateState = 1
|
||||
|
||||
/datum/bee/proc/Die()
|
||||
if (mob)
|
||||
new corpse(get_turf(mob))
|
||||
mob.bees.Remove(src)
|
||||
mob = null
|
||||
if (home)
|
||||
home.bees_outside_hive -= src
|
||||
home = null
|
||||
qdel(src)
|
||||
|
||||
/datum/bee/queen_bee
|
||||
health = 15
|
||||
maxHealth = 15
|
||||
corpse = /obj/effect/decal/cleanable/bee/queen_bee
|
||||
var/colonizing = 0
|
||||
|
||||
|
||||
/datum/bee/queen_bee/proc/setHome(var/obj/machinery/apiary/A)
|
||||
state = BEE_SWARM
|
||||
colonizing = 1
|
||||
mob.destination = A
|
||||
mob.updateState = 1
|
||||
|
||||
|
||||
//////////////////////BEE CORPSES///////////////////////////////////////
|
||||
|
||||
/obj/effect/decal/cleanable/bee
|
||||
name = "dead bee"
|
||||
desc = "This one stung for the last time."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/apiary_bees_etc.dmi'
|
||||
icon_state = "bee_dead"
|
||||
anchored = 0
|
||||
mouse_opacity = 1
|
||||
plane = LYING_MOB_PLANE
|
||||
|
||||
/obj/effect/decal/cleanable/bee/New()
|
||||
..()
|
||||
dir = pick(cardinal)
|
||||
pixel_x = rand(-10,10)
|
||||
pixel_y = rand(-4,4)
|
||||
|
||||
/obj/effect/decal/cleanable/bee/queen_bee
|
||||
name = "dead queen bee"
|
||||
icon_state = "queen_bee_dead"
|
||||
|
||||
|
||||
|
||||
//////////////////////BEE MOB///////////////////////////////////////
|
||||
|
||||
/mob/living/simple_animal/bee
|
||||
name = "bees"
|
||||
icon = 'icons/obj/apiary_bees_etc.dmi'
|
||||
icon_state = "bees1"
|
||||
icon_dead = "bee_dead"
|
||||
icon_dead = "bees1"
|
||||
|
||||
mob_property_flags = MOB_SWARM
|
||||
size = SIZE_TINY
|
||||
can_butcher = 0
|
||||
|
||||
var/updateState = 0//if set to 1, the bee mob will check if it should split based on its bee datums' intents
|
||||
var/state = BEE_ROAMING
|
||||
var/atom/destination = null
|
||||
var/list/bees = list()
|
||||
var/mob/target = null
|
||||
var/current_physical_damage = 0
|
||||
var/current_poison_damage = 0
|
||||
var/obj/machinery/apiary/home = null
|
||||
var/calmed = 0
|
||||
var/pollinating = 0
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/target_plant = null
|
||||
var/list/visited_plants = list()
|
||||
var/strength = 1
|
||||
var/feral = 0
|
||||
var/mut = 0
|
||||
var/toxic = 0
|
||||
var/turf/target_turf
|
||||
var/mob/target
|
||||
var/obj/machinery/apiary/parent
|
||||
pass_flags = PASSTABLE
|
||||
turns_per_move = 6
|
||||
density = 0
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/my_hydrotray
|
||||
|
||||
// Allow final solutions.
|
||||
min_oxy = 5
|
||||
@@ -152,18 +37,17 @@
|
||||
flying = 1
|
||||
meat_type = 0
|
||||
|
||||
var/max_hive_dist=5
|
||||
held_items = list()
|
||||
|
||||
/mob/living/simple_animal/bee/New(loc, var/obj/machinery/apiary/new_home)
|
||||
/mob/living/simple_animal/bee/New(loc, var/obj/machinery/apiary/new_parent)
|
||||
..()
|
||||
home = new_home
|
||||
|
||||
parent = new_parent
|
||||
|
||||
/mob/living/simple_animal/bee/Destroy()
|
||||
..()
|
||||
if(home)
|
||||
for (var/datum/bee/B in bees)
|
||||
home.bees_outside_hive -= B
|
||||
if(parent)
|
||||
parent.owned_bee_swarms.Remove(src)
|
||||
|
||||
/mob/living/simple_animal/bee/Die()
|
||||
returnToPool(src)
|
||||
@@ -180,17 +64,10 @@
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/bee/Cross(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
if(istype(mover, /obj/item/projectile) && !istype(mover, /obj/item/projectile/bullet/beegun))
|
||||
|
||||
//Projectiles are more likely to hit if there are many bees in the swarm
|
||||
if (prob(min(100,bees.len * 4)))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
//DEALING WITH DAMAGE
|
||||
/mob/living/simple_animal/bee/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
user.delayNextAttack(8)
|
||||
if (istype(O,/obj/item/weapon/bee_net)) return
|
||||
if(O.force)
|
||||
var/damage = O.force
|
||||
if (O.damtype == HALLOSS)
|
||||
@@ -199,39 +76,15 @@
|
||||
user.visible_message("<span class='danger'>[src] has been attacked with [O] by [user]. </span>")
|
||||
panic_attack(user)
|
||||
|
||||
/mob/living/simple_animal/bee/hitby(AM as mob|obj)
|
||||
..()
|
||||
visible_message("<span class='warning'>\The [src] was hit by \the [AM].</span>", 1)
|
||||
var/mob/M = null
|
||||
if (ismob(AM))
|
||||
M = AM
|
||||
panic_attack(M)
|
||||
|
||||
/mob/living/simple_animal/bee/bullet_act(var/obj/item/projectile/P)
|
||||
..()
|
||||
if(P && P.firer)
|
||||
panic_attack(P.firer)
|
||||
|
||||
/mob/living/simple_animal/bee/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
qdel(src)
|
||||
if (2)
|
||||
adjustBruteLoss(100)
|
||||
if (3)
|
||||
adjustBruteLoss(20)
|
||||
|
||||
/mob/living/simple_animal/bee/unarmed_attacked(mob/living/attacker, damage, damage_type, zone)
|
||||
/mob/living/simple_animal/bee/attack_hand(mob/living/carbon/human/M as mob)//punching bees!
|
||||
..()
|
||||
panic_attack(attacker)
|
||||
|
||||
/mob/living/simple_animal/bee/attack_paw(var/mob/M)
|
||||
..()
|
||||
panic_attack(M)
|
||||
|
||||
/mob/living/simple_animal/bee/attack_alien(var/mob/M)
|
||||
..()
|
||||
panic_attack(M)
|
||||
if((M.a_intent == I_HURT) || (M.a_intent == I_DISARM))
|
||||
panic_attack(M)
|
||||
|
||||
/mob/living/simple_animal/bee/kick_act(mob/living/carbon/human/H)
|
||||
if(prob(10))
|
||||
@@ -245,131 +98,45 @@
|
||||
|
||||
panic_attack(H)
|
||||
|
||||
/mob/living/simple_animal/bee/adjustBruteLoss(var/amount)
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
|
||||
while (amount > 0 && bees.len)
|
||||
var/datum/bee/B = pick(bees)
|
||||
if (B.health > amount)
|
||||
B.health -= amount
|
||||
amount = 0
|
||||
else
|
||||
amount -= B.health
|
||||
B.Die()
|
||||
|
||||
if (bees.len <= 0)
|
||||
qdel(src)
|
||||
updateDamage()
|
||||
update_icon()
|
||||
|
||||
|
||||
//CUSTOM PROCS
|
||||
/mob/living/simple_animal/bee/proc/addBee(var/datum/bee/B)
|
||||
bees.Add(B)
|
||||
B.mob = src
|
||||
home = B.home
|
||||
updateDamage()
|
||||
|
||||
/mob/living/simple_animal/bee/proc/updateDamage()
|
||||
if (bees.len <= 0)
|
||||
return
|
||||
|
||||
var/total_brute = 0
|
||||
var/total_toxic = 0
|
||||
for (var/datum/bee/BEE in bees)
|
||||
total_brute += BEE.damage
|
||||
total_toxic += BEE.toxic
|
||||
current_physical_damage = total_brute/2//1 regular bee = 0.5 brute; 20 regular bees = 10 brute; 20 mutated(2 damage) bees = 20 brute;
|
||||
current_poison_damage = bees.len + (total_toxic/bees.len)/100//1 regular bee = 1 tox; 20 regular bees = 20 tox; 20 intoxicated(100 toxic) bees = 40 tox;
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bee/proc/panic_attack(mob/damagesource)
|
||||
for(var/mob/living/simple_animal/bee/B in range(src,3))
|
||||
if (B.state == BEE_SWARM || calmed > 0)
|
||||
return
|
||||
B.feral = 15
|
||||
B.target = damagesource
|
||||
|
||||
//only their friends from the same apiary will answer their call. homeless bees will also help each others.
|
||||
if (B.home == home)
|
||||
B.state = BEE_OUT_FOR_ENEMIES
|
||||
B.target = damagesource
|
||||
/mob/living/simple_animal/bee/wander_move(var/turf/dest)
|
||||
var/goodmove=0
|
||||
if(!my_hydrotray || my_hydrotray.loc != src.loc || my_hydrotray.dead || !my_hydrotray.seed)
|
||||
// Wander the wastes
|
||||
goodmove=1
|
||||
else
|
||||
// Restrict bee to area within distance of tray
|
||||
var/turf/hiveturf = get_turf(my_hydrotray)
|
||||
var/current_dist = get_dist(src,hiveturf)
|
||||
var/new_dist = get_dist(dest,hiveturf)
|
||||
// If we're beyond hive max range and we're not feral, we can only move towards or parallel to the hive.
|
||||
if(current_dist > max_hive_dist && !feral)
|
||||
if(new_dist <= current_dist)
|
||||
goodmove=1
|
||||
else
|
||||
// Otherwise, we can move anywhere we like.
|
||||
goodmove=1
|
||||
if(goodmove)
|
||||
Move(dest)
|
||||
|
||||
|
||||
////////////////////////////////LIFE////////////////////////////////////////
|
||||
/mob/living/simple_animal/bee/proc/newTarget()
|
||||
var/list/neabyMobs = list()
|
||||
for(var/mob/living/G in view(src,7))
|
||||
neabyMobs += G
|
||||
target = pick(neabyMobs)
|
||||
|
||||
/mob/living/simple_animal/bee/Life()
|
||||
if(timestopped)
|
||||
return 0
|
||||
return 0 //under effects of time magick
|
||||
|
||||
..()
|
||||
|
||||
if (!bees || bees.len <= 0)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(stat != DEAD)
|
||||
//SUFFERING FROM HIGH TOXICITY
|
||||
if (((current_poison_damage - bees.len)/bees.len*100) > 50)
|
||||
if (prob((((current_poison_damage - bees.len)/bees.len*100)-50)*2))
|
||||
adjustBruteLoss(3)
|
||||
if (bees.len <= 0)
|
||||
return
|
||||
|
||||
//SPLITTING THE SWARM DEPENDING ON THEIR INTENT
|
||||
if (updateState)
|
||||
updateState = 0
|
||||
var/list/swarmers = list()
|
||||
var/list/home_goers = list()
|
||||
var/list/pollinaters = list()
|
||||
var/list/fighters = list()
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
for (var/datum/bee/B in bees)
|
||||
if (B.state == BEE_SWARM)
|
||||
swarmers.Add(B)
|
||||
if (B.state == BEE_HEADING_HOME)
|
||||
home_goers.Add(B)
|
||||
if (B.state == BEE_OUT_FOR_PLANTS)
|
||||
pollinaters.Add(B)
|
||||
if (B.state == BEE_OUT_FOR_ENEMIES)
|
||||
fighters.Add(B)
|
||||
|
||||
if (swarmers.len > 0) // this intent comes from a queen, and thus overrides the intents of every other bee in the swarm
|
||||
for (var/datum/bee/B in bees)
|
||||
B.state = BEE_SWARM
|
||||
B.home = destination
|
||||
home = destination
|
||||
state = BEE_SWARM
|
||||
|
||||
if (home_goers.len > 0)
|
||||
if (home_goers.len == bees.len)
|
||||
state = BEE_HEADING_HOME
|
||||
|
||||
else
|
||||
var/mob/living/simple_animal/bee/B_mob = getFromPool(/mob/living/simple_animal/bee,T)
|
||||
for (var/datum/bee/B in home_goers)
|
||||
B_mob.addBee(B)
|
||||
bees.Remove(B)
|
||||
B_mob.home = home
|
||||
B_mob.updateState = 1
|
||||
|
||||
if (pollinaters.len > 0)
|
||||
if (pollinaters.len == bees.len)
|
||||
state = BEE_OUT_FOR_PLANTS
|
||||
|
||||
else
|
||||
var/mob/living/simple_animal/bee/B_mob = getFromPool(/mob/living/simple_animal/bee,T)
|
||||
for (var/datum/bee/B in pollinaters)
|
||||
B_mob.addBee(B)
|
||||
bees.Remove(B)
|
||||
B_mob.home = home
|
||||
B_mob.updateState = 1
|
||||
|
||||
if (fighters.len > 0)
|
||||
state = BEE_OUT_FOR_ENEMIES
|
||||
|
||||
|
||||
//CALMING BEES
|
||||
if(stat != DEAD) //If we're alive, see if we can be calmed down.
|
||||
//smoke, water and steam calms us down
|
||||
var/calming = 0
|
||||
var/list/calmers = list(
|
||||
/obj/effect/decal/chemical_puff,
|
||||
/obj/effect/effect/smoke/chem,
|
||||
@@ -379,291 +146,151 @@
|
||||
/obj/effect/mist,
|
||||
)
|
||||
|
||||
if (calmed > 0)
|
||||
calmed--
|
||||
|
||||
for(var/this_type in calmers)
|
||||
var/obj/effect/check_effect = locate(this_type) in src.loc
|
||||
if(check_effect && (check_effect.reagents.has_reagent(WATER) || check_effect.reagents.has_reagent(HOLYWATER)))
|
||||
calmed = 6
|
||||
if (state == BEE_OUT_FOR_ENEMIES)
|
||||
src.visible_message("<span class='notice'>The bees calm down!</span>")
|
||||
for (var/datum/bee/B)
|
||||
B.state = BEE_HEADING_HOME
|
||||
state = BEE_HEADING_HOME
|
||||
calming = 1
|
||||
break
|
||||
|
||||
|
||||
if(calming)
|
||||
var/oldferal = feral
|
||||
feral = -10
|
||||
if(oldferal > 0 && feral <= 0)
|
||||
src.visible_message("<span class='notice'>The bees calm down!</span>")
|
||||
target = null
|
||||
target_turf = null
|
||||
wander = 1
|
||||
if(stat == CONSCIOUS)
|
||||
|
||||
//if we're strong enough, sting some people
|
||||
var/mob/living/carbon/human/M = target
|
||||
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
|
||||
if(istype(M))
|
||||
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) // Stinging. The more mutated I am, the harder I sting.
|
||||
M.apply_damage((round(feral/5,1)*(max((round(strength/10,1)),1)))+toxic, TOX) // Bee venom based on how angry I am and how many there are of me!
|
||||
to_chat(M, "<span class='warning'>You have been stung!</span>")
|
||||
M.flash_pain()
|
||||
|
||||
//if we're chasing someone, get a little bit angry
|
||||
if(target && 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
|
||||
|
||||
//CALMED BEES WON'T REMAIN GROUPED
|
||||
if(calmed > 0)
|
||||
if(target)
|
||||
target = null
|
||||
if(bees.len > 5)
|
||||
target_turf = null
|
||||
if(strength > 5)
|
||||
//calm down and spread out a little
|
||||
var/mob/living/simple_animal/bee/B_mob = getFromPool(/mob/living/simple_animal/bee,get_turf(src))
|
||||
for (var/i = 1 to rand(1,5))
|
||||
var/datum/bee/B = pick(bees)
|
||||
B_mob.addBee(B)
|
||||
bees.Remove(B)
|
||||
B_mob.calmed = calmed
|
||||
B_mob.state = state
|
||||
B_mob.home = home
|
||||
B_mob.Move(get_turf(pick(orange(src,1))))
|
||||
var/turf/T = get_turf(pick(orange(src,1)))
|
||||
var/mob/living/simple_animal/bee/B = getFromPool(/mob/living/simple_animal/bee,T)
|
||||
B.strength = rand(1,5)
|
||||
src.strength -= B.strength
|
||||
if(src.strength <= 5)
|
||||
src.icon_state = "bees[src.strength]"
|
||||
B.icon_state = "bees[B.strength]"
|
||||
if(src.parent)
|
||||
B.parent = src.parent
|
||||
src.parent.owned_bee_swarms.Add(B)
|
||||
|
||||
//ATTACKING TARGET
|
||||
else if(state == BEE_OUT_FOR_ENEMIES && M in view(src,1))
|
||||
var/sting_prob = 100
|
||||
if(istype(M))
|
||||
var/obj/item/clothing/worn_suit = M.wear_suit
|
||||
var/obj/item/clothing/worn_helmet = M.head
|
||||
if(worn_suit)
|
||||
var/bio_block = min(worn_suit.armor["bio"],70)
|
||||
var/perm_block = 70-70*worn_suit.permeability_coefficient
|
||||
sting_prob -= max(bio_block,perm_block) // Is your suit sealed? I can't get to 70% of your body.
|
||||
if(worn_helmet)
|
||||
var/bio_block = min(worn_helmet.armor["bio"],30)
|
||||
var/perm_block = 30-30*worn_helmet.permeability_coefficient
|
||||
sting_prob -= max(bio_block,perm_block) // Is your helmet sealed? I can't get to 30% of your body.
|
||||
if(prob(sting_prob))
|
||||
M.apply_damage(current_physical_damage, BRUTE)
|
||||
M.apply_damage(current_poison_damage, TOX)
|
||||
M.visible_message("<span class='warning'>\The [src] are stinging \the [M]!</span>", "<span class='warning'>You have been stung by \the [src]!</span>")
|
||||
M.flash_pain()
|
||||
|
||||
//MAKING NOISE
|
||||
//make some noise
|
||||
if(prob(1))
|
||||
if(prob(50))
|
||||
src.visible_message("<span class='notice'>[pick("Buzzzz.","Hmmmmm.","Bzzz.")]</span>")
|
||||
playsound(get_turf(src), 'sound/effects/bees.ogg', min(20 * bees.len, 100), 1)
|
||||
playsound(get_turf(src), 'sound/effects/bees.ogg', min(20*strength,100), 1)
|
||||
|
||||
|
||||
//GROUPING WITH OTHER BEES
|
||||
for(var/mob/living/simple_animal/bee/B_mob in src.loc)
|
||||
//sanity check
|
||||
if(B_mob == src)
|
||||
for(var/mob/living/simple_animal/bee/B in src.loc)
|
||||
if(B == src)
|
||||
continue
|
||||
|
||||
//bees don't mix with bees from other hives
|
||||
if(B_mob.home != home)
|
||||
continue
|
||||
if(feral > 0)
|
||||
src.strength += B.strength
|
||||
returnToPool(B)
|
||||
src.icon_state = "bees[src.strength]"
|
||||
if(strength > 5)
|
||||
icon_state = "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
|
||||
|
||||
//no more than 20 bees per swarm to avoid people abusing their damage
|
||||
if(bees.len + B_mob.bees.len > MAX_BEES_PER_SWARM)
|
||||
continue
|
||||
B.icon_state = "bees[B.strength]"
|
||||
if(src.strength <= 0)
|
||||
returnToPool(B)
|
||||
return
|
||||
src.icon_state = "bees[B.strength]"
|
||||
var/turf/simulated/floor/T = get_turf(get_step(src, pick(1,2,4,8)))
|
||||
if(T.Enter(src, get_turf(src)))
|
||||
src.forceMove(T)
|
||||
break
|
||||
|
||||
//angry bees will drag other bees along with them
|
||||
if(state == BEE_OUT_FOR_ENEMIES)
|
||||
if((prob(10) && B_mob.state == BEE_OUT_FOR_PLANTS) || (prob(60) && B_mob.state == BEE_OUT_FOR_ENEMIES))
|
||||
for (var/datum/bee/B in B_mob.bees)
|
||||
addBee(B)
|
||||
B_mob.bees = list()
|
||||
visited_plants.Add(B_mob.visited_plants)
|
||||
if(!target)
|
||||
target = B_mob.target
|
||||
qdel(B_mob)
|
||||
updateDamage()
|
||||
|
||||
else if(prob(30) && state != BEE_OUT_FOR_ENEMIES && pollinating <= 0 && B_mob.pollinating <= 0 && state == B_mob.state)
|
||||
for (var/datum/bee/B in B_mob.bees)
|
||||
addBee(B)
|
||||
B_mob.bees = list()
|
||||
visited_plants.Add(B_mob.visited_plants)
|
||||
qdel(B_mob)
|
||||
updateDamage()
|
||||
|
||||
//SPREADING OUT
|
||||
if(bees.len > 1 && pollinating <= 0 && prob(bees.len*2) && state != BEE_SWARM && state != BEE_HEADING_HOME)
|
||||
var/mob/living/simple_animal/bee/B_mob = getFromPool(/mob/living/simple_animal/bee,get_turf(src))
|
||||
var/datum/bee/B = pick(bees)
|
||||
B_mob.addBee(B)
|
||||
bees.Remove(B)
|
||||
B_mob.calmed = calmed
|
||||
B_mob.state = state
|
||||
B_mob.target = target
|
||||
B_mob.update_icon()
|
||||
B_mob.home = home
|
||||
B_mob.visited_plants.Add(visited_plants)
|
||||
B_mob.Move(get_turf(pick(orange(src,1))))
|
||||
updateDamage()
|
||||
|
||||
//REACHING FOR MOBS
|
||||
if(state == BEE_OUT_FOR_ENEMIES)
|
||||
var/turf/target_turf = null
|
||||
if(target && (target in view(src,7)) && target.stat != DEAD)
|
||||
if(target)
|
||||
if(target in view(src,7))
|
||||
target_turf = get_turf(target)
|
||||
wander = 0
|
||||
else
|
||||
target = null
|
||||
var/list/nearbyMobs = list()
|
||||
for(var/mob/living/G in view(src,7))
|
||||
if (istype(G,/mob/living/simple_animal/bee))
|
||||
var/mob/living/simple_animal/bee/B = G
|
||||
if (B.home == home || (home && B.home && B.home.wild && home.wild))//we'll allow bees to fight bees from other hives, unless they're both from wild hives
|
||||
continue
|
||||
if (G.flags & INVULNERABLE) continue
|
||||
if (G.stat != DEAD)
|
||||
nearbyMobs += G
|
||||
if (nearbyMobs.len > 0)
|
||||
target = pick(nearbyMobs)
|
||||
if (target)
|
||||
src.visible_message("<span class='warning'>The bees swarm after [target]!</span>")
|
||||
else
|
||||
for (var/datum/bee/B in bees)
|
||||
B.bored++
|
||||
if (B.bored > BOREDOM_TO_RETURN && B.home && !B.home.wild)
|
||||
B.homeCall()
|
||||
|
||||
if(target_turf)
|
||||
var/tdir = get_dir(src,target_turf)
|
||||
var/turf/move_to = get_step(src, tdir)
|
||||
walk_to(src,move_to)
|
||||
else // My target's gone! But I might still be pissed! You there. You look like a good stinging target!
|
||||
newTarget()
|
||||
|
||||
if(src.loc == target_turf)
|
||||
wander = 1
|
||||
|
||||
//REACHING FOR FLOWERS
|
||||
if(state == BEE_OUT_FOR_PLANTS && pollinating <= 0)
|
||||
var/turf/target_turf = null
|
||||
if(target_plant && target_plant in view(src,7))
|
||||
target_turf = get_turf(target_plant)
|
||||
wander = 0
|
||||
else
|
||||
var/list/nearbyPlants = list()
|
||||
for(var/obj/machinery/portable_atmospherics/hydroponics/H in view(src,2))
|
||||
if (!H.dead && H.seed)
|
||||
nearbyPlants += H
|
||||
nearbyPlants.Remove(visited_plants)
|
||||
if (nearbyPlants.len > 0)
|
||||
target_plant = pick(nearbyPlants)
|
||||
else
|
||||
for (var/datum/bee/B in bees)
|
||||
B.fatigue++
|
||||
if (B.fatigue > FATIGUE_TO_RETURN)
|
||||
B.homeCall()
|
||||
if(target_turf)
|
||||
var/tdir = get_dir(src,target_turf)
|
||||
var/turf/move_to = get_step(src, tdir)
|
||||
if (calmed <= 0)
|
||||
walk_to(src,move_to)
|
||||
|
||||
if(src.loc == target_turf)
|
||||
visited_plants.Add(target_plant)
|
||||
pollinating = TIME_TO_POLLINATE
|
||||
target_plant.pollination = DURATION_OF_POLLINATION
|
||||
else if (pollinating > 0)
|
||||
pollinating--
|
||||
if (pollinating == 0)
|
||||
for (var/datum/bee/B in bees)
|
||||
B.pollens += target_plant.seed
|
||||
B.toxins += target_plant.toxins
|
||||
B.fatigue += FATIGUE_PER_POLLINATIONS
|
||||
if (B.fatigue > FATIGUE_TO_RETURN)
|
||||
B.homeCall()
|
||||
target_plant = null
|
||||
if(target_turf)
|
||||
var/tdir=get_dir(src,target_turf) // This was called thrice. Optimize.
|
||||
var/turf/move_to=get_step(src, tdir) // Called twice.
|
||||
walk_to(src,move_to)
|
||||
if (prob(1))
|
||||
src.visible_message("<span class='notice'>The bees swarm after [target]!</span>")
|
||||
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
|
||||
|
||||
animate(src, pixel_x = rand(-12,12) * PIXEL_MULTIPLIER, pixel_y = rand(-12,12) * PIXEL_MULTIPLIER, time = 10, easing = SINE_EASING)
|
||||
|
||||
//REACHING FOR HOME
|
||||
if(state == BEE_HEADING_HOME || state == BEE_SWARM)
|
||||
wander = 0
|
||||
var/turf/target_turf = get_turf(home)
|
||||
if(target_turf)
|
||||
var/tdir = get_dir(src,target_turf)
|
||||
var/turf/move_to = get_step(src, tdir)
|
||||
if (calmed <= 0)
|
||||
walk_to(src,move_to)
|
||||
/*
|
||||
if(!parent && prob(10))
|
||||
strength -= 1
|
||||
if(strength <= 0)
|
||||
returnToPool(src)
|
||||
else if(strength <= 5)
|
||||
icon_state = "bees[strength]"
|
||||
*/
|
||||
|
||||
if(src.loc == target_turf)
|
||||
for(var/datum/bee/B in bees)
|
||||
home.enterHive(B)
|
||||
qdel(src)
|
||||
else
|
||||
state = BEE_ROAMING
|
||||
if(feral > 0)
|
||||
if(strength <= 5)
|
||||
icon_state = "bees[max(strength,1)]-feral"
|
||||
else
|
||||
icon_state = "bees_swarm-feral"
|
||||
|
||||
|
||||
//BEING LOST
|
||||
if(state == BEE_ROAMING)
|
||||
wander = 1
|
||||
if (home && home.loc)
|
||||
state = BEE_HEADING_HOME
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
////////////////////////////////UPDATE ICON/////////////////////////////////
|
||||
|
||||
/mob/living/simple_animal/bee/update_icon()
|
||||
overlays.len = 0
|
||||
|
||||
var/queen = 0
|
||||
for (var/D in bees)
|
||||
if (istype(D,/datum/bee/queen_bee))
|
||||
queen = 1
|
||||
if (bees.len >= 15)
|
||||
icon_state = "bees-swarm"
|
||||
else
|
||||
icon_state = "bees[min(bees.len-queen,10)]"
|
||||
|
||||
|
||||
if (state == BEE_OUT_FOR_ENEMIES)
|
||||
icon_state += "-feral"
|
||||
if (queen)
|
||||
overlays += image('icons/obj/apiary_bees_etc.dmi', icon_state="queen_bee-feral")
|
||||
else if (queen)
|
||||
overlays += image('icons/obj/apiary_bees_etc.dmi', icon_state="queen_bee")
|
||||
|
||||
|
||||
animate(src, pixel_x = rand(-12,12) * PIXEL_MULTIPLIER, pixel_y = rand(-12,12) * PIXEL_MULTIPLIER, time = 10, easing = SINE_EASING)
|
||||
|
||||
|
||||
|
||||
////////////////////////////BEE PRESETS/////////////////////////////////////
|
||||
|
||||
/mob/living/simple_animal/bee/adminSpawned/New(loc, var/obj/machinery/apiary/new_home)
|
||||
..()
|
||||
var/datum/bee/B = new()
|
||||
addBee(B)
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bee/adminSpawnedQueen/New(loc, var/obj/machinery/apiary/new_home)
|
||||
..()
|
||||
var/datum/bee/queen_bee/B = new()
|
||||
B.colonizing = 1//so it can start a colony if someone places it in an empty hive
|
||||
addBee(B)
|
||||
update_icon()
|
||||
|
||||
//BEE-NADE & BEE-ULLET
|
||||
/mob/living/simple_animal/bee/angry/New(loc, var/obj/machinery/apiary/new_home)
|
||||
..()
|
||||
var/datum/bee/B = new()
|
||||
B.toxic = 50
|
||||
B.damage = 2
|
||||
B.state = BEE_OUT_FOR_ENEMIES
|
||||
state = BEE_OUT_FOR_ENEMIES
|
||||
addBee(B)
|
||||
update_icon()
|
||||
|
||||
//BEE-IEFCASE
|
||||
/mob/living/simple_animal/bee/swarm/New(loc, var/obj/machinery/apiary/new_home)
|
||||
..()
|
||||
for (var/i = 1 to MAX_BEES_PER_SWARM)
|
||||
var/datum/bee/B = new()
|
||||
B.toxic = 50
|
||||
B.damage = 2
|
||||
B.state = BEE_OUT_FOR_ENEMIES
|
||||
addBee(B)
|
||||
state = BEE_OUT_FOR_ENEMIES
|
||||
update_icon()
|
||||
|
||||
#undef TIME_TO_POLLINATE
|
||||
#undef DURATION_OF_POLLINATION
|
||||
#undef FATIGUE_PER_POLLINATIONS
|
||||
#undef FATIGUE_TO_RETURN
|
||||
|
||||
#undef BOREDOM_TO_RETURN
|
||||
|
||||
#undef MAX_BEES_PER_SWARM
|
||||
//debugging
|
||||
/*icon_state = "[strength]"
|
||||
if(strength > 5)
|
||||
icon_state = "unknown"*/
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
penetration = 1
|
||||
|
||||
/obj/item/projectile/bullet/auto380 //new sec pistol ammo, reverse name because lol compiler
|
||||
damage = 15
|
||||
damage = 15
|
||||
drowsy = 1
|
||||
agony = 1
|
||||
penetration = 2
|
||||
@@ -152,7 +152,7 @@
|
||||
weaken = 5
|
||||
embed = 0
|
||||
penetration = 0
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/suffocationbullet//How does this even work?
|
||||
name = "CO2 bullet"
|
||||
damage = 20
|
||||
@@ -383,7 +383,13 @@
|
||||
bumped = 1
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/mob/living/simple_animal/bee/angry/BEE = new(T)
|
||||
var/mob/living/simple_animal/bee/BEE = new(T)
|
||||
BEE.strength = 1
|
||||
BEE.toxic = 5
|
||||
BEE.mut = 2
|
||||
BEE.feral = 25
|
||||
BEE.icon_state = "bees1-feral"
|
||||
|
||||
if(istype(A,/mob/living))
|
||||
var/mob/living/M = A
|
||||
visible_message("<span class='warning'>\the [M.name] is hit by \the [src.name] in the [parse_zone(def_zone)]!</span>")
|
||||
@@ -391,6 +397,8 @@
|
||||
admin_warn(M)
|
||||
BEE.forceMove(M.loc)
|
||||
BEE.target = M
|
||||
else
|
||||
BEE.newTarget()
|
||||
bullet_die()
|
||||
|
||||
/obj/item/projectile/bullet/APS //Armor-piercing sabot round. Metal rods become this when fired from a railgun.
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
//Always call parent on reaction_mob, reaction_obj, reaction_turf, on_mob_life and Destroy() so that the sanities can be handled
|
||||
//Failure to do so will lead to serious problems
|
||||
|
||||
//Are you adding a toxic reagent? Remember to update bees_apiary.dm 's lists of toxic reagents accordingly.
|
||||
|
||||
/datum/reagent
|
||||
var/name = "Reagent"
|
||||
var/id = REAGENT
|
||||
@@ -1146,40 +1144,6 @@
|
||||
|
||||
M.nutrition += REM
|
||||
|
||||
/datum/reagent/honey
|
||||
name = "Honey"
|
||||
id = HONEY
|
||||
description = "A golden yellow syrup, loaded with sugary sweetness."
|
||||
color = "#FEAE00"
|
||||
alpha = 200
|
||||
nutriment_factor = 15 * REAGENTS_METABOLISM
|
||||
var/quality = 2
|
||||
|
||||
/datum/reagent/honey/on_mob_life(var/mob/living/M as mob)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!holder)
|
||||
return
|
||||
H.nutrition += nutriment_factor
|
||||
holder.remove_reagent(src.id, 0.4)
|
||||
if(H.getBruteLoss() && prob(60))
|
||||
H.heal_organ_damage(quality, 0)
|
||||
if(H.getFireLoss() && prob(50))
|
||||
H.heal_organ_damage(0, quality)
|
||||
if(H.getToxLoss() && prob(50))
|
||||
H.adjustToxLoss(-quality)
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/reagent/honey/royal_jelly
|
||||
name = "Royal Jelly"
|
||||
id = ROYALJELLY
|
||||
description = "A pale yellow liquid that is both spicy and acidic, yet also sweet."
|
||||
color = "#FFDA6A"
|
||||
alpha = 220
|
||||
nutriment_factor = 15 * REAGENTS_METABOLISM
|
||||
quality = 3
|
||||
|
||||
/datum/reagent/sacid
|
||||
name = "Sulphuric acid"
|
||||
id = SACID
|
||||
|
||||
@@ -37,6 +37,20 @@
|
||||
/obj/item/weapon/reagent_containers/food = list("generic",0)
|
||||
)
|
||||
|
||||
var/list/juice_items = list (
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato = list(TOMATOJUICE,0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot = list(CARROTJUICE,0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/berries = list(BERRYJUICE,0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/banana = list(BANANA,0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/potato = list(POTATO,0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/lemon = list(LEMONJUICE,0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/orange = list(ORANGEJUICE,0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/lime = list(LIMEJUICE,0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon = list(WATERMELONJUICE,0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/watermelonslice = list(WATERMELONJUICE,0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/poisonberries = list(POISONBERRYJUICE,0),
|
||||
)
|
||||
|
||||
|
||||
var/obj/item/crushable = null
|
||||
|
||||
|
||||
@@ -1,21 +1,5 @@
|
||||
|
||||
|
||||
var/global/list/juice_items = list (
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato = list(TOMATOJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot = list(CARROTJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/berries = list(BERRYJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/banana = list(BANANA = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/potato = list(POTATO = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/apple = list(APPLEJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/lemon = list(LEMONJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/orange = list(ORANGEJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/lime = list(LIMEJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon = list(WATERMELONJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/watermelonslice = list(WATERMELONJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/poisonberries = list(POISONBERRYJUICE = 0),
|
||||
)
|
||||
|
||||
/obj/machinery/reagentgrinder
|
||||
|
||||
name = "All-In-One Grinder"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "juicer1"
|
||||
@@ -65,6 +49,23 @@ var/global/list/juice_items = list (
|
||||
/obj/item/weapon/reagent_containers/food = list()
|
||||
)
|
||||
|
||||
var/list/juice_items = list (
|
||||
|
||||
//Juicer Stuff
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato = list(TOMATOJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot = list(CARROTJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/berries = list(BERRYJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/banana = list(BANANA = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/potato = list(POTATO = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/apple = list(APPLEJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/lemon = list(LEMONJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/orange = list(ORANGEJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/lime = list(LIMEJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon = list(WATERMELONJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/watermelonslice = list(WATERMELONJUICE = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/poisonberries = list(POISONBERRYJUICE = 0),
|
||||
)
|
||||
|
||||
|
||||
var/list/holdingitems = list()
|
||||
var/targetMoveKey
|
||||
|
||||
@@ -179,11 +179,6 @@
|
||||
desc = "Sweet and healthy!"
|
||||
icon_state = HONEY
|
||||
item_state = null
|
||||
if(ROYALJELLY)
|
||||
name = "royal jelly pot"
|
||||
desc = "Spicy and healthy!"
|
||||
icon_state = ROYALJELLY
|
||||
item_state = HONEY
|
||||
if(CINNAMON)
|
||||
name = "cinnamon shaker"
|
||||
desc = "A spice, obtained from the bark of cinnamomum trees."
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -2253,7 +2253,7 @@
|
||||
"aRq" = (/turf/simulated/floor{icon_state = "dark"},/area/hydroponics)
|
||||
"aRr" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 5},/obj/machinery/portable_atmospherics/hydroponics,/turf/simulated/floor{icon_state = "dark"},/area/hydroponics)
|
||||
"aRs" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 10},/obj/machinery/portable_atmospherics/hydroponics,/turf/simulated/floor{icon_state = "dark"},/area/hydroponics)
|
||||
"aRt" = (/obj/structure/closet/crate/secure/hydrosec,/obj/item/weapon/reagent_containers/food/snacks/beezeez,/obj/item/weapon/reagent_containers/food/snacks/beezeez,/obj/item/clothing/head/bio_hood/beekeeping,/obj/item/clothing/suit/bio_suit/beekeeping,/obj/item/weapon/bee_net,/obj/item/queen_bee,/obj/item/queen_bee,/obj/item/apiary,/obj/item/weapon/book/manual/hydroponics_beekeeping,/obj/item/weapon/hatchet,/obj/item/weapon/minihoe,/obj/item/weapon/paper/hydroponics,/turf/simulated/floor{icon_state = "dark"},/area/hydroponics)
|
||||
"aRt" = (/obj/structure/closet/crate/secure/hydrosec,/obj/item/beezeez,/obj/item/beezeez,/obj/item/clothing/head/bio_hood/beekeeping,/obj/item/clothing/suit/bio_suit/beekeeping,/obj/item/weapon/bee_net,/obj/item/queen_bee,/obj/item/queen_bee,/obj/item/apiary,/obj/item/weapon/book/manual/hydroponics_beekeeping,/obj/item/weapon/hatchet,/obj/item/weapon/minihoe,/obj/item/weapon/paper/hydroponics,/turf/simulated/floor{icon_state = "dark"},/area/hydroponics)
|
||||
"aRu" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced,/obj/structure/grille,/turf/simulated/floor/plating,/area/medical/chemistry)
|
||||
"aRv" = (/obj/structure/table/reinforced,/obj/machinery/door/window{base_state = "right"; dir = 2; name = "Chemistry Desk"; req_access_txt = "33"},/obj/item/clothing/glasses/science,/obj/machinery/door/firedoor/border_only{name = "Firelock South"},/turf/simulated/floor/plating,/area/medical/chemistry)
|
||||
"aRw" = (/obj/structure/sign/chemtable,/turf/simulated/wall/r_wall,/area/medical/chemistry)
|
||||
@@ -10823,3 +10823,4 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
"}
|
||||
|
||||
|
||||