Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions maps/ministation/ministation-1.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -5716,9 +5716,9 @@
/obj/item/tool/hoe/mini,
/obj/item/tool/spade,
/obj/item/tool/spade,
/obj/item/honey_frame,
/obj/item/honey_frame,
/obj/item/honey_frame,
/obj/item/hive_frame/crafted,
/obj/item/hive_frame/crafted,
/obj/item/hive_frame/crafted,
/turf/floor/tiled,
/area/ministation/hydro)
"yg" = (
Expand Down
12 changes: 1 addition & 11 deletions mods/content/beekeeping/_beekeeping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,5 @@

/datum/storage/hopper/industrial/centrifuge/New()
..()
can_hold |= /obj/item/honey_frame
can_hold |= /obj/item/hive_frame

// Terrible, will be replaced in beewrite.
/datum/storage/hopper/industrial/centrifuge/should_ingest(mob/user, obj/item/thing)
if(istype(thing, /obj/item/honey_frame))
var/obj/item/honey_frame/frame = thing
if(frame.honey > 0)
return TRUE
if(user)
to_chat(user, SPAN_WARNING("\The [thing] is empty."))
return FALSE
return ..()
2 changes: 1 addition & 1 deletion mods/content/beekeeping/_beekeeping.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#define MODPACK_BEEKEEPING
// BEGIN_INCLUDE
#include "_beekeeping.dm"
#include "centrifuge.dm"
#include "closets.dm"
#include "hive_frame.dm"
#include "items.dm"
#include "recipes.dm"
#include "trading.dm"
Expand Down
53 changes: 0 additions & 53 deletions mods/content/beekeeping/centrifuge.dm

This file was deleted.

10 changes: 5 additions & 5 deletions mods/content/beekeeping/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
. = ..()
new /obj/item/beehive_assembly(src)
new /obj/item/bee_smoker(src)
new /obj/item/honey_frame(src)
new /obj/item/honey_frame(src)
new /obj/item/honey_frame(src)
new /obj/item/honey_frame(src)
new /obj/item/honey_frame(src)
new /obj/item/hive_frame/crafted(src)
new /obj/item/hive_frame/crafted(src)
new /obj/item/hive_frame/crafted(src)
new /obj/item/hive_frame/crafted(src)
new /obj/item/hive_frame/crafted(src)
new /obj/item/bee_pack(src)
new /obj/item/crowbar(src)
62 changes: 62 additions & 0 deletions mods/content/beekeeping/hive_frame.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/obj/item/hive_frame
abstract_type = /obj/item/hive_frame
icon_state = ICON_STATE_WORLD
w_class = ITEM_SIZE_SMALL
material_alteration = MAT_FLAG_ALTERATION_ALL
var/destroy_on_centrifuge = FALSE

/obj/item/hive_frame/Initialize(ml, material_key)
. = ..()
initialize_reagents()

/obj/item/hive_frame/initialize_reagents(populate = TRUE)
create_reagents(20)
. = ..()

/obj/item/hive_frame/on_reagent_change()
. = ..()
if(reagents?.total_volume)
SetName("filled [initial(name)] ([reagents.get_primary_reagent_name()])")
else
SetName(initial(name))
queue_icon_update()

/obj/item/hive_frame/on_update_icon()
. = ..()
var/mesh_state = "[icon_state]-mesh"
if(check_state_in_icon(mesh_state, icon))
add_overlay(overlay_image(icon, mesh_state, COLOR_WHITE, RESET_COLOR))
if(reagents?.total_volume)
var/comb_state = "[icon_state]-comb"
if(check_state_in_icon(comb_state, icon))
add_overlay(overlay_image(icon, comb_state, reagents.get_color(), RESET_COLOR))
compile_overlays()

/obj/item/hive_frame/handle_centrifuge_process(obj/machinery/centrifuge/centrifuge)
if(!(. = ..()))
return
if(reagents.total_volume)
reagents.trans_to_holder(centrifuge.loaded_beaker.reagents, reagents.total_volume)
for(var/obj/item/thing in contents)
thing.dropInto(centrifuge.loc)
if(destroy_on_centrifuge)
for(var/atom/movable/thing in convert_matter_to_lumps())
thing.dropInto(centrifuge.loc)

// Crafted frame used in apiaries.
/obj/item/hive_frame/crafted
name = "hive frame"
desc = "A wooden frame for insect hives that the workers will fill with products like honey."
icon = 'mods/content/beekeeping/icons/frame.dmi'
material = /decl/material/solid/organic/wood
material_alteration = MAT_FLAG_ALTERATION_ALL

// TEMP until beewrite redoes hives.
/obj/item/hive_frame/crafted/filled/Initialize()
. = ..()
new /obj/item/stack/material/bar/wax(src)
update_icon()

/obj/item/hive_frame/crafted/filled/populate_reagents()
. = ..()
reagents.add_reagent(/decl/material/liquid/nutriment/honey, reagents?.maximum_volume)
8 changes: 4 additions & 4 deletions mods/content/beekeeping/hives/_hive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@
smoked = 30
update_icon()
return TRUE
else if(istype(I, /obj/item/honey_frame))
else if(istype(I, /obj/item/hive_frame/crafted))
if(closed)
to_chat(user, "<span class='notice'>You need to open \the [src] with a crowbar before inserting \the [I].</span>")
return TRUE
if(frames >= maxFrames)
to_chat(user, "<span class='notice'>There is no place for an another frame.</span>")
return TRUE
var/obj/item/honey_frame/H = I
if(H.honey)
var/obj/item/hive_frame/crafted/H = I
if(H.reagents?.total_volume)
to_chat(user, "<span class='notice'>\The [I] is full with beeswax and honey, empty it in the extractor first.</span>")
return TRUE
++frames
Expand Down Expand Up @@ -140,7 +140,7 @@
return
user.visible_message("<span class='notice'>\The [user] starts taking the honeycombs out of \the [src].</span>", "<span class='notice'>You start taking the honeycombs out of \the [src]...</span>")
while(honeycombs >= 100 && do_after(user, 30, src))
new /obj/item/honey_frame/filled(loc)
new /obj/item/hive_frame/crafted/filled(loc)
honeycombs -= 100
--frames
update_icon()
Expand Down
Binary file added mods/content/beekeeping/icons/frame.dmi
Binary file not shown.
40 changes: 1 addition & 39 deletions mods/content/beekeeping/items.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/obj/item/beehive_assembly
name = "beehive assembly"
desc = "Contains everything you need to build a beehive."
icon = 'mods/content/beekeeping/apiary_bees_etc.dmi'
icon = 'mods/content/beekeeping/icons/apiary_bees_etc.dmi'
icon_state = "apiary"
material = /decl/material/solid/organic/wood

Expand All @@ -12,15 +12,6 @@
new /obj/machinery/beehive(get_turf(user))
qdel(src)

/obj/item/stock_parts/circuitboard/honey
name = "circuitboard (honey extractor)"
build_path = /obj/machinery/honey_extractor
board_type = "machine"
origin_tech = @'{"biotech":2,"engineering":1}'
req_components = list(
/obj/item/stock_parts/manipulator = 2,
/obj/item/stock_parts/matter_bin = 2)

/obj/item/bee_smoker
name = "bee smoker"
desc = "A device used to calm down bees before harvesting honey."
Expand All @@ -29,35 +20,6 @@
w_class = ITEM_SIZE_SMALL
material = /decl/material/solid/metal/steel

/obj/item/honey_frame
name = "beehive frame"
desc = "A frame for the beehive that the bees will fill with honeycombs."
icon = 'mods/content/beekeeping/icons/beekeeping.dmi'
icon_state = "honeyframe"
w_class = ITEM_SIZE_SMALL
material = /decl/material/solid/organic/wood
var/honey = 0

/obj/item/honey_frame/filled
name = "filled beehive frame"
desc = "A frame for the beehive that the bees have filled with honeycombs."
honey = 20
material = /decl/material/solid/organic/wood

/obj/item/honey_frame/filled/Initialize()
. = ..()
overlays += "honeycomb"

// This is crap, will be replaced in beewrite PR.
/obj/item/honey_frame/handle_centrifuge_process(obj/machinery/centrifuge/centrifuge)
if(!(. = ..()) || !honey)
return
centrifuge?.loaded_beaker?.add_to_reagents(/decl/material/liquid/nutriment/honey, honey)
honey = 0
new /obj/item/honey_frame(centrifuge.loc)
new /obj/item/stack/material/bar(centrifuge.loc, 1, /decl/material/solid/organic/wax)
qdel(src)

/obj/item/bee_pack
name = "bee pack"
desc = "Contains a queen bee and some worker bees. Everything you'll need to start a hive!"
Expand Down
6 changes: 1 addition & 5 deletions mods/content/beekeeping/recipes.dm
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@

/decl/stack_recipe/planks/beehive_assembly
result_type = /obj/item/beehive_assembly
category = "furniture"

/decl/stack_recipe/planks/beehive_frame
result_type = /obj/item/honey_frame

/datum/fabricator_recipe/imprinter/circuit/honey_extractor
path = /obj/item/stock_parts/circuitboard/honey
result_type = /obj/item/hive_frame/crafted
18 changes: 10 additions & 8 deletions mods/content/beekeeping/trading.dm
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
/datum/trader/trading_beacon/manufacturing/New()
LAZYSET(possible_trading_items, /obj/item/bee_pack, TRADER_THIS_TYPE)
LAZYSET(possible_trading_items, /obj/item/bee_smoker, TRADER_THIS_TYPE)
LAZYSET(possible_trading_items, /obj/item/beehive_assembly, TRADER_THIS_TYPE)
LAZYSET(possible_trading_items, /obj/item/honey_frame, TRADER_THIS_TYPE)
LAZYSET(possible_trading_items, /obj/item/bee_pack, TRADER_THIS_TYPE)
LAZYSET(possible_trading_items, /obj/item/bee_smoker, TRADER_THIS_TYPE)
LAZYSET(possible_trading_items, /obj/item/beehive_assembly, TRADER_THIS_TYPE)
LAZYSET(possible_trading_items, /obj/item/hive_frame/crafted, TRADER_THIS_TYPE)
..()

/decl/hierarchy/supply_pack/hydroponics/bee_keeper
name = "Equipment - Beekeeping"
contains = list(/obj/item/beehive_assembly,
/obj/item/bee_smoker,
/obj/item/honey_frame = 5,
/obj/item/bee_pack)
contains = list(
/obj/item/beehive_assembly,
/obj/item/bee_smoker,
/obj/item/hive_frame/crafted = 5,
/obj/item/bee_pack
)
containername = "beekeeping crate"
access = access_hydroponics
Loading