diff --git a/code/game/machinery/tcomms/_base.dm b/code/game/machinery/tcomms/_base.dm index fe1a39660a9..d73c6787199 100644 --- a/code/game/machinery/tcomms/_base.dm +++ b/code/game/machinery/tcomms/_base.dm @@ -118,7 +118,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines) log_game("NTTC: [key_name(user)] [msg]") log_investigate("[key_name(user)] [msg]", "nttc") if(adminmsg) - message_admins("NTTC: [key_name_admin(user)] [msg]") + message_admins("[key_name_admin(user)] [msg]") /** * Power Change Handler * diff --git a/code/game/machinery/tcomms/core.dm b/code/game/machinery/tcomms/core.dm index 72e373c6f95..66c08ed0b32 100644 --- a/code/game/machinery/tcomms/core.dm +++ b/code/game/machinery/tcomms/core.dm @@ -121,7 +121,7 @@ // Now the actual UI stuff ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) - ui = new(user, src, ui_key, "tcomms_core.tmpl", "Telecommunications Core", 800, 600) + ui = new(user, src, ui_key, "tcomms_core.tmpl", "Telecommunications Core", 900, 525) ui.open() ui.set_auto_update(1) @@ -133,8 +133,7 @@ // Only send NTTC settings if were on the right tab. This saves on sending overhead. if(ui_tab == UI_TAB_CONFIG) // Z-level list - var/zlevel_string = jointext(reachable_zlevels, ", ") - data["sectors_available"] = "Count: [length(reachable_zlevels)] | List: [copytext(zlevel_string, 1, length(zlevel_string)-1)]" + data["sectors_available"] = "Count: [length(reachable_zlevels)] | List: [jointext(reachable_zlevels, " ")]" // Toggles data["active"] = active data["nttc_toggle_jobs"] = nttc.toggle_jobs @@ -145,6 +144,25 @@ data["nttc_setting_language"] = nttc.setting_language data["nttc_job_indicator_type"] = nttc.job_indicator_type + if(ui_tab == UI_TAB_LINKS) + data["link_password"] = link_password + // You ready to see some shit? + for(var/obj/machinery/tcomms/relay/R in linked_relays) + // Dont show relays with a hidden link + if(R.hidden_link) + continue + // Assume false + var/status = FALSE + var/status_color = "'background-color: #eb4034'" // Red + if(R.active && !(R.stat & NOPOWER)) + status = TRUE + status_color = "'background-color: #32a852'" // Green + + + + data["entries"] += list(list("addr" = "\ref[R]", "net_id" = R.network_id, "sector" = R.loc.z, "status" = status, "status_color" = status_color)) + // End the shit + return data /obj/machinery/tcomms/core/Topic(href, href_list) @@ -210,6 +228,17 @@ if(href_list["export"]) usr << browse(nttc.nttc_serialize(), "window=save_nttc") + if(ui_tab == UI_TAB_LINKS) + if(href_list["unlink"]) + var/obj/machinery/tcomms/relay/R = locate(href_list["unlink"]) + if(istype(R, /obj/machinery/tcomms/relay)) + var/confirm = alert("Are you sure you want to unlink this relay?\nID: [R.network_id]\nADDR: \ref[R]", "Relay Unlink", "Yes", "No") + if(confirm == "Yes") + log_action(usr, "has unlinked tcomms relay with ID [R.network_id] from tcomms core with ID [network_id]", TRUE) + R.Reset() + else + to_chat(usr, "ERROR: Relay not found. Please file an issue report.") + // Try to speed-update the UI SSnanoui.update_uis(src) diff --git a/code/modules/modular_computers/NTNet/NTNet_relay.dm b/code/modules/modular_computers/NTNet/NTNet_relay.dm index f50567e6710..97ddcfb69c0 100644 --- a/code/modules/modular_computers/NTNet/NTNet_relay.dm +++ b/code/modules/modular_computers/NTNet/NTNet_relay.dm @@ -3,7 +3,7 @@ name = "NTNet Quantum Relay" desc = "A very complex router and transmitter capable of connecting electronic devices together. Looks fragile." use_power = ACTIVE_POWER_USE - active_power_usage = 10000 //10kW, apropriate for machine that keeps massive cross-Zlevel wireless network operational. Used to be 20 but that actually drained the smes one round + active_power_usage = 100 // 100 watts. Yes I know this is a high power machine but this fucking obliterates an unpowered smes (AI sat) idle_power_usage = 100 icon = 'icons/obj/stationobjs.dmi' icon_state = "bus" diff --git a/nano/templates/tcomms_core.tmpl b/nano/templates/tcomms_core.tmpl index 15f3eb44a29..dd8835e623b 100644 --- a/nano/templates/tcomms_core.tmpl +++ b/nano/templates/tcomms_core.tmpl @@ -2,7 +2,7 @@ {{:helper.link('Device Links', 'link', {'tab' : "LINKS"}, data.tab == "LINKS" ? 'selected' : '')}} {{if data.tab == "CONFIG"}} -

Device Config

+

Core Configuration

Status

@@ -12,7 +12,8 @@ {{:helper.link(data.active ? 'Enabled' : 'Disabled', 'power-off', {'toggle_active' : 1}, null, data.active ? 'selected' : '')}}
-
+
+
Sectors with Telecommunications Signal:
@@ -73,5 +74,58 @@ {{:helper.link('Import Configuration', 'sign-in', {'import' : 1})}} {{:helper.link('Export Configuration', 'sign-out', {'export' : 1})}} {{else data.tab == "LINKS"}} +

Connected Devices

+
+
+ Link Password: +
+
+ {{:data.link_password}} +
+
+
+ + + + + + + + + + + + + + + + + + + {{for data.entries}} + + + + + + + + {{/for}} + +
Network AddressNetwork IDSectorStatusUnlink
{{:value.addr}}{{:value.net_id}}{{:value.sector}}{{:value.status ? 'Active' : 'Error'}}{{:helper.link('Unlink', 'unlink', {'unlink' : value.addr}, null, 'infoButton')}}
{{/if}}