Another bunch of fixes for TGUI inputs (I'll be cursed...) (#25009)

* Oh god, oh fuck, WHY DIDN'T I USE isnull()???

* More correct checks

* That's all

* That's all x2

* Flavor fix
This commit is contained in:
Aylong
2024-04-12 18:51:36 +00:00
committed by GitHub
parent bc4cd8bceb
commit 6fe23a6a20
28 changed files with 87 additions and 88 deletions
+2 -2
View File
@@ -26,11 +26,11 @@
switch(text2num(params["msgnum"]))
if(1)
message1 = tgui_input_text(usr, "Line 1", "Enter Message Text", message1, encode = FALSE)
if(!message1)
if(isnull(message1))
return
if(2)
message2 = tgui_input_text(usr, "Line 2", "Enter Message Text", message2, encode = FALSE)
if(!message2)
if(isnull(message2))
return
if("Status")
+1 -1
View File
@@ -74,7 +74,7 @@
switch(action)
if("Edit")
var/n = tgui_input_text(usr, "Please enter message", name, note, multiline = TRUE, encode = FALSE)
if(!n)
if(isnull(n))
return
if(pda.loc == usr)
-2
View File
@@ -122,8 +122,6 @@
/datum/data/pda/app/messenger/proc/create_message(mob/living/U, obj/item/pda/P)
var/t = tgui_input_text(U, "Please enter your message", name)
if(!t)
return
if(!t || !istype(P))
return
if(!in_range(pda, U) && pda.loc != U)
+1 -1
View File
@@ -242,7 +242,7 @@
/datum/data/pda/app/nanobank/proc/input_account_pin(mob/user)
var/attempt_pin = tgui_input_number(user, "Enter pin code", "NanoBank Account Auth", max_value = 99999)
if(!user_account || !attempt_pin)
if(!user_account || isnull(attempt_pin))
return
return attempt_pin