mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-16 10:35:41 +01:00
119356e97f
* Fixes Massive Radio Overtime, Implements a Spatial Grid System for Faster Searching Over Areas * no spamming pings for upstream :( * E * E Co-authored-by: Kylerace <kylerlumpkin1@gmail.com> Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> Co-authored-by: Gandalf <jzo123@hotmail.com>
28 lines
580 B
Plaintext
28 lines
580 B
Plaintext
/datum/wires/radio
|
|
holder_type = /obj/item/radio
|
|
proper_name = "Radio"
|
|
|
|
/datum/wires/radio/New(atom/holder)
|
|
wires = list(
|
|
WIRE_SIGNAL,
|
|
WIRE_RX, WIRE_TX
|
|
)
|
|
..()
|
|
|
|
/datum/wires/radio/interactable(mob/user)
|
|
if(!..())
|
|
return FALSE
|
|
var/obj/item/radio/R = holder
|
|
return R.unscrewed
|
|
|
|
/datum/wires/radio/on_pulse(index)
|
|
var/obj/item/radio/R = holder
|
|
switch(index)
|
|
if(WIRE_SIGNAL)
|
|
R.set_listening(!R.get_listening())
|
|
R.set_broadcasting(R.get_listening())
|
|
if(WIRE_RX)
|
|
R.set_listening(!R.get_listening())
|
|
if(WIRE_TX)
|
|
R.set_broadcasting(!R.get_broadcasting())
|