diff --git a/code/datums/autolathe/engineering_vr.dm b/code/datums/autolathe/engineering_vr.dm index 93c06fd7f2..1ceefcae72 100644 --- a/code/datums/autolathe/engineering_vr.dm +++ b/code/datums/autolathe/engineering_vr.dm @@ -73,3 +73,7 @@ /datum/category_item/autolathe/engineering/arf_generator name = "atmospheric field generator electronics" path =/obj/item/circuitboard/arf_generator + +/datum/category_item/autolathe/engineering/honey_extractor + name = "honey extractor electronics" + path =/obj/item/circuitboard/honey_extractor diff --git a/code/game/objects/items/weapons/circuitboards/circuitboards_vr.dm b/code/game/objects/items/weapons/circuitboards/circuitboards_vr.dm index 57cb7a1870..9d1b449f70 100644 --- a/code/game/objects/items/weapons/circuitboards/circuitboards_vr.dm +++ b/code/game/objects/items/weapons/circuitboards/circuitboards_vr.dm @@ -87,3 +87,12 @@ /obj/item/stack/cable_coil = 2, /obj/item/stock_parts/scanning_module = 1, ) + +/obj/item/circuitboard/honey_extractor + name = T_BOARD("honey_extractor") + board_type = new /datum/frame/frame_types/machine + build_path = /obj/machinery/honey_extractor + req_components = list( + /obj/item/stack/cable_coil = 4, + /obj/item/stock_parts/motor = 1, + /obj/item/stock_parts/console_screen = 1) diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm index 7a50533856..fe90a93b12 100644 --- a/code/modules/hydroponics/beekeeping/beehive.dm +++ b/code/modules/hydroponics/beekeeping/beehive.dm @@ -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].")) diff --git a/code/modules/research/tg/designs/misc_designs.dm b/code/modules/research/tg/designs/misc_designs.dm index cfcb2b3d58..6635ef92c8 100644 --- a/code/modules/research/tg/designs/misc_designs.dm +++ b/code/modules/research/tg/designs/misc_designs.dm @@ -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 diff --git a/code/modules/research/tg/techwebs/nodes/biology_nodes.dm b/code/modules/research/tg/techwebs/nodes/biology_nodes.dm index b60b193540..4172507250 100644 --- a/code/modules/research/tg/techwebs/nodes/biology_nodes.dm +++ b/code/modules/research/tg/techwebs/nodes/biology_nodes.dm @@ -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) diff --git a/icons/obj/beekeeping.dmi b/icons/obj/beekeeping.dmi index c8dc2fe2d7..ba170f92d6 100644 Binary files a/icons/obj/beekeeping.dmi and b/icons/obj/beekeeping.dmi differ