mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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, "<span class='notice'>Age changed to [new_age].</span>")
|
||||
@@ -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, "<span class='notice'>Linked money account changed to [new_account].</span>")
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user