[FIX] Now properly remove/add machines to the RNC console when (un)linked (#26815)

* Now properly remove/add machines to the rdconsole when (un)linked

* Remove unused variable

---------

Co-authored-by: Adrer <adrermail@gmail.com>
This commit is contained in:
Adrer
2024-09-20 23:08:26 +02:00
committed by GitHub
parent 7262bfb6b6
commit 1d32faf3e3
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -454,6 +454,7 @@
var/user_pass = tgui_input_text(usr, "Please enter network password", "Password Entry")
// Check the password
if(user_pass == C.network_password)
C.mechfabs += UID()
network_manager_uid = C.UID()
to_chat(usr, "<span class='notice'>Successfully linked to <b>[C.network_name]</b>.</span>")
else
@@ -536,6 +537,8 @@
add_fingerprint(usr)
/obj/machinery/mecha_part_fabricator/proc/unlink()
var/obj/machinery/computer/rnd_network_controller/RNC = locateUID(network_manager_uid)
RNC.mechfabs -= UID()
network_manager_uid = null
SStgui.update_uis(src)
+3
View File
@@ -478,6 +478,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/user_pass = input(usr, "Please enter network password", "Password Entry")
// Check the password
if(user_pass == C.network_password)
C.consoles += UID()
network_manager_uid = C.UID()
to_chat(usr, "<span class='notice'>Successfully linked to <b>[C.network_name]</b>.</span>")
else
@@ -708,6 +709,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
return TRUE // update uis
/obj/machinery/computer/rdconsole/proc/unlink()
var/obj/machinery/computer/rnd_network_controller/RNC = locateUID(network_manager_uid)
RNC.consoles -= UID()
network_manager_uid = null
SStgui.update_uis(src)