mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Allows all assemblies to be attached to wires (#29880)
* Allows all assemblies to be attached to wires * Making it for all items it's inside, like things that use wires * Better way to write it * Typo * Mobs were a mistake Co-authored-by: kanef <kanef9x@protonmail.com>
This commit is contained in:
@@ -36,6 +36,7 @@ var/global/list/assembly_short_name_to_type = list() //Please, I beg you, don't
|
||||
var/list/attached_overlays = list()
|
||||
var/obj/item/device/assembly_holder/holder = null
|
||||
var/cooldown = 0//To prevent spam
|
||||
var/datum/wires/connected = null
|
||||
var/wires = WIRE_RECEIVE | WIRE_PULSE
|
||||
|
||||
var/const/WIRE_RECEIVE = 1 //Allows Pulsed(0) to call Activate()
|
||||
@@ -228,7 +229,9 @@ var/global/list/assembly_short_name_to_type = list() //Please, I beg you, don't
|
||||
|
||||
|
||||
/obj/item/device/assembly/pulse(var/radio = 0)
|
||||
if(istype(holder, /obj/item/device/assembly_frame))
|
||||
if(src.connected && src.wires)
|
||||
connected.Pulse(src)
|
||||
else if(istype(holder, /obj/item/device/assembly_frame))
|
||||
var/obj/item/device/assembly_frame/AB = holder
|
||||
|
||||
AB.receive_pulse(src)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
T = holder.loc
|
||||
else if (holder.master && isturf(holder.loc.loc)) //or in an assembly rigging something that's on the floor?
|
||||
T = holder.loc.loc
|
||||
else if(istype(loc,/obj/item/weapon/grenade) && isturf(loc.loc)) // or in a grenade that's on the floor? (can it even activate grenades without igniters?)
|
||||
else if(isobj(loc) && isturf(loc.loc)) // or in a grenade on the floor/wired item? (can it even activate grenades without igniters?)
|
||||
T = loc.loc
|
||||
if(T)
|
||||
if(!beam)
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
var/code = 30
|
||||
var/frequency = 1457
|
||||
var/delay = 0
|
||||
var/datum/wires/connected = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/deadman = 0
|
||||
|
||||
@@ -158,14 +157,6 @@
|
||||
S.pulse(0)
|
||||
return 0*/
|
||||
|
||||
|
||||
/obj/item/device/assembly/signaler/pulse(var/radio = 0)
|
||||
if(src.connected && src.wires)
|
||||
connected.Pulse(src)
|
||||
else
|
||||
return ..(radio)
|
||||
|
||||
|
||||
/obj/item/device/assembly/signaler/receive_signal(datum/signal/signal)
|
||||
if(!signal)
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user