Files
Yogstation/code/datums/wires/microwave.dm
coiax 5edcfca3b7 Microwaves now have a single wire (#41822)
cl coiax
add: Microwaves have a single wire accessible when open, the activation wire.
When cut, the microwave will no longer function, when pulsed, the microwave
will turn on.
add: Stabilized dark purple extracts now cook items in your hands, rather than dropping
the cooked item on the floor.
/cl

Previously microwaves just worked on their contents, now they keep a subset of contents called ingredients, because otherwise it would explode whenever you put a signaler inside.

Someone asked me to do it. It seemed like a neat idea. God knows
what horrible things people will do with this.
2018-12-16 22:01:28 +01:00

28 lines
567 B
Plaintext

/datum/wires/microwave
holder_type = /obj/machinery/microwave
proper_name = "Microwave"
/datum/wires/microwave/New(atom/holder)
wires = list(
WIRE_ACTIVATE
)
..()
/datum/wires/microwave/interactable(mob/user)
. = FALSE
var/obj/machinery/microwave/M = holder
if(M.panel_open)
. = TRUE
/datum/wires/microwave/on_pulse(wire)
var/obj/machinery/microwave/M = holder
switch(wire)
if(WIRE_ACTIVATE)
M.cook()
/datum/wires/microwave/on_cut(wire, mend)
var/obj/machinery/microwave/M = holder
switch(wire)
if(WIRE_ACTIVATE)
M.wire_disabled = !mend