modules: A to C
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE
|
||||
attachable = 1
|
||||
|
||||
var/code = 30
|
||||
var/frequency = 1457
|
||||
var/code = DEFAULT_SIGNALER_CODE
|
||||
var/frequency = FREQ_SIGNALER
|
||||
var/delay = 0
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
@@ -73,7 +73,7 @@ Code:
|
||||
|
||||
if (href_list["freq"])
|
||||
var/new_frequency = (frequency + text2num(href_list["freq"]))
|
||||
if(new_frequency < 1200 || new_frequency > 1600)
|
||||
if(new_frequency < MIN_FREE_FREQ || new_frequency > MAX_FREE_FREQ)
|
||||
new_frequency = sanitize_frequency(new_frequency)
|
||||
set_frequency(new_frequency)
|
||||
|
||||
@@ -105,10 +105,7 @@ Code:
|
||||
if(!radio_connection)
|
||||
return
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.source = src
|
||||
signal.encryption = code
|
||||
signal.data["message"] = "ACTIVATE"
|
||||
var/datum/signal/signal = new(list("code" = code))
|
||||
radio_connection.post_signal(src, signal)
|
||||
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
@@ -122,7 +119,7 @@ Code:
|
||||
/obj/item/device/assembly/signaler/receive_signal(datum/signal/signal)
|
||||
if(!signal)
|
||||
return 0
|
||||
if(signal.encryption != code)
|
||||
if(signal.data["code"] != code)
|
||||
return 0
|
||||
if(!(src.wires & WIRE_RADIO_RECEIVE))
|
||||
return 0
|
||||
@@ -132,13 +129,9 @@ Code:
|
||||
|
||||
|
||||
/obj/item/device/assembly/signaler/proc/set_frequency(new_frequency)
|
||||
if(!SSradio)
|
||||
sleep(20)
|
||||
if(!SSradio)
|
||||
return
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_CHAT)
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_SIGNALER)
|
||||
return
|
||||
|
||||
// Embedded signaller used in grenade construction.
|
||||
@@ -175,7 +168,7 @@ Code:
|
||||
/obj/item/device/assembly/signaler/anomaly/receive_signal(datum/signal/signal)
|
||||
if(!signal)
|
||||
return 0
|
||||
if(signal.encryption != code)
|
||||
if(signal.data["code"] != code)
|
||||
return 0
|
||||
for(var/obj/effect/anomaly/A in get_turf(src))
|
||||
A.anomalyNeutralize()
|
||||
|
||||
Reference in New Issue
Block a user