Revert "TGUI alerts, lists, inputs"
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
var/prefix = "|Name | Reagents | Reaction vars | Description | Chem properties |\n|---|---|---|-----------|---|\n"
|
||||
var/input_reagent = replacetext(lowertext(tgui_input_text(src, "Input the name/type of a reagent to get it's description on it's own, or leave blank to parse every chem.", "Input")), " ", "") //95% of the time, the reagent type is a lowercase, no spaces / underscored version of the name
|
||||
var/input_reagent = replacetext(lowertext(input("Input the name/type of a reagent to get it's description on it's own, or leave blank to parse every chem.", "Input") as text), " ", "") //95% of the time, the reagent type is a lowercase, no spaces / underscored version of the name
|
||||
if(input_reagent)
|
||||
var/input_reagent2 = find_reagent(input_reagent)
|
||||
if(!input_reagent2)
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
if("clear_recipes")
|
||||
if(!is_operational())
|
||||
return
|
||||
var/yesno = tgui_alert(usr, "Clear all recipes?",, list("Yes","No"))
|
||||
var/yesno = alert("Clear all recipes?",, "Yes","No")
|
||||
if(yesno == "Yes")
|
||||
saved_recipes = list()
|
||||
. = TRUE
|
||||
@@ -337,7 +337,7 @@
|
||||
var/name = stripped_input(usr,"Name","What do you want to name this recipe?", "Recipe", MAX_NAME_LEN)
|
||||
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
if(saved_recipes[name] && tgui_alert(usr, "\"[name]\" already exists, do you want to overwrite it?",, list("Yes", "No")) == "No")
|
||||
if(saved_recipes[name] && alert("\"[name]\" already exists, do you want to overwrite it?",, "Yes", "No") == "No")
|
||||
return
|
||||
if(name && recording_recipe)
|
||||
var/list/logstring = list()
|
||||
|
||||
@@ -221,8 +221,7 @@
|
||||
var/to_container = params["to"]
|
||||
// Custom amount
|
||||
if (amount == -1)
|
||||
amount = text2num(tgui_input_num(
|
||||
usr,
|
||||
amount = text2num(input(
|
||||
"Enter the amount you want to transfer:",
|
||||
name, ""))
|
||||
if (amount == null || amount <= 0)
|
||||
@@ -257,7 +256,7 @@
|
||||
// Get amount of items
|
||||
var/amount = text2num(params["amount"])
|
||||
if(amount == null)
|
||||
amount = text2num(tgui_input_num(usr,
|
||||
amount = text2num(input(usr,
|
||||
"Max 20. Buffer content will be split evenly.",
|
||||
"How many to make?", 1))
|
||||
amount = clamp(round(amount), 0, 20)
|
||||
@@ -286,7 +285,7 @@
|
||||
if(vol_each_text == "auto")
|
||||
vol_each = vol_each_max
|
||||
if(vol_each == null)
|
||||
vol_each = text2num(tgui_input_num(usr,
|
||||
vol_each = text2num(input(usr,
|
||||
"Maximum [vol_each_max] units per item.",
|
||||
"How many units to fill?",
|
||||
vol_each_max))
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
beaker = null
|
||||
. = TRUE
|
||||
if("input")
|
||||
var/input_reagent = replacetext(lowertext(tgui_input_text(usr, "Enter the name of any reagent", "Input")), " ", "") //95% of the time, the reagent id is a lowercase/no spaces version of the name
|
||||
var/input_reagent = replacetext(lowertext(input("Enter the name of any reagent", "Input") as text|null), " ", "") //95% of the time, the reagent id is a lowercase/no spaces version of the name
|
||||
|
||||
if (isnull(input_reagent))
|
||||
return
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
set name = "Set Transfer Amount"
|
||||
set category = "Object"
|
||||
set waitfor = FALSE
|
||||
var/N = tgui_input_list(usr, "Amount per transfer from this:","[src]", possible_transfer_amounts)
|
||||
var/N = input("Amount per transfer from this:","[src]") as null|anything in possible_transfer_amounts
|
||||
if(N)
|
||||
amount_per_transfer_from_this = N
|
||||
to_chat(usr, "<span class='notice'>[src]'s transfer amount is now [amount_per_transfer_from_this] units.</span>")
|
||||
|
||||
@@ -122,7 +122,7 @@ Borg Hypospray
|
||||
log_combat(user, M, "injected", src, "(CHEMICALS: [english_list(injected)])")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/attack_self(mob/user)
|
||||
var/chosen_reagent = modes[reagent_names[tgui_input_list(user, "What reagent do you want to dispense?", "", reagent_names)]]
|
||||
var/chosen_reagent = modes[reagent_names[input(user, "What reagent do you want to dispense?") as null|anything in reagent_names]]
|
||||
if(!chosen_reagent)
|
||||
return
|
||||
mode = chosen_reagent
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
set src in usr
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
if (tgui_alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", list("Yes", "No")) != "Yes")
|
||||
if (alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
|
||||
return
|
||||
if(isturf(usr.loc) && src.loc == usr)
|
||||
to_chat(usr, "<span class='notice'>You empty \the [src] onto the floor.</span>")
|
||||
|
||||
Reference in New Issue
Block a user