More standard tgui input conversions (#63464)

This commit is contained in:
Jeremiah
2021-12-24 03:04:18 -08:00
committed by GitHub
parent 36e5fcadd3
commit dcab86ba2c
64 changed files with 246 additions and 215 deletions
@@ -33,7 +33,7 @@
if(!user.is_literate())
to_chat(user, span_notice("You scribble illegibly on [src]!"))
return
var/t = stripped_input(user, "What would you like the label to be?", name, null, 53)
var/t = tgui_input_text(user, "What would you like the label to be?", name, max_length = 53)
if(user.get_active_held_item() != interact_tool)
return
if(!user.canUseTopic(src, BE_CLOSE))
+1 -1
View File
@@ -84,7 +84,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
if(!user.is_literate())
to_chat(user, span_notice("You scribble illegibly on the side of [src]!"))
return
var/t = stripped_input(user, "What would you like the label to be?", text("[]", name), null)
var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", name), null)
if (user.get_active_held_item() != P)
return
if(!user.canUseTopic(src, BE_CLOSE))
+6 -4
View File
@@ -156,11 +156,13 @@
if (!can_rotate || admin)
to_chat(user, span_warning("The rotation is locked!"))
return FALSE
var/new_angle = input(user, "Input a new angle for primary reflection face.", "Reflector Angle", rotation_angle) as null|num
var/new_angle = tgui_input_number(user, "New angle for primary reflection face", "Reflector Angle", rotation_angle, 360)
if(isnull(new_angle))
return FALSE
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
return
if(!isnull(new_angle))
set_angle(SIMPLIFY_DEGREES(new_angle))
return FALSE
new_angle = round(new_angle)
set_angle(SIMPLIFY_DEGREES(new_angle))
return TRUE
/obj/structure/reflector/AltClick(mob/user)
@@ -245,7 +245,7 @@
ae.forceMove(drop_location())
else if(istype(W, /obj/item/pen))
var/t = stripped_input(user, "Enter the name for the door.", name, created_name,MAX_NAME_LEN)
var/t = tgui_input_text(user, "Enter the name for the door.", "Windoor", created_name, MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && loc != usr)