mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 05:27:39 +01:00
Input Conversion Part 2
This commit is contained in:
@@ -7,13 +7,13 @@
|
||||
|
||||
var/obj/effect/spawner/newbomb/proto = /obj/effect/spawner/newbomb/radio/custom
|
||||
|
||||
var/p = input(usr, "Enter phoron amount (mol):","Phoron", initial(proto.phoron_amt)) as num|null
|
||||
var/p = tgui_input_number(usr, "Enter phoron amount (mol):","Phoron", initial(proto.phoron_amt))
|
||||
if(p == null) return
|
||||
|
||||
var/o = input(usr, "Enter oxygen amount (mol):","Oxygen", initial(proto.oxygen_amt)) as num|null
|
||||
var/o = tgui_input_number(usr, "Enter oxygen amount (mol):","Oxygen", initial(proto.oxygen_amt))
|
||||
if(o == null) return
|
||||
|
||||
var/c = input(usr, "Enter carbon dioxide amount (mol):","Carbon Dioxide", initial(proto.carbon_amt)) as num|null
|
||||
var/c = tgui_input_number(usr, "Enter carbon dioxide amount (mol):","Carbon Dioxide", initial(proto.carbon_amt))
|
||||
if(c == null) return
|
||||
|
||||
new /obj/effect/spawner/newbomb/radio/custom(get_turf(mob), p, o, c)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/client/proc/kaboom()
|
||||
var/power = input(src, "power?", "power?") as num
|
||||
var/power = tgui_input_number(src, "power?", "power?")
|
||||
var/turf/T = get_turf(src.mob)
|
||||
explosion_rec(T, power)
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/obj/structure/closet/body_bag/attackby(var/obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
|
||||
var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null)
|
||||
if (user.get_active_hand() != W)
|
||||
return
|
||||
if (!in_range(src, user) && src.loc != user)
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
. = TRUE
|
||||
switch(action)
|
||||
if("rename")
|
||||
var/new_name = sanitizeSafe(input(usr,"Please enter your name.","Communicator",usr.name) )
|
||||
var/new_name = sanitizeSafe(tgui_input_text(usr,"Please enter your name.","Communicator",usr.name) )
|
||||
if(new_name)
|
||||
register_device(new_name)
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
to_chat(user, "<span class='warning'>The MMI must go in after everything else!</span>")
|
||||
|
||||
if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -399,7 +399,7 @@
|
||||
|
||||
/obj/item/stack/attack_hand(mob/user as mob)
|
||||
if (user.get_inactive_hand() == src)
|
||||
var/N = input(usr, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1) as num|null
|
||||
var/N = tgui_input_number(usr, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1, amount, 1)
|
||||
if(N)
|
||||
var/obj/item/stack/F = src.split(N)
|
||||
if (F)
|
||||
|
||||
@@ -843,7 +843,7 @@
|
||||
if(!M.mind)
|
||||
return 0
|
||||
|
||||
var/input = sanitizeSafe(input(usr, "What do you want to name the plushie?", ,""), MAX_NAME_LEN)
|
||||
var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name the plushie?", ,""), MAX_NAME_LEN)
|
||||
|
||||
if(src && input && !M.stat && in_range(M,src))
|
||||
name = input
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
to_chat(user, "<span class='warning'>Circuit controls are locked.</span>")
|
||||
return
|
||||
var/existing_networks = jointext(network,",")
|
||||
var/input = sanitize(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
|
||||
var/input = sanitize(tgui_input_text(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
|
||||
if(!input)
|
||||
to_chat(usr, "No input found please hang up and try your call again.")
|
||||
return
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/plastique/attack_self(mob/user as mob)
|
||||
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
|
||||
var/newtime = tgui_input_number(usr, "Please set the timer.", "Timer", 10, 60000, 10)
|
||||
if(user.get_active_hand() == src)
|
||||
newtime = CLAMP(newtime, 10, 60000)
|
||||
timer = newtime
|
||||
|
||||
@@ -288,7 +288,7 @@ Implant Specifics:<BR>"}
|
||||
|
||||
/obj/item/weapon/implant/explosive/post_implant(mob/source as mob)
|
||||
elevel = tgui_alert(usr, "What sort of explosion would you prefer?", "Implant Intent", list("Localized Limb", "Destroy Body", "Full Explosion"))
|
||||
phrase = input(usr, "Choose activation phrase:") as text
|
||||
phrase = tgui_input_text(usr, "Choose activation phrase:")
|
||||
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
|
||||
phrase = replace_characters(phrase, replacechars)
|
||||
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.", 0, 0)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/obj/item/weapon/implantcase/attackby(obj/item/weapon/I as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(I, /obj/item/weapon/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
|
||||
var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null)
|
||||
if (user.get_active_hand() != I)
|
||||
return
|
||||
if((!in_range(src, usr) && src.loc != user))
|
||||
|
||||
Reference in New Issue
Block a user