mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-21 12:17:40 +01:00
[MIRROR] EMP & Wires refactor (#12658)
Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Guti
Cameron Lennox
parent
494fc9bea9
commit
b116cc450d
@@ -16,7 +16,7 @@
|
||||
var/list/attached_overlays = null
|
||||
var/obj/item/assembly_holder/holder = null
|
||||
var/cooldown = FALSE //To prevent spam
|
||||
var/wires = WIRE_RECEIVE | WIRE_PULSE
|
||||
var/wires_type = WIRE_RECEIVE | WIRE_PULSE
|
||||
|
||||
var/const/WIRE_RECEIVE = 1 //Allows Pulsed(0) to call Activate()
|
||||
var/const/WIRE_PULSE = 2 //Allows Pulse(0) to act on the holder
|
||||
@@ -34,16 +34,16 @@
|
||||
return
|
||||
|
||||
/obj/item/assembly/proc/pulsed(var/radio = 0)
|
||||
if(holder && (wires & WIRE_RECEIVE))
|
||||
if(holder && (wires_type & WIRE_RECEIVE))
|
||||
activate()
|
||||
if(radio && (wires & WIRE_RADIO_RECEIVE))
|
||||
if(radio && (wires_type & WIRE_RADIO_RECEIVE))
|
||||
activate()
|
||||
return 1
|
||||
|
||||
/obj/item/assembly/proc/pulse(var/radio = 0)
|
||||
if(holder && (wires & WIRE_PULSE))
|
||||
if(holder && (wires_type & WIRE_PULSE))
|
||||
holder.process_activation(src, 1, 0)
|
||||
if(holder && (wires & WIRE_PULSE_SPECIAL))
|
||||
if(holder && (wires_type & WIRE_PULSE_SPECIAL))
|
||||
holder.process_activation(src, 0, 1)
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user