More standard tgui input conversions (#63464)

This commit is contained in:
Jeremiah
2021-12-24 13:04:18 +02:00
committed by GitHub
parent 36e5fcadd3
commit dcab86ba2c
64 changed files with 246 additions and 215 deletions
+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)