/obj/item/device/assembly/signaler name = "Remote Signaling Device" desc = "Used to remotely activate devices." icon_state = "signaller" item_state = "signaler" m_amt = 1000 g_amt = 200 w_amt = 100 origin_tech = "magnets=1" wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE secured = 1 small_icon_state_left = "signaller_left" small_icon_state_right = "signaller_right" var code = 30 frequency = 100 delay = 0 airlock_wire = null proc send_signal() activate() if(cooldown > 0) return 0 cooldown = 2 spawn(10) process_cooldown() signal() return 1 interact(mob/user as mob, flag1) var/t1 = "-------" // if ((src.b_stat && !( flag1 ))) // t1 = text("-------
\nGreen Wire: []
\nRed Wire: []
\nBlue Wire: []
\n", (src.wires & 4 ? text("Cut Wire", src) : text("Mend Wire", src)), (src.wires & 2 ? text("Cut Wire", src) : text("Mend Wire", src)), (src.wires & 1 ? text("Cut Wire", src) : text("Mend Wire", src))) // else // t1 = "-------" Speaker: [src.listening ? "Engaged" : "Disengaged"]
var/dat = {" Send Signal
Frequency/Code for signaler:
Frequency: - - [src.frequency] + +
Code: - - [src.code] + +
[t1]
"} user << browse(dat, "window=radio") onclose(user, "radio") return Topic(href, href_list) ..() if(get_dist(src, usr) > 1) usr << browse(null, "window=signal") onclose(usr, "signal") return if (href_list["freq"]) src.frequency += text2num(href_list["freq"]) src.frequency = round(src.frequency) src.frequency = min(100, src.frequency) src.frequency = max(1, src.frequency) if(href_list["code"]) src.code += text2num(href_list["code"]) src.code = round(src.code) src.code = min(100, src.code) src.code = max(1, src.code) if(href_list["send"]) spawn( 0 ) signal() if(usr) attack_self(usr) return proc/signal()//will have to do for now for(var/obj/item/device/assembly/signaler/S in world) if(!S) continue if(S == src) continue if((S.frequency == src.frequency) && (S.code == src.code)) spawn(0) S.pulse(0) return 1 return 0 pulse(var/radio = 0) if(istype(src.loc, /obj/machinery/door/airlock) && src.airlock_wire && src.wires) var/obj/machinery/door/airlock/A = src.loc A.pulse(src.airlock_wire) else if(holder) holder.process_activation(src, 1, 0) return 1