mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 12:08:55 +01:00
TGUI input box conversions 1 (#63313)
This commit is contained in:
@@ -37,10 +37,10 @@
|
||||
to_chat(user, span_warning("You're still waiting for approval from your employers about your proposed name change, it'd be best to wait for now."))
|
||||
return
|
||||
|
||||
var/new_name = stripped_input(user, message="What do you want to name \
|
||||
var/new_name = tgui_input_text(user, "What do you want to name \
|
||||
[station_name()]? Keep in mind particularly terrible names may be \
|
||||
rejected by your employers, while names using the standard format, \
|
||||
will automatically be accepted.", max_length=MAX_CHARTER_LEN)
|
||||
rejected by your employers, while names using the standard format \
|
||||
will be accepted automatically.", "Station Name", max_length = MAX_CHARTER_LEN)
|
||||
|
||||
if(response_timer_id)
|
||||
to_chat(user, span_warning("You're still waiting for approval from your employers about your proposed name change, it'd be best to wait for now."))
|
||||
|
||||
@@ -630,7 +630,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
//NOTEKEEPER FUNCTIONS===================================
|
||||
|
||||
if ("Edit")
|
||||
var/n = stripped_multiline_input(U, "Please enter message", name, note)
|
||||
var/n = tgui_input_text(U, "Please enter message", name, note, multiline = TRUE)
|
||||
if (in_range(src, U) && loc == U)
|
||||
if (ui_mode == PDA_UI_NOTEKEEPER && n)
|
||||
note = n
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
to_chat(pai, span_notice("You have been bound to a new master."))
|
||||
pai.emittersemicd = FALSE
|
||||
if("set_laws")
|
||||
var/newlaws = stripped_multiline_input(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.laws.supplied[1], MAX_MESSAGE_LEN)
|
||||
var/newlaws = tgui_input_text(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.laws.supplied[1], MAX_MESSAGE_LEN, TRUE)
|
||||
if(newlaws && pai)
|
||||
pai.add_supplied_law(0,newlaws)
|
||||
if("toggle_holo")
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
/obj/item/grenade/chem_grenade/adv_release/multitool_act(mob/living/user, obj/item/tool)
|
||||
if (active)
|
||||
return
|
||||
var/newspread = text2num(stripped_input(user, "Please enter a new spread amount", name))
|
||||
var/newspread = tgui_input_number(user, "Please enter a new spread amount", name)
|
||||
if (newspread != null && user.canUseTopic(src, BE_CLOSE))
|
||||
newspread = round(newspread)
|
||||
unit_spread = clamp(newspread, 5, 100)
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
return ..()
|
||||
|
||||
if(weapon.tool_behaviour == TOOL_MULTITOOL)
|
||||
var/newtime = text2num(stripped_input(user, "Please enter a new detonation time", name))
|
||||
var/newtime = tgui_input_number(user, "Please enter a new detonation time", name)
|
||||
if (newtime != null && user.canUseTopic(src, BE_CLOSE))
|
||||
if(change_det_time(newtime))
|
||||
to_chat(user, span_notice("You modify the time delay. It's set for [DisplayTimeText(det_time)]."))
|
||||
|
||||
@@ -516,8 +516,7 @@
|
||||
if(is_zero_amount(delete_if_zero = TRUE))
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
var/max = get_amount()
|
||||
var/stackmaterial = round(input(user, "How many sheets do you wish to take out of this stack? (Maximum [max])", "Stack Split") as null|num)
|
||||
max = get_amount()
|
||||
var/stackmaterial = round(tgui_input_number(user, "How many sheets do you wish to take out of this stack?", "Stack Split", max_value = max))
|
||||
stackmaterial = min(max, stackmaterial)
|
||||
if(stackmaterial == null || stackmaterial <= 0 || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
return SECONDARY_ATTACK_CONTINUE_CHAIN
|
||||
|
||||
Reference in New Issue
Block a user