The One Where I Port Modals

This commit is contained in:
Chompstation Bot
2021-06-30 19:29:34 +00:00
parent 2457a62edd
commit b6e1989a01
468 changed files with 10519 additions and 1808 deletions

View File

@@ -55,7 +55,7 @@
. = TRUE
if("set_global_limit")
var/newlim = input("Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100) as num
var/newlim = input(usr, "Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100) as num
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
linked.thrust_limit = clamp(newlim/100, 0, 1)
@@ -71,7 +71,7 @@
if("set_limit")
var/datum/ship_engine/E = locate(params["engine"])
var/newlim = input("Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit()) as num
var/newlim = input(usr, "Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit()) as num
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
var/limit = clamp(newlim/100, 0, 1)

View File

@@ -149,7 +149,7 @@ GLOBAL_LIST_EMPTY(all_waypoints)
switch(action)
if("add")
var/datum/computer_file/data/waypoint/R = new()
var/sec_name = input("Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]") as text
var/sec_name = input(usr, "Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]") as text
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
if(!sec_name)
@@ -163,10 +163,10 @@ GLOBAL_LIST_EMPTY(all_waypoints)
R.fields["x"] = linked.x
R.fields["y"] = linked.y
if("new")
var/newx = input("Input new entry x coordinate", "Coordinate input", linked.x) as num
var/newx = input(usr, "Input new entry x coordinate", "Coordinate input", linked.x) as num
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return TRUE
var/newy = input("Input new entry y coordinate", "Coordinate input", linked.y) as num
var/newy = input(usr, "Input new entry y coordinate", "Coordinate input", linked.y) as num
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
R.fields["x"] = CLAMP(newx, 1, world.maxx)
@@ -183,14 +183,14 @@ GLOBAL_LIST_EMPTY(all_waypoints)
if("setcoord")
if(params["setx"])
var/newx = input("Input new destiniation x coordinate", "Coordinate input", dx) as num|null
var/newx = input(usr, "Input new destiniation x coordinate", "Coordinate input", dx) as num|null
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return
if(newx)
dx = CLAMP(newx, 1, world.maxx)
if(params["sety"])
var/newy = input("Input new destiniation y coordinate", "Coordinate input", dy) as num|null
var/newy = input(usr, "Input new destiniation y coordinate", "Coordinate input", dy) as num|null
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return
if(newy)
@@ -208,13 +208,13 @@ GLOBAL_LIST_EMPTY(all_waypoints)
. = TRUE
if("speedlimit")
var/newlimit = input("Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000) as num|null
var/newlimit = input(usr, "Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000) as num|null
if(newlimit)
speedlimit = CLAMP(newlimit/1000, 0, 100)
. = TRUE
if("accellimit")
var/newlimit = input("Input new acceleration limit", "Acceleration limit", accellimit*1000) as num|null
var/newlimit = input(usr, "Input new acceleration limit", "Acceleration limit", accellimit*1000) as num|null
if(newlimit)
accellimit = max(newlimit/1000, 0)
. = TRUE

View File

@@ -99,7 +99,7 @@
if(sensors)
switch(action)
if("range")
var/nrange = input("Set new sensors range", "Sensor range", sensors.range) as num|null
var/nrange = input(usr, "Set new sensors range", "Sensor range", sensors.range) as num|null
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
if(nrange)

View File

@@ -43,7 +43,7 @@
var/list/possible_d = shuttle.get_possible_destinations()
var/D
if(possible_d.len)
D = input("Choose shuttle destination", "Shuttle Destination") as null|anything in possible_d
D = tgui_input_list(usr, "Choose shuttle destination", "Shuttle Destination", possible_d)
else
to_chat(usr,"<span class='warning'>No valid landing sites in range.</span>")
possible_d = shuttle.get_possible_destinations()