diff --git a/code/modules/plumbing/plumbers/autohydro.dm b/code/modules/plumbing/plumbers/autohydro.dm index 5e4c618284..dbc70dfcf5 100644 --- a/code/modules/plumbing/plumbers/autohydro.dm +++ b/code/modules/plumbing/plumbers/autohydro.dm @@ -8,7 +8,7 @@ /obj/machinery/hydroponics/constructable/automagic/attackby(obj/item/O, mob/user, params) - if(istype(O, /obj/item/reagent_containers) ) + if(istype(O, /obj/item/reagent_containers)) return FALSE //avoid fucky wuckies ..() @@ -23,11 +23,22 @@ else CP.disable() -/obj/machinery/hydroponics/constructable/automagic/Initialize(mapload, bolt) +/obj/machinery/hydroponics/constructable/automagic/Destroy() . = ..() - AddComponent(/datum/component/plumbing/simple_demand, bolt) + STOP_PROCESSING(SSobj, src) + +/obj/machinery/hydroponics/constructable/automagic/Initialize(mapload) + . = ..() + START_PROCESSING(SSobj, src) create_reagents(100 , AMOUNT_VISIBLE) +/obj/machinery/hydroponics/constructable/automagic/ComponentInitialize() + . = ..() + AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS, null, CALLBACK(src, .proc/can_be_rotated)) + AddComponent(/datum/component/plumbing/simple_demand) + +/obj/machinery/hydroponics/constructable/proc/can_be_rotated(mob/user, rotation_type) + return !anchored /obj/machinery/hydroponics/constructable/automagic/process() if(reagents) diff --git a/code/modules/reagents/chemistry/machinery/smoke_machine.dm b/code/modules/reagents/chemistry/machinery/smoke_machine.dm index a539897c9d..fd9f9116b7 100644 --- a/code/modules/reagents/chemistry/machinery/smoke_machine.dm +++ b/code/modules/reagents/chemistry/machinery/smoke_machine.dm @@ -36,6 +36,11 @@ for(var/obj/item/stock_parts/matter_bin/B in component_parts) reagents.maximum_volume += REAGENTS_BASE_VOLUME * B.rating +/obj/machinery/smoke_machine/ComponentInitialize() + . = ..() + AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS, null, CALLBACK(src, .proc/can_be_rotated)) + AddComponent(/datum/component/plumbing/simple_demand) //this SURELY CANT' LEAD TO BAD THINGS HAPPENING. + /obj/machinery/smoke_machine/update_icon_state() if((!is_operational()) || (!on) || (reagents.total_volume == 0)) if (panel_open)