There's a bounty for this right? i spent nearly two full days at this
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(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
|
||||
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
|
||||
if(input_reagent)
|
||||
var/input_reagent2 = find_reagent(input_reagent)
|
||||
if(!input_reagent2)
|
||||
|
||||
@@ -221,7 +221,8 @@
|
||||
var/to_container = params["to"]
|
||||
// Custom amount
|
||||
if (amount == -1)
|
||||
amount = text2num(input(
|
||||
amount = text2num(tgui_input_num(
|
||||
usr,
|
||||
"Enter the amount you want to transfer:",
|
||||
name, ""))
|
||||
if (amount == null || amount <= 0)
|
||||
@@ -256,7 +257,7 @@
|
||||
// Get amount of items
|
||||
var/amount = text2num(params["amount"])
|
||||
if(amount == null)
|
||||
amount = text2num(input(usr,
|
||||
amount = text2num(tgui_input_num(usr,
|
||||
"Max 20. Buffer content will be split evenly.",
|
||||
"How many to make?", 1))
|
||||
amount = clamp(round(amount), 0, 20)
|
||||
@@ -285,7 +286,7 @@
|
||||
if(vol_each_text == "auto")
|
||||
vol_each = vol_each_max
|
||||
if(vol_each == null)
|
||||
vol_each = text2num(input(usr,
|
||||
vol_each = text2num(tgui_input_num(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(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
|
||||
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
|
||||
|
||||
if (isnull(input_reagent))
|
||||
return
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
set name = "Set Transfer Amount"
|
||||
set category = "Object"
|
||||
set waitfor = FALSE
|
||||
var/N = input("Amount per transfer from this:","[src]") as null|anything in possible_transfer_amounts
|
||||
var/N = tgui_input_list(usr, "Amount per transfer from this:","[src]", 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[input(user, "What reagent do you want to dispense?") as null|anything in reagent_names]]
|
||||
var/chosen_reagent = modes[reagent_names[tgui_input_list(user, "What reagent do you want to dispense?", "", reagent_names)]]
|
||||
if(!chosen_reagent)
|
||||
return
|
||||
mode = chosen_reagent
|
||||
|
||||
Reference in New Issue
Block a user