diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm
index 4bdb96191f..6c8ae1c420 100644
--- a/code/modules/hydroponics/beekeeping/beehive.dm
+++ b/code/modules/hydroponics/beekeeping/beehive.dm
@@ -6,19 +6,29 @@
anchored = 1
var/closed = 0
- var/bee_count = 0 // Percentage
- var/smoked = 0
- var/honeycombs = 0
+ var/bee_count = 0 // Percent
+ var/smoked = 0 // Timer
+ var/honeycombs = 0 // Percent
var/frames = 0
var/maxFrames = 5
/obj/machinery/beehive/update_icon()
overlays.Cut()
icon_state = "beehive"
+ if(closed)
+ overlays += "lid"
if(frames)
overlays += "empty[frames]"
- if(honeycombs >= 1)
- overlays += "filled[round(honeycombs)]"
+ if(honeycombs >= 100)
+ overlays += "full[round(honeycombs / 100)]"
+ if(!smoked)
+ switch(bee_count)
+ if(1 to 40)
+ overlays += "bees1"
+ if(41 to 80)
+ overlays += "bees2"
+ if(81 to 100)
+ overlays += "bees3"
/obj/machinery/beehive/examine(var/mob/user)
..()
@@ -28,11 +38,12 @@
/obj/machinery/beehive/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/weapon/crowbar))
closed = !closed
- user.visible_message("[user] [closed ? "closes" : "opens"] \the [src].", "You [closed ? "close" : "open"] \the [src]")
+ user.visible_message("[user] [closed ? "closes" : "opens"] \the [src].", "You [closed ? "close" : "open"] \the [src].")
+ update_icon()
return
else if(istype(I, /obj/item/weapon/wrench))
anchored = !anchored
- user.visible_message("[user] [anchored ? "wrenches" : "unwrenches"] \the [src].", "You [anchored ? "wrench" : "unwrench"] \the [src]")
+ user.visible_message("[user] [anchored ? "wrenches" : "unwrenches"] \the [src].", "You [anchored ? "wrench" : "unwrench"] \the [src].")
return
else if(istype(I, /obj/item/bee_smoker))
if(closed)
@@ -40,6 +51,7 @@
return
user.visible_message("[user] smokes the bees in \the [src].", "You smoke the bees in \the [src].")
smoked = 30
+ update_icon()
return
else if(istype(I, /obj/item/honey_frame))
if(closed)
@@ -59,38 +71,57 @@
qdel(I)
return
else if(istype(I, /obj/item/bee_pack))
- if(bee_count)
+ var/obj/item/bee_pack/B = I
+ if(B.full && bee_count)
user << "\The [src] already has bees inside."
return
- if(closed)
- user << "You need to open \the [src] with a crowbar before putting the bees inside."
+ if(!B.full && bee_count < 90)
+ user << "\The [src] is not ready to split."
return
- user.visible_message("[user] puts \the [I] into \the [src].", "You put \the [I] into \the [src].")
- bee_count = 20
- user.drop_from_inventory(I)
- qdel(I)
+ if(!B.full && !smoked)
+ user << "Smoke \the [src] first!"
+ return
+ if(closed)
+ user << "You need to open \the [src] with a crowbar before moving the bees."
+ return
+ if(B.full)
+ user.visible_message("[user] puts the queen and the bees from \the [I] into \the [src].", "You put the queen and the bees from \the [I] into \the [src].")
+ bee_count = 20
+ B.empty()
+ else
+ user.visible_message("[user] puts bees and larvae from \the [src] into \the [I].", "You put puts bees and larvae from \the [src] into \the [I].")
+ bee_count /= 2
+ B.fill()
+ update_icon()
return
else if(istype(I, /obj/item/device/analyzer/plant_analyzer))
- user << "[src] scan result..."
- user << "Beehive is [bee_count ? "[bee_count]% full" : "empty"]."
- user << "There are [frames ? frames : "no"] frames installed."
+ user << "Scan result of \the [src]..."
+ user << "Beehive is [bee_count ? "[round(bee_count)]% full" : "empty"].[bee_count > 90 ? " Colony is ready to split." : ""]"
+ if(frames)
+ user << "[frames] frames installed, [round(honeycombs / 100)] filled."
+ if(honeycombs < frames * 100)
+ user << "Next frame is [round(honeycombs % 100)]% full."
+ else
+ user << "No frames installed."
+ if(smoked)
+ user << "The hive is smoked."
return 1
/obj/machinery/beehive/attack_hand(var/mob/user)
if(!closed)
- if(honeycombs < 1)
+ if(honeycombs < 100)
user << "There are no filled honeycombs."
return
if(!smoked && bee_count)
user << "The bees won't let you take the honeycombs out like this, smoke them first."
return
- user.visible_message("[user] starts taking the honeycombs out of \the [src].", "You start taking the honeycombs out of \the [src]...")
- while(honeycombs >= 1 && do_after(user, 30))
+ user.visible_message("[user] starts taking the honeycombs out of \the [src].", "You start taking the honeycombs out of \the [src]...")
+ while(honeycombs >= 100 && do_after(user, 30))
new /obj/item/honey_frame/filled(loc)
- --honeycombs
+ honeycombs -= 100
--frames
update_icon()
- if(honeycombs < 1)
+ if(honeycombs < 100)
user << "You take all filled honeycombs out."
return
@@ -100,14 +131,17 @@
update_icon()
smoked = max(0, smoked - 1)
if(!smoked && bee_count)
- bee_count = min(bee_count + 1, 100)
+ bee_count = min(bee_count * 1.005, 100)
+ update_icon()
/obj/machinery/beehive/proc/pollinate_flowers()
var/coef = bee_count / 100
+ var/trays = 0
for(var/obj/machinery/portable_atmospherics/hydroponics/H in view(7, src))
if(H.seed && !H.dead)
H.health += 0.05 * coef
- honeycombs = min(honeycombs + 0.01 * coef, frames)
+ ++trays
+ honeycombs = min(honeycombs + 0.1 * coef * min(trays, 5), frames * 100)
/obj/machinery/honey_extractor
name = "honey extractor"
@@ -145,7 +179,7 @@
var/transferred = min(G.reagents.maximum_volume - G.reagents.total_volume, honey)
G.reagents.add_reagent("honey", transferred)
honey -= transferred
- user.visible_message("[user] collects honey from \the [src] into \the [G].", "You collect [transferred] units of honey from \the [src] into the [G].")
+ user.visible_message("[user] collects honey from \the [src] into \the [G].", "You collect [transferred] units of honey from \the [src] into \the [G].")
return 1
/obj/item/bee_smoker
@@ -198,5 +232,24 @@ var/global/list/datum/stack_recipe/wax_recipes = list( \
/obj/item/bee_pack
name = "bee pack"
desc = "Contains a queen bee and some worker bees. Everything you'll need to start a hive!"
- icon = 'icons/obj/apiary_bees_etc.dmi'
- icon_state = "apiary"
+ icon = 'icons/obj/beekeeping.dmi'
+ icon_state = "beepack"
+ var/full = 1
+
+/obj/item/bee_pack/New()
+ ..()
+ overlays += "beepack-full"
+
+/obj/item/bee_pack/proc/empty()
+ full = 0
+ name = "empty bee pack"
+ desc = "A stasis pack for moving bees. It's empty."
+ overlays.Cut()
+ overlays += "beepack-empty"
+
+/obj/item/bee_pack/proc/fill()
+ full = initial(full)
+ name = initial(name)
+ desc = initial(desc)
+ overlays.Cut()
+ overlays += "beepack-full"
\ No newline at end of file
diff --git a/code/modules/materials/material_recipes.dm b/code/modules/materials/material_recipes.dm
index 8a0ad29bf3..addf1160a9 100644
--- a/code/modules/materials/material_recipes.dm
+++ b/code/modules/materials/material_recipes.dm
@@ -104,6 +104,8 @@
recipes += new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood, 3, time = 10, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0)
recipes += new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1)
+ recipes += new/datum/stack_recipe("beehive assembly", /obj/item/beehive_assembly, 4)
+ recipes += new/datum/stack_recipe("beehive frame", /obj/item/honey_frame, 1)
/material/cardboard/generate_recipes()
..()
diff --git a/icons/obj/beekeeping.dmi b/icons/obj/beekeeping.dmi
index 54f16761b3..98174510b8 100644
Binary files a/icons/obj/beekeeping.dmi and b/icons/obj/beekeeping.dmi differ