Constructable honey extractor + floral disk printable (#18080)

* Constructable honey extractor + floral disk printable

Making the Honey Extractor buildable with a circuit in the autolathe and the floral disk for xenobot is now printable when floraguns are researched.

* Update beehive.dm

* Update .gitignore

* Update _map_selection.dm

* Update beehive.dm

* Update beehive.dm

* More honey_extractor changes.

– made the honey_extractor anchorable.
– ensured the honey_extractor can’t run when the maintenance panel is open.
– honey_extractor can now lose power and can’t run when so.
– honey_extractor will now use power 5*200watts for processing 1 honey_frame.
(can be easily changed if needed)
– appropriorate messages for the new states.
– appropriorate icons and overlays for the new states.

* changes to make the maintainer happy

put the circuit board in the appropriate place and changed some grammar and code to ensure smooth sailing.

---------

Co-authored-by: antokamire <140556309+antokamire@users.noreply.github.com>
Co-authored-by: Luther <221619555+SaintLuther@users.noreply.github.com>
This commit is contained in:
SaintLuther
2025-08-05 00:31:15 +02:00
committed by GitHub
parent 7dea28fa67
commit 12771ed29d
6 changed files with 78 additions and 4 deletions
+51 -4
View File
@@ -169,16 +169,62 @@
desc = "A machine used to turn honeycombs on the frame into honey and wax."
icon = 'icons/obj/beekeeping.dmi'
icon_state = "centrifuge"
circuit = /obj/item/circuitboard/honey_extractor
anchored = TRUE
density = TRUE
idle_power_usage = 15
active_power_usage = 200
use_power = USE_POWER_IDLE
var/processing = 0
var/honey = 0
/obj/machinery/honey_extractor/Initialize(mapload)
. = ..()
default_apply_parts()
RefreshParts()
update_icon()
/obj/machinery/honey_extractor/power_change()
. = ..()
var/delay = rand(0,15)
if(delay)
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_icon)), delay)
return
update_icon()
/obj/machinery/honey_extractor/update_icon()
cut_overlays()
icon_state = initial(icon_state)
if(panel_open)
add_overlay("[icon_state]_panel")
if(stat & NOPOWER)
icon_state = "[icon_state]_off"
return
if(processing)
icon_state = "[icon_state]_moving"
/obj/machinery/honey_extractor/attackby(var/obj/item/I, var/mob/user)
if(processing)
to_chat(user, span_notice("\The [src] is currently spinning, wait until it's finished."))
return
if(I.has_tool_quality(TOOL_WRENCH))
anchored = !anchored
playsound(src, I.usesound, 50, 1)
user.visible_message(span_notice("[user] [anchored ? "wrenches" : "unwrenches"] \the [src]."), span_notice("You [anchored ? "wrench" : "unwrench"] \the [src]."))
return
if(default_deconstruction_screwdriver(user, I))
return
if(default_deconstruction_crowbar(user, I))
return
if(stat & NOPOWER)
to_chat(user, span_notice("\The [src] is powerless and can't grant your wishes"))
return
if(panel_open)
to_chat(user, span_notice("\The [src]'s maintenance panel is open, It would not be safe to turn it on."))
return
else if(istype(I, /obj/item/honey_frame))
var/obj/item/honey_frame/H = I
if(!H.honey)
@@ -186,14 +232,15 @@
return
user.visible_message(span_notice("[user] loads \the [H]'s comb into \the [src] and turns it on."), span_notice("You load \the [H] into \the [src] and turn it on."))
processing = H.honey
icon_state = "[initial(icon_state)]_moving"
update_icon()
use_power_oneoff(active_power_usage * 5) //uses 5 second of active power at once, because I could not figure out how active powerdraw works and if or how the work is timed.
H.honey = 0
H.update_icon()
H.update_icon() //updates the honeyframe
spawn(50)
new /obj/item/stack/material/wax(loc)
honey += processing
processing = 0
icon_state = "[initial(icon_state)]"
update_icon()
else if(istype(I, /obj/item/reagent_containers/glass))
if(!honey)
to_chat(user, span_notice("There is no honey in \the [src]."))
@@ -119,3 +119,16 @@
RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_SCIENCE
)
departmental_flags = DEPARTMENT_BITFLAG_SCIENCE
/datum/design_techweb/disk/botany
name = "flora data disk"
desc = "A small disk used for carrying data on plant genetics."
id = "disk_botany"
// req_tech = list(TECH_DATA = 2, TECH_BIO = 3)
build_type = PROTOLATHE
materials = list(MAT_STEEL = 30, MAT_GLASS = 10, MAT_URANIUM = 5)
build_path = /obj/item/disk/botany
category = list(
RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_SCIENCE
)
departmental_flags = DEPARTMENT_BITFLAG_SCIENCE
@@ -112,6 +112,7 @@
prereq_ids = list(TECHWEB_NODE_HYDROPONICS)
design_ids = list(
"flora_gun",
"disk_botany",
// "gene_shears",
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_3_POINTS)