Skip to content

Commit

Permalink
Modpacking beehives.
Browse files Browse the repository at this point in the history
  • Loading branch information
MistakeNot4892 committed Feb 9, 2025
1 parent 67e6cac commit 35c63d0
Show file tree
Hide file tree
Showing 20 changed files with 199 additions and 177 deletions.
9 changes: 0 additions & 9 deletions code/datums/supplypacks/hydroponics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@
containername = "exotic Seeds crate"
access = access_xenobiology

/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)
containername = "beekeeping crate"
access = access_hydroponics

/decl/hierarchy/supply_pack/hydroponics/hydrotray
name = "Equipment - Hydroponics tray"
contains = list(/obj/machinery/portable_atmospherics/hydroponics)
Expand Down
4 changes: 0 additions & 4 deletions code/datums/trading/traders/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,7 @@ They sell generic supplies and ask for generic supplies.
/obj/structure/ore_box = TRADER_THIS_TYPE,
/obj/structure/coatrack = TRADER_THIS_TYPE,
/obj/structure/bookcase = TRADER_THIS_TYPE,
/obj/item/bee_pack = TRADER_THIS_TYPE,
/obj/item/bee_smoker = TRADER_THIS_TYPE,
/obj/item/beehive_assembly = TRADER_THIS_TYPE,
/obj/item/glass_jar = TRADER_THIS_TYPE,
/obj/item/honey_frame = TRADER_THIS_TYPE,
/obj/item/training_dummy = TRADER_THIS_TYPE,
/obj/item/training_dummy/syndicate = TRADER_THIS_TYPE,
/obj/item/training_dummy/alien = TRADER_THIS_TYPE,
Expand Down
14 changes: 0 additions & 14 deletions code/game/objects/items/circuitboards/machinery/household.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@
/obj/item/stock_parts/circuitboard/cooker/get_buildable_types()
return subtypesof(/obj/machinery/cooker)

/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/stock_parts/circuitboard/honey/seed
name = "circuitboard (seed extractor)"
build_path = /obj/machinery/seed_extractor
board_type = "machine"

/obj/item/stock_parts/circuitboard/seed_storage
name = "circuitboard (seed storage)"
build_path = /obj/machinery/seed_storage
Expand Down
7 changes: 0 additions & 7 deletions code/modules/crafting/stack_recipes/recipes_planks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@
difficulty = MAT_VALUE_VERY_HARD_DIY
category = "weapons"

/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

/decl/stack_recipe/planks/zipgunframe
result_type = /obj/item/zipgunframe
difficulty = MAT_VALUE_VERY_HARD_DIY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,8 @@
/datum/fabricator_recipe/imprinter/circuit/cooker
path = /obj/item/stock_parts/circuitboard/cooker

/datum/fabricator_recipe/imprinter/circuit/honey_extractor
path = /obj/item/stock_parts/circuitboard/honey

/datum/fabricator_recipe/imprinter/circuit/seed_extractor
path = /obj/item/stock_parts/circuitboard/honey/seed
path = /obj/item/stock_parts/circuitboard/seed

/datum/fabricator_recipe/imprinter/circuit/vending
path = /obj/item/stock_parts/circuitboard/vending
Expand Down
1 change: 1 addition & 0 deletions maps/exodus/exodus.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "../../mods/content/mundane.dm"
#include "../../mods/content/scaling_descriptors.dm"

#include "../../mods/content/beekeeping/_beekeeping.dme"
#include "../../mods/content/bigpharma/_bigpharma.dme"
#include "../../mods/content/corporate/_corporate.dme"
#include "../../mods/content/government/_government.dme"
Expand Down
1 change: 1 addition & 0 deletions maps/ministation/ministation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Twice...
#include "../../mods/mobs/dionaea/_dionaea.dme"
#include "../../mods/mobs/borers/_borers.dme"

#include "../../mods/content/beekeeping/_beekeeping.dme"
#include "../../mods/content/tabloids/_tabloids.dme"
#include "../../mods/species/ascent/_ascent.dme"
#include "../../mods/species/tajaran/_tajaran.dme"
Expand Down
1 change: 1 addition & 0 deletions maps/tradeship/tradeship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "../../mods/content/government/away_sites/icarus/icarus.dm"
#include "../../mods/content/corporate/away_sites/lar_maria/lar_maria.dm"

#include "../../mods/content/beekeeping/_beekeeping.dme"
#include "../../mods/content/mundane.dm"
#include "../../mods/content/scaling_descriptors.dm"

Expand Down
3 changes: 3 additions & 0 deletions mods/content/beekeeping/_beekeeping.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/decl/modpack/beekeeping
name = "Beekeeping Content"

12 changes: 12 additions & 0 deletions mods/content/beekeeping/_beekeeping.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef MODPACK_INSECTS
#define MODPACK_INSECTS
// BEGIN_INCLUDE
#include "_beekeeping.dm"
#include "centrifuge.dm"
#include "closets.dm"
#include "items.dm"

Check failure on line 7 in mods/content/beekeeping/_beekeeping.dme

View workflow job for this annotation

GitHub Actions / Code

DME Validator

The include at line 7 is out of order (#include "items.dm", expected #include "hives/_hive.dm")
#include "recipes.dm"

Check failure on line 8 in mods/content/beekeeping/_beekeeping.dme

View workflow job for this annotation

GitHub Actions / Code

DME Validator

The include at line 8 is out of order (#include "recipes.dm", expected #include "items.dm")
#include "trading.dm"

Check failure on line 9 in mods/content/beekeeping/_beekeeping.dme

View workflow job for this annotation

GitHub Actions / Code

DME Validator

The include at line 9 is out of order (#include "trading.dm", expected #include "recipes.dm")
#include "hives/_hive.dm"

Check failure on line 10 in mods/content/beekeeping/_beekeeping.dme

View workflow job for this annotation

GitHub Actions / Code

DME Validator

The include at line 10 is out of order (#include "hives/_hive.dm", expected #include "trading.dm")
// END_INCLUDE
#endif
File renamed without changes.
54 changes: 54 additions & 0 deletions mods/content/beekeeping/centrifuge.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

/obj/machinery/honey_extractor
name = "honey extractor"
desc = "A machine used to extract honey and wax from a beehive frame."
icon = 'icons/obj/virology.dmi'
icon_state = "centrifuge"
anchored = TRUE
density = TRUE
construct_state = /decl/machine_construction/default/panel_closed
uncreated_component_parts = null
stat_immune = 0

var/processing = 0
var/honey = 0

/obj/machinery/honey_extractor/components_are_accessible(path)
return !processing && ..()

/obj/machinery/honey_extractor/cannot_transition_to(state_path, mob/user)
if(processing)
return SPAN_NOTICE("You must wait for \the [src] to finish first!")
return ..()

/obj/machinery/honey_extractor/attackby(var/obj/item/I, var/mob/user)
if(processing)
to_chat(user, "<span class='notice'>\The [src] is currently spinning, wait until it's finished.</span>")
return
if((. = component_attackby(I, user)))
return
if(istype(I, /obj/item/honey_frame))
var/obj/item/honey_frame/H = I
if(!H.honey)
to_chat(user, "<span class='notice'>\The [H] is empty, put it into a beehive.</span>")
return
user.visible_message("<span class='notice'>\The [user] loads \the [H] into \the [src] and turns it on.</span>", "<span class='notice'>You load \the [H] into \the [src] and turn it on.</span>")
processing = H.honey
icon_state = "centrifuge_moving"
qdel(H)
spawn(50)
new /obj/item/honey_frame(loc)
new /obj/item/stack/material/bar/wax(loc, 1)
honey += processing
processing = 0
icon_state = "centrifuge"
else if(istype(I, /obj/item/chems/glass))
if(!honey)
to_chat(user, "<span class='notice'>There is no honey in \the [src].</span>")
return
var/obj/item/chems/glass/G = I
var/transferred = min(G.reagents.maximum_volume - G.reagents.total_volume, honey)
G.add_to_reagents(/decl/material/liquid/nutriment/honey, transferred)
honey -= transferred
user.visible_message("<span class='notice'>\The [user] collects honey from \the [src] into \the [G].</span>", "<span class='notice'>You collect [transferred] units of honey from \the [src] into \the [G].</span>")
return 1
15 changes: 15 additions & 0 deletions mods/content/beekeeping/closets.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/obj/structure/closet/crate/hydroponics/beekeeping
name = "beekeeping crate"
desc = "All you need to set up your own beehive."

/obj/structure/closet/crate/hydroponics/beekeeping/Initialize()
. = ..()
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/bee_pack(src)
new /obj/item/crowbar(src)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/machinery/beehive

Check failure on line 1 in mods/content/beekeeping/hives/_hive.dm

View workflow job for this annotation

GitHub Actions / Code

DME Validator

File is not included
name = "apiary"
icon = 'icons/obj/beekeeping.dmi'
icon = 'mods/content/beekeeping/icons/beekeeping.dmi'
icon_state = "beehive-0"
desc = "A wooden box designed specifically to house our buzzling buddies. Far more efficient than traditional hives. Just insert a frame and a queen, close it up, and you're good to go!"
density = TRUE
Expand Down Expand Up @@ -164,140 +164,3 @@
H.plant_health += 0.05 * coef
++trays
honeycombs = min(honeycombs + 0.1 * coef * min(trays, 5), frames * 100)

/obj/machinery/honey_extractor
name = "honey extractor"
desc = "A machine used to extract honey and wax from a beehive frame."
icon = 'icons/obj/virology.dmi'
icon_state = "centrifuge"
anchored = TRUE
density = TRUE
construct_state = /decl/machine_construction/default/panel_closed
uncreated_component_parts = null
stat_immune = 0

var/processing = 0
var/honey = 0

/obj/machinery/honey_extractor/components_are_accessible(path)
return !processing && ..()

/obj/machinery/honey_extractor/cannot_transition_to(state_path, mob/user)
if(processing)
return SPAN_NOTICE("You must wait for \the [src] to finish first!")
return ..()

/obj/machinery/honey_extractor/attackby(var/obj/item/I, var/mob/user)
if(processing)
to_chat(user, "<span class='notice'>\The [src] is currently spinning, wait until it's finished.</span>")
return TRUE
if(istype(I, /obj/item/honey_frame))
var/obj/item/honey_frame/H = I
if(!H.honey)
to_chat(user, "<span class='notice'>\The [H] is empty, put it into a beehive.</span>")
return TRUE
user.visible_message("<span class='notice'>\The [user] loads \the [H] into \the [src] and turns it on.</span>", "<span class='notice'>You load \the [H] into \the [src] and turn it on.</span>")
processing = H.honey
icon_state = "centrifuge_moving"
qdel(H)
spawn(50)
new /obj/item/honey_frame(loc)
new /obj/item/stack/material/bar/wax(loc, 1)
honey += processing
processing = 0
icon_state = "centrifuge"
return TRUE
else if(istype(I, /obj/item/chems/glass))
if(!honey)
to_chat(user, "<span class='notice'>There is no honey in \the [src].</span>")
return TRUE
var/obj/item/chems/glass/G = I
var/transferred = min(G.reagents.maximum_volume - G.reagents.total_volume, honey)
G.add_to_reagents(/decl/material/liquid/nutriment/honey, transferred)
honey -= transferred
user.visible_message("<span class='notice'>\The [user] collects honey from \the [src] into \the [G].</span>", "<span class='notice'>You collect [transferred] units of honey from \the [src] into \the [G].</span>")
return TRUE
return ..() // smack it, interact with components, etc.

/obj/item/bee_smoker
name = "bee smoker"
desc = "A device used to calm down bees before harvesting honey."
icon = 'icons/obj/items/weapon/batterer.dmi'
icon_state = ICON_STATE_WORLD
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 = 'icons/obj/beekeeping.dmi'
icon_state = "honeyframe"
w_class = ITEM_SIZE_SMALL
material = /decl/material/solid/organic/wood/oak
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/oak

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

/obj/item/beehive_assembly
name = "beehive assembly"
desc = "Contains everything you need to build a beehive."
icon = 'icons/obj/apiary_bees_etc.dmi'
icon_state = "apiary"
material = /decl/material/solid/organic/wood/oak

/obj/item/beehive_assembly/attack_self(var/mob/user)
to_chat(user, "<span class='notice'>You start assembling \the [src]...</span>")
if(do_after(user, 30, src))
user.visible_message("<span class='notice'>\The [user] constructs a beehive.</span>", "<span class='notice'>You construct a beehive.</span>")
new /obj/machinery/beehive(get_turf(user))
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!"
icon = 'icons/obj/beekeeping.dmi'
icon_state = "beepack"
material = /decl/material/solid/organic/plastic
var/full = 1

/obj/item/bee_pack/Initialize()
. = ..()
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)
SetName(initial(name))
desc = initial(desc)
overlays.Cut()
overlays += "beepack-full"

/obj/structure/closet/crate/hydroponics/beekeeping
name = "beekeeping crate"
desc = "All you need to set up your own beehive."

/obj/structure/closet/crate/hydroponics/beekeeping/Initialize()
. = ..()
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/bee_pack(src)
new /obj/item/crowbar(src)
File renamed without changes.
Binary file added mods/content/beekeeping/icons/smoker.dmi
Binary file not shown.
Loading

0 comments on commit 35c63d0

Please sign in to comment.