diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index 6b191ef1..443ac26d 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -9,7 +9,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
#define NO_NEW_MESSAGE 0
#define NORMAL_MESSAGE_PRIORITY 1
#define HIGH_MESSAGE_PRIORITY 2
-#define EXTREME_MESSAGE_PRIORITY 3 // not implemented, will probably require some hacking... everything needs to have a hidden feature in this game.
+#define EXTREME_MESSAGE_PRIORITY 3 // is implimented, does require hacking. everything needs to have a hidden feature in this game.
/obj/machinery/requests_console
name = "requests console"
@@ -47,9 +47,9 @@ GLOBAL_LIST_EMPTY(allConsoles)
var/announceAuth = FALSE //Will be set to 1 when you authenticate yourself for announcements
var/msgVerified = "" //Will contain the name of the person who verified it
var/msgStamped = "" //If a message is stamped, this will contain the stamp name
- var/message = "";
- var/dpt = ""; //the department which will be receiving the message
- var/priority = -1 ; //Priority of the message being sent
+ var/message = ""
+ var/dpt = "" //the department which will be receiving the message
+ var/priority = NORMAL_MESSAGE_PRIORITY //Priority of the message being sent. why is the default -1??
var/obj/item/radio/Radio
var/emergency //If an emergency has been called by this device. Acts as both a cooldown and lets the responder know where it the emergency was triggered from
var/receive_ore_updates = FALSE //If ore redemption machines will send an update when it receives new ores.
@@ -64,13 +64,14 @@ GLOBAL_LIST_EMPTY(allConsoles)
if(stat & NOPOWER)
set_light(0)
else
- set_light(1.4,0.7,"#34D352")//green light
+ set_light(1.4, 0.7, "#34D352")//green light
+
if(open)
if(!hackState)
icon_state="req_comp_open"
else
icon_state="req_comp_rewired"
- else if(stat & NOPOWER)
+ else if(CHECK_BITFIELD(stat, NOPOWER))
if(icon_state != "req_comp_off")
icon_state = "req_comp_off"
else
@@ -121,7 +122,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
GLOB.req_console_information += department
Radio = new /obj/item/radio(src)
- Radio.listening = 0
+ Radio.listening = FALSE
/obj/machinery/requests_console/Destroy()
QDEL_NULL(Radio)
@@ -130,164 +131,173 @@ GLOBAL_LIST_EMPTY(allConsoles)
/obj/machinery/requests_console/ui_interact(mob/user)
. = ..()
+ if(open) //no.
+ return
+
var/dat = ""
- if(!open)
- switch(screen)
- if(1) //req. assistance
- dat += "Which department do you need assistance from?
"
- dat += "
| [dpt] | " - dat += "Normal High" - if(hackState) - dat += "EXTREME" - dat += " | " - dat += "
| [dpt] | " + dat += "" + dat += "Normal" + dat += "High" + if(hackState) + dat += "EXTREME" + dat += " | " + dat += "
| [dpt] | " - dat += "Normal High" - if(hackState) - dat += "EXTREME" - dat += " | " - dat += "
| [dpt] | " - dat += "Normal High" - if(hackState) - dat += "EXTREME" - dat += " | " - dat += "
| [dpt] | " + dat += "" + dat += "Normal" + dat += "High" + if(hackState) + dat += "EXTREME" + dat += " | " + dat += "
| X | Sender | Recipient | Message |
|---|---|---|---|
| [pda.sender] | [pda.recipient] | [pda.message][pda.picture ? " (Photo)":""] |
| Sender | -Sender's Job | -Recipient | -Message |
| [customsender] | -[customjob] | -[customrecepient ? customrecepient.owner : "NONE"] | -[custommessage] |
| X | Sending Dep. | Receiving Dep. | -Message | Stamp | ID Auth. | Priority. |
|---|---|---|---|---|---|---|
| [rc.send_dpt] | -[rc.rec_dpt] | [rc.message] | [rc.stamp] | [rc.id_auth] | [rc.priority] |
" \
- + "", "window=pdaphoto;size=[picture.psize_x]x[picture.psize_y];can-close=true")
+
+ M << browse_rsc(picture.picture_image, "pda_photo.png")
+
+ var/dat = ""
+
+ var/datum/browser/popup = new(M, "pdaphoto", "PDA Photo", picture.psize_x, picture.psize_y)
+ popup.set_content(dat)
+ popup.open()
onclose(M, "pdaphoto")
/datum/data_rc_msg
diff --git a/code/game/machinery/telecomms/machines/relay.dm b/code/game/machinery/telecomms/machines/relay.dm
index 9e671627..65f70a4f 100644
--- a/code/game/machinery/telecomms/machines/relay.dm
+++ b/code/game/machinery/telecomms/machines/relay.dm
@@ -49,6 +49,11 @@
/obj/machinery/telecomms/relay/preset
network = "tcommsat"
+/obj/machinery/telecomms/relay/Initialize(mapload)
+ . = ..()
+ if(autolinkers.len) //We want lateloaded presets to autolink (lateloaded aways/ruins/shuttles)
+ return INITIALIZE_HINT_LATELOAD
+
/obj/machinery/telecomms/relay/preset/station
id = "Station Relay"
autolinkers = list("s_relay")
@@ -74,3 +79,8 @@
icon = 'icons/obj/clockwork_objects.dmi'
hide = TRUE
autolinkers = list("h_relay")
+
+//Generic preset relay
+/obj/machinery/telecomms/relay/preset/auto
+ hide = TRUE
+ autolinkers = list("autorelay")
diff --git a/code/game/machinery/telecomms/machines/server.dm b/code/game/machinery/telecomms/machines/server.dm
index 46b16252..4ce2d54b 100644
--- a/code/game/machinery/telecomms/machines/server.dm
+++ b/code/game/machinery/telecomms/machines/server.dm
@@ -28,7 +28,7 @@
totaltraffic += traffic // add current traffic to total traffic
// Delete particularly old logs
- if (log_entries.len >= 400)
+ if(LAZYLEN(log_entries) >= 400) //[list].len is not safe
log_entries.Cut(1, 2)
var/datum/comm_log_entry/log = new
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index db250193..ac812d52 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -107,6 +107,7 @@ GLOBAL_LIST_EMPTY(telecomms_list)
for(var/x in autolinkers)
if(x in T.autolinkers)
links |= T
+ T.links |= src
/obj/machinery/telecomms/update_icon()
if(on)
@@ -121,9 +122,9 @@ GLOBAL_LIST_EMPTY(telecomms_list)
icon_state = "[initial(icon_state)]_off"
/obj/machinery/telecomms/proc/update_power()
-
if(toggled)
- if(stat & (BROKEN|NOPOWER|EMPED)) // if powered, on. if not powered, off. if too damaged, off
+ // if powered, on. if not powered, off. if too damaged, off
+ if(CHECK_BITFIELD(stat, (BROKEN | NOPOWER | EMPED)))
on = FALSE
else
on = TRUE
@@ -141,11 +142,11 @@ GLOBAL_LIST_EMPTY(telecomms_list)
/obj/machinery/telecomms/emp_act(severity)
. = ..()
- if(. & EMP_PROTECT_SELF)
+ if(CHECK_BITFIELD(., EMP_PROTECT_SELF))
return
- if(prob(100/severity))
- if(!(stat & EMPED))
- stat |= EMPED
- var/duration = (300 * 10)/severity
+ if(prob(100 / severity))
+ if(!CHECK_BITFIELD(stat, EMPED))
+ ENABLE_BITFIELD(stat, EMPED)
+ var/duration = (300 * 10) / severity
spawn(rand(duration - 20, duration + 20)) // Takes a long time for the machines to reboot.
- stat &= ~EMPED
+ DISABLE_BITFIELD(stat, EMPED)
diff --git a/tgui-next/packages/tgui/interfaces/TelecommsInteraction.js b/tgui-next/packages/tgui/interfaces/TelecommsInteraction.js
new file mode 100644
index 00000000..a67bfdf9
--- /dev/null
+++ b/tgui-next/packages/tgui/interfaces/TelecommsInteraction.js
@@ -0,0 +1,238 @@
+import { Fragment } from 'inferno';
+import { useBackend } from '../backend';
+import { toFixed } from 'common/math';
+import { RADIO_CHANNELS } from '../constants';
+import { Button, LabeledList, NumberInput, NoticeBox, Section, Input } from '../components';
+
+export const TeleInteract = props => {
+ const { act, data } = useBackend(props);
+ const {
+ notice = "",
+ multitool = false,
+ multitool_buf = null,
+ machine = null,
+ links = [],
+ freq_listening = [],
+ } = data;
+ const {
+ power = false,
+ id = "NULL",
+ network,
+ prefab = false,
+ hidden = false,
+ isrelay = false,
+ isbus = false,
+ } = machine;
+ return (
+