ALL runtimes

This commit is contained in:
Casey
2022-06-23 09:41:56 +00:00
committed by CHOMPStation2
parent 68760deefb
commit 68c3469d60
17 changed files with 1077 additions and 41 deletions
+3 -3
View File
@@ -31,7 +31,7 @@
// return tgui_input_list(user, message, title, buttons, timeout, autofocus)
// Client does NOT have tgui_input on: Returns regular input
if(!usr.client.prefs.tgui_input_mode || strict_byond)
if(!user.client.prefs.tgui_input_mode || strict_byond)
if(length(buttons) == 2)
return alert(user, message, title, buttons[1], buttons[2])
if(length(buttons) == 3)
@@ -64,7 +64,7 @@
/// The lifespan of the tgui_modal, after which the window will close and delete itself.
var/timeout
/// The bool that controls if this modal should grab window focus
var/autofocus
var/autofocus
/// Boolean field describing if the tgui_modal was closed by the user.
var/closed
@@ -117,7 +117,7 @@
/datum/tgui_alert/tgui_data(mob/user)
var/list/data = list()
if(timeout)
.["timeout"] = CLAMP01((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS))
data["timeout"] = CLAMP01((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS))
return data
/datum/tgui_alert/tgui_act(action, list/params)
+1 -1
View File
@@ -26,7 +26,7 @@
else
return
/// Client does NOT have tgui_input on: Returns regular input
if(!usr.client.prefs.tgui_input_mode && !strict_modern)
if(!user.client.prefs.tgui_input_mode && !strict_modern)
return input(user, message, title, default) as null|anything in items
var/datum/tgui_list_input/input = new(user, message, title, items, default, timeout)
input.tgui_interact(user)
+1 -1
View File
@@ -25,7 +25,7 @@
else
return
// Client does NOT have tgui_input on: Returns regular input
if(!usr.client.prefs.tgui_input_mode)
if(!user.client.prefs.tgui_input_mode)
var/input_number = input(user, message, title, default) as null|num
return clamp(round_value ? round(input_number) : input_number, min_value, max_value)
var/datum/tgui_input_number/number_input = new(user, message, title, default, max_value, min_value, timeout, round_value)
+1 -1
View File
@@ -28,7 +28,7 @@
else
return
// Client does NOT have tgui_input on: Returns regular input
if(!usr.client.prefs.tgui_input_mode)
if(!user.client.prefs.tgui_input_mode)
if(encode)
if(multiline)
return stripped_multiline_input(user, message, title, default, max_length)