diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
index 6c98ab8b3f1..f6181fe104b 100644
--- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
+++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
@@ -320,16 +320,12 @@
return
var/command = tgui_input_text(user, "Enter the command for your target to follow. Uses Left: [G.mind_control_uses], Duration: [DisplayTimeText(G.mind_control_duration)]", "Enter command")
-
if(!command)
return
-
if(QDELETED(user) || user.get_active_hand() != src || loc != user)
return
-
if(QDELETED(G))
return
-
G.mind_control(command, user)
to_chat(user, "You send the command to your target.")
diff --git a/code/game/gamemodes/miniantags/demons/slaughter demon/slaughter.dm b/code/game/gamemodes/miniantags/demons/slaughter demon/slaughter.dm
index 0ee8e70ce67..1dce1c415ff 100644
--- a/code/game/gamemodes/miniantags/demons/slaughter demon/slaughter.dm
+++ b/code/game/gamemodes/miniantags/demons/slaughter demon/slaughter.dm
@@ -195,7 +195,7 @@
return
var/msg = tgui_input_text(usr, "What do you wish to tell [choice]?", null, "")
- if(!(msg))
+ if(!msg)
return
log_say("(SLAUGHTER to [key_name(choice)]) [msg]", usr)
to_chat(usr, "You whisper to [choice]: [msg]")
diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index a3410fa61f0..2c3e81c9c12 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -440,13 +440,14 @@ GLOBAL_VAR(bomb_set)
return
// If no code set, enter new one
var/tempcode = tgui_input_number(usr, "Code", "Input Code", max_value = 999999)
- if(tempcode)
- code = tempcode
- if(code == r_code)
- yes_code = TRUE
- code = null
- else
- code = "ERROR"
+ if(isnull(tempcode))
+ return
+ code = tempcode
+ if(code == r_code)
+ yes_code = TRUE
+ code = null
+ else
+ code = "ERROR"
return
if("toggle_anchor")
if(removal_stage == NUKE_MOBILE)
@@ -479,7 +480,7 @@ GLOBAL_VAR(bomb_set)
switch(action)
if("set_time")
var/time = tgui_input_number(usr, "Detonation time (seconds, min 120, max 600)", "Input Time", 120, 600, 120)
- if(!time)
+ if(isnull(time))
return
timeleft = time
if("toggle_safety")
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index 53b618f108c..2727b8c110e 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -676,7 +676,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
return
if("account") // card account number
var/account_num = tgui_input_number(usr, "Account Number", "Input Number", modify.associated_account_number, 9999999, 1000000)
- if(!scan || !modify || !account_num)
+ if(isnull(account_num) || !scan || !modify)
return FALSE
modify.associated_account_number = account_num
//for future reference, you should never be able to modify the money account datum through the card computer
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index d8666b35d08..d2c2f012dc8 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -247,7 +247,7 @@
to_chat(ui.user, "Arrays recycling. Please stand by.")
return
var/input = tgui_input_text(ui.user, "Please enter the reason for requesting the nuclear self-destruct codes. Misuse of the nuclear request system will not be tolerated under any circumstances. Transmission does not guarantee a response.", "Self Destruct Code Request.", encode = FALSE)
- if(!input || ..() || !(is_authenticated(ui.user) >= COMM_AUTHENTICATION_CAPT))
+ if(isnull(input) || ..() || !(is_authenticated(ui.user) >= COMM_AUTHENTICATION_CAPT))
return
if(length(input) < COMM_CCMSGLEN_MINIMUM)
to_chat(ui.user, "Message '[input]' is too short. [COMM_CCMSGLEN_MINIMUM] character minimum.")
diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm
index 6dc19a744a7..fbc5c3fb08d 100644
--- a/code/game/machinery/doors/brigdoors.dm
+++ b/code/game/machinery/doors/brigdoors.dm
@@ -345,7 +345,10 @@
if(params["prisoner_name"])
prisoner_name = params["prisoner_name"]
else
- prisoner_name = tgui_input_text(usr, "Prisoner Name:", name, prisoner_name, MAX_NAME_LEN, encode = FALSE)
+ var/new_name = tgui_input_text(usr, "Prisoner Name:", name, prisoner_name, MAX_NAME_LEN, encode = FALSE)
+ if(isnull(new_name))
+ return
+ prisoner_name = new_name
if(prisoner_name)
var/datum/data/record/R = find_security_record("name", prisoner_name)
if(istype(R))
@@ -353,9 +356,15 @@
else
prisoner_hasrecord = FALSE
if("prisoner_charge")
- prisoner_charge = tgui_input_text(usr, "Prisoner Charge:", name, prisoner_charge, encode = FALSE)
+ var/new_charge = tgui_input_text(usr, "Prisoner Charge:", name, prisoner_charge, encode = FALSE)
+ if(isnull(new_charge))
+ return
+ prisoner_charge = new_charge
if("prisoner_time")
- prisoner_time = tgui_input_number(usr, "Prisoner Time (in minutes):", name, prisoner_time, 60)
+ var/new_time = tgui_input_number(usr, "Prisoner Time (in minutes):", name, prisoner_time, 60)
+ if(isnull(new_time))
+ return
+ prisoner_time = new_time
if("start")
if(!prisoner_name || !prisoner_charge || !prisoner_time)
return FALSE
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index f1dbc7792f1..f8d8a056195 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -163,9 +163,10 @@ Transponder Codes:
"}
if(href_list["locedit"])
var/newloc = tgui_input_text(usr, "Enter New Location", "Navigation Beacon", location)
- if(newloc)
- location = newloc
- updateDialog()
+ if(!newloc)
+ return
+ location = newloc
+ updateDialog()
else if(href_list["edit"])
var/codekey = href_list["code"]
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index ba6682cb042..d8d85b498b4 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -195,27 +195,25 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
if("writeInput")
if(reject_bad_text(params["write"]))
recipient = params["write"] //write contains the string of the receiving department's name
-
var/new_message = tgui_input_text(usr, "Write your message:", "Awaiting Input", encode = FALSE)
- if(new_message)
- message = new_message
- screen = RCS_MESSAUTH
- switch(params["priority"])
- if("1")
- priority = RQ_NORMALPRIORITY
- if("2")
- priority = RQ_HIGHPRIORITY
- else
- priority = RQ_NONEW_MESSAGES
- else
- reset_message(TRUE)
+ if(isnull(new_message))
+ reset_message(FALSE)
+ return
+ message = new_message
+ screen = RCS_MESSAUTH
+ switch(params["priority"])
+ if("1")
+ priority = RQ_NORMALPRIORITY
+ if("2")
+ priority = RQ_HIGHPRIORITY
+ else
+ priority = RQ_NONEW_MESSAGES
if("writeAnnouncement")
var/new_message = tgui_input_text(usr, "Write your message:", "Awaiting Input", message, multiline = TRUE, encode = FALSE)
- if(new_message)
- message = new_message
- else
- reset_message(TRUE)
+ if(isnull(new_message))
+ return
+ message = new_message
if("sendAnnouncement")
if(!announcementConsole)
diff --git a/code/game/machinery/tcomms/tcomms_core.dm b/code/game/machinery/tcomms/tcomms_core.dm
index e3db26cdea5..6d191a0ec5a 100644
--- a/code/game/machinery/tcomms/tcomms_core.dm
+++ b/code/game/machinery/tcomms/tcomms_core.dm
@@ -286,7 +286,7 @@
// Imports and exports
if("import")
var/json = tgui_input_text(usr, "Provide configuration JSON below.", "Load Config", nttc.nttc_serialize(), multiline = TRUE, encode = FALSE)
- if(!json)
+ if(isnull(json))
return
if(nttc.nttc_deserialize(json, usr.ckey))
log_action(usr, "has uploaded a NTTC JSON configuration: [ADMIN_SHOWDETAILS("Show", json)]", TRUE)
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index bf31c6cdacd..ad46baad7f6 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -293,7 +293,7 @@
var/min = 0
var/max = get_amount()
var/stackmaterial = tgui_input_number(user, "How many sheets do you wish to take out of this stack? (Max: [max])", "Stack Split", max_value = max)
- if(stackmaterial == null || stackmaterial <= min || stackmaterial > get_amount())
+ if(isnull(stackmaterial) || stackmaterial <= min || stackmaterial > get_amount())
return
if(!Adjacent(user, 1))
return
diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm
index a1b8c5ea69f..f51a3db9dad 100755
--- a/code/game/objects/items/weapons/AI_modules.dm
+++ b/code/game/objects/items/weapons/AI_modules.dm
@@ -215,7 +215,7 @@ AI MODULES
/obj/item/aiModule/freeform/attack_self(mob/user as mob)
..()
var/new_lawpos = tgui_input_number(user, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority", lawpos, MAX_SUPPLIED_LAW_NUMBER, MIN_SUPPLIED_LAW_NUMBER)
- if(!new_lawpos || new_lawpos == lawpos)
+ if(isnull(new_lawpos) || new_lawpos == lawpos)
return
lawpos = new_lawpos
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index 64940e3e2d6..7a825263df9 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -499,7 +499,7 @@
var/mob/living/carbon/human/H = user
default = H.age
var/new_age = tgui_input_number(user, "What age would you like to be written on this card?", "Agent Card Age", default, 300, 17)
- if(!Adjacent(user) || !new_age)
+ if(!Adjacent(user) || isnull(new_age))
return
age = new_age
to_chat(user, "Age changed to [new_age].")
@@ -535,7 +535,7 @@
if("Money Account")
var/new_account = tgui_input_number(user, "What money account would you like to link to this card?", "Agent Card Account", 12345, max_value = 9999999)
- if(!Adjacent(user) || !new_account)
+ if(!Adjacent(user) || isnull(new_account))
return
associated_account_number = new_account
to_chat(user, "Linked money account changed to [new_account].")
diff --git a/code/game/objects/items/weapons/picket_signs.dm b/code/game/objects/items/weapons/picket_signs.dm
index 62815bfe516..227a032fb92 100644
--- a/code/game/objects/items/weapons/picket_signs.dm
+++ b/code/game/objects/items/weapons/picket_signs.dm
@@ -15,7 +15,7 @@
/obj/item/picket_sign/attackby(obj/item/W, mob/user, params)
if(is_pen(W) || istype(W, /obj/item/toy/crayon))
var/txt = tgui_input_text(user, "What would you like to write on the sign?", "Sign Label", max_length = 30)
- if(!txt)
+ if(isnull(txt))
return
label = txt
src.name = "[label] sign"
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index c1e98e50194..f07dbd89470 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -546,16 +546,16 @@ GLOBAL_LIST_INIT(view_runtimes_verbs, list(
explosion(epicenter, 3, 5, 7, 5)
if("Custom Bomb")
var/devastation_range = tgui_input_number(src, "Devastation range (in tiles):", "Custom Bomb", max_value = 255)
- if(devastation_range == null)
+ if(isnull(devastation_range))
return
var/heavy_impact_range = tgui_input_number(src, "Heavy impact range (in tiles):", "Custom Bomb", max_value = 255)
- if(heavy_impact_range == null)
+ if(isnull(heavy_impact_range))
return
var/light_impact_range = tgui_input_number(src, "Light impact range (in tiles):", "Custom Bomb", max_value = 255)
- if(light_impact_range == null)
+ if(isnull(light_impact_range))
return
var/flash_range = tgui_input_number(src, "Flash range (in tiles):", "Custom Bomb", max_value = 255)
- if(flash_range == null)
+ if(isnull(flash_range))
return
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, 1, 1)
log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc]")
diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm
index 8ef4f4286ce..cb62033952a 100644
--- a/code/modules/atmospherics/machinery/airalarm.dm
+++ b/code/modules/atmospherics/machinery/airalarm.dm
@@ -921,10 +921,8 @@
if(!(varname in list("min1", "min2", "max1", "max2"))) // uh oh
message_admins("[key_name_admin(usr)] attempted to href edit vars on [src]!!!")
return
-
var/datum/tlv/tlv = TLV[env]
var/newval = tgui_input_number(usr, "Enter [varname] for [env]", "Alarm triggers", tlv.vars[varname], round_value = FALSE)
-
if(isnull(newval) || ..()) // No setting if you walked away
return
if(newval < 0)
diff --git a/code/modules/client/preference/link_processing.dm b/code/modules/client/preference/link_processing.dm
index f33977c4a3d..948dc80d069 100644
--- a/code/modules/client/preference/link_processing.dm
+++ b/code/modules/client/preference/link_processing.dm
@@ -1118,7 +1118,7 @@
if("screentip_mode")
var/desired_screentip_mode = tgui_input_number(user, "Pick a screentip size, pick 0 to disable screentips. (We suggest a number between 8 and 15):", "Screentip Size", screentip_mode, 20, 0)
- if(!desired_screentip_mode)
+ if(isnull(desired_screentip_mode))
return
screentip_mode = desired_screentip_mode
diff --git a/code/modules/economy/economy_machinery/eftpos.dm b/code/modules/economy/economy_machinery/eftpos.dm
index acab3350a93..621c54e8208 100644
--- a/code/modules/economy/economy_machinery/eftpos.dm
+++ b/code/modules/economy/economy_machinery/eftpos.dm
@@ -96,7 +96,7 @@
var/attempt_code = tgui_input_number(user, "Re-enter the current EFTPOS access code:", "Confirm old EFTPOS code", max_value = 9999, min_value = 1000)
if(attempt_code == access_code)
var/trycode = tgui_input_number(user, "Enter a new access code for this device:", "Enter new EFTPOS code", max_value = 9999, min_value = 1000)
- if(!trycode)
+ if(isnull(trycode))
return
access_code = trycode
print_reference()
@@ -122,7 +122,7 @@
transaction_purpose = purpose
if("trans_value")
var/try_num = tgui_input_number(user, "Enter amount for EFTPOS transaction", "Transaction amount", transaction_amount, MAX_EFTPOS_CHARGE)
- if(!check_user_position(user) || !try_num)
+ if(!check_user_position(user) || isnull(try_num))
return
transaction_amount = try_num
if("toggle_lock")
diff --git a/code/modules/food_and_drinks/food/foods/pizza.dm b/code/modules/food_and_drinks/food/foods/pizza.dm
index 8e7a9205045..5be3ad588fd 100644
--- a/code/modules/food_and_drinks/food/foods/pizza.dm
+++ b/code/modules/food_and_drinks/food/foods/pizza.dm
@@ -474,7 +474,7 @@
icon_state = "pizzabox_bomb"
timer_set = TRUE
var/new_timer = tgui_input_number(user, "Set a timer, from one second to ten seconds.", "Timer", timer / 10, 10, 1)
- if(!new_timer)
+ if(isnull(new_timer))
return
if(!in_range(src, user) || issilicon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || user.restrained())
timer_set = FALSE
diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm
index 3746b18a15b..ad5e29ab160 100644
--- a/code/modules/games/cards.dm
+++ b/code/modules/games/cards.dm
@@ -191,8 +191,8 @@
for(var/mob/living/player in viewers(3))
if(!player.incapacitated())
players += player
- var/dcard = tgui_input_number(usr, "How many card(s) do you wish to deal? You may deal up to [length(cards)] cards.", "Deal Cards", max_value = length(cards))
- if(!dcard)
+ var/dcard = tgui_input_number(usr, "How many card(s) do you wish to deal? You may deal up to [length(cards)] cards.", "Deal Cards", 1, length(cards), 1)
+ if(isnull(dcard))
return
var/mob/living/M = tgui_input_list(usr, "Who do you wish to deal [dcard] card(s)?", "Deal Card", players)
if(!usr || !src || !M || !Adjacent(usr))
diff --git a/code/modules/library/book.dm b/code/modules/library/book.dm
index 7f257028052..ec525e0a1db 100644
--- a/code/modules/library/book.dm
+++ b/code/modules/library/book.dm
@@ -214,7 +214,7 @@
switch(choice)
if("Title")
var/newtitle = reject_bad_text(tgui_input_text(user, "Write a new title:", "Title", title))
- if(!newtitle)
+ if(isnull(newtitle))
to_chat(user, "You change your mind.")
return
//Like with paper, the name (not title) of the book should indicate that THIS IS A BOOK when actions are performed with it
@@ -223,13 +223,13 @@
title = newtitle
if("Author")
var/newauthor = tgui_input_text(user, "Write the author's name:", "Author", author, MAX_NAME_LEN)
- if(!newauthor)
+ if(isnull(newauthor))
to_chat(user, "You change your mind.")
return
author = newauthor
if("Summary")
var/newsummary = tgui_input_text(user, "Write the new summary:", "Summary", summary, MAX_SUMMARY_LEN, multiline = TRUE)
- if(!newsummary)
+ if(isnull(newsummary))
to_chat(user, "You change your mind.")
return
summary = newsummary
@@ -245,7 +245,7 @@
to_chat(user, "There's not enough space left on this page to write anything!")
return
var/content = tgui_input_text(user, "Add Text to this page, you have [character_space_remaining] characters of space left:", "Edit Current Page", max_length = MAX_CHARACTERS_PER_BOOKPAGE, multiline = TRUE)
- if(!content)
+ if(isnull(content))
to_chat(user, "You change your mind.")
return
//check if length of current text content + what player is adding is larger than our character limit
@@ -268,7 +268,7 @@
to_chat(user, "There aren't any pages in this book!")
return
var/page_choice = tgui_input_number(user, "There are [length(pages)] pages, which page number would you like to remove?", "Input Page Number", max_value = length(pages))
- if(!page_choice)
+ if(isnull(page_choice))
to_chat(user, "You change your mind.")
return
if(page_choice <= 0 || page_choice > length(pages))
diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm
index 10d7b7aab22..59a38dbee4d 100644
--- a/code/modules/mob/living/simple_animal/friendly/cat.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cat.dm
@@ -288,6 +288,7 @@
so quickly that it generally doesn't matter. You're remarkably resilient to any damage besides this and it's hard for you to really die at all. You should go around and bring happiness and \
free cake to the station!")
var/new_name = tgui_input_text(src, "Enter your name, or press \"Cancel\" to stick with Keeki.", "Name Change", name)
- if(new_name)
- to_chat(src, "Your name is now \"[new_name]\"!")
- name = new_name
+ if(!new_name)
+ return
+ to_chat(src, "Your name is now \"[new_name]\"!")
+ name = new_name
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 3b0c961c935..36958d7be1e 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -752,22 +752,20 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
to_chat(usr, "You have to be conscious to change your flavor text")
return
- var/msg = tgui_input_text(usr, "Set the flavor text in your 'examine' verb. The flavor text should be a physical descriptor of your character at a glance. SFW Drawn Art of your character is acceptable.", "Flavor Text", flavor_text, multiline = TRUE, encode = FALSE)
-
- if(msg != null)
- if(stat)
- to_chat(usr, "You have to be conscious to change your flavor text")
- return
- msg = copytext(msg, 1, MAX_MESSAGE_LEN)
- msg = msg
-
- flavor_text = msg
+ var/msg = tgui_input_text(usr, "Set the flavor text in your 'examine' verb. The flavor text should be a physical descriptor of your character at a glance. SFW Drawn Art of your character is acceptable.", "Flavor Text", flavor_text, multiline = TRUE)
+ if(isnull(msg))
+ return
+ if(stat)
+ to_chat(usr, "You have to be conscious to change your flavor text")
+ return
+ msg = copytext(msg, 1, MAX_MESSAGE_LEN)
+ flavor_text = msg
/mob/proc/print_flavor_text(shrink = TRUE)
if(flavor_text && flavor_text != "")
var/msg = replacetext(flavor_text, "\n", " ")
if(length(msg) <= 40 || !shrink)
- return "[html_encode(msg)]" //Repeat after me, "I will not give players access to decoded HTML."
+ return "[msg]" // There is already encoded by tgui_input
else
return "[copytext_preserve_html(msg, 1, 37)]... More..."
diff --git a/code/modules/pda/cart_apps.dm b/code/modules/pda/cart_apps.dm
index 6ec43486b6c..f34c992d99b 100644
--- a/code/modules/pda/cart_apps.dm
+++ b/code/modules/pda/cart_apps.dm
@@ -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")
diff --git a/code/modules/pda/core_apps.dm b/code/modules/pda/core_apps.dm
index d47f69dfea5..df18daf2fc7 100644
--- a/code/modules/pda/core_apps.dm
+++ b/code/modules/pda/core_apps.dm
@@ -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)
diff --git a/code/modules/pda/messenger.dm b/code/modules/pda/messenger.dm
index 2d1ca09cb98..3f72ad3a376 100644
--- a/code/modules/pda/messenger.dm
+++ b/code/modules/pda/messenger.dm
@@ -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)
diff --git a/code/modules/pda/nanobank.dm b/code/modules/pda/nanobank.dm
index 0d53fc5f84e..106d9503d84 100644
--- a/code/modules/pda/nanobank.dm
+++ b/code/modules/pda/nanobank.dm
@@ -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
diff --git a/code/modules/supply/supply_console.dm b/code/modules/supply/supply_console.dm
index a70e43223b1..91c8fe26171 100644
--- a/code/modules/supply/supply_console.dm
+++ b/code/modules/supply/supply_console.dm
@@ -277,15 +277,14 @@
return
if(!P.singleton && params["multiple"])
- var/num_input = tgui_input_number(user, "Amount", "How many crates?", max_value = MULTIPLE_CRATE_MAX)
- if(!num_input || (!is_public && !is_authorized(user)) || ..()) // Make sure they dont walk away
+ var/num_input = tgui_input_number(user, "Amount", "How many crates?", max_value = MULTIPLE_CRATE_MAX, min_value = 1)
+ if(isnull(num_input) || (!is_public && !is_authorized(user)) || ..()) // Make sure they dont walk away
return
amount = clamp(round(num_input), 1, MULTIPLE_CRATE_MAX)
var/timeout = world.time + (60 SECONDS) // If you dont type the reason within a minute, theres bigger problems here
- var/reason = tgui_input_text(user, "Reason", "Why do you require this item?", encode = FALSE)
- if(world.time > timeout || !reason || (!is_public && !is_authorized(user)) || ..())
- // Cancel if they take too long, they dont give a reason, they aint authed, or if they walked away
+ var/reason = tgui_input_text(user, "Reason", "Why do you require this item?", encode = FALSE, timeout = timeout)
+ if(!reason || (!is_public && !is_authorized(user)) || ..())
return
reason = sanitize(copytext_char(reason, 1, 75)) // very long reasons are bad
diff --git a/code/modules/vote/vote_verb.dm b/code/modules/vote/vote_verb.dm
index 1e44179142d..9dbcad13634 100644
--- a/code/modules/vote/vote_verb.dm
+++ b/code/modules/vote/vote_verb.dm
@@ -41,13 +41,13 @@
// Its custom, lets ask
var/question = tgui_input_text(usr, "What is the vote for?", "Create Vote", encode = FALSE)
- if(!question)
+ if(isnull(question))
return
var/list/choices = list()
for(var/i in 1 to 10)
var/option = tgui_input_text(usr, "Please enter an option or hit cancel to finish", "Create Vote", encode = FALSE)
- if(!option || !usr.client)
+ if(isnull(option) || !usr.client)
break
choices |= option