tgui usr to ui.user

This commit is contained in:
Kashargul
2024-11-13 00:49:17 +01:00
parent 49d89c0059
commit 32c9f971bc
120 changed files with 1037 additions and 1061 deletions
@@ -66,7 +66,7 @@
return TRUE
// High security - can only be operated when the user has an ID with access on them.
var/obj/item/card/id/I = usr.GetIdCard()
var/obj/item/card/id/I = ui.user.GetIdCard()
if(!istype(I) || !(access_network in I.GetAccess()))
return TRUE
@@ -93,7 +93,7 @@
if(!current_account)
return TRUE
var/newpass = sanitize(tgui_input_text(usr,"Enter new password for account [current_account.login]", "Password", null, 100), 100)
var/newpass = sanitize(tgui_input_text(ui.user,"Enter new password for account [current_account.login]", "Password", null, 100), 100)
if(!newpass)
return TRUE
current_account.password = newpass
@@ -118,10 +118,10 @@
return TRUE
if("newaccount")
var/newdomain = sanitize(tgui_input_list(usr,"Pick domain:", "Domain name", using_map.usable_email_tlds))
var/newdomain = sanitize(tgui_input_list(ui.user,"Pick domain:", "Domain name", using_map.usable_email_tlds))
if(!newdomain)
return TRUE
var/newlogin = sanitize(tgui_input_text(usr,"Pick account name (@[newdomain]):", "Account name", null, 100), 100)
var/newlogin = sanitize(tgui_input_text(ui.user,"Pick account name (@[newdomain]):", "Account name", null, 100), 100)
if(!newlogin)
return TRUE
@@ -60,8 +60,8 @@
ntnet_global.setting_disabled = FALSE
return TRUE
var/response = tgui_alert(usr, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", list("Yes", "No"))
if(response == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE)
var/response = tgui_alert(ui.user, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", list("Yes", "No"))
if(response == "Yes" && tgui_status(ui.user, state) == STATUS_INTERACTIVE)
ntnet_global.setting_disabled = TRUE
return TRUE
if("purgelogs")
@@ -81,14 +81,14 @@
if("ban_nid")
if(!ntnet_global)
return
var/nid = tgui_input_number(usr,"Enter NID of device which you want to block from the network:", "Enter NID")
if(nid && tgui_status(usr, state) == STATUS_INTERACTIVE)
var/nid = tgui_input_number(ui.user,"Enter NID of device which you want to block from the network:", "Enter NID")
if(nid && tgui_status(ui.user, state) == STATUS_INTERACTIVE)
ntnet_global.banned_nids |= nid
return TRUE
if("unban_nid")
if(!ntnet_global)
return
var/nid = tgui_input_number(usr,"Enter NID of device which you want to unblock from the network:", "Enter NID")
if(nid && tgui_status(usr, state) == STATUS_INTERACTIVE)
var/nid = tgui_input_number(ui.user,"Enter NID of device which you want to unblock from the network:", "Enter NID")
if(nid && tgui_status(ui.user, state) == STATUS_INTERACTIVE)
ntnet_global.banned_nids -= nid
return TRUE