mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 08:36:00 +01:00
More standard tgui input conversions (#63464)
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user