diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm
index b0d1a1e15f..332abc11bd 100644
--- a/_maps/map_files/BoxStation/BoxStation.dmm
+++ b/_maps/map_files/BoxStation/BoxStation.dmm
@@ -17830,7 +17830,7 @@
/turf/open/floor/wood,
/area/service/bar)
"aRx" = (
-/obj/machinery/computer/arcade/minesweeper,
+/obj/machinery/computer/arcade/orion_trail,
/turf/open/floor/wood,
/area/service/bar)
"aRy" = (
@@ -60122,7 +60122,7 @@
/turf/open/floor/plasteel,
/area/commons/dorms)
"nZL" = (
-/obj/machinery/computer/arcade/minesweeper,
+/obj/machinery/computer/arcade/orion_trail,
/turf/open/floor/wood,
/area/command/heads_quarters/captain)
"oax" = (
@@ -64938,7 +64938,7 @@
/turf/open/floor/plasteel,
/area/security/prison/upper)
"vim" = (
-/obj/machinery/computer/arcade/minesweeper,
+/obj/machinery/computer/arcade/battle,
/obj/effect/decal/cleanable/dirt,
/obj/structure/cable{
icon_state = "1-2"
diff --git a/_maps/map_files/CogStation/CogStation.dmm b/_maps/map_files/CogStation/CogStation.dmm
index 74debaa989..c5e8df8ed2 100644
--- a/_maps/map_files/CogStation/CogStation.dmm
+++ b/_maps/map_files/CogStation/CogStation.dmm
@@ -858,7 +858,7 @@
/turf/open/floor/plating/airless,
/area/router/aux)
"acf" = (
-/obj/machinery/computer/arcade/minesweeper,
+/obj/machinery/computer/arcade/battle,
/turf/open/floor/carpet/arcade,
/area/commons/arcade)
"acg" = (
@@ -4505,7 +4505,7 @@
/area/maintenance/solars/starboard/fore)
"alg" = (
/obj/structure/frame/machine,
-/obj/item/circuitboard/computer/arcade/minesweeper,
+/obj/item/circuitboard/computer/arcade/orion_trail,
/turf/open/floor/plating,
/area/construction/secondary)
"alh" = (
diff --git a/_maps/map_files/LambdaStation/dorms.dmm b/_maps/map_files/LambdaStation/dorms.dmm
index afe85da6cc..e1133584b8 100644
--- a/_maps/map_files/LambdaStation/dorms.dmm
+++ b/_maps/map_files/LambdaStation/dorms.dmm
@@ -9501,7 +9501,7 @@
/obj/machinery/camera/autoname{
dir = 4
},
-/obj/machinery/computer/arcade/minesweeper{
+/obj/machinery/computer/arcade/orion_trail{
dir = 4
},
/turf/open/floor/plasteel,
diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm
index 5b5885aca6..cc78b62bdc 100644
--- a/_maps/map_files/MetaStation/MetaStation.dmm
+++ b/_maps/map_files/MetaStation/MetaStation.dmm
@@ -70208,7 +70208,7 @@
},
/area/command/gateway)
"pCQ" = (
-/obj/machinery/computer/arcade/minesweeper{
+/obj/machinery/computer/arcade/battle{
dir = 4
},
/turf/open/floor/plasteel,
diff --git a/_maps/map_files/Snaxi/Snaxi.dmm b/_maps/map_files/Snaxi/Snaxi.dmm
index d9cf6c7948..1db8a64a97 100644
--- a/_maps/map_files/Snaxi/Snaxi.dmm
+++ b/_maps/map_files/Snaxi/Snaxi.dmm
@@ -870,7 +870,7 @@
/obj/machinery/light{
dir = 4
},
-/obj/machinery/computer/arcade/minesweeper{
+/obj/machinery/computer/arcade/orion_trail{
dir = 8
},
/obj/structure/sign/poster/official/nanomichi_ad{
@@ -5842,7 +5842,7 @@
/turf/open/floor/plating,
/area/maintenance/aft/secondary)
"akQ" = (
-/obj/machinery/computer/arcade/minesweeper,
+/obj/machinery/computer/arcade/battle,
/turf/open/floor/plasteel/dark,
/area/security/prison)
"akR" = (
@@ -34938,7 +34938,7 @@
dir = 1;
pixel_y = -24
},
-/obj/machinery/computer/arcade/minesweeper{
+/obj/machinery/computer/arcade/orion_trail{
dir = 4
},
/turf/open/floor/plasteel/dark,
diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm
index 01d7794638..e3c928a9a9 100644
--- a/code/__DEFINES/status_effects.dm
+++ b/code/__DEFINES/status_effects.dm
@@ -119,6 +119,8 @@
#define STATUS_EFFECT_CLOUDSTRUCK /datum/status_effect/cloudstruck //blinds and applies an overlay.
+#define STATUS_EFFECT_GAUNTLET_CONC /datum/status_effect/cgau_conc // it's a slowdown that really should only be applying to large simplemobs
+
/// shoves inflict this to indicate the next shove while this is in effect should disarm guns
#define STATUS_EFFECT_OFF_BALANCE /datum/status_effect/off_balance
diff --git a/code/__HELPERS/areas.dm b/code/__HELPERS/areas.dm
index 84740b2fc3..395cf66758 100644
--- a/code/__HELPERS/areas.dm
+++ b/code/__HELPERS/areas.dm
@@ -151,7 +151,7 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engineerin
if(!place.requires_power || (place.area_flags & NOTELEPORT) || (place.area_flags & HIDDEN_AREA))
continue // No expanding powerless rooms etc
areas[place.name] = place
- var/area_choice = input(creator, "Choose an area to expand or make a new area.", "Area Expansion") as null|anything in areas
+ var/area_choice = tgui_input_list(creator, "Choose an area to expand or make a new area.", "Area Expansion", areas)
area_choice = areas[area_choice]
if(!area_choice)
diff --git a/code/__HELPERS/custom_holoforms.dm b/code/__HELPERS/custom_holoforms.dm
index 2733a97e14..b16c3f6c98 100644
--- a/code/__HELPERS/custom_holoforms.dm
+++ b/code/__HELPERS/custom_holoforms.dm
@@ -60,7 +60,7 @@
S["real_name"] >> name
if(name)
characters[name] = i
- var/chosen_name = input(C, "Which character do you wish to use as your appearance.") as anything in characters
+ var/chosen_name = tgui_input_list(C, "Which character do you wish to use as your appearance.", "", characters)
if(chosen_name)
if(C.prefs.last_custom_holoform > world.time - CUSTOM_HOLOFORM_DELAY)
to_chat(C.mob, "You are attempting to set your custom holoform too fast!")
diff --git a/code/__HELPERS/files.dm b/code/__HELPERS/files.dm
index aad5b4cab1..eac7534827 100644
--- a/code/__HELPERS/files.dm
+++ b/code/__HELPERS/files.dm
@@ -11,7 +11,7 @@
if(path != root)
choices.Insert(1,"/")
- var/choice = input(src,"Choose a file to access:","Download",null) as null|anything in choices
+ var/choice = tgui_input_list(src,"Choose a file to access:","Download", choices)
switch(choice)
if(null)
return
diff --git a/code/__HELPERS/reagents.dm b/code/__HELPERS/reagents.dm
index fa655efce4..d5080c863d 100644
--- a/code/__HELPERS/reagents.dm
+++ b/code/__HELPERS/reagents.dm
@@ -75,11 +75,11 @@
/proc/choose_reagent_id(mob/user)
var/chosen_id
- switch(alert(user, "Choose a method.", "Add Reagents", "Search", "Choose from a list", "I'm feeling lucky"))
+ switch(tgui_alert(user, "Choose a method.", "Add Reagents", list("Search", "Choose from a list", "I'm feeling lucky")))
if("Search")
var/valid_id
while(!valid_id)
- chosen_id = input(user, "Enter the ID of the reagent you want to add.", "Search reagents") as null|text
+ chosen_id = tgui_input_text(user, "Enter the ID of the reagent you want to add.", "Search reagents")
if(isnull(chosen_id)) //Get me out of here!
break
if(!ispath(text2path(chosen_id)))
@@ -91,7 +91,7 @@
if(!valid_id)
to_chat(user, "A reagent with that ID doesn't exist!")
if("Choose from a list")
- chosen_id = input(user, "Choose a reagent to add.", "Choose a reagent.") as null|anything in subtypesof(/datum/reagent)
+ chosen_id = tgui_input_list(user, "Choose a reagent to add.", "Choose a reagent.", subtypesof(/datum/reagent))
if("I'm feeling lucky")
chosen_id = pick(subtypesof(/datum/reagent))
return chosen_id
diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm
index dec44653af..8e2cff6a49 100644
--- a/code/__HELPERS/text.dm
+++ b/code/__HELPERS/text.dm
@@ -42,7 +42,7 @@
/proc/sanitize_name(t,list/repl_chars = null)
if(t == "space" || t == "floor" || t == "wall" || t == "r-wall" || t == "monkey" || t == "unknown" || t == "inactive ai") //prevents these common metagamey names
- alert("Invalid name.")
+ tgui_alert(usr, "Invalid name.")
return ""
return sanitize(t)
@@ -93,7 +93,7 @@
// Used to get a properly sanitized input, of max_length
// no_trim is self explanatory but it prevents the input from being trimed if you intend to parse newlines or whitespace.
/proc/stripped_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE)
- var/name = input(user, message, title, default) as text|null
+ var/name = tgui_input_text(user, message, title, default)
if(no_trim)
return copytext(html_encode(name), 1, max_length)
else
@@ -101,7 +101,7 @@
// Used to get a properly sanitized multiline input, of max_length
/proc/stripped_multiline_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE)
- var/name = input(user, message, title, default) as message|null
+ var/name = tgui_input_message(user, message, title, default)
if(isnull(name)) // Return null if canceled.
return null
if(no_trim)
@@ -113,7 +113,7 @@
* stripped_multiline_input but reflects to the user instead if it's too big and returns null.
*/
/proc/stripped_multiline_input_or_reflect(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE)
- var/name = input(user, message, title, default) as message|null
+ var/name = tgui_input_message(user, message, title, default)
if(isnull(name)) // Return null if canceled.
return null
if(length(name) > max_length)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 9fee97bbb1..daad573c5a 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -249,7 +249,7 @@ Turf and target are separate in case you want to teleport some distance from a t
var/list/borgs = active_free_borgs()
if(borgs.len)
if(user)
- . = input(user,"Unshackled cyborg signals detected:", "Cyborg Selection", borgs[1]) in borgs
+ . = tgui_input_list(user,"Unshackled cyborg signals detected:", "Cyborg Selection", borgs)
else
. = pick(borgs)
return .
@@ -258,7 +258,7 @@ Turf and target are separate in case you want to teleport some distance from a t
var/list/ais = active_ais()
if(ais.len)
if(user)
- . = input(user,"AI signals detected:", "AI Selection", ais[1]) in ais
+ . = tgui_input_list(user,"AI signals detected:", "AI Selection", ais)
else
. = pick(ais)
return .
@@ -1075,7 +1075,7 @@ B --><-- A
/proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
if (value == FALSE) //nothing should be calling us with a number, so this is safe
- value = input("Enter type to find (blank for all, cancel to cancel)", "Search for type") as null|text
+ value = tgui_input_text(usr, "Enter type to find (blank for all, cancel to cancel)", "Search for type")
if (isnull(value))
return
value = trim(value)
@@ -1089,7 +1089,7 @@ B --><-- A
if(matches.len==1)
chosen = matches[1]
else
- chosen = input("Select a type", "Pick Type", matches[1]) as null|anything in matches
+ chosen = tgui_input_list(usr, "Select a type", "Pick Type", matches)
if(!chosen)
return
chosen = matches[chosen]
diff --git a/code/_onclick/hud/ai.dm b/code/_onclick/hud/ai.dm
index 17b5a9ed61..7a21a3f338 100644
--- a/code/_onclick/hud/ai.dm
+++ b/code/_onclick/hud/ai.dm
@@ -33,7 +33,7 @@
if(..())
return
var/mob/living/silicon/ai/AI = usr
- var/target_name = input(AI, "Choose who you want to track", "Tracking") as null|anything in AI.trackable_mobs()
+ var/target_name = tgui_input_list(AI, "Choose who you want to track", "Tracking", AI.trackable_mobs())
AI.ai_camera_track(target_name)
/atom/movable/screen/ai/camera_light
diff --git a/code/_onclick/hud/movable_screen_objects.dm b/code/_onclick/hud/movable_screen_objects.dm
index eeb56d67f5..7d75fd8b5a 100644
--- a/code/_onclick/hud/movable_screen_objects.dm
+++ b/code/_onclick/hud/movable_screen_objects.dm
@@ -62,7 +62,7 @@
M.maptext = "Movable"
M.maptext_width = 64
- var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object") as text
+ var/screen_l = tgui_input_text(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object")
if(!screen_l)
return
@@ -81,7 +81,7 @@
S.maptext = "Snap"
S.maptext_width = 64
- var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Snap UI Object") as text
+ var/screen_l = tgui_input_text(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Snap UI Object")
if(!screen_l)
return
diff --git a/code/controllers/admin.dm b/code/controllers/admin.dm
index 5c767ecb1b..17341a3970 100644
--- a/code/controllers/admin.dm
+++ b/code/controllers/admin.dm
@@ -80,7 +80,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
controllers["[controller] (controller.type)"] = controller //we use an associated list to ensure clients can't hold references to controllers
controller_choices += "[controller] (controller.type)"
- var/datum/controller/controller_string = input("Select controller to debug", "Debug Controller") as null|anything in controller_choices
+ var/datum/controller/controller_string = tgui_input_list(src, "Select controller to debug", "Debug Controller", controller_choices)
var/datum/controller/controller = controllers[controller_string]
if (!istype(controller))
diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm
index d0a6336223..b231546bb7 100644
--- a/code/controllers/subsystem/mapping.dm
+++ b/code/controllers/subsystem/mapping.dm
@@ -483,7 +483,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
if(!holder ||!check_rights(R_FUN))
return
- var/choice = alert(src, "What kind of level would you like to load?", "Load Away/VR", AWAY_MISSION_NAME, VIRT_REALITY_NAME, "Cancel")
+ var/choice = tgui_alert(src, "What kind of level would you like to load?", "Load Away/VR", list(AWAY_MISSION_NAME, VIRT_REALITY_NAME, "Cancel"))
var/list/possible_options
var/list/ztraits
@@ -493,7 +493,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
ztraits = list(ZTRAIT_AWAY = TRUE, ZTRAIT_VR = TRUE)
if(AWAY_MISSION_NAME)
if(!GLOB.the_gateway)
- if(alert("There's no home gateway on the station. You sure you want to continue ?", "Uh oh", "Yes", "No") != "Yes")
+ if(tgui_alert(src, "There's no home gateway on the station. You sure you want to continue ?", "Uh oh", list("Yes", "No")) != "Yes")
return
possible_options = GLOB.potential_away_levels
ztraits = list(ZTRAIT_AWAY = TRUE)
@@ -503,7 +503,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
var/away_name
var/datum/space_level/away_level
- var/answer = input("What kind ? ","Away/VR") as null|anything in list(possible_options + "Custom")
+ var/answer = tgui_input_list(src, "What kind ? ","Away/VR", list(possible_options + "Custom"))
switch(answer)
if(null)
return
diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm
index 6af79d4d14..34e79b6549 100644
--- a/code/controllers/subsystem/shuttle.dm
+++ b/code/controllers/subsystem/shuttle.dm
@@ -943,6 +943,6 @@ SUBSYSTEM_DEF(shuttle)
SSblackbox.record_feedback("text", "shuttle_manipulator", 1, "[mdp.name]")
shuttle_loading = FALSE
if(emergency == mdp) //you just changed the emergency shuttle, there are events in game + captains that can change your snowflake choice.
- var/set_purchase = alert(usr, "Do you want to also disable shuttle purchases/random events that would change the shuttle?", "Butthurt Admin Prevention", "Yes, disable purchases/events", "No, I want to possibly get owned")
+ var/set_purchase = tgui_alert(usr, "Do you want to also disable shuttle purchases/random events that would change the shuttle?", "Butthurt Admin Prevention", list("Yes, disable purchases/events", "No, I want to possibly get owned"))
if(set_purchase == "Yes, disable purchases/events")
SSshuttle.shuttle_purchased = SHUTTLEPURCHASE_FORCED
diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm
index 7b4a06c74d..0e29e80245 100644
--- a/code/controllers/subsystem/vote.dm
+++ b/code/controllers/subsystem/vote.dm
@@ -326,7 +326,7 @@ SUBSYSTEM_DEF(vote)
return message_admins("A vote has tried to change the gamemode, but the game has already started. Aborting.")
GLOB.master_mode = "dynamic"
if(. == "extended")
- GLOB.dynamic_forced_extended = TRUE
+ GLOB.dynamic_extended = TRUE
message_admins("The gamemode has been voted for, and has been changed to: [GLOB.master_mode]")
log_admin("Gamemode has been voted for and switched to: [GLOB.master_mode].")
if("restart")
@@ -453,7 +453,7 @@ SUBSYSTEM_DEF(vote)
question = stripped_input(usr,"What is the vote for?")
if(!question)
return 0
- var/system_string = input(usr,"Which voting type?",GLOB.vote_type_names[1]) in GLOB.vote_type_names
+ var/system_string = tgui_input_list(usr,"Which voting type?",GLOB.vote_type_names[1], GLOB.vote_type_names)
vote_system = GLOB.vote_type_names[system_string]
for(var/i=1,i<=10,i++)
var/option = capitalize(stripped_input(usr,"Please enter an option or hit cancel to finish"))
@@ -469,7 +469,7 @@ SUBSYSTEM_DEF(vote)
var/bitflag = GLOB.display_vote_settings[A]
toggletext = "[toggles & bitflag ? "Show" : "Hide"] [A]"
choices[toggletext] = bitflag
- var/chosen = input(usr, "Toggle vote display settings. Cancel to finalize.", toggles) as null|anything in choices
+ var/chosen = tgui_input_list(usr, "Toggle vote display settings. Cancel to finalize.", toggles, choices)
if(!chosen)
keep_going = FALSE
else
diff --git a/code/datums/action.dm b/code/datums/action.dm
index 1a8ea7a60f..8b8ea7efd5 100644
--- a/code/datums/action.dm
+++ b/code/datums/action.dm
@@ -564,7 +564,7 @@
var/list/areas = list()
for (var/area/a in owner.siliconaccessareas)
areas[a.name] = a
- var/removeAPC = input("Select an APC to remove:","Remove APC Control",1) as null|anything in areas
+ var/removeAPC = tgui_input_list(owner, "Select an APC to remove:","Remove APC Control", areas)
if (!removeAPC)
return
var/area/area = areas[removeAPC]
@@ -586,7 +586,7 @@
var/list/areas = list()
for (var/area/a in owner.siliconaccessareas)
areas[a.name] = a
- var/accessAPC = input("Select an APC to access:","Access APC Interface",1) as null|anything in areas
+ var/accessAPC = tgui_input_list(owner, "Select an APC to access:","Access APC Interface", areas)
if (!accessAPC)
return
var/area/area = areas[accessAPC]
diff --git a/code/datums/browser.dm b/code/datums/browser.dm
index 2057cbb21a..1663f8b5c6 100644
--- a/code/datums/browser.dm
+++ b/code/datums/browser.dm
@@ -376,13 +376,13 @@
if ("string")
settings["mainsettings"][setting]["value"] = stripped_input(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]", settings["mainsettings"][setting]["value"])
if ("number")
- settings["mainsettings"][setting]["value"] = input(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]") as num
+ settings["mainsettings"][setting]["value"] = tgui_input_num(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]")
if ("color")
settings["mainsettings"][setting]["value"] = input(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]", settings["mainsettings"][setting]["value"]) as color
if ("boolean")
- settings["mainsettings"][setting]["value"] = input(user, "[settings["mainsettings"][setting]["desc"]]?") in list("Yes","No")
+ settings["mainsettings"][setting]["value"] = tgui_input_list(user, "[settings["mainsettings"][setting]["desc"]]?", "", list("Yes","No"))
if ("ckey")
- settings["mainsettings"][setting]["value"] = input(user, "[settings["mainsettings"][setting]["desc"]]?") in list("none") + GLOB.directory
+ settings["mainsettings"][setting]["value"] = tgui_input_list(user, "[settings["mainsettings"][setting]["desc"]]?", "", list("none") + GLOB.directory)
if (settings["mainsettings"][setting]["callback"])
var/datum/callback/callback = settings["mainsettings"][setting]["callback"]
settings = callback.Invoke(settings)
diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm
index cc988544b8..05f614842f 100644
--- a/code/datums/components/material_container.dm
+++ b/code/datums/components/material_container.dm
@@ -125,7 +125,7 @@
//try to get ammount to use
var/requested_amount
if(precise_insertion)
- requested_amount = input(user, "How much do you want to insert?", "Inserting [S.singular_name]s") as num|null
+ requested_amount = tgui_input_num(user, "How much do you want to insert?", "Inserting [S.singular_name]s")
else
requested_amount= S.amount
diff --git a/code/datums/components/storage/concrete/bag_of_holding.dm b/code/datums/components/storage/concrete/bag_of_holding.dm
index e19edc89d8..010437dbb1 100644
--- a/code/datums/components/storage/concrete/bag_of_holding.dm
+++ b/code/datums/components/storage/concrete/bag_of_holding.dm
@@ -5,7 +5,7 @@
var/list/obj/item/storage/backpack/holding/matching = typecache_filter_list(W.GetAllContents(), typecacheof(/obj/item/storage/backpack/holding))
matching -= A
if(istype(W, /obj/item/storage/backpack/holding) || matching.len)
- var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", "Abort", "Proceed")
+ var/safety = tgui_alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", list("Abort", "Proceed"))
if(safety != "Proceed" || QDELETED(A) || QDELETED(W) || QDELETED(user) || !user.canUseTopic(A, BE_CLOSE, iscarbon(user)))
return
var/turf/loccheck = get_turf(A)
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 7e3ac29b2d..8496d95442 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -450,7 +450,7 @@
symptoms += SSdisease.list_symptoms.Copy()
do
if(user)
- var/symptom = input(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom") in symptoms
+ var/symptom = tgui_input_list(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom", symptoms)
if(isnull(symptom))
return
else if(istext(symptom))
diff --git a/code/datums/elements/flavor_text.dm b/code/datums/elements/flavor_text.dm
index 6217665157..d2e1c07eff 100644
--- a/code/datums/elements/flavor_text.dm
+++ b/code/datums/elements/flavor_text.dm
@@ -112,7 +112,7 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
var/datum/element/flavor_text/F = i
choices[F.flavor_name] = F
- var/chosen = input(src, "Which flavor text would you like to modify?") as null|anything in choices
+ var/chosen = tgui_input_list(src, "Which flavor text would you like to modify?", "", choices)
if(!chosen)
return
var/datum/element/flavor_text/F = choices[chosen]
diff --git a/code/datums/elements/polychromic.dm b/code/datums/elements/polychromic.dm
index 5e888e0609..70de6ca279 100644
--- a/code/datums/elements/polychromic.dm
+++ b/code/datums/elements/polychromic.dm
@@ -122,7 +122,7 @@
overlays += mutable_appearance(f_icon, overlays_states[i], color = M.color)
/datum/element/polychromic/proc/set_color(atom/source, mob/user)
- var/choice = input(user,"Polychromic options", "Recolor [source]") as null|anything in overlays_names
+ var/choice = tgui_input_list(user,"Polychromic options", "Recolor [source]", overlays_names)
if(!choice || QDELETED(source) || !user.canUseTopic(source, BE_CLOSE, NO_DEXTERY))
return
var/index = overlays_names.Find(choice)
diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm
index 8cdfaa4308..63131dc4ff 100644
--- a/code/datums/explosion.dm
+++ b/code/datums/explosion.dm
@@ -385,7 +385,7 @@ GLOBAL_LIST_EMPTY(explosions)
set name = "Check Bomb Impact"
set category = "Debug"
- var/newmode = alert("Use reactionary explosions?","Check Bomb Impact", "Yes", "No")
+ var/newmode = tgui_alert(src, "Use reactionary explosions?","Check Bomb Impact", list("Yes", "No"))
var/turf/epicenter = get_turf(mob)
if(!epicenter)
return
@@ -394,7 +394,7 @@ GLOBAL_LIST_EMPTY(explosions)
var/heavy = 0
var/light = 0
var/list/choices = list("Small Bomb","Medium Bomb","Big Bomb","Custom Bomb")
- var/choice = input("Bomb Size?") in choices
+ var/choice = tgui_input_list(src, "Bomb Size?", "", choices)
switch(choice)
if(null)
return 0
@@ -411,9 +411,9 @@ GLOBAL_LIST_EMPTY(explosions)
heavy = 5
light = 7
if("Custom Bomb")
- dev = input("Devastation range (Tiles):") as num
- heavy = input("Heavy impact range (Tiles):") as num
- light = input("Light impact range (Tiles):") as num
+ dev = tgui_input_num(src, "Devastation range (Tiles):")
+ heavy = tgui_input_num(src, "Heavy impact range (Tiles):")
+ light = tgui_input_num(src, "Light impact range (Tiles):")
var/max_range = max(dev, heavy, light)
var/x0 = epicenter.x
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index e917fc6b70..769b108004 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -420,7 +420,7 @@
A.admin_remove(usr)
if (href_list["role_edit"])
- var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in get_all_jobs()
+ var/new_role = tgui_input_list(usr, "Select new role", "Assigned role", get_all_jobs())
if (!new_role)
return
assigned_role = new_role
@@ -433,7 +433,6 @@
else if (href_list["obj_edit"] || href_list["obj_add"])
var/objective_pos //Edited objectives need to keep same order in antag objective list
- var/def_value
var/datum/antagonist/target_antag
var/datum/objective/old_objective //The old objective we're replacing/editing
var/datum/objective/new_objective //New objective we're be adding
@@ -461,7 +460,7 @@
if(1)
target_antag = antag_datums[1]
else
- var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", "(new custom antag)") as null|anything in antag_datums + "(new custom antag)"
+ var/datum/antagonist/target = tgui_input_list(usr, "Which antagonist gets the objective:", "Antagonist", list(antag_datums + "(new custom antag)"))
if (QDELETED(target))
return
else if(target == "(new custom antag)")
@@ -495,11 +494,7 @@
var/datum/objective/X = T
choices[initial(X.name)] = T
- if(old_objective)
- if(old_objective.name in choices)
- def_value = old_objective.name
-
- var/selected_type = input("Select objective type:", "Objective type", def_value) as null|anything in choices
+ var/selected_type = tgui_input_list(usr, "Select objective type:", "Objective type", choices)
selected_type = choices[selected_type]
if (!selected_type)
return
@@ -537,7 +532,7 @@
choices[initial(t.employer)] = C
var/datum/antagonist/traitor/T = locate(href_list["target_antag"]) in antag_datums
if(T)
- var/selected_type = input("Select traitor class:", "Traitor class", T.traitor_kind.employer) as null|anything in choices
+ var/selected_type = tgui_input_list(usr, "Select traitor class:", "Traitor class", choices)
selected_type = choices[selected_type]
T.set_traitor_kind(selected_type)
@@ -598,7 +593,7 @@
if(check_rights(R_FUN, 0))
var/datum/component/uplink/U = find_syndicate_uplink()
if(U)
- var/crystals = input("Amount of telecrystals for [key]","Syndicate uplink", U.telecrystals) as null | num
+ var/crystals = tgui_input_num(usr, "Amount of telecrystals for [key]","Syndicate uplink", U.telecrystals)
if(!isnull(crystals))
U.telecrystals = crystals
message_admins("[key_name_admin(usr)] changed [current]'s telecrystal count to [crystals].")
diff --git a/code/datums/mutations/actions.dm b/code/datums/mutations/actions.dm
index 8f7d67abb8..d2656dee97 100644
--- a/code/datums/mutations/actions.dm
+++ b/code/datums/mutations/actions.dm
@@ -242,7 +242,7 @@
if(!length(possible))
to_chat(user,"Despite your best efforts, there are no scents to be found on [sniffed]...")
return
- tracking_target = input(user, "Choose a scent to remember.", "Scent Tracking") as null|anything in sortNames(possible)
+ tracking_target = tgui_input_list(user, "Choose a scent to remember.", "Scent Tracking", sortNames(possible))
if(!tracking_target)
if(!old_target)
to_chat(user,"You decide against remembering any scents. Instead, you notice your own nose in your peripheral vision. This goes on to remind you of that one time you started breathing manually and couldn't stop. What an awful day that was.")
diff --git a/code/datums/skills/_check_skills.dm b/code/datums/skills/_check_skills.dm
index 91b36a123f..4d03559c06 100644
--- a/code/datums/skills/_check_skills.dm
+++ b/code/datums/skills/_check_skills.dm
@@ -21,7 +21,7 @@
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "SkillPanel", "[owner.name]'s Skills")
- ui.set_autoupdate(FALSE)
+ ui.set_autoupdate(FALSE)
ui.open()
else if(need_static_data_update)
update_static_data(user)
@@ -57,7 +57,7 @@
if(!check_rights(R_DEBUG))
return
var/skill = text2path(params["skill"])
- var/number = input("Please insert the amount of experience/progress you'd like to add/subtract:") as num|null
+ var/number = tgui_input_num(usr, "Please insert the amount of experience/progress you'd like to add/subtract:")
if (number)
owner.set_skill_value(skill, owner.get_skill_value(skill, FALSE) + number)
return TRUE
@@ -65,7 +65,7 @@
if(!check_rights(R_DEBUG))
return
var/skill = text2path(params["skill"])
- var/number = input("Please insert the number you want to set the player's exp/progress to:") as num|null
+ var/number = tgui_input_num(usr, "Please insert the number you want to set the player's exp/progress to:")
if (!isnull(number))
owner.set_skill_value(skill, number)
return TRUE
@@ -73,7 +73,7 @@
if(!check_rights(R_DEBUG))
return
var/datum/skill/level/S = GLOB.skill_datums[text2path(params["skill"])]
- var/number = input("Please insert a whole number between 0[S.associative ? " ([S.unskilled_tier])" : ""] and [S.max_levels][S.associative ? " ([S.levels[S.max_levels]])" : ""] corresponding to the level you'd like to set the player to.") as num|null
+ var/number = tgui_input_num(usr, "Please insert a whole number between 0[S.associative ? " ([S.unskilled_tier])" : ""] and [S.max_levels][S.associative ? " ([S.levels[S.max_levels]])" : ""] corresponding to the level you'd like to set the player to.")
if (number >= 0 && number <= S.max_levels)
owner.set_skill_value(S.type, S.get_skill_level_value(number))
return TRUE
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index b3e3d15c65..bb544ac346 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -1134,3 +1134,16 @@
else if(fake_msg)
to_chat(owner, fake_msg)
msg_stage++
+
+/datum/status_effect/cgau_conc
+ id = "cgau_conc"
+ examine_text = "SUBJECTPRONOUN rocks from side to side, confused."
+ duration = 5 SECONDS
+
+/datum/status_effect/cgau_conc/on_creation(mob/living/new_owner, ...)
+ . = ..()
+ new_owner.add_movespeed_modifier(/datum/movespeed_modifier/gauntlet_concussion)
+
+/datum/status_effect/cgau_conc/on_remove()
+ owner.remove_movespeed_modifier(/datum/movespeed_modifier/gauntlet_concussion)
+ . = ..()
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 48213279f1..5e3db3d93c 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -985,14 +985,14 @@
. = ..()
if(href_list[VV_HK_ADD_REAGENT] && check_rights(R_VAREDIT))
if(!reagents)
- var/amount = input(usr, "Specify the reagent size of [src]", "Set Reagent Size", 50) as num
+ var/amount = tgui_input_num(usr, "Specify the reagent size of [src]", "Set Reagent Size", 50)
if(amount)
create_reagents(amount)
if(reagents)
var/chosen_id = choose_reagent_id(usr)
if(chosen_id)
- var/amount = input(usr, "Choose the amount to add.", "Choose the amount.", reagents.maximum_volume) as num
+ var/amount = tgui_input_num(usr, "Choose the amount to add.", "Choose the amount.", reagents.maximum_volume)
if(amount)
reagents.add_reagent(chosen_id, amount)
log_admin("[key_name(usr)] has added [amount] units of [chosen_id] to [src]")
@@ -1002,25 +1002,25 @@
if(href_list[VV_HK_TRIGGER_EMP] && check_rights(R_FUN))
usr.client.cmd_admin_emp(src)
if(href_list[VV_HK_MODIFY_TRANSFORM] && check_rights(R_VAREDIT))
- var/result = input(usr, "Choose the transformation to apply","Transform Mod") as null|anything in list("Scale","Translate","Rotate")
+ var/result = tgui_input_list(usr, "Choose the transformation to apply","Transform Mod", list("Scale","Translate","Rotate"))
var/matrix/M = transform
switch(result)
if("Scale")
- var/x = input(usr, "Choose x mod","Transform Mod") as null|num
- var/y = input(usr, "Choose y mod","Transform Mod") as null|num
+ var/x = tgui_input_num(usr, "Choose x mod","Transform Mod")
+ var/y = tgui_input_num(usr, "Choose y mod","Transform Mod")
if(!isnull(x) && !isnull(y))
transform = M.Scale(x,y)
if("Translate")
- var/x = input(usr, "Choose x mod","Transform Mod") as null|num
- var/y = input(usr, "Choose y mod","Transform Mod") as null|num
+ var/x = tgui_input_num(usr, "Choose x mod","Transform Mod")
+ var/y = tgui_input_num(usr, "Choose y mod","Transform Mod")
if(!isnull(x) && !isnull(y))
transform = M.Translate(x,y)
if("Rotate")
- var/angle = input(usr, "Choose angle to rotate","Transform Mod") as null|num
+ var/angle = tgui_input_num(usr, "Choose angle to rotate","Transform Mod")
if(!isnull(angle))
transform = M.Turn(angle)
if(href_list[VV_HK_AUTO_RENAME] && check_rights(R_VAREDIT))
- var/newname = input(usr, "What do you want to rename this to?", "Automatic Rename") as null|text
+ var/newname = tgui_input_text(usr, "What do you want to rename this to?", "Automatic Rename")
if(newname)
vv_auto_rename(newname)
if(href_list[VV_HK_EDIT_FILTERS] && check_rights(R_VAREDIT))
diff --git a/code/game/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm
index be07a5c3b9..cbd9c6c8c6 100644
--- a/code/game/gamemodes/dynamic/dynamic.dm
+++ b/code/game/gamemodes/dynamic/dynamic.dm
@@ -1,13 +1,16 @@
#define RULESET_STOP_PROCESSING 1
-#define FAKE_REPORT_CHANCE 8
+#define FAKE_REPORT_CHANCE 20
#define REPORT_NEG_DIVERGENCE -15
#define REPORT_POS_DIVERGENCE 15
+#define EXTENDED_CURVE_CENTER -7
// Are HIGH_IMPACT_RULESETs allowed to stack?
GLOBAL_VAR_INIT(dynamic_no_stacking, TRUE)
// If enabled does not accept or execute any rulesets.
GLOBAL_VAR_INIT(dynamic_forced_extended, FALSE)
+// Antags still allowed, but no roundstart antags + midrounds are low impact
+GLOBAL_VAR_INIT(dynamic_extended, FALSE)
// How high threat is required for HIGH_IMPACT_RULESETs stacking.
// This is independent of dynamic_no_stacking.
GLOBAL_VAR_INIT(dynamic_stacking_limit, 90)
@@ -163,6 +166,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
dat += "Split parameters: centre = [roundstart_split_curve_centre] ; width = [roundstart_split_curve_width]. "
dat += "On average, [peaceful_percentage]% of the rounds are more peaceful. "
dat += "Forced extended: [GLOB.dynamic_forced_extended ? "On" : "Off"] "
+ dat += "Dynamic extended: [GLOB.dynamic_extended ? "On" : "Off"] "
dat += "No stacking (only one round-ender): [GLOB.dynamic_no_stacking ? "On" : "Off"] "
dat += "Stacking limit: [GLOB.dynamic_stacking_limit] \[Adjust\]"
dat += " "
@@ -192,10 +196,12 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
return
if (href_list["forced_extended"])
GLOB.dynamic_forced_extended = !GLOB.dynamic_forced_extended
+ else if (href_list["extended"])
+ GLOB.dynamic_extended = !GLOB.dynamic_extended
else if (href_list["no_stacking"])
GLOB.dynamic_no_stacking = !GLOB.dynamic_no_stacking
else if (href_list["adjustthreat"])
- var/threatadd = input("Specify how much threat to add (negative to subtract). This can inflate the threat level.", "Adjust Threat", 0) as null|num
+ var/threatadd = tgui_input_num(usr, "Specify how much threat to add (negative to subtract). This can inflate the threat level.", "Adjust Threat", 0)
if(!threatadd)
return
if(threatadd > 0)
@@ -215,9 +221,9 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
else if (href_list["threatlog"])
show_threatlog(usr)
else if (href_list["stacking_limit"])
- GLOB.dynamic_stacking_limit = input(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) as num
+ GLOB.dynamic_stacking_limit = tgui_input_num(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null)
else if(href_list["force_latejoin_rule"])
- var/added_rule = input(usr,"What ruleset do you want to force upon the next latejoiner? This will bypass threat level and population restrictions.", "Rigging Latejoin", null) as null|anything in sortNames(init_rulesets(/datum/dynamic_ruleset/latejoin))
+ var/added_rule = tgui_input_list(usr,"What ruleset do you want to force upon the next latejoiner? This will bypass threat level and population restrictions.", "Rigging Latejoin", sortNames(init_rulesets(/datum/dynamic_ruleset/latejoin)))
if (!added_rule)
return
forced_latejoin_rule = added_rule
@@ -228,7 +234,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
log_admin("[key_name(usr)] cleared the forced latejoin ruleset.")
message_admins("[key_name(usr)] cleared the forced latejoin ruleset.")
else if(href_list["force_midround_rule"])
- var/added_rule = input(usr,"What ruleset do you want to force right now? This will bypass threat level and population restrictions.", "Execute Ruleset", null) as null|anything in sortNames(init_rulesets(/datum/dynamic_ruleset/midround))
+ var/added_rule = tgui_input_list(usr,"What ruleset do you want to force right now? This will bypass threat level and population restrictions.", "Execute Ruleset", sortNames(init_rulesets(/datum/dynamic_ruleset/midround)))
if (!added_rule)
return
log_admin("[key_name(usr)] executed the [added_rule] ruleset.")
@@ -309,9 +315,10 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
/// Generates the threat level using lorentz distribution and assigns peaceful_percentage.
/datum/game_mode/dynamic/proc/generate_threat()
+ if(GLOB.dynamic_extended)
+ threat_curve_centre = EXTENDED_CURVE_CENTER
var/relative_threat = LORENTZ_DISTRIBUTION(threat_curve_centre, threat_curve_width)
threat_level = round(lorentz_to_amount(relative_threat), 0.1)
-
peaceful_percentage = round(LORENTZ_CUMULATIVE_DISTRIBUTION(relative_threat, threat_curve_centre, threat_curve_width), 0.01)*100
SSblackbox.record_feedback("tally","dynamic_threat",threat_level,"Initial threat level")
@@ -321,14 +328,18 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
/// Generates the midround and roundstart budgets
/datum/game_mode/dynamic/proc/generate_budgets()
- var/relative_round_start_budget_scale = LORENTZ_DISTRIBUTION(roundstart_split_curve_centre, roundstart_split_curve_width)
- round_start_budget = round((lorentz_to_amount(relative_round_start_budget_scale) / 100) * threat_level, 0.1)
- initial_round_start_budget = round_start_budget
- mid_round_budget = threat_level - round_start_budget
+ if(GLOB.dynamic_extended)
+ mid_round_budget = threat_level
+ round_start_budget = 0
+ else
+ var/relative_round_start_budget_scale = LORENTZ_DISTRIBUTION(roundstart_split_curve_centre, roundstart_split_curve_width)
+ round_start_budget = round((lorentz_to_amount(relative_round_start_budget_scale) / 100) * threat_level, 0.1)
+ initial_round_start_budget = round_start_budget
+ mid_round_budget = threat_level - round_start_budget
/datum/game_mode/dynamic/proc/setup_parameters()
log_game("DYNAMIC: Dynamic mode parameters for the round:")
- log_game("DYNAMIC: Centre is [threat_curve_centre], Width is [threat_curve_width], Forced extended is [GLOB.dynamic_forced_extended ? "Enabled" : "Disabled"], No stacking is [GLOB.dynamic_no_stacking ? "Enabled" : "Disabled"].")
+ log_game("DYNAMIC: Centre is [threat_curve_centre], Width is [threat_curve_width], Extended is [GLOB.dynamic_extended ? "Enabled" : "Disabled"], No stacking is [GLOB.dynamic_no_stacking ? "Enabled" : "Disabled"].")
log_game("DYNAMIC: Stacking limit is [GLOB.dynamic_stacking_limit].")
if(GLOB.dynamic_forced_threat_level >= 0)
threat_level = round(GLOB.dynamic_forced_threat_level, 0.1)
@@ -346,9 +357,15 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
shown_threat = clamp(threat_level + rand(REPORT_NEG_DIVERGENCE, REPORT_POS_DIVERGENCE), 0, 100)
/datum/game_mode/dynamic/proc/set_cooldowns()
+ var/coeff = GLOB.dynamic_extended ? 2 : 1
+ latejoin_delay_min *= coeff
+ latejoin_delay_max *= coeff
var/latejoin_injection_cooldown_middle = 0.5*(latejoin_delay_max + latejoin_delay_min)
latejoin_injection_cooldown = round(clamp(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), latejoin_delay_min, latejoin_delay_max)) + world.time
+ midround_delay_min *= coeff
+ midround_delay_max *= coeff
+
var/midround_injection_cooldown_middle = 0.5*(midround_delay_max + midround_delay_min)
midround_injection_cooldown = round(clamp(EXP_DISTRIBUTION(midround_injection_cooldown_middle), midround_delay_min, midround_delay_max)) + world.time
@@ -456,6 +473,9 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
if (GLOB.dynamic_forced_extended)
log_game("DYNAMIC: Starting a round of forced extended.")
return TRUE
+ if (GLOB.dynamic_extended)
+ log_game("DYNAMIC: Starting a round of dynamic extended.")
+ return TRUE
var/list/drafted_rules = list()
for (var/datum/dynamic_ruleset/roundstart/rule in roundstart_rules)
if (!rule.weight)
@@ -563,9 +583,10 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
return FALSE
// Check if the ruleset is high impact and if a high impact ruleset has been executed
else if(new_rule.flags & HIGH_IMPACT_RULESET)
- if(threat_level < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking)
- if(high_impact_ruleset_executed)
- return FALSE
+ if(GLOB.dynamic_extended)
+ return FALSE
+ if(high_impact_ruleset_executed && threat_level < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking)
+ return FALSE
var/population = current_players[CURRENT_LIVING_PLAYERS].len
if((new_rule.acceptable(population, threat_level) && new_rule.cost <= mid_round_budget) || forced)
@@ -598,8 +619,8 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
/datum/game_mode/dynamic/proc/midround_rule_draft()
set waitfor = FALSE
if (midround_injection_cooldown < world.time)
- /*if (GLOB.dynamic_forced_extended)
- return*/
+ if (GLOB.dynamic_forced_extended)
+ return
// Somehow it managed to trigger midround multiple times so this was moved here.
// There is no way this should be able to trigger an injection twice now.
@@ -620,6 +641,11 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
for (var/datum/dynamic_ruleset/midround/rule in midround_rules)
if (!rule.weight)
continue
+ if(rule.flags & HIGH_IMPACT_RULESET)
+ if (high_impact_ruleset_executed && threat_level < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking)
+ continue
+ if(GLOB.dynamic_extended)
+ continue
if (rule.acceptable(current_players[CURRENT_LIVING_PLAYERS].len, threat_level) && mid_round_budget >= rule.cost)
rule.trim_candidates()
if (rule.ready())
@@ -642,11 +668,17 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
forced_injection = dry_run
return 100
var/chance = 0
- var/max_pop_per_antag = max(5,15 - round(threat_level/10) - round(current_players[CURRENT_LIVING_PLAYERS].len/5))
+ var/effective_living_players = current_players[CURRENT_LIVING_PLAYERS].len
+ if(GLOB.dynamic_extended)
+ effective_living_players = min(effective_living_players, length(SSjob.get_living_sec())*2 + length(SSjob.get_living_heads()))
+ var/max_pop_per_antag = max(5,15 - round(threat_level/10) - round(effective_living_players/5))
if (!current_players[CURRENT_LIVING_ANTAGS].len)
- chance += 50 // No antags at all? let's boost those odds!
+ if(GLOB.dynamic_extended)
+ chance += min(50,effective_living_players*5)
+ else
+ chance += 50 // No antags at all? let's boost those odds!
else
- var/current_pop_per_antag = current_players[CURRENT_LIVING_PLAYERS].len / current_players[CURRENT_LIVING_ANTAGS].len
+ var/current_pop_per_antag = effective_living_players / current_players[CURRENT_LIVING_ANTAGS].len
if (current_pop_per_antag > max_pop_per_antag)
chance += min(50, 25+10*(current_pop_per_antag-max_pop_per_antag))
else
diff --git a/code/game/gamemodes/dynamic/dynamic_simulations.dm b/code/game/gamemodes/dynamic/dynamic_simulations.dm
index 63da54bece..a7e0a4f582 100644
--- a/code/game/gamemodes/dynamic/dynamic_simulations.dm
+++ b/code/game/gamemodes/dynamic/dynamic_simulations.dm
@@ -72,9 +72,9 @@
set name = "Run Dynamic Simulations"
set category = "Debug"
- var/simulations = input(usr, "Enter number of simulations") as num
- var/roundstart_players = input(usr, "Enter number of round start players") as num
- var/forced_threat_level = input(usr, "Enter forced threat level, if you want one") as num | null
+ var/simulations = tgui_input_num(usr, "Enter number of simulations")
+ var/roundstart_players = tgui_input_num(usr, "Enter number of round start players")
+ var/forced_threat_level = tgui_input_num(usr, "Enter forced threat level, if you want one")
SSticker.mode = new /datum/game_mode/dynamic
message_admins("Running dynamic simulations...")
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index 7f3c2b8550..19ae718d17 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -40,16 +40,11 @@ GLOBAL_LIST_EMPTY(objectives)
//Shared by few objective types
/datum/objective/proc/admin_simple_target_pick(mob/admin)
var/list/possible_targets = list("Free objective")
- var/def_value
for(var/datum/mind/possible_target in SSticker.minds)
if ((possible_target != src) && ishuman(possible_target.current))
possible_targets += possible_target.current
-
- if(target && target.current)
- def_value = target.current
-
- var/mob/new_target = input(admin,"Select target:", "Objective target", def_value) as null|anything in possible_targets
+ var/mob/new_target = tgui_input_list(admin,"Select target:", "Objective target", possible_targets)
if (!new_target)
return
@@ -606,12 +601,12 @@ GLOBAL_LIST_EMPTY(possible_items)
/datum/objective/steal/admin_edit(mob/admin)
var/list/possible_items_all = GLOB.possible_items+"custom"
- var/new_target = input(admin,"Select target:", "Objective target", steal_target) as null|anything in possible_items_all
+ var/new_target = tgui_input_list(admin,"Select target:", "Objective target", possible_items_all)
if (!new_target)
return
if (new_target == "custom") //Can set custom items.
- var/custom_path = input(admin,"Search for target item type:","Type") as null|text
+ var/custom_path = tgui_input_text(admin,"Search for target item type:","Type")
if (!custom_path)
return
var/obj/item/custom_target = pick_closest_path(custom_path, make_types_fancy(subtypesof(/obj/item)))
@@ -728,7 +723,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
return checking.researched_nodes.len >= target_amount
/datum/objective/download/admin_edit(mob/admin)
- var/count = input(admin,"How many nodes ?","Nodes",target_amount) as num|null
+ var/count = tgui_input_num(admin,"How many nodes ?","Nodes",target_amount)
if(count)
target_amount = count
update_explanation_text()
@@ -774,7 +769,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
return captured_amount >= target_amount
/datum/objective/capture/admin_edit(mob/admin)
- var/count = input(admin,"How many mobs to capture ?","capture",target_amount) as num|null
+ var/count = tgui_input_num(admin,"How many mobs to capture ?","capture",target_amount)
if(count)
target_amount = count
update_explanation_text()
@@ -806,7 +801,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
explanation_text = "Extract [target_amount] compatible genome\s."
/datum/objective/absorb/admin_edit(mob/admin)
- var/count = input(admin,"How many people to absorb?","absorb",target_amount) as num|null
+ var/count = tgui_input_num(admin,"How many people to absorb?","absorb",target_amount)
if(count)
target_amount = count
update_explanation_text()
@@ -896,7 +891,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/destroy/admin_edit(mob/admin)
var/list/possible_targets = active_ais(1)
if(possible_targets.len)
- var/mob/new_target = input(admin,"Select target:", "Objective target") as null|anything in possible_targets
+ var/mob/new_target = tgui_input_list(admin,"Select target:", "Objective target", possible_targets)
target = new_target.mind
else
to_chat(admin, "No active AIs with minds")
diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm
index 82209221ce..809eb3d9af 100644
--- a/code/game/machinery/PDApainter.dm
+++ b/code/game/machinery/PDApainter.dm
@@ -112,7 +112,7 @@
if(!storedpda)
to_chat(user, "[src] is empty.")
return
- var/choice = input(user, "Select the new skin!", "PDA Painting") as null|anything in colorlist
+ var/choice = tgui_input_list(user, "Select the new skin!", "PDA Painting", colorlist)
if(!choice || !storedpda || !in_range(src, user))
return
var/list/P = colorlist[choice]
diff --git a/code/game/machinery/aug_manipulator.dm b/code/game/machinery/aug_manipulator.dm
index e496973d75..2b982f7480 100644
--- a/code/game/machinery/aug_manipulator.dm
+++ b/code/game/machinery/aug_manipulator.dm
@@ -8,14 +8,14 @@
max_integrity = 200
var/obj/item/bodypart/storedpart
var/initial_icon_state
- var/static/list/style_list_icons = list("standard" = 'icons/mob/augmentation/augments.dmi',
- "engineer" = 'icons/mob/augmentation/augments_engineer.dmi',
- "security" = 'icons/mob/augmentation/augments_security.dmi',
- "mining" = 'icons/mob/augmentation/augments_mining.dmi',
- "Talon" = 'icons/mob/augmentation/cosmetic_prosthetic/talon.dmi',
- "Nanotrasen" = 'icons/mob/augmentation/cosmetic_prosthetic/nanotrasen.dmi',
- "Hephaesthus" = 'icons/mob/augmentation/cosmetic_prosthetic/hephaestus.dmi',
- "Bishop" = 'icons/mob/augmentation/cosmetic_prosthetic/bishop.dmi',
+ var/static/list/style_list_icons = list("standard" = 'icons/mob/augmentation/augments.dmi',
+ "engineer" = 'icons/mob/augmentation/augments_engineer.dmi',
+ "security" = 'icons/mob/augmentation/augments_security.dmi',
+ "mining" = 'icons/mob/augmentation/augments_mining.dmi',
+ "Talon" = 'icons/mob/augmentation/cosmetic_prosthetic/talon.dmi',
+ "Nanotrasen" = 'icons/mob/augmentation/cosmetic_prosthetic/nanotrasen.dmi',
+ "Hephaesthus" = 'icons/mob/augmentation/cosmetic_prosthetic/hephaestus.dmi',
+ "Bishop" = 'icons/mob/augmentation/cosmetic_prosthetic/bishop.dmi',
"Xion" = 'icons/mob/augmentation/cosmetic_prosthetic/xion.dmi',
"Grayson" = 'icons/mob/augmentation/cosmetic_prosthetic/grayson.dmi',
"Cybersolutions" = 'icons/mob/augmentation/cosmetic_prosthetic/cybersolutions.dmi',
@@ -116,7 +116,7 @@
add_fingerprint(user)
if(storedpart)
- var/augstyle = input(user, "Select style.", "Augment Custom Fitting") as null|anything in style_list_icons
+ var/augstyle = tgui_input_list(user, "Select style.", "Augment Custom Fitting", style_list_icons)
if(!augstyle)
return
if(!in_range(src, user))
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 0e7b4aa0fa..c734e2b265 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -184,7 +184,7 @@
if(materials.materials[i] > 0)
list_to_show += i
- used_material = input("Choose [used_material]", "Custom Material") as null|anything in sortList(list_to_show, /proc/cmp_typepaths_asc)
+ used_material = tgui_input_list(usr, "Choose [used_material]", "Custom Material", sortList(list_to_show, /proc/cmp_typepaths_asc))
if(!used_material)
return //Didn't pick any material, so you can't build shit either.
custom_materials[used_material] += amount_needed
diff --git a/code/game/machinery/autoloom.dm b/code/game/machinery/autoloom.dm
new file mode 100644
index 0000000000..f290ac1a96
--- /dev/null
+++ b/code/game/machinery/autoloom.dm
@@ -0,0 +1,102 @@
+// like a recycler, but for plants only ig
+/obj/machinery/autoloom
+ name = "autoloom"
+ desc = "A large processing machine used to process raw biological matter, like cotton or logs. It also looks like a recycler. There's a display on the side."
+ icon = 'icons/obj/recycling.dmi'
+ icon_state = "grinder-o0"
+ layer = ABOVE_ALL_MOB_LAYER // Overhead
+ density = TRUE
+ circuit = /obj/item/circuitboard/machine/autoloom
+ var/icon_name = "grinder-o"
+ var/eat_dir = WEST
+ var/process_efficiency = 0
+ var/static/list/can_process = typecacheof(list(
+ /obj/item/stack/sheet/cotton,
+ /obj/item/grown/log,
+ /obj/item/grown/cotton
+ ))
+
+/obj/machinery/autoloom/RefreshParts()
+ for(var/obj/item/stock_parts/manipulator/M in component_parts)
+ process_efficiency = M.rating
+
+/obj/machinery/recycler/examine(mob/user)
+ . = ..()
+ . += "Biomatter processing efficiency at [amount_produced*100]%."
+
+/obj/machinery/autoloom/power_change()
+ ..()
+ update_icon()
+
+/obj/machinery/autoloom/attackby(obj/item/I, mob/user, params)
+ if(default_deconstruction_screwdriver(user, "grinder-oOpen", "grinder-o0", I))
+ return
+
+ if(default_pry_open(I))
+ return
+
+ if(default_unfasten_wrench(user, I))
+ return
+
+ if(default_deconstruction_crowbar(I))
+ return
+ return ..()
+
+/obj/machinery/autoloom/update_icon_state()
+ var/is_powered = !(stat & (BROKEN|NOPOWER))
+ icon_state = icon_name + "[is_powered]" // add the blood tag at the end
+
+/obj/machinery/autoloom/CanPass(atom/movable/AM)
+ . = ..()
+ if(!anchored)
+ return
+
+ var/move_dir = get_dir(loc, AM.loc)
+ if(move_dir == eat_dir)
+ return TRUE
+
+/obj/machinery/autoloom/Crossed(atom/movable/AM)
+ eat(AM)
+ . = ..()
+
+/obj/machinery/autoloom/proc/eat(atom/movable/AM0, sound=TRUE)
+ if(stat & (BROKEN|NOPOWER))
+ return
+ if(!isturf(AM0.loc))
+ return //I don't know how you called Crossed() but stop it.
+
+ if(is_type_in_list(AM0, can_process))
+ process_item(AM0)
+
+/obj/machinery/autoloom/proc/process_item(obj/item/I)
+ . = list()
+ for(var/A in I)
+ var/atom/movable/AM = A
+ AM.forceMove(loc)
+ if(AM.loc == loc)
+ . += AM
+
+ I.forceMove(loc)
+ if(istype(I, /obj/item/grown/log))
+ var/obj/item/grown/log/L = I
+ var/seed_modifier = 0
+ if(L.seed)
+ seed_modifier = round(L.seed.potency / 25)
+ new L.plank_type(src.loc, process_efficiency + seed_modifier)
+ qdel(L)
+ return
+
+ if(istype(I, /obj/item/stack/sheet/cotton))
+ var/obj/item/stack/sheet/cotton/RS = I
+ var/tomake = round((RS.amount / 4) * process_efficiency)
+ new RS.loom_result(src.loc, tomake)
+ qdel(RS)
+ return
+
+ if(istype(I, /obj/item/grown/cotton))
+ var/obj/item/grown/cotton/RC = I
+ var/cottonAmt = 1 + round(RC.seed.potency / 25)
+ var/newRaw = new RC.cotton_type(src.loc, cottonAmt)
+ qdel(RC)
+ process_item(newRaw)
+ return
diff --git a/code/game/machinery/bloodbankgen.dm b/code/game/machinery/bloodbankgen.dm
index 31fac02d83..b089b06a88 100644
--- a/code/game/machinery/bloodbankgen.dm
+++ b/code/game/machinery/bloodbankgen.dm
@@ -185,7 +185,7 @@
to_chat(user, "This machine already has bags attached.")
if(!bag && !outbag)
- var/choice = alert(user, "Choose where to place [O]", "", "Input", "Cancel", "Output")
+ var/choice = tgui_alert(user, "Choose where to place [O]", "", list("Input", "Cancel", "Output"))
switch(choice)
if("Cancel")
return FALSE
diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm
index bf1b84fe5d..8966fc03f1 100644
--- a/code/game/machinery/camera/tracking.dm
+++ b/code/game/machinery/camera/tracking.dm
@@ -16,7 +16,7 @@
/mob/living/silicon/ai/proc/show_camera_list()
var/list/cameras = get_camera_list()
- var/camera = input(src, "Choose which camera you want to view", "Cameras") as null|anything in cameras
+ var/camera = tgui_input_list(src, "Choose which camera you want to view", "Cameras", cameras)
switchCamera(cameras[camera])
/datum/trackable
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index dd2ebf287f..e430ac469f 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -82,9 +82,8 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
// If it's a generic arcade machine, pick a random arcade
// circuit board for it and make the new machine
if(!circuit)
- var/list/gameodds = list(/obj/item/circuitboard/computer/arcade/battle = 33,
- /obj/item/circuitboard/computer/arcade/orion_trail = 33,
- /obj/item/circuitboard/computer/arcade/minesweeper = 33,
+ var/list/gameodds = list(/obj/item/circuitboard/computer/arcade/battle = 50,
+ /obj/item/circuitboard/computer/arcade/orion_trail = 50,
/obj/item/circuitboard/computer/arcade/amputation = 2)
var/thegame = pickweight(gameodds)
var/obj/item/circuitboard/CB = new thegame()
diff --git a/code/game/machinery/computer/arcade/minesweeper.dm b/code/game/machinery/computer/arcade/minesweeper.dm
deleted file mode 100644
index 1027ab1815..0000000000
--- a/code/game/machinery/computer/arcade/minesweeper.dm
+++ /dev/null
@@ -1,413 +0,0 @@
-#define MINESWEEPER_GAME_MAIN_MENU 0
-#define MINESWEEPER_GAME_PLAYING 1
-#define MINESWEEPER_GAME_LOST 2
-#define MINESWEEPER_GAME_WON 3
-#define MINESWEEPERIMG(what) {""} //Basically bypassing asset.icon_tag()
-
-/obj/machinery/computer/arcade/minesweeper
- name = "Minesweeper"
- desc = "An arcade machine that generates grids. It seems that the machine sparks and screeches when a grid is generated, as if it cannot cope with the intensity of generating the grid."
- icon_state = "arcade"
- circuit = /obj/item/circuitboard/computer/arcade/minesweeper
- var/area
- var/difficulty = "" //To show what difficulty you are playing
- var/flag_text = ""
- var/flagging = FALSE
- var/game_status = MINESWEEPER_GAME_MAIN_MENU
- var/mine_limit = 0
- var/mine_placed = 0
- var/mine_sound = TRUE //So it doesn't get repeated when multiple mines are exposed
- var/randomcolour = 1
- var/randomnumber = 1 //Random emagged game iteration number to be displayed, put here so it is persistent across one individual arcade machine
- var/safe_squares_revealed
- var/saved_web = "" //To display the web if you click on the arcade
- var/win_condition
- var/rows = 1
- var/columns = 1
- var/table[31][51] //Make the board boys, 30x50 board
- var/spark_spam = FALSE
-
-/obj/machinery/computer/arcade/minesweeper/interact(mob/user)
- var/emagged = CHECK_BITFIELD(obj_flags, EMAGGED)
- var/dat
- if(game_status == MINESWEEPER_GAME_MAIN_MENU)
- dat += "
Minesweeper
Minesweeper[emagged ? " EXTREME EDITION: Iteration #[randomnumber]" : ""] " //Different colour mix for every random number made
- dat += " [emagged ? "Explode in the game, explode in real life" : "Reveal all the squares without hitting a mine"]! What difficulty do you want to play?
" //Make unique hrefs for every square
- if(10)
- web += "
[MINESWEEPERIMG(minehit)]
"
- if(11)
- web += "
[MINESWEEPERIMG(empty)]
"
- if(12)
- web += "
[MINESWEEPERIMG(1)]
"
- if(13)
- web += "
[MINESWEEPERIMG(2)]
"
- if(14)
- web += "
[MINESWEEPERIMG(3)]
"
- if(15)
- web += "
[MINESWEEPERIMG(4)]
"
- if(16)
- web += "
[MINESWEEPERIMG(5)]
"
- if(17)
- web += "
[MINESWEEPERIMG(6)]
"
- if(18)
- web += "
[MINESWEEPERIMG(7)]
"
- if(19)
- web += "
[MINESWEEPERIMG(8)]
"
- CHECK_TICK
- web += ""
- web += "
"
- web += ""
- web += " "
-
- if(safe_squares_revealed >= win_condition && game_status == MINESWEEPER_GAME_PLAYING)
- game_status = MINESWEEPER_GAME_WON
- if(rows < 10 || columns < 10) //If less than easy difficulty
- playsound(loc, 'sound/arcade/minesweeper_winfail.ogg', 50, FALSE, extrarange = -3)
- say("You cleared the board of all mines, but you picked too small of a board! Try again with at least a 9x9 board!")
- else
- playsound(loc, 'sound/arcade/minesweeper_win.ogg', 50, FALSE, extrarange = -3)
- say("You cleared the board of all mines! Congratulations!")
- if(CHECK_BITFIELD(obj_flags, EMAGGED))
- var/itemname
- switch(rand(1,3))
- if(1)
- itemname = "a syndicate bomb beacon"
- new /obj/item/sbeacondrop/bomb(loc)
- if(2)
- itemname = "a rocket launcher"
- new /obj/item/gun/ballistic/rocketlauncher/unrestricted(loc)
- new /obj/item/ammo_casing/caseless/rocket(loc)
- new /obj/item/ammo_casing/caseless/rocket(loc)
- new /obj/item/ammo_casing/caseless/rocket(loc)
- if(3)
- itemname = "two bags of c4"
- new /obj/item/storage/backpack/duffelbag/syndie/c4(loc)
- new /obj/item/storage/backpack/duffelbag/syndie/x4(loc)
- message_admins("[key_name_admin(user)] won emagged Minesweeper and got [itemname]!")
- visible_message("[src] dispenses [itemname]!", "You hear a chime and a clunk.")
- DISABLE_BITFIELD(obj_flags, EMAGGED)
- else
- var/dope_prizes = (area >= 480) ? 6 : (area >= 256) ? 4 : 2
- prizevend(user, dope_prizes)
-
- if(game_status == MINESWEEPER_GAME_WON)
- web += "[(rows < 10 || columns < 10) ? "You won, but your board was too small! Pick a bigger board next time!" : "Congratulations, you have won!"] Want to play again? Easy (9x9 board, 10 mines) Intermediate (16x16 board, 40 mines) Hard (16x30 board, 99 mines) Custom Return to Main Menu "
-
- if(game_status == MINESWEEPER_GAME_LOST)
- web += "You have lost! Try again? Easy (9x9 board, 10 mines) Intermediate (16x16 board, 40 mines) Hard (16x30 board, 99 mines) Custom Return to Main Menu "
-
- if(game_status == MINESWEEPER_GAME_PLAYING)
- web += "Return to Main Menu "
- web += "
"
temp += ""
else
- alert(usr, "You do not have the required rank to do this!")
+ tgui_alert(usr, "You do not have the required rank to do this!")
//TEMPORARY MENU FUNCTIONS
else//To properly clear as per clear screen.
temp=null
diff --git a/code/game/machinery/computer/teleporter.dm b/code/game/machinery/computer/teleporter.dm
index 3e9531097e..0dd64bf3e8 100644
--- a/code/game/machinery/computer/teleporter.dm
+++ b/code/game/machinery/computer/teleporter.dm
@@ -139,7 +139,7 @@
if(is_eligible(M))
L[avoid_assoc_duplicate_keys(M.real_name, areaindex)] = M
- var/desc = input("Please select a location to lock in.", "Locking Computer") as null|anything in L
+ var/desc = tgui_input_list(user, "Please select a location to lock in.", "Locking Computer", L)
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user), NO_DEXTERY)) //check if we are still around
return
target = L[desc]
@@ -167,7 +167,7 @@
if(!L.len)
to_chat(user, "No active connected stations located.")
return
- var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in L
+ var/desc = tgui_input_list(user, "Please select a station to lock in.", "Locking Computer", L)
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user), NO_DEXTERY)) //again, check if we are still around
return
var/obj/machinery/teleport/station/target_station = L[desc]
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index f2f8c20776..9474320894 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -101,7 +101,7 @@
updateUsrDialog()
return
- var/obj/I = input(user, "Please choose which object to retrieve.","Object recovery",null) as null|anything in stored_packages
+ var/obj/I = tgui_input_list(user, "Please choose which object to retrieve.","Object recovery", stored_packages)
playsound(src, "terminal_type", 25, 0)
if(!I)
return
@@ -439,7 +439,7 @@
to_chat(user, "You can't put [target] into [src]. They're conscious.")
return
else if(target.client)
- if(alert(target,"Would you like to enter cryosleep?",,"Yes","No") == "No")
+ if(tgui_alert(target,"Would you like to enter cryosleep?",,list("Yes","No")) == "No")
return
var/generic_plsnoleave_message = " Please adminhelp before leaving the round, even if there are no administrators online!"
@@ -462,7 +462,7 @@
LAZYADD(caught_string, "Revolutionary")
if(caught_string)
- alert(target, "You're a [english_list(caught_string)]![generic_plsnoleave_message][addendum]")
+ tgui_alert(target, "You're a [english_list(caught_string)]![generic_plsnoleave_message][addendum]")
target.client.cryo_warned = world.time
return
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 982e40a79b..39749b33fa 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -102,7 +102,7 @@
rad_insulation = RAD_MEDIUM_INSULATION
var/static/list/airlock_overlays = list()
-
+
/// sigh
var/unelectrify_timerid
@@ -1212,7 +1212,7 @@
else
optionlist = list("Standard", "Public", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Freezer", "Science", "Virology", "Mining", "Maintenance", "External", "External Maintenance")
- var/paintjob = input(user, "Please select a paintjob for this airlock.") in optionlist
+ var/paintjob = tgui_input_list(user, "Please select a paintjob for this airlock.", "", optionlist)
if((!in_range(src, usr) && src.loc != usr) || !W.use_paint(user))
return
switch(paintjob)
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index 853bd73eac..5b2551fa8b 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -264,7 +264,7 @@ GLOBAL_LIST_EMPTY(network_holopads)
if(A)
LAZYADD(callnames[A], I)
callnames -= get_area(src)
- var/result = input(usr, "Choose an area to call", "Holocall") as null|anything in sortNames(callnames)
+ var/result = tgui_input_list(usr, "Choose an area to call", "Holocall", sortNames(callnames))
if(QDELETED(usr) || !result || outgoing_call)
return
if(usr.loc == loc)
diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm
index 87989b18ec..49ff0e7609 100644
--- a/code/game/machinery/launch_pad.dm
+++ b/code/game/machinery/launch_pad.dm
@@ -339,7 +339,7 @@
pad.display_name = new_name
if("remove")
. = TRUE
- if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "I'm Sure", "Abort") != "Abort")
+ if(usr && tgui_alert(usr, "Are you sure?", "Unlink Launchpad", list("I'm Sure", "Abort")) != "Abort")
pad = null
if("launch")
sending = TRUE
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index 5b30105409..4d6900983f 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -245,7 +245,7 @@ Buildable meters
disposable = FALSE
/obj/item/pipe/bluespace/attack_self(mob/user)
- var/new_name = input(user, "Enter identifier for bluespace pipe network", "bluespace pipe", bluespace_network_name) as text|null
+ var/new_name = tgui_input_text(user, "Enter identifier for bluespace pipe network", "bluespace pipe", bluespace_network_name)
if(!isnull(new_name))
bluespace_network_name = new_name
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index 4009b1b56b..54663356c7 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -193,11 +193,11 @@
playsound(loc, 'sound/machines/click.ogg', 30, 1)
/obj/machinery/syndicatebomb/proc/settings(mob/user)
- var/new_timer = input(user, "Please set the timer.", "Timer", "[timer_set]") as num
+ var/new_timer = tgui_input_num(user, "Please set the timer.", "Timer", "[timer_set]")
if(in_range(src, user) && isliving(user)) //No running off and setting bombs from across the station
timer_set = clamp(new_timer, minimum_timer, maximum_timer)
loc.visible_message("[icon2html(src, viewers(src))] timer set for [timer_set] seconds.")
- if(alert(user,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && in_range(src, user) && isliving(user))
+ if(tgui_alert(user,"Would you like to start the countdown now?",,list("Yes","No")) == "Yes" && in_range(src, user) && isliving(user))
if(defused || active)
if(defused)
visible_message("[icon2html(src, viewers(src))] Device error: User intervention required.")
diff --git a/code/game/machinery/telecomms/computers/message.dm b/code/game/machinery/telecomms/computers/message.dm
index a674bb6489..50792205c8 100644
--- a/code/game/machinery/telecomms/computers/message.dm
+++ b/code/game/machinery/telecomms/computers/message.dm
@@ -316,7 +316,7 @@
// Get out list of viable PDAs
var/list/obj/item/pda/sendPDAs = get_viewable_pdas()
if(GLOB.PDAs && LAZYLEN(GLOB.PDAs) > 0)
- customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sortNames(sendPDAs)
+ customrecepient = tgui_input_list(usr, "Select a PDA from the list.", "", sortNames(sendPDAs))
else
customrecepient = null
return
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index 808dc4877b..ab7b31f530 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -177,7 +177,7 @@
links.Remove(T)
if("freq")
if("add" in params)
- var/newfreq = input("Specify a new frequency to filter (GHz). Decimals assigned automatically.", src.name, null) as null|num
+ var/newfreq = tgui_input_num(usr, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src.name, null)
if(!canAccess(usr) || !newfreq || isnull(newfreq))
return
diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm
index 6aeef4b6ac..b2293f2125 100644
--- a/code/game/machinery/wishgranter.dm
+++ b/code/game/machinery/wishgranter.dm
@@ -38,7 +38,7 @@
to_chat(user, "You have a very great feeling about this!")
else
to_chat(user, "The Wish Granter awaits your wish.")
- var/wish = input("You want...","Wish") as null|anything in list("Power","Wealth","The Station To Disappear","To Kill","Nothing")
+ var/wish = tgui_input_list(user, "You want...","Wish", list("Power","Wealth","The Station To Disappear","To Kill","Nothing"))
switch(wish)
if("Power") //Gives infinite power in exchange for infinite power going off in your face!
if(charges <= 0)
diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm
index 1c4586205a..4b36b298b3 100644
--- a/code/game/mecha/equipment/tools/work_tools.dm
+++ b/code/game/mecha/equipment/tools/work_tools.dm
@@ -407,7 +407,7 @@
return
if(href_list["cut"])
if(cable && cable.amount)
- var/m = round(input(chassis.occupant,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1)
+ var/m = round(tgui_input_num(chassis.occupant,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)), 1)
m = min(m, cable.amount)
if(m)
use_cable(m)
diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm
index 067cffd319..7c8324eb37 100644
--- a/code/game/mecha/mecha_topic.dm
+++ b/code/game/mecha/mecha_topic.dm
@@ -246,7 +246,7 @@
output_maintenance_dialog(id_card, usr)
if(href_list["set_internal_tank_valve"] && state >=1)
- var/new_pressure = input(usr,"Input new output pressure","Pressure setting",internal_tank_valve) as num
+ var/new_pressure = tgui_input_num(usr,"Input new output pressure","Pressure setting",internal_tank_valve)
if(new_pressure)
internal_tank_valve = new_pressure
to_chat(usr, "The internal pressure valve has been set to [internal_tank_valve]kPa.")
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index afc4312779..a203bd172f 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -18,7 +18,7 @@
if(act_intent == INTENT_HELP || act_intent == INTENT_GRAB)
return
if(buckled_mobs.len > 1)
- var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs
+ var/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?","Unbuckle Who?", buckled_mobs)
if(user_unbuckle_mob(unbuckled,user))
return 1
else
@@ -161,6 +161,6 @@
else if(length(buckled_mobs) == 1)
return user_unbuckle_mob(buckled_mobs[1], user)
else
- var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs
+ var/unbuckled = tgui_input_list(user, "Who do you wish to unbuckle?","Unbuckle Who?", buckled_mobs)
return user_unbuckle_mob(unbuckled, user)
diff --git a/code/game/objects/items/AI_modules.dm b/code/game/objects/items/AI_modules.dm
index 59dd420d23..dd123c07e8 100644
--- a/code/game/objects/items/AI_modules.dm
+++ b/code/game/objects/items/AI_modules.dm
@@ -229,11 +229,11 @@ AI MODULES
laws = list("")
/obj/item/aiModule/supplied/freeform/attack_self(mob/user)
- var/newpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num|null
+ var/newpos = tgui_input_num(user, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos)
if(newpos == null)
return
if(newpos < 15)
- var/response = alert("Error: The law priority of [newpos] is invalid, Law priorities below 14 are reserved for core laws, Would you like to change that that to 15?", "Invalid law priority", "Change to 15", "Cancel")
+ var/response = tgui_alert(user, "Error: The law priority of [newpos] is invalid, Law priorities below 14 are reserved for core laws, Would you like to change that that to 15?", "Invalid law priority", list("Change to 15", "Cancel"))
if (!response || response == "Cancel")
return
newpos = 15
@@ -264,7 +264,7 @@ AI MODULES
var/lawpos = 1
/obj/item/aiModule/remove/attack_self(mob/user)
- lawpos = input("Please enter the law you want to delete.", "Law Number", lawpos) as num|null
+ lawpos = tgui_input_num(user, "Please enter the law you want to delete.", "Law Number", lawpos)
if(lawpos == null)
return
if(lawpos <= 0)
diff --git a/code/game/objects/items/boombox.dm b/code/game/objects/items/boombox.dm
index 49e2375c1a..e0edeede22 100644
--- a/code/game/objects/items/boombox.dm
+++ b/code/game/objects/items/boombox.dm
@@ -25,7 +25,7 @@
for(var/datum/track/S in SSjukeboxes.songs)
if(istype(S) && (S.song_associated_id in availabletrackids))
tracklist[S.song_name] = S
- var/selected = input(user, "Play song", "Track:") as null|anything in tracklist
+ var/selected = tgui_input_list(user, "Play song", "Track:", tracklist)
if(QDELETED(src) || !selected || !istype(tracklist[selected], /datum/track))
return
var/jukeboxslottotake = SSjukeboxes.addjukebox(src, tracklist[selected])
diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm
index df7d6467f0..ad3a6563a5 100644
--- a/code/game/objects/items/cards_ids.dm
+++ b/code/game/objects/items/cards_ids.dm
@@ -302,7 +302,7 @@
. = FALSE
var/datum/bank_account/old_account = registered_account
- var/new_bank_id = input(user, "Enter your account ID number.", "Account Reclamation", 111111) as num | null
+ var/new_bank_id = tgui_input_num(user, "Enter your account ID number.", "Account Reclamation", 111111)
if (isnull(new_bank_id))
return
@@ -344,7 +344,7 @@
registered_account.bank_card_talk("ERROR: UNABLE TO LOGIN DUE TO SCHEDULED MAINTENANCE. MAINTENANCE IS SCHEDULED TO COMPLETE IN [(registered_account.withdrawDelay - world.time)/10] SECONDS.", TRUE)
return
- var/amount_to_remove = input(user, "How much do you want to withdraw? Current Balance: [registered_account.account_balance]", "Withdraw Funds", 5) as num|null
+ var/amount_to_remove = tgui_input_num(user, "How much do you want to withdraw? Current Balance: [registered_account.account_balance]", "Withdraw Funds", 5)
if(!amount_to_remove || amount_to_remove < 0)
return
@@ -478,9 +478,9 @@
var/popup_input
if(bank_support == ID_FREE_BANK_ACCOUNT)
- popup_input = alert(user, "Choose Action", "Agent ID", "Show", "Forge/Reset", "Change Account ID")
+ popup_input = tgui_alert(user, "Choose Action", "Agent ID", list("Show", "Forge/Reset", "Change Account ID"))
else
- popup_input = alert(user, "Choose Action", "Agent ID", "Show", "Forge/Reset")
+ popup_input = tgui_alert(user, "Choose Action", "Agent ID", list("Show", "Forge/Reset"))
if(!user.canUseTopic(src, BE_CLOSE, FALSE))
return
if(popup_input == "Forge/Reset" && !forged)
@@ -843,7 +843,7 @@
if(user.incapacitated() || !istype(user))
to_chat(user, "You can't do that right now!")
return TRUE
- if(alert("Are you sure you want to recolor your id?", "Confirm Repaint", "Yes", "No") == "Yes")
+ if(tgui_alert(user, "Are you sure you want to recolor your id?", "Confirm Repaint", list("Yes", "No")) == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",id_color) as color|null
if(!in_range(src, user) || !energy_color_input)
return TRUE
diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm
index afab49ac76..742a1fe3b0 100644
--- a/code/game/objects/items/circuitboards/computer_circuitboards.dm
+++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm
@@ -259,11 +259,6 @@
build_path = /obj/machinery/computer/arcade/orion_trail
-/obj/item/circuitboard/computer/arcade/minesweeper
- name = "Minesweeper (Computer Board)"
- icon_state = "generic"
- build_path = /obj/machinery/computer/arcade/minesweeper
-
/obj/item/circuitboard/computer/holodeck// Not going to let people get this, but it's just here for future
name = "Holodeck Control (Computer Board)"
icon_state = "generic"
diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm
index 6bf6e7d312..0647ec5bc0 100644
--- a/code/game/objects/items/circuitboards/machine_circuitboards.dm
+++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm
@@ -654,7 +654,7 @@
display_vending_names_paths = list()
for(var/path in vending_names_paths)
display_vending_names_paths[vending_names_paths[path]] = path
- var/choice = input(user,"Choose a new brand","Select an Item") as null|anything in sortList(display_vending_names_paths)
+ var/choice = tgui_input_list(user,"Choose a new brand","Select an Item", sortList(display_vending_names_paths))
set_type(display_vending_names_paths[choice])
else
return ..()
@@ -856,7 +856,7 @@
// /obj/item/circuitboard/machine/medical_kiosk/multitool_act(mob/living/user)
// . = ..()
-// var/new_cost = input("Set a new cost for using this medical kiosk.","New cost", custom_cost) as num|null
+// var/new_cost = tgui_input_num(user, "Set a new cost for using this medical kiosk.","New cost", custom_cost)
// if(!new_cost || (loc != user))
// to_chat(user, "You must hold the circuitboard to change its cost!")
// return
@@ -1050,7 +1050,7 @@
/obj/item/circuitboard/machine/public_nanite_chamber/multitool_act(mob/living/user)
. = ..()
- var/new_cloud = input("Set the public nanite chamber's Cloud ID (1-100).", "Cloud ID", cloud_id) as num|null
+ var/new_cloud = tgui_input_num(user, "Set the public nanite chamber's Cloud ID (1-100).", "Cloud ID", cloud_id)
if(!new_cloud || (loc != user))
to_chat(user, "You must hold the circuitboard to change its Cloud ID!")
return
@@ -1295,6 +1295,15 @@
/obj/item/stock_parts/manipulator = 1)
needs_anchored = FALSE
+/obj/item/circuitboard/machine/autoloom
+ name = "Autoloom (Machine Board)"
+ icon_state = "service"
+ build_path = /obj/machinery/autoloom
+ req_components = list(
+ /obj/item/stock_parts/matter_bin = 1,
+ /obj/item/stock_parts/manipulator = 1)
+ needs_anchored = FALSE
+
/obj/item/circuitboard/machine/seed_extractor
name = "Seed Extractor (Machine Board)"
icon_state = "service"
diff --git a/code/game/objects/items/crab17.dm b/code/game/objects/items/crab17.dm
index 8d55d3d5a2..b831a118de 100644
--- a/code/game/objects/items/crab17.dm
+++ b/code/game/objects/items/crab17.dm
@@ -14,7 +14,7 @@
if(dumped)
to_chat(user, "You already activated Protocol CRAB-17.")
return FALSE
- if(alert(user, "Are you sure you want to crash this market with no survivors?", "Protocol CRAB-17", "Yes", "No") == "Yes")
+ if(tgui_alert(user, "Are you sure you want to crash this market with no survivors?", "Protocol CRAB-17", list("Yes", "No")) == "Yes")
if(dumped || QDELETED(src)) //Prevents fuckers from cheesing alert
return FALSE
var/turf/targetturf = get_safe_random_station_turf()
diff --git a/code/game/objects/items/credit_holochip.dm b/code/game/objects/items/credit_holochip.dm
index b7f7f5f2d1..b9cf189051 100644
--- a/code/game/objects/items/credit_holochip.dm
+++ b/code/game/objects/items/credit_holochip.dm
@@ -95,7 +95,7 @@
/obj/item/holochip/AltClick(mob/user)
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
- var/split_amount = round(input(user,"How many credits do you want to extract from the holochip?") as null|num)
+ var/split_amount = round(tgui_input_num(user,"How many credits do you want to extract from the holochip?"))
if(split_amount == null || split_amount <= 0 || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
else
diff --git a/code/game/objects/items/debug_items.dm b/code/game/objects/items/debug_items.dm
index c7aaab6a26..f743e2e4e8 100644
--- a/code/game/objects/items/debug_items.dm
+++ b/code/game/objects/items/debug_items.dm
@@ -21,9 +21,9 @@
/obj/item/debug/human_spawner/attack_self(mob/user)
..()
- var/choice = input("Select a species", "Human Spawner", null) in GLOB.species_list
+ var/choice = tgui_input_list(user, "Select a species", "Human Spawner", null, GLOB.species_list)
selected_species = GLOB.species_list[choice]
-
+
/* Revive this once we purge all the istype checks for tools for tool_behaviour
/obj/item/debug/omnitool
name = "omnitool"
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 2339e88a76..f19cde7071 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -144,7 +144,7 @@ GLOBAL_LIST_EMPTY(PDAs)
dat += "\n[V]: [output]"
to_chat(M, dat)
- var/choice = input(M, "Choose the a reskin for [src]","Reskin Object") as null|anything in GLOB.pda_reskins
+ var/choice = tgui_input_list(M, "Choose the a reskin for [src]","Reskin Object", GLOB.pda_reskins)
var/new_icon = GLOB.pda_reskins[choice]
if(QDELETED(src) || isnull(new_icon) || new_icon == icon || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
@@ -619,7 +619,7 @@ GLOBAL_LIST_EMPTY(PDAs)
playsound(src, 'sound/machines/terminal_select.ogg', 15, 1)
if("Drone Phone")
- var/alert_s = input(U,"Alert severity level","Ping Drones",null) as null|anything in list("Low","Medium","High","Critical")
+ var/alert_s = tgui_input_list(U,"Alert severity level","Ping Drones", list("Low","Medium","High","Critical"))
var/area/A = get_area(U)
if(A && alert_s && !QDELETED(U))
var/msg = "NON-DRONE PING: [U.name]: [alert_s] priority alert in [A.name]!"
@@ -1147,7 +1147,7 @@ GLOBAL_LIST_EMPTY(PDAs)
plist[avoid_assoc_duplicate_keys(P.owner, namecounts)] = P
- var/c = input(user, "Please select a PDA") as null|anything in sortList(plist)
+ var/c = tgui_input_list(user, "Please select a PDA", "", sortList(plist))
if (!c)
return
@@ -1155,7 +1155,7 @@ GLOBAL_LIST_EMPTY(PDAs)
var/selected = plist[c]
if(aicamera.stored.len)
- var/add_photo = input(user,"Do you want to attach a photo?","Photo","No") as null|anything in list("Yes","No")
+ var/add_photo = tgui_input_list(user,"Do you want to attach a photo?","Photo","No", list("Yes","No"))
if(add_photo=="Yes")
var/datum/picture/Pic = aicamera.selectpicture(user)
aiPDA.picture = Pic
diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm
index 4ca0b86bc0..8ac68b9827 100644
--- a/code/game/objects/items/devices/PDA/cart.dm
+++ b/code/game/objects/items/devices/PDA/cart.dm
@@ -656,10 +656,10 @@ Code:
if("alert")
post_status("alert", href_list["alert"])
if("setmsg1")
- message1 = reject_bad_text(input("Line 1", "Enter Message Text", message1) as text|null, 40)
+ message1 = reject_bad_text(tgui_input_text(usr, "Line 1", "Enter Message Text", message1), 40)
updateSelfDialog()
if("setmsg2")
- message2 = reject_bad_text(input("Line 2", "Enter Message Text", message2) as text|null, 40)
+ message2 = reject_bad_text(tgui_input_text(usr, "Line 2", "Enter Message Text", message2), 40)
updateSelfDialog()
else
post_status(href_list["statdisp"])
diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm
index 503e2a9473..1cb4d3be22 100644
--- a/code/game/objects/items/devices/aicard.dm
+++ b/code/game/objects/items/devices/aicard.dm
@@ -84,7 +84,7 @@
if(flush)
flush = FALSE
else
- var/confirm = alert("Are you sure you want to wipe this card's memory?", name, "Yes", "No")
+ var/confirm = tgui_alert(usr, "Are you sure you want to wipe this card's memory?", name, list("Yes", "No"))
if(confirm == "Yes" && !..())
flush = TRUE
if(AI && AI.loc == src)
diff --git a/code/game/objects/items/devices/desynchronizer.dm b/code/game/objects/items/devices/desynchronizer.dm
index 2cb4922f36..2e8b11a64e 100644
--- a/code/game/objects/items/devices/desynchronizer.dm
+++ b/code/game/objects/items/devices/desynchronizer.dm
@@ -36,7 +36,7 @@
. = ..()
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
- var/new_duration = input(user, "Set the duration (5-300):", "Desynchronizer", duration / 10) as null|num
+ var/new_duration = tgui_input_num(user, "Set the duration (5-300):", "Desynchronizer", duration / 10)
if(new_duration)
new_duration = new_duration SECONDS
new_duration = clamp(new_duration, 50, max_duration)
diff --git a/code/game/objects/items/devices/electrochromatic_kit.dm b/code/game/objects/items/devices/electrochromatic_kit.dm
index d582eab00e..244ca03275 100644
--- a/code/game/objects/items/devices/electrochromatic_kit.dm
+++ b/code/game/objects/items/devices/electrochromatic_kit.dm
@@ -8,7 +8,7 @@
. = ..()
if(.)
return
- var/new_id = input(user, "Set this kit's electrochromatic ID", "Set ID", id) as text|null
+ var/new_id = tgui_input_text(user, "Set this kit's electrochromatic ID", "Set ID", id)
if(isnull(new_id))
return
id = new_id
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index d54911528d..3a15e87bdd 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -87,7 +87,7 @@
pai.master_dna = M.dna.unique_enzymes
to_chat(pai, "You have been bound to a new master.")
if(href_list["wipe"])
- var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
+ var/confirm = tgui_input_list(usr, "Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe", list("Yes", "No"))
if(confirm == "Yes")
if(pai)
to_chat(pai, "You feel yourself slipping away from reality.")
diff --git a/code/game/objects/items/devices/pipe_painter.dm b/code/game/objects/items/devices/pipe_painter.dm
index a6323cfd7f..573e2f0194 100644
--- a/code/game/objects/items/devices/pipe_painter.dm
+++ b/code/game/objects/items/devices/pipe_painter.dm
@@ -23,7 +23,7 @@
user.visible_message("[user] paints \the [P] [paint_color].","You paint \the [P] [paint_color].")
/obj/item/pipe_painter/attack_self(mob/user)
- paint_color = input("Which colour do you want to use?","Pipe painter") in GLOB.pipe_paint_colors
+ paint_color = tgui_input_list(user, "Which colour do you want to use?","Pipe painter", GLOB.pipe_paint_colors)
/obj/item/pipe_painter/examine(mob/user)
. = ..()
diff --git a/code/game/objects/items/devices/polycircuit.dm b/code/game/objects/items/devices/polycircuit.dm
index 17e364c4f3..3a35f7c9f8 100644
--- a/code/game/objects/items/devices/polycircuit.dm
+++ b/code/game/objects/items/devices/polycircuit.dm
@@ -18,7 +18,7 @@
else
if(zero_amount())
return
- chosen_circuit = input("What type of circuit would you like to remove?", "Choose a Circuit Type", chosen_circuit) as null|anything in list("airlock","firelock","fire alarm","air alarm","APC")
+ chosen_circuit = tgui_input_list(user, "What type of circuit would you like to remove?", "Choose a Circuit Type", list("airlock","firelock","fire alarm","air alarm","APC"))
if(zero_amount() || !chosen_circuit || !in_range(src,user))
return
switch(chosen_circuit)
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index e81110425c..c86b9b3951 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -150,7 +150,7 @@
if(tune == "input")
var/min = format_frequency(freerange ? MIN_FREE_FREQ : MIN_FREQ)
var/max = format_frequency(freerange ? MAX_FREE_FREQ : MAX_FREQ)
- tune = input("Tune frequency ([min]-[max]):", name, format_frequency(frequency)) as null|num
+ tune = tgui_input_num(usr, "Tune frequency ([min]-[max]):", name, format_frequency(frequency))
if(!isnull(tune) && !..())
if (tune < MIN_FREE_FREQ && tune <= MAX_FREE_FREQ / 10)
// allow typing 144.7 to get 1447
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 0bf7b13646..0cb31291ed 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -946,7 +946,7 @@ GENETICS SCANNER
for(var/A in buffer)
options += get_display_name(A)
- var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sortList(options)
+ var/answer = tgui_input_list(user, "Analyze Potential", "Sequence Analyzer", sortList(options))
if(answer && ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
var/sequence
for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list
diff --git a/code/game/objects/items/dualsaber.dm b/code/game/objects/items/dualsaber.dm
index eea189c3be..0e21a2520a 100644
--- a/code/game/objects/items/dualsaber.dm
+++ b/code/game/objects/items/dualsaber.dm
@@ -23,7 +23,7 @@
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
resistance_flags = FIRE_PROOF
- wound_bonus = -110
+ wound_bonus = -40
bare_wound_bonus = 20
block_parry_data = /datum/block_parry_data/dual_esword
block_chance = 60
@@ -133,7 +133,7 @@
total_mass = initial(total_mass)
wielded = FALSE
hitsound = "swing_hit"
- slowdown_wielded -= slowdown_wielded
+ slowdown -= slowdown_wielded
STOP_PROCESSING(SSobj, src)
set_light(0)
RemoveElement(/datum/element/sword_point)
@@ -278,6 +278,7 @@
desc = "A supermassive weapon envisioned to cleave the very fabric of space and time itself in twain, the hypereutactic blade dynamically flash-forges a hypereutactic crystaline nanostructure capable of passing through most known forms of matter like a hot knife through butter."
force = 7
hitsound_on = 'sound/weapons/nebhit.ogg'
+ wound_bonus = -20
armour_penetration = 60
light_color = "#37FFF7"
rainbow_colors = list("#FF0000", "#FFFF00", "#00FF00", "#00FFFF", "#0000FF","#FF00FF", "#3399ff", "#ff9900", "#fb008b", "#9800ff", "#00ffa3", "#ccff00")
@@ -318,7 +319,7 @@
if(user.incapacitated() || !istype(user))
to_chat(user, "You can't do that right now!")
return
- if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
+ if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Repaint", list("Yes", "No")) == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null
if(!energy_color_input || !user.canUseTopic(src, BE_CLOSE, FALSE) || hacked)
return
diff --git a/code/game/objects/items/dyekit.dm b/code/game/objects/items/dyekit.dm
index 43a05c7939..eea4bf65e8 100644
--- a/code/game/objects/items/dyekit.dm
+++ b/code/game/objects/items/dyekit.dm
@@ -23,7 +23,7 @@
return
var/mob/living/carbon/human/human_target = target
- var/new_grad_style = input(usr, "Choose a color pattern:", "Character Preference") as null|anything in GLOB.hair_gradients_list
+ var/new_grad_style = tgui_input_list(usr, "Choose a color pattern:", "Character Preference", GLOB.hair_gradients_list)
if(!new_grad_style)
return
diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm
index 23fe128fa8..a30b1c40cf 100644
--- a/code/game/objects/items/grenades/plastic.dm
+++ b/code/game/objects/items/grenades/plastic.dm
@@ -95,7 +95,7 @@
if(nadeassembly)
nadeassembly.attack_self(user)
return
- var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
+ var/newtime = tgui_input_num(usr, "Please set the timer.", "Timer", 10)
if(user.get_active_held_item() == src)
newtime = clamp(newtime, 10, 60000)
det_time = newtime
diff --git a/code/game/objects/items/implants/implant_explosive.dm b/code/game/objects/items/implants/implant_explosive.dm
index 370924063d..1479763efa 100644
--- a/code/game/objects/items/implants/implant_explosive.dm
+++ b/code/game/objects/items/implants/implant_explosive.dm
@@ -33,7 +33,7 @@
return FALSE
if(cause == "action_button" && !popup)
popup = TRUE
- var/response = alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", "Yes", "No")
+ var/response = tgui_alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", list("Yes", "No"))
popup = FALSE
if(response == "No")
return FALSE
diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm
index 275536d370..9f5abfcca3 100644
--- a/code/game/objects/items/melee/energy.dm
+++ b/code/game/objects/items/melee/energy.dm
@@ -415,7 +415,7 @@
to_chat(user, "You can't do that right now!")
return TRUE
- if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
+ if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Repaint", list("Yes", "No")) == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null
if(energy_color_input)
light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
diff --git a/code/game/objects/items/miscellaneous.dm b/code/game/objects/items/miscellaneous.dm
index 80466832a6..151f5f1c7d 100644
--- a/code/game/objects/items/miscellaneous.dm
+++ b/code/game/objects/items/miscellaneous.dm
@@ -26,7 +26,7 @@
stored_options = generate_display_names()
if(!stored_options.len)
return
- var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in stored_options
+ var/choice = tgui_input_list(M,"Which item would you like to order?","Select an Item", stored_options)
if(!choice || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
@@ -182,7 +182,7 @@
return carrier
/obj/item/choice_beacon/pet/spawn_option(atom/choice,mob/living/M)
- pet_name = input(M, "What would you like to name the pet? (leave blank for default name)", "Pet Name")
+ pet_name = tgui_input_text(M, "What would you like to name the pet? (leave blank for default name)", "Pet Name")
..()
//choice boxes (they just open in your hand instead of making a pod)
diff --git a/code/game/objects/items/paint.dm b/code/game/objects/items/paint.dm
index cd65149f5d..5483d3dc38 100644
--- a/code/game/objects/items/paint.dm
+++ b/code/game/objects/items/paint.dm
@@ -56,7 +56,7 @@
icon_state = "paint_neutral"
/obj/item/paint/anycolor/attack_self(mob/user)
- var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "pink", "blue", "cyan", "green", "lime", "yellow", "orange", "violet", "purple", "black", "gray", "white")
+ var/t1 = tgui_input_list(user, "Please select a color:", "Locking Computer", list( "red", "pink", "blue", "cyan", "green", "lime", "yellow", "orange", "violet", "purple", "black", "gray", "white"))
if ((user.get_active_held_item() != src || user.stat || user.restrained()))
return
switch(t1)
diff --git a/code/game/objects/items/pinpointer.dm b/code/game/objects/items/pinpointer.dm
index 22ffc33516..d3dcbafb70 100644
--- a/code/game/objects/items/pinpointer.dm
+++ b/code/game/objects/items/pinpointer.dm
@@ -154,7 +154,7 @@
user.visible_message("[user]'s pinpointer fails to detect a signal.", "Your pinpointer fails to detect a signal.")
return
- var/A = input(user, "Person to track", "Pinpoint") in names
+ var/A = tgui_input_list(user, "Person to track", "Pinpoint", names)
if(!A || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated())
return
diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm
index cbfdc85f6d..fa72789221 100644
--- a/code/game/objects/items/robot/robot_items.dm
+++ b/code/game/objects/items/robot/robot_items.dm
@@ -997,7 +997,7 @@
to_chat(user, "[target] is firmly secured!")
/obj/item/cyborg_clamp/attack_self(mob/user)
- var/obj/chosen_cargo = input(user, "Drop what?") as null|anything in cargo
+ var/obj/chosen_cargo = tgui_input_list(user, "Drop what?", cargo)
if(!chosen_cargo)
return
chosen_cargo.forceMove(get_turf(chosen_cargo))
diff --git a/code/game/objects/items/scrolls.dm b/code/game/objects/items/scrolls.dm
index d58f670dc4..095b435c6a 100644
--- a/code/game/objects/items/scrolls.dm
+++ b/code/game/objects/items/scrolls.dm
@@ -48,7 +48,7 @@
var/A
- A = input(user, "Area to jump to", "BOOYEA", A) as null|anything in GLOB.teleportlocs
+ A = tgui_input_list(user, "Area to jump to", "BOOYEA", GLOB.teleportlocs)
if(!src || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !A || !uses)
return
var/area/thearea = GLOB.teleportlocs[A]
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 266d8b7b86..12822aefd0 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -465,7 +465,7 @@
return
//get amount from user
var/max = get_amount()
- var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum [max])") as null|num)
+ var/stackmaterial = round(tgui_input_num(user,"How many sheets do you wish to take out of this stack? (Maximum [max])"))
max = get_amount()
stackmaterial = min(max, stackmaterial)
if(stackmaterial == null || stackmaterial <= 0 || !user.canUseTopic(src, BE_CLOSE, TRUE, FALSE)) //, !iscyborg(user)
diff --git a/code/game/objects/items/storage/dakis.dm b/code/game/objects/items/storage/dakis.dm
index 29f12df4c4..b9b175bb04 100644
--- a/code/game/objects/items/storage/dakis.dm
+++ b/code/game/objects/items/storage/dakis.dm
@@ -24,7 +24,7 @@
var/custom_name
if(icon_state == "daki_base")
- body_choice = input("Pick a body.") in dakimakura_options
+ body_choice = tgui_input_list(user, "Pick a body.", "", dakimakura_options)
icon_state = "daki_[body_choice]"
custom_name = stripped_input(user, "What's her name?")
if(length(custom_name) > MAX_NAME_LEN)
diff --git a/code/game/objects/items/teleportation.dm b/code/game/objects/items/teleportation.dm
index bc6a40f8c0..a8e94ba001 100644
--- a/code/game/objects/items/teleportation.dm
+++ b/code/game/objects/items/teleportation.dm
@@ -164,7 +164,7 @@
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
- var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in L
+ var/t1 = tgui_input_list(user, "Please select a teleporter to lock in on.", "Hand Teleporter", L)
if (!t1 || user.get_active_held_item() != src || user.incapacitated())
return
if(active_portal_pairs.len >= max_portal_pairs)
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 547217366b..c2693510cd 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -340,7 +340,7 @@
to_chat(user, "You can't do that right now!")
return TRUE
- if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
+ if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Repaint", list("Yes", "No")) == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null
if(energy_color_input)
light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 58c571d9e6..e802e084f8 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -282,14 +282,14 @@
message_admins("[key_name_admin(usr)] modified the armor on [src] ([type]) to melee: [armor.melee], bullet: [armor.bullet], laser: [armor.laser], energy: [armor.energy], bomb: [armor.bomb], bio: [armor.bio], rad: [armor.rad], fire: [armor.fire], acid: [armor.acid]")
if(href_list[VV_HK_MASS_DEL_TYPE])
if(check_rights(R_DEBUG|R_SERVER))
- var/action_type = alert("Strict type ([type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
+ var/action_type = tgui_alert(usr, "Strict type ([type]) or type and all subtypes?",,list("Strict type","Type and subtypes","Cancel"))
if(action_type == "Cancel" || !action_type)
return
- if(alert("Are you really sure you want to delete all objects of type [type]?",,"Yes","No") != "Yes")
+ if(tgui_alert(usr, "Are you really sure you want to delete all objects of type [type]?",,list("Yes","No")) != "Yes")
return
- if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
+ if(tgui_alert(usr, "Second confirmation required. Delete?",,list("Yes","No")) != "Yes")
return
var/O_type = type
diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm
index a96d39316e..1f0121db76 100644
--- a/code/game/objects/structures/barsigns.dm
+++ b/code/game/objects/structures/barsigns.dm
@@ -120,7 +120,7 @@
/obj/structure/sign/barsign/proc/pick_sign(mob/user)
- var/picked_name = input(user, "Available Signage", "Bar Sign", name) as null|anything in barsigns
+ var/picked_name = tgui_input_list(user, "Available Signage", "Bar Sign", barsigns)
if(!picked_name)
return
set_sign(picked_name)
diff --git a/code/game/objects/structures/crates_lockers/closets/genpop.dm b/code/game/objects/structures/crates_lockers/closets/genpop.dm
index 7be12a4819..99665400e0 100644
--- a/code/game/objects/structures/crates_lockers/closets/genpop.dm
+++ b/code/game/objects/structures/crates_lockers/closets/genpop.dm
@@ -40,13 +40,13 @@
return TRUE
/obj/structure/closet/secure_closet/genpop/proc/handle_edit_sentence(mob/user)
- var/prisoner_name = input(user, "Please input the name of the prisoner.", "Prisoner Name", registered_id.registered_name) as text|null
+ var/prisoner_name = tgui_input_text(user, "Please input the name of the prisoner.", "Prisoner Name", registered_id.registered_name)
if(prisoner_name == null | !user.Adjacent(src))
return FALSE
- var/sentence_length = input(user, "Please input the length of their sentence in minutes (0 for perma).", "Sentence Length", registered_id.sentence) as num|null
+ var/sentence_length = tgui_input_num(user, "Please input the length of their sentence in minutes (0 for perma).", "Sentence Length", registered_id.sentence)
if(sentence_length == null | !user.Adjacent(src))
return FALSE
- var/crimes = input(user, "Please input their crimes.", "Crimes", registered_id.crime) as text|null
+ var/crimes = tgui_input_text(user, "Please input their crimes.", "Crimes", registered_id.crime)
if(crimes == null | !user.Adjacent(src))
return FALSE
@@ -71,7 +71,7 @@
if(!broken && locked && registered_id != null)
var/name = registered_id.registered_name
- var/result = alert(user, "This locker currently contains [name]'s personal belongings ","Locker In Use","Reset","Amend ID", "Open")
+ var/result = tgui_alert(user, "This locker currently contains [name]'s personal belongings ","Locker In Use",list("Reset","Amend ID", "Open"))
if(!user.Adjacent(src))
return
if(result == "Reset")
diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm
index c32bf81ecf..321bb35cf8 100644
--- a/code/game/objects/structures/displaycase.dm
+++ b/code/game/objects/structures/displaycase.dm
@@ -470,7 +470,7 @@
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, TRUE)
return
- var/new_price_input = input(usr,"Set the sale price for this vend-a-tray.","new price",0) as num|null
+ var/new_price_input = tgui_input_num(usr,"Set the sale price for this vend-a-tray.","new price",sale_price)
if(isnull(new_price_input) || (payments_acc != potential_acc.registered_account))
to_chat(usr, "[src] rejects your new price.")
return
diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm
index 9790a0e661..48a6c2f530 100644
--- a/code/game/objects/structures/dresser.dm
+++ b/code/game/objects/structures/dresser.dm
@@ -37,7 +37,7 @@
if(!(GLOB.socks_list[H.socks]?.has_color))
undergarment_choices -= "Socks Color"
- var/choice = input(H, "Underwear, Undershirt, or Socks?", "Changing") as null|anything in undergarment_choices
+ var/choice = tgui_input_list(H, "Underwear, Undershirt, or Socks?", "Changing", undergarment_choices)
if(!H.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
var/dye_undie = FALSE
@@ -45,21 +45,21 @@
var/dye_socks = FALSE
switch(choice)
if("Underwear")
- var/new_undies = input(H, "Select your underwear", "Changing") as null|anything in GLOB.underwear_list
+ var/new_undies = tgui_input_list(H, "Select your underwear", "Changing", GLOB.underwear_list)
if(new_undies)
H.underwear = new_undies
H.saved_underwear = new_undies
var/datum/sprite_accessory/underwear/bottom/B = GLOB.underwear_list[new_undies]
dye_undie = B?.has_color
if("Undershirt")
- var/new_undershirt = input(H, "Select your undershirt", "Changing") as null|anything in GLOB.undershirt_list
+ var/new_undershirt = tgui_input_list(H, "Select your undershirt", "Changing", GLOB.undershirt_list)
if(new_undershirt)
H.undershirt = new_undershirt
H.saved_undershirt = new_undershirt
var/datum/sprite_accessory/underwear/top/T = GLOB.undershirt_list[new_undershirt]
dye_shirt = T?.has_color
if("Socks")
- var/new_socks = input(H, "Select your socks", "Changing") as null|anything in GLOB.socks_list
+ var/new_socks = tgui_input_list(H, "Select your socks", "Changing", GLOB.socks_list)
if(new_socks)
H.socks = new_socks
H.saved_socks = new_socks
diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm
index 40af75002f..e3825b1ee6 100644
--- a/code/game/objects/structures/ghost_role_spawners.dm
+++ b/code/game/objects/structures/ghost_role_spawners.dm
@@ -184,7 +184,7 @@
/obj/effect/mob_spawn/human/golem/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(isgolem(user) && can_transfer)
- var/transfer_choice = alert("Transfer your soul to [src]? (Warning, your old body will die!)",,"Yes","No")
+ var/transfer_choice = tgui_alert(user, "Transfer your soul to [src]? (Warning, your old body will die!)",,list("Yes","No"))
if(transfer_choice != "Yes" || QDELETED(src) || uses <= 0 || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERY, NO_TK))
return
log_game("[key_name(user)] golem-swapped into [src]")
@@ -742,7 +742,7 @@
/datum/action/disguise/Trigger()
var/mob/living/carbon/human/H = owner
if(!currently_disguised)
- var/user_object_type = input(H, "Disguising as OBJECT or MOB?") as null|anything in list("OBJECT", "MOB")
+ var/user_object_type = tgui_input_list(H, "Disguising as OBJECT or MOB?", "", list("OBJECT", "MOB"))
if(user_object_type)
var/search_term = stripped_input(H, "Enter the search term")
if(search_term)
@@ -758,7 +758,7 @@
if(!length(filtered_results))
to_chat(H, "Nothing matched your search query!")
else
- var/disguise_selection = input("Select item to disguise as") as null|anything in filtered_results
+ var/disguise_selection = tgui_input_list(H, "Select item to disguise as", "", filtered_results)
if(disguise_selection)
var/atom/disguise_item = disguise_selection
var/image/I = image(icon = initial(disguise_item.icon), icon_state = initial(disguise_item.icon_state), loc = H)
@@ -800,6 +800,13 @@
/datum/outfit/ghostcafe/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
..()
+ if (isplasmaman(H))
+ head = /obj/item/clothing/head/helmet/space/plasmaman
+ uniform = /obj/item/clothing/under/plasmaman
+ l_hand= /obj/item/tank/internals/plasmaman/belt/full
+ mask = /obj/item/clothing/mask/breath
+ return
+
var/suited = !preference_source || preference_source.prefs.jumpsuit_style == PREF_SUIT
if (CONFIG_GET(flag/grey_assistants))
uniform = suited ? /obj/item/clothing/under/color/grey : /obj/item/clothing/under/color/jumpskirt/grey
@@ -809,6 +816,10 @@
else
uniform = suited ? /obj/item/clothing/under/color/random : /obj/item/clothing/under/color/jumpskirt/random
+/datum/outfit/ghostcafe/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
+ H.internal = H.get_item_for_held_index(1)
+ H.update_internals_hud_icon(1)
+
/obj/item/storage/box/syndie_kit/chameleon/ghostcafe
name = "ghost cafe costuming kit"
desc = "Look just the way you did in life - or better!"
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index a70d9d4678..d518401ccb 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -26,7 +26,7 @@
//handle facial hair (if necessary)
if(H.gender != FEMALE)
- var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in GLOB.facial_hair_styles_list
+ var/new_style = tgui_input_list(user, "Select a facial hair style", "Grooming", GLOB.facial_hair_styles_list)
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return //no tele-grooming
if(new_style)
@@ -35,7 +35,7 @@
H.facial_hair_style = "Shaved"
//handle normal hair
- var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in GLOB.hair_styles_list
+ var/new_style = tgui_input_list(user, "Select a hair style", "Grooming", GLOB.hair_styles_list)
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return //no tele-grooming
if(new_style)
@@ -141,7 +141,7 @@
var/mob/living/carbon/human/H = user
- var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("name", "race", "gender", "hair", "eyes")
+ var/choice = tgui_input_list(user, "Something to change?", "Magical Grooming", list("name", "race", "gender", "hair", "eyes"))
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
@@ -163,7 +163,7 @@
if("race")
var/newrace
- var/racechoice = input(H, "What are we again?", "Race change") as null|anything in choosable_races
+ var/racechoice = tgui_input_list(H, "What are we again?", "Race change", choosable_races)
newrace = GLOB.species_list[racechoice]
if(!newrace)
@@ -176,7 +176,7 @@
var/list/choices = GLOB.skin_tones
if(CONFIG_GET(flag/allow_custom_skintones))
choices += "custom"
- var/new_s_tone = input(H, "Choose your skin tone:", "Race change") as null|anything in choices
+ var/new_s_tone = tgui_input_list(H, "Choose your skin tone:", "Race change", choices)
if(new_s_tone)
if(new_s_tone == "custom")
var/default = H.dna.skin_tone_override || null
@@ -214,14 +214,14 @@
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
if(H.gender == "male")
- if(alert(H, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes")
+ if(tgui_alert(H, "Become a Witch?", "Confirmation", list("Yes", "No")) == "Yes")
H.gender = "female"
to_chat(H, "Man, you feel like a woman!")
else
return
else
- if(alert(H, "Become a Warlock?", "Confirmation", "Yes", "No") == "Yes")
+ if(tgui_alert(H, "Become a Warlock?", "Confirmation", list("Yes", "No")) == "Yes")
H.gender = "male"
to_chat(H, "Whoa man, you feel like a man!")
else
@@ -231,7 +231,7 @@
H.update_mutations_overlay() //(hulk male/female)
if("hair")
- var/hairchoice = alert(H, "Hair style or hair color?", "Change Hair", "Style", "Color")
+ var/hairchoice = tgui_alert(H, "Hair style or hair color?", "Change Hair", list("Style", "Color"))
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
if(hairchoice == "Style") //So you just want to use a mirror then?
@@ -249,7 +249,7 @@
H.update_hair()
if(BODY_ZONE_PRECISE_EYES)
- var/eye_type = input(H, "Choose the eye you want to color", "Eye Color") as null|anything in list("Both Eyes", "Left Eye", "Right Eye")
+ var/eye_type = tgui_input_list(H, "Choose the eye you want to color", "Eye Color", list("Both Eyes", "Left Eye", "Right Eye"))
if(eye_type)
var/input_color = H.left_eye_color
if(eye_type == "Right Eye")
diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm
index 8174f6a82e..47f9bd3e5d 100644
--- a/code/game/objects/structures/reflector.dm
+++ b/code/game/objects/structures/reflector.dm
@@ -159,7 +159,7 @@
if (!can_rotate || admin)
to_chat(user, "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_num(user, "Input a new angle for primary reflection face.", "Reflector Angle", rotation_angle)
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
if(!isnull(new_angle))
diff --git a/code/game/objects/structures/signs/_signs.dm b/code/game/objects/structures/signs/_signs.dm
index 8b82cdba5e..b4ee0a3e55 100644
--- a/code/game/objects/structures/signs/_signs.dm
+++ b/code/game/objects/structures/signs/_signs.dm
@@ -45,7 +45,7 @@
var/list/sign_types = list("Secure Area", "Biohazard", "High Voltage", "Radiation", "Hard Vacuum Ahead", "Disposal: Leads To Space", "Danger: Fire", "No Smoking", "Medbay", "Science", "Chemistry", \
"Hydroponics", "Xenobiology")
var/obj/structure/sign/sign_type
- switch(input(user, "Select a sign type.", "Sign Customization") as null|anything in sign_types)
+ switch(tgui_input_list(user, "Select a sign type.", "Sign Customization", sign_types))
if("Blank")
sign_type = /obj/structure/sign/basic
if("Secure Area")
diff --git a/code/game/objects/structures/spirit_board.dm b/code/game/objects/structures/spirit_board.dm
index 1b3093e4e7..7781414583 100644
--- a/code/game/objects/structures/spirit_board.dm
+++ b/code/game/objects/structures/spirit_board.dm
@@ -31,7 +31,7 @@
virgin = 0
notify_ghosts("Someone has begun playing with a [src.name] in [get_area(src)]!", source = src)
- planchette = input("Choose the letter.", "Seance!") as null|anything in list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
+ planchette = tgui_input_list(M, "Choose the letter.", "Seance!", list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"))
if(!planchette || !Adjacent(M) || next_use > world.time)
return
M.log_message("picked a letter on [src], which was \"[planchette]\".")
diff --git a/code/modules/admin/DB_ban/functions.dm b/code/modules/admin/DB_ban/functions.dm
index b8d2452874..82fc35466e 100644
--- a/code/modules/admin/DB_ban/functions.dm
+++ b/code/modules/admin/DB_ban/functions.dm
@@ -92,7 +92,7 @@
qdel(query_add_ban_get_ckey)
if(!seen_before)
if(!had_banned_mob || (had_banned_mob && !banned_mob_guest_key))
- if(alert(usr, "[bankey] has not been seen before, are you sure you want to create a ban for them?", "Unknown ckey", "Yes", "No", "Cancel") != "Yes")
+ if(tgui_alert(usr, "[bankey] has not been seen before, are you sure you want to create a ban for them?", "Unknown ckey", list("Yes", "No", "Cancel")) != "Yes")
return
var/a_key
@@ -289,7 +289,7 @@
switch(param)
if("reason")
if(!value)
- value = input("Insert the new reason for [p_key]'s ban", "New Reason", "[reason]", null) as null|text
+ value = tgui_input_text(usr, "Insert the new reason for [p_key]'s ban", "New Reason", "[reason]", null)
if(!value)
to_chat(usr, "Cancelled")
return
@@ -302,7 +302,7 @@
message_admins("[key_name_admin(usr)] has edited a ban for [p_key]'s reason from [reason] to [value]")
if("duration")
if(!value)
- value = input("Insert the new duration (in minutes) for [p_key]'s ban", "New Duration", "[duration]", null) as null|num
+ value = tgui_input_num(usr, "Insert the new duration (in minutes) for [p_key]'s ban", "New Duration", "[duration]", null)
if(!isnum(value) || !value)
to_chat(usr, "Cancelled")
return
@@ -314,7 +314,7 @@
qdel(query_edit_ban_duration)
message_admins("[key_name_admin(usr)] has edited a ban for [p_key]'s duration from [duration] to [value]")
if("unban")
- if(alert("Unban [p_key]?", "Unban?", "Yes", "No") == "Yes")
+ if(tgui_alert(usr, "Unban [p_key]?", "Unban?", list("Yes", "No")) == "Yes")
DB_ban_unban_by_id(banid)
return
else
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index d56e78c9fb..2cd7e88565 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -470,25 +470,25 @@
options += "Server Restart (Kill and restart DD)";
if(SSticker.admin_delay_notice)
- if(alert(usr, "Are you sure? An admin has already delayed the round end for the following reason: [SSticker.admin_delay_notice]", "Confirmation", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Are you sure? An admin has already delayed the round end for the following reason: [SSticker.admin_delay_notice]", "Confirmation", list("Yes", "No")) != "Yes")
return FALSE
- var/result = input(usr, "Select reboot method", "World Reboot", options[1]) as null|anything in options
+ var/result = tgui_input_list(usr, "Select reboot method", "World Reboot", options)
if(result)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Reboot World") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
var/init_by = "Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]."
switch(result)
if("Regular Restart")
if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses)))
- if(alert("Are you sure you want to restart the server?","This server is live","Restart","Cancel") != "Restart")
+ if(tgui_alert(usr, "Are you sure you want to restart the server?","This server is live",list("Restart","Cancel")) != "Restart")
return FALSE
SSticker.Reboot(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10)
if("Regular Restart (with delay)")
- var/delay = input("What delay should the restart have (in seconds)?", "Restart Delay", 5) as num|null
+ var/delay = tgui_input_num(usr, "What delay should the restart have (in seconds)?", "Restart Delay", 5)
if(!delay)
return FALSE
if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses)))
- if(alert("Are you sure you want to restart the server?","This server is live","Restart","Cancel") != "Restart")
+ if(tgui_alert(usr, "Are you sure you want to restart the server?","This server is live",list("Restart","Cancel")) != "Restart")
return FALSE
SSticker.Reboot(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", delay * 10)
if("Hard Restart (No Delay, No Feeback Reason)")
@@ -508,7 +508,7 @@
if (!usr.client.holder)
return
- var/confirm = alert("End the round and restart the game world?", "End Round", "Yes", "Cancel")
+ var/confirm = tgui_alert(usr, "End the round and restart the game world?", "End Round", list("Yes", "Cancel"))
if(confirm == "Cancel")
return
if(confirm == "Yes")
@@ -523,7 +523,7 @@
if(!check_rights(0))
return
- var/message = input("Global message to send:", "Admin Announce", null, null) as message
+ var/message = tgui_input_message(usr, "Global message to send:", "Admin Announce", null, null)
if(message)
if(!check_rights(R_SERVER,0))
message = adminscrub(message,500)
@@ -538,7 +538,7 @@
if(!check_rights(0))
return
- var/new_admin_notice = input(src,"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):","Set Notice",GLOB.admin_notice) as message|null
+ var/new_admin_notice = tgui_input_message(src,"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):","Set Notice",GLOB.admin_notice)
if(new_admin_notice == null)
return
if(new_admin_notice == GLOB.admin_notice)
@@ -599,7 +599,7 @@
if(!SSticker.start_immediately)
var/localhost_addresses = list("127.0.0.1", "::1")
if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses)))
- if(alert("Are you sure you want to start the round?","Start Now","Start Now","Cancel") != "Start Now")
+ if(tgui_alert(usr, "Are you sure you want to start the round?","Start Now",list("Start Now","Cancel")) != "Start Now")
return FALSE
SSticker.start_immediately = TRUE
log_admin("[usr.key] has started the game.")
@@ -684,9 +684,9 @@
set desc="Delay the game start"
set name="Delay Pre-Game"
- var/newtime = input("Set a new time in seconds. Set -1 for indefinite delay.","Set Delay",round(SSticker.GetTimeLeft()/10)) as num|null
+ var/newtime = tgui_input_num(usr, "Set a new time in seconds. Set -1 for indefinite delay.","Set Delay",round(SSticker.GetTimeLeft()/10))
if(SSticker.current_state > GAME_STATE_PREGAME)
- return alert("Too late... The game has already started!")
+ return tgui_alert(usr, "Too late... The game has already started!")
if(newtime)
newtime = newtime*10
SSticker.SetTimeLeft(newtime)
@@ -708,7 +708,7 @@
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]")
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
else
- alert("[M.name] is not prisoned.")
+ tgui_alert(usr, "[M.name] is not prisoned.")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Unprison") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
@@ -873,7 +873,7 @@
var/count = 0
if(!SSjob.initialized)
- alert(usr, "You cannot manage jobs before the job subsystem is initialized!")
+ tgui_alert(usr, "You cannot manage jobs before the job subsystem is initialized!")
return
dat += "
"
@@ -972,7 +972,7 @@
question = "This mob already has a user ([tomob.key]) in control of it! "
question += "Are you sure you want to place [frommob.name]([frommob.key]) in control of [tomob.name]?"
- var/ask = alert(question, "Place ghost in control of mob?", "Yes", "No")
+ var/ask = tgui_alert(usr, question, "Place ghost in control of mob?", list("Yes", "No"))
if (ask != "Yes")
return TRUE
diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm
index 52be445120..23cf7eae87 100644
--- a/code/modules/admin/admin_investigate.dm
+++ b/code/modules/admin/admin_investigate.dm
@@ -24,7 +24,7 @@
var/list/combined = sortList(logs_present) + sortList(logs_missing)
- var/selected = input("Investigate what?", "Investigate") as null|anything in combined
+ var/selected = tgui_input_list(src, "Investigate what?", "Investigate", combined)
if(!(selected in combined) || selected == "---")
return
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 8d3e1c79ec..2c85e0ca42 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -518,7 +518,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
set desc = "Cause an explosion of varying strength at your location."
var/list/choices = list("Small Bomb (1, 2, 3, 3)", "Medium Bomb (2, 3, 4, 4)", "Big Bomb (3, 5, 7, 5)", "Maxcap", "Custom Bomb")
- var/choice = input("What size explosion would you like to produce? NOTE: You can do all this rapidly and in an IC manner (using cruise missiles!) with the Config/Launch Supplypod verb. WARNING: These ignore the maxcap") as null|anything in choices
+ var/choice = tgui_input_list(src, "What size explosion would you like to produce? NOTE: You can do all this rapidly and in an IC manner (using cruise missiles!) with the Config/Launch Supplypod verb. WARNING: These ignore the maxcap", choices)
var/turf/epicenter = mob.loc
switch(choice)
@@ -533,20 +533,20 @@ GLOBAL_PROTECT(admin_verbs_hideable)
if("Maxcap")
explosion(epicenter, GLOB.MAX_EX_DEVESTATION_RANGE, GLOB.MAX_EX_HEAVY_RANGE, GLOB.MAX_EX_LIGHT_RANGE, GLOB.MAX_EX_FLASH_RANGE)
if("Custom Bomb")
- var/devastation_range = input("Devastation range (in tiles):") as null|num
+ var/devastation_range = tgui_input_num(src, "Devastation range (in tiles):")
if(devastation_range == null)
return
- var/heavy_impact_range = input("Heavy impact range (in tiles):") as null|num
+ var/heavy_impact_range = tgui_input_num(src, "Heavy impact range (in tiles):")
if(heavy_impact_range == null)
return
- var/light_impact_range = input("Light impact range (in tiles):") as null|num
+ var/light_impact_range = tgui_input_num(src, "Light impact range (in tiles):")
if(light_impact_range == null)
return
- var/flash_range = input("Flash range (in tiles):") as null|num
+ var/flash_range = tgui_input_num(src, "Flash range (in tiles):")
if(flash_range == null)
return
if(devastation_range > GLOB.MAX_EX_DEVESTATION_RANGE || heavy_impact_range > GLOB.MAX_EX_HEAVY_RANGE || light_impact_range > GLOB.MAX_EX_LIGHT_RANGE || flash_range > GLOB.MAX_EX_FLASH_RANGE)
- if(alert("Bomb is bigger than the maxcap. Continue?",,"Yes","No") != "Yes")
+ if(tgui_alert(src, "Bomb is bigger than the maxcap. Continue?",,list("Yes","No")) != "Yes")
return
epicenter = mob.loc //We need to reupdate as they may have moved again
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, TRUE, TRUE)
@@ -559,34 +559,34 @@ GLOBAL_PROTECT(admin_verbs_hideable)
set name = "Drop Wave Explosion"
set desc = "Cause an explosive shockwave at your location."
- var/power = input(src, "Wave initial power", "Power", 50) as num|null
+ var/power = tgui_input_num(src, "Wave initial power", "Power", 50)
if(isnull(power))
return
- var/falloff = input(src, "Wave innate falloff factor", "Falloff", EXPLOSION_DEFAULT_FALLOFF_MULTIPLY) as num|null
+ var/falloff = tgui_input_num(src, "Wave innate falloff factor", "Falloff", EXPLOSION_DEFAULT_FALLOFF_MULTIPLY)
if(isnull(falloff))
return
falloff = max(0, falloff)
if(falloff > 1)
to_chat(src, "Aborting: Falloff cannot be higher tahn 1.")
return
- var/constant = input(src, "Wave innate falloff constant", "Constant", EXPLOSION_DEFAULT_FALLOFF_SUBTRACT) as num|null
+ var/constant = tgui_input_num(src, "Wave innate falloff constant", "Constant", EXPLOSION_DEFAULT_FALLOFF_SUBTRACT)
if(isnull(constant))
return
if(constant < 0)
to_chat(src, "Aborting: Falloff constant cannot be less than 0.")
return
- var/fire = input(src, "Probability per tile of fire?", "Fire Probability", 0) as num|null
+ var/fire = tgui_input_num(src, "Probability per tile of fire?", "Fire Probability", 0)
if(isnull(fire))
return
- var/speed = input(src, "Speed in ticks to wait between cycles? 0 for fast as possible", "Wait", 0) as num|null
+ var/speed = tgui_input_num(src, "Speed in ticks to wait between cycles? 0 for fast as possible", "Wait", 0)
if(isnull(speed))
return
- var/block_resistance = input(src, "DANGEROUS: Block resistance? USE 1 IF YOU DO NOT KNOW WHAT YOU ARE DOING.", "Block Negation", 1) as num|null
+ var/block_resistance = tgui_input_num(src, "DANGEROUS: Block resistance? USE 1 IF YOU DO NOT KNOW WHAT YOU ARE DOING.", "Block Negation", 1)
if(isnull(block_resistance))
return
block_resistance = max(0, block_resistance)
if(power > 500)
- var/sure = alert(src, "Explosion power is extremely high. Are you absolutely sure?", "Uhh...", "No", "Yes")
+ var/sure = tgui_alert(src, "Explosion power is extremely high. Are you absolutely sure?", "Uhh...", list("No", "Yes"))
if(sure != "Yes")
return
// point of no return
@@ -604,7 +604,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
set name = "Drop DynEx Bomb"
set desc = "Cause an explosion of varying strength at your location."
- var/ex_power = input("Explosive Power:") as null|num
+ var/ex_power = tgui_input_num(src, "Explosive Power:")
var/turf/epicenter = mob.loc
if(ex_power && epicenter)
dyn_explosion(epicenter, ex_power)
@@ -617,7 +617,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
set name = "Get DynEx Range"
set desc = "Get the estimated range of a bomb, using explosive power."
- var/ex_power = input("Explosive Power:") as null|num
+ var/ex_power = tgui_input_num(src, "Explosive Power:")
if (isnull(ex_power))
return
var/range = round((2 * ex_power)**GLOB.DYN_EX_SCALE)
@@ -628,7 +628,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
set name = "Get DynEx Power"
set desc = "Get the estimated required power of a bomb, to reach a specific range."
- var/ex_range = input("Light Explosion Range:") as null|num
+ var/ex_range = tgui_input_num(src, "Light Explosion Range:")
if (isnull(ex_range))
return
var/power = (0.5 * ex_range)**(1/GLOB.DYN_EX_SCALE)
@@ -639,7 +639,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
set name = "Set DynEx Scale"
set desc = "Set the scale multiplier of dynex explosions. The default is 0.5."
- var/ex_scale = input("New DynEx Scale:") as null|num
+ var/ex_scale = tgui_input_num(src, "New DynEx Scale:")
if(!ex_scale)
return
GLOB.DYN_EX_SCALE = ex_scale
@@ -684,10 +684,10 @@ GLOBAL_PROTECT(admin_verbs_hideable)
// if(!SStrading_card_game.loaded)
// message_admins("The card subsystem is not currently loaded")
// return
-// var/pack = input("Which pack should we test?", "You fucked it didn't you") as null|anything in sortList(SStrading_card_game.card_packs)
-// var/batchCount = input("How many times should we open it?", "Don't worry, I understand") as null|num
-// var/batchSize = input("How many cards per batch?", "I hope you remember to check the validation") as null|num
-// var/guar = input("Should we use the pack's guaranteed rarity? If so, how many?", "We've all been there. Man you should have seen the old system") as null|num
+// var/pack = tgui_input_list(src, "Which pack should we test?", "You fucked it didn't you", sortList(SStrading_card_game.card_packs))
+// var/batchCount = tgui_input_num(src, "How many times should we open it?", "Don't worry, I understand")
+// var/batchSize = tgui_input_num(src, "How many cards per batch?", "I hope you remember to check the validation")
+// var/guar = tgui_input_num(src, "Should we use the pack's guaranteed rarity? If so, how many?", "We've all been there. Man you should have seen the old system")
// checkCardDistribution(pack, batchSize, batchCount, guar)
// /client/proc/print_cards()
@@ -704,7 +704,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
var/type_length = length_char("/obj/effect/proc_holder/spell") + 2
for(var/A in GLOB.spells)
spell_list[copytext_char("[A]", type_length)] = A
- var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in sortList(spell_list)
+ var/obj/effect/proc_holder/spell/S = tgui_input_list(src, "Choose the spell to give to that guy", "ABRAKADABRA", sortList(spell_list))
if(!S)
return
@@ -725,7 +725,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
set desc = "Remove a spell from the selected mob."
if(T?.mind)
- var/obj/effect/proc_holder/spell/S = input("Choose the spell to remove", "NO ABRAKADABRA") as null|anything in sortList(T.mind.spell_list)
+ var/obj/effect/proc_holder/spell/S = tgui_input_list(src, "Choose the spell to remove", "NO ABRAKADABRA", sortList(T.mind.spell_list))
if(S)
T.mind.RemoveSpell(S)
log_admin("[key_name(usr)] removed the spell [S] from [key_name(T)].")
@@ -739,7 +739,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
if(!istype(T))
to_chat(src, "You can only give a disease to a mob of type /mob/living.", confidential = TRUE)
return
- var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in sortList(SSdisease.diseases, /proc/cmp_typepaths_asc)
+ var/datum/disease/D = tgui_input_list(src, "Choose the disease to give to that guy", "ACHOO", sortList(SSdisease.diseases, /proc/cmp_typepaths_asc))
if(!D)
return
T.ForceContractDisease(new D, FALSE, TRUE)
@@ -751,7 +751,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
set category = "Admin.Events"
set name = "OSay"
set desc = "Makes an object say something."
- var/message = input(usr, "What do you want the message to be?", "Make Sound") as text | null
+ var/message = tgui_input_text(usr, "What do you want the message to be?", "Make Sound")
if(!message)
return
O.say(message)
diff --git a/code/modules/admin/antag_panel.dm b/code/modules/admin/antag_panel.dm
index 180735d746..80ec32d997 100644
--- a/code/modules/admin/antag_panel.dm
+++ b/code/modules/admin/antag_panel.dm
@@ -91,10 +91,10 @@ GLOBAL_VAR(antag_prototypes)
/datum/mind/proc/traitor_panel()
if(!SSticker.HasRoundStarted())
- alert("Not before round-start!", "Alert")
+ tgui_alert(usr, "Not before round-start!", "Alert")
return
if(QDELETED(src))
- alert("This mind doesn't have a mob, or is deleted! For some reason!", "Edit Memory")
+ tgui_alert(usr, "This mind doesn't have a mob, or is deleted! For some reason!", "Edit Memory")
return
var/out = "[name][(current && (current.real_name!=name))?" (as [current.real_name])":""] "
diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm
index 21bf732493..83d51e3049 100644
--- a/code/modules/admin/callproc/callproc.dm
+++ b/code/modules/admin/callproc/callproc.dm
@@ -12,7 +12,7 @@
var/targetselected = FALSE
var/returnval
- switch(alert("Proc owned by something?",,"Yes","No"))
+ switch(tgui_alert(usr, "Proc owned by something?",,list("Yes","No")))
if("Yes")
targetselected = TRUE
var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT, VV_MARKED_DATUM, VV_TEXT_LOCATE, VV_PROCCALL_RETVAL))
@@ -26,7 +26,7 @@
target = null
targetselected = FALSE
- var/procpath = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
+ var/procpath = tgui_input_text(src, "Proc path, eg: /proc/fake_blood","Path:", null)
if(!procpath)
return
@@ -136,7 +136,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
if(!check_rights(R_DEBUG))
return
- var/procname = input("Proc name, eg: fake_blood","Proc:", null) as text|null
+ var/procname = tgui_input_text(src, "Proc name, eg: fake_blood","Proc:", null)
if(!procname)
return
if(!hascall(A,procname))
@@ -161,14 +161,14 @@ GLOBAL_PROTECT(LastAdminCalledProc)
to_chat(usr, ., confidential = TRUE)
/client/proc/get_callproc_args()
- var/argnum = input("Number of arguments","Number:",0) as num|null
+ var/argnum = tgui_input_num(src, "Number of arguments","Number:",0)
if(isnull(argnum))
return
. = list()
var/list/named_args = list()
while(argnum--)
- var/named_arg = input("Leave blank for positional argument. Positional arguments will be considered as if they were added first.", "Named argument") as text|null
+ var/named_arg = tgui_input_text(src, "Leave blank for positional argument. Positional arguments will be considered as if they were added first.", "Named argument")
var/value = vv_get_value(restricted_classes = list(VV_RESTORE_DEFAULT))
if (!value["class"])
return
diff --git a/code/modules/admin/check_antagonists.dm b/code/modules/admin/check_antagonists.dm
index 532a11a532..8ae036703a 100644
--- a/code/modules/admin/check_antagonists.dm
+++ b/code/modules/admin/check_antagonists.dm
@@ -134,7 +134,7 @@
/datum/admins/proc/check_antagonists()
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(usr, "The game hasn't started yet!")
return
var/list/dat = list("Round Status
Round Status
")
if(SSticker.mode.replacementmode)
diff --git a/code/modules/admin/create_object.dm b/code/modules/admin/create_object.dm
index a0d7e41485..18d9cb658f 100644
--- a/code/modules/admin/create_object.dm
+++ b/code/modules/admin/create_object.dm
@@ -19,7 +19,7 @@
/obj/item, /obj/item/clothing, /obj/item/stack, /obj/item,
/obj/item/reagent_containers, /obj/item/gun)
- var/path = input("Select the path of the object you wish to create.", "Path", /obj) in create_object_forms
+ var/path = tgui_input_list(user, "Select the path of the object you wish to create.", "Path", create_object_forms)
var/html_form = create_object_forms[path]
if (!html_form)
diff --git a/code/modules/admin/create_poll.dm b/code/modules/admin/create_poll.dm
index e5391f0f43..b43d084005 100644
--- a/code/modules/admin/create_poll.dm
+++ b/code/modules/admin/create_poll.dm
@@ -6,7 +6,7 @@
if(!SSdbcore.Connect())
to_chat(src, "Failed to establish database connection.")
return
- var/polltype = input("Choose poll type.","Poll Type") as null|anything in list("Single Option","Text Reply","Rating","Multiple Choice", "Instant Runoff Voting")
+ var/polltype = tgui_input_list(src, "Choose poll type.","Poll Type", list("Single Option","Text Reply","Rating","Multiple Choice", "Instant Runoff Voting"))
var/choice_amount = 0
switch(polltype)
if("Single Option")
@@ -17,7 +17,7 @@
polltype = POLLTYPE_RATING
if("Multiple Choice")
polltype = POLLTYPE_MULTI
- choice_amount = input("How many choices should be allowed?","Select choice amount") as num|null
+ choice_amount = tgui_input_num(src, "How many choices should be allowed?","Select choice amount")
switch(choice_amount)
if(0)
to_chat(src, "Multiple choice poll must have at least one choice allowed.")
@@ -31,7 +31,7 @@
else
return 0
var/starttime = SQLtime()
- var/endtime = input("Set end time for poll as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than starting time for obvious reasons.", "Set end time", SQLtime()) as text
+ var/endtime = tgui_input_text(src, "Set end time for poll as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than starting time for obvious reasons.", "Set end time", SQLtime())
if(!endtime)
return
var/datum/db_query/query_validate_time = SSdbcore.NewQuery({"
@@ -49,7 +49,7 @@
endtime = query_validate_time.item[1]
qdel(query_validate_time)
var/adminonly
- switch(alert("Admin only poll?",,"Yes","No","Cancel"))
+ switch(tgui_alert(usr, "Admin only poll?",,list("Yes","No","Cancel")))
if("Yes")
adminonly = 1
if("No")
@@ -57,26 +57,26 @@
else
return
var/dontshow
- switch(alert("Hide poll results from tracking until completed?",,"Yes","No","Cancel"))
+ switch(tgui_alert(usr, "Hide poll results from tracking until completed?",,list("Yes","No","Cancel")))
if("Yes")
dontshow = 1
if("No")
dontshow = 0
else
return
- var/question = input("Write your question","Question") as message|null
+ var/question = tgui_input_message(src, "Write your question","Question")
if(!question)
return
var/list/sql_option_list = list()
if(polltype != POLLTYPE_TEXT)
var/add_option = 1
while(add_option)
- var/option = input("Write your option","Option") as message|null
+ var/option = tgui_input_message(src, "Write your option","Option")
if(!option)
return
var/default_percentage_calc = 0
if(polltype != POLLTYPE_IRV)
- switch(alert("Should this option be included by default when poll result percentages are generated?",,"Yes","No","Cancel"))
+ switch(tgui_alert(usr, "Should this option be included by default when poll result percentages are generated?",,list("Yes","No","Cancel")))
if("Yes")
default_percentage_calc = 1
if("No")
@@ -89,29 +89,29 @@
var/descmid = ""
var/descmax = ""
if(polltype == POLLTYPE_RATING)
- minval = input("Set minimum rating value.","Minimum rating") as num|null
+ minval = tgui_input_num(src, "Set minimum rating value.","Minimum rating")
if(minval == null)
return
- maxval = input("Set maximum rating value.","Maximum rating") as num|null
+ maxval = tgui_input_num(src, "Set maximum rating value.","Maximum rating")
if(minval >= maxval)
to_chat(src, "Maximum rating value can't be less than or equal to minimum rating value")
continue
if(maxval == null)
return
- descmin = input("Optional: Set description for minimum rating","Minimum rating description") as message|null
+ descmin = tgui_input_message(src, "Optional: Set description for minimum rating","Minimum rating description")
if(descmin == null)
return
- descmid = input("Optional: Set description for median rating","Median rating description") as message|null
+ descmid = tgui_input_message(src, "Optional: Set description for median rating","Median rating description")
if(descmid == null)
return
- descmax = input("Optional: Set description for maximum rating","Maximum rating description") as message|null
+ descmax = tgui_input_message(src, "Optional: Set description for maximum rating","Maximum rating description")
if(descmax == null)
return
sql_option_list += list(list(
"text" = option, "minval" = minval, "maxval" = maxval,
"descmin" = descmin, "descmid" = descmid, "descmax" = descmax,
"default_percentage_calc" = default_percentage_calc))
- switch(alert(" ",,"Add option","Finish", "Cancel"))
+ switch(tgui_alert(usr, " ",,list("Add option","Finish", "Cancel")))
if("Add option")
add_option = 1
if("Finish")
diff --git a/code/modules/admin/fun_balloon.dm b/code/modules/admin/fun_balloon.dm
index 417663fcb7..f11b193680 100644
--- a/code/modules/admin/fun_balloon.dm
+++ b/code/modules/admin/fun_balloon.dm
@@ -35,7 +35,7 @@
/obj/effect/fun_balloon/attack_ghost(mob/user)
if(!user.client || !user.client.holder || popped)
return
- var/confirmation = alert("Pop [src]?","Fun Balloon","Yes","No")
+ var/confirmation = tgui_alert(user, "Pop [src]?","Fun Balloon",list("Yes","No"))
if(confirmation == "Yes" && !popped)
popped = TRUE
effect()
diff --git a/code/modules/admin/outfit_editor.dm b/code/modules/admin/outfit_editor.dm
index 9a99d8b20e..e50f1bec4c 100644
--- a/code/modules/admin/outfit_editor.dm
+++ b/code/modules/admin/outfit_editor.dm
@@ -117,11 +117,11 @@
if(!choice)
return
if(!ispath(choice))
- alert(owner, "Invalid item", OUTFIT_EDITOR_NAME, "oh no")
+ tgui_alert(owner, "Invalid item", OUTFIT_EDITOR_NAME, "oh no")
return
if(initial(choice.icon_state) == null) //hacky check copied from experimentor code
var/msg = "Warning: This item's icon_state is null, indicating it is very probably not actually a usable item."
- if(alert(owner, msg, OUTFIT_EDITOR_NAME, "Use it anyway", "Cancel") != "Use it anyway")
+ if(tgui_alert(owner, msg, OUTFIT_EDITOR_NAME, list("Use it anyway", "Cancel")) != "Use it anyway")
return
if(drip.vars.Find(slot))
diff --git a/code/modules/admin/permissionedit.dm b/code/modules/admin/permissionedit.dm
index 9f5dc00a48..4676d50df4 100644
--- a/code/modules/admin/permissionedit.dm
+++ b/code/modules/admin/permissionedit.dm
@@ -165,7 +165,7 @@
to_chat(usr, "Unable to connect to database, changes are temporary only.", confidential = TRUE)
use_db = FALSE
else
- use_db = alert("Permanent changes are saved to the database for future rounds, temporary changes will affect only the current round", "Permanent or Temporary?", "Permanent", "Temporary", "Cancel")
+ use_db = tgui_alert(usr, "Permanent changes are saved to the database for future rounds, temporary changes will affect only the current round", "Permanent or Temporary?", list("Permanent", "Temporary", "Cancel"))
if(use_db == "Cancel")
return
if(use_db == "Permanent")
@@ -208,7 +208,7 @@
if(admin_ckey)
. = admin_ckey
else
- admin_key = input("New admin's key","Admin key") as text|null
+ admin_key = tgui_input_text(usr, "New admin's key","Admin key")
. = ckey(admin_key)
if(!.)
return FALSE
@@ -247,7 +247,7 @@
qdel(query_add_admin_log)
/datum/admins/proc/remove_admin(admin_ckey, admin_key, use_db, datum/admins/D)
- if(alert("Are you sure you want to remove [admin_ckey]?","Confirm Removal","Do it","Cancel") == "Do it")
+ if(tgui_alert(usr, "Are you sure you want to remove [admin_ckey]?","Confirm Removal",list("Do it","Cancel")) == "Do it")
GLOB.admin_datums -= admin_ckey
GLOB.deadmins -= admin_ckey
if(D)
@@ -305,9 +305,9 @@
for(R in GLOB.admin_ranks)
if((R.rights & usr.client.holder.rank.can_edit_rights) == R.rights)
rank_names[R.name] = R
- var/new_rank = input("Please select a rank", "New rank") as null|anything in rank_names
+ var/new_rank = tgui_input_list(usr, "Please select a rank", "New rank", rank_names)
if(new_rank == "*New Rank*")
- new_rank = input("Please input a new rank", "New custom rank") as text|null
+ new_rank = tgui_input_text(usr, "Please input a new rank", "New custom rank")
if(!new_rank)
return
R = rank_names[new_rank]
@@ -492,7 +492,7 @@
to_chat(usr, "Error: Rank deletion attempted while rank still used; Tell a coder, this shouldn't happen.", confidential = TRUE)
return
qdel(query_admins_with_rank)
- if(alert("Are you sure you want to remove [admin_rank]?","Confirm Removal","Do it","Cancel") == "Do it")
+ if(tgui_alert(usr, "Are you sure you want to remove [admin_rank]?","Confirm Removal",list("Do it","Cancel")) == "Do it")
var/m1 = "[key_name_admin(usr)] removed rank [admin_rank] permanently"
var/m2 = "[key_name(usr)] removed rank [admin_rank] permanently"
var/datum/db_query/query_add_rank = SSdbcore.NewQuery(
diff --git a/code/modules/admin/sound_emitter.dm b/code/modules/admin/sound_emitter.dm
index ad9c995aa1..b8ea8d0c0e 100644
--- a/code/modules/admin/sound_emitter.dm
+++ b/code/modules/admin/sound_emitter.dm
@@ -90,7 +90,7 @@
sound_file = new_file
to_chat(user, "New sound file set to [sound_file].", confidential = TRUE)
if(href_list["edit_volume"])
- var/new_volume = input(user, "Choose a volume.", "Sound Emitter", sound_volume) as null|num
+ var/new_volume = tgui_input_num(user, "Choose a volume.", "Sound Emitter", sound_volume)
if(isnull(new_volume))
return
new_volume = clamp(new_volume, 0, 100)
@@ -99,7 +99,7 @@
if(href_list["edit_mode"])
var/new_mode
var/mode_list = list("Local (normal sound)" = SOUND_EMITTER_LOCAL, "Direct (not affected by environment/location)" = SOUND_EMITTER_DIRECT)
- new_mode = input(user, "Choose a new mode.", "Sound Emitter") as null|anything in mode_list
+ new_mode = tgui_input_list(user, "Choose a new mode.", "Sound Emitter", mode_list)
if(!new_mode)
return
motus_operandi = mode_list[new_mode]
@@ -107,13 +107,13 @@
if(href_list["edit_range"])
var/new_range
var/range_list = list("Radius (all mobs within a radius)" = SOUND_EMITTER_RADIUS, "Z-Level (all mobs on the same z)" = SOUND_EMITTER_ZLEVEL, "Global (all players)" = SOUND_EMITTER_GLOBAL)
- new_range = input(user, "Choose a new range.", "Sound Emitter") as null|anything in range_list
+ new_range = tgui_input_list(user, "Choose a new range.", "Sound Emitter", range_list)
if(!new_range)
return
emitter_range = range_list[new_range]
to_chat(user, "Range set to [emitter_range].", confidential = TRUE)
if(href_list["edit_radius"])
- var/new_radius = input(user, "Choose a radius.", "Sound Emitter", sound_volume) as null|num
+ var/new_radius = tgui_input_num(user, "Choose a radius.", "Sound Emitter", sound_volume)
if(isnull(new_radius))
return
new_radius = clamp(new_radius, 0, 127)
diff --git a/code/modules/admin/sql_message_system.dm b/code/modules/admin/sql_message_system.dm
index 3ba309bc24..a02df755c9 100644
--- a/code/modules/admin/sql_message_system.dm
+++ b/code/modules/admin/sql_message_system.dm
@@ -6,7 +6,7 @@
return
var/target_ckey = ckey(target_key)
if(!target_key && (type == "note" || type == "message" || type == "watchlist entry"))
- var/new_key = input(usr,"Who would you like to create a [type] for?","Enter a key or ckey",null) as null|text
+ var/new_key = tgui_input_text(usr,"Who would you like to create a [type] for?","Enter a key or ckey",null)
if(!new_key)
return
var/new_ckey = ckey(new_key)
@@ -18,7 +18,7 @@
qdel(query_find_ckey)
return
if(!query_find_ckey.NextRow())
- if(alert(usr, "[new_key]/([new_ckey]) has not been seen before, are you sure you want to create a [type] for them?", "Unknown ckey", "Yes", "No", "Cancel") != "Yes")
+ if(tgui_alert(usr, "[new_key]/([new_ckey]) has not been seen before, are you sure you want to create a [type] for them?", "Unknown ckey", list("Yes", "No", "Cancel")) != "Yes")
qdel(query_find_ckey)
return
qdel(query_find_ckey)
@@ -35,7 +35,7 @@
if(!target_ckey)
target_ckey = admin_ckey
if(!text)
- text = input(usr,"Write your [type]","Create [type]") as null|message
+ text = tgui_input_message(usr,"Write your [type]","Create [type]")
if(!text)
return
if(!timestamp)
@@ -45,7 +45,7 @@
if (ssqlname)
server = ssqlname
if(isnull(secret))
- switch(alert("Hide note from being viewed by players?", "Secret note?","Yes","No","Cancel"))
+ switch(tgui_alert(usr, "Hide note from being viewed by players?", "Secret note?",list("Yes","No","Cancel")))
if("Yes")
secret = 1
if("No")
@@ -53,8 +53,8 @@
else
return
if(isnull(expiry))
- if(alert(usr, "Set an expiry time? Expired messages are hidden like deleted ones.", "Expiry time?", "Yes", "No", "Cancel") == "Yes")
- var/expire_time = input("Set expiry time for [type] as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than current time for obvious reasons.", "Set expiry time", SQLtime()) as null|text
+ if(tgui_alert(usr, "Set an expiry time? Expired messages are hidden like deleted ones.", "Expiry time?", list("Yes", "No", "Cancel")) == "Yes")
+ var/expire_time = tgui_input_text(usr, "Set expiry time for [type] as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than current time for obvious reasons.", "Set expiry time", SQLtime())
if(!expire_time)
return
var/datum/db_query/query_validate_expire_time = SSdbcore.NewQuery(
@@ -73,7 +73,7 @@
expiry = query_validate_expire_time.item[1]
qdel(query_validate_expire_time)
if(type == "note" && isnull(note_severity))
- note_severity = input("Set the severity of the note.", "Severity", null, null) as null|anything in list("High", "Medium", "Minor", "None")
+ note_severity = tgui_input_list(usr, "Set the severity of the note.", "Severity", list("High", "Medium", "Minor", "None"))
if(!note_severity)
return
var/datum/db_query/query_create_message = SSdbcore.NewQuery({"
@@ -180,7 +180,7 @@
var/target_key = query_find_edit_message.item[2]
var/admin_key = query_find_edit_message.item[3]
var/old_text = query_find_edit_message.item[4]
- var/new_text = input("Input new [type]", "New [type]", "[old_text]") as null|message
+ var/new_text = tgui_input_message(usr, "Input new [type]", "New [type]", "[old_text]")
if(!new_text)
qdel(query_find_edit_message)
return
@@ -231,7 +231,7 @@
var/admin_key = query_find_edit_expiry_message.item[3]
var/old_expiry = query_find_edit_expiry_message.item[4]
var/new_expiry
- var/expire_time = input("Set expiry time for [type] as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than current time for obvious reasons. Enter -1 to remove expiry time.", "Set expiry time", old_expiry) as null|text
+ var/expire_time = tgui_input_text(usr, "Set expiry time for [type] as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than current time for obvious reasons. Enter -1 to remove expiry time.", "Set expiry time", old_expiry)
if(!expire_time)
qdel(query_find_edit_expiry_message)
return
@@ -303,7 +303,7 @@
old_severity = "NA"
var/editor_key = usr.key
var/editor_ckey = usr.ckey
- var/new_severity = input("Set the severity of the note.", "Severity", null, null) as null|anything in list("high", "medium", "minor", "none") //lowercase for edit log consistency
+ var/new_severity = tgui_input_list(usr, "Set the severity of the note.", "Severity", list("high", "medium", "minor", "none")) //lowercase for edit log consistency
if(!new_severity)
qdel(query_find_edit_note_severity)
return
diff --git a/code/modules/admin/stickyban.dm b/code/modules/admin/stickyban.dm
index 57487f3144..4906f9a97a 100644
--- a/code/modules/admin/stickyban.dm
+++ b/code/modules/admin/stickyban.dm
@@ -14,7 +14,7 @@
if (data["ckey"])
ckey = ckey(data["ckey"])
else
- ckey = input(usr,"Ckey","Ckey","") as text|null
+ ckey = tgui_input_text(usr,"Ckey","Ckey","")
if (!ckey)
return
ckey = ckey(ckey)
@@ -27,7 +27,7 @@
if (data["reason"])
ban["message"] = data["reason"]
else
- var/reason = input(usr,"Reason","Reason","Ban Evasion") as text|null
+ var/reason = tgui_input_text(usr,"Reason","Reason","Ban Evasion")
if (!reason)
return
ban["message"] = "[reason]"
@@ -61,7 +61,7 @@
if (!ban)
to_chat(usr, "Error: No sticky ban for [ckey] found!", confidential = TRUE)
return
- if (alert("Are you sure you want to remove the sticky ban on [ckey]?","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr, "Are you sure you want to remove the sticky ban on [ckey]?","Are you sure",list("Yes","No")) == "No")
return
if (!get_stickyban_from_ckey(ckey))
to_chat(usr, "Error: The ban disappeared.", confidential = TRUE)
@@ -98,7 +98,7 @@
to_chat(usr, "Error: [alt] is not linked to [ckey]'s sticky ban!", confidential = TRUE)
return
- if (alert("Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them, Use \[E] to exempt them","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr, "Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them, Use \[E] to exempt them","Are you sure",list("Yes","No")) == "No")
return
//we have to do this again incase something changes
@@ -138,7 +138,7 @@
to_chat(usr, "Error: No sticky ban for [ckey] found!", confidential = TRUE)
return
var/oldreason = ban["message"]
- var/reason = input(usr,"Reason","Reason","[ban["message"]]") as text|null
+ var/reason = tgui_input_text(usr,"Reason","Reason","[ban["message"]]")
if (!reason || reason == oldreason)
return
//we have to do this again incase something changed while we waited for input
@@ -180,7 +180,7 @@
to_chat(usr, "Error: [alt] is not linked to [ckey]'s sticky ban!", confidential = TRUE)
return
- if (alert("Are you sure you want to exempt [alt] from [ckey]'s sticky ban?","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr, "Are you sure you want to exempt [alt] from [ckey]'s sticky ban?","Are you sure",list("Yes","No")) == "No")
return
//we have to do this again incase something changes
@@ -230,7 +230,7 @@
to_chat(usr, "Error: [alt] is not exempt from [ckey]'s sticky ban!", confidential = TRUE)
return
- if (alert("Are you sure you want to unexempt [alt] from [ckey]'s sticky ban?","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr, "Are you sure you want to unexempt [alt] from [ckey]'s sticky ban?","Are you sure",list("Yes","No")) == "No")
return
//we have to do this again incase something changes
@@ -272,7 +272,7 @@
var/ckey = data["ckey"]
- if (alert("Are you sure you want to put [ckey]'s stickyban on timeout until next round (or removed)?","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr, "Are you sure you want to put [ckey]'s stickyban on timeout until next round (or removed)?","Are you sure",list("Yes","No")) == "No")
return
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
@@ -298,7 +298,7 @@
return
var/ckey = data["ckey"]
- if (alert("Are you sure you want to lift the timeout on [ckey]'s stickyban?","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr, "Are you sure you want to lift the timeout on [ckey]'s stickyban?","Are you sure",list("Yes","No")) == "No")
return
var/ban = get_stickyban_from_ckey(ckey)
@@ -323,7 +323,7 @@
if (!data["ckey"])
return
var/ckey = data["ckey"]
- if (alert("Are you sure you want to revert the sticky ban on [ckey] to its state at round start (or last edit)?","Are you sure","Yes","No") == "No")
+ if (tgui_alert(usr, "Are you sure you want to revert the sticky ban on [ckey] to its state at round start (or last edit)?","Are you sure",list("Yes","No")) == "No")
return
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index d6a704d872..d9435e1def 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -130,7 +130,7 @@
message_admins("[key_name_admin(usr)] tried to create a death squad. Unfortunately, there were not enough candidates available.")
log_admin("[key_name(usr)] failed to create a death squad.")
if("blob")
- var/strength = input("Set Blob Resource Gain Rate","Set Resource Rate",1) as num|null
+ var/strength = tgui_input_num(usr, "Set Blob Resource Gain Rate","Set Resource Rate",1)
if(!strength)
return
message_admins("[key_name(usr)] spawned a blob with base resource gain [strength].")
@@ -176,7 +176,7 @@
var/datum/round_event/event = E.runEvent()
if(event.announceWhen>0)
event.processing = FALSE
- var/prompt = alert(usr, "Would you like to alert the crew?", "Alert", "Yes", "No", "Cancel")
+ var/prompt = tgui_alert(usr, "Would you like to alert the crew?", "Alert", list("Yes", "No", "Cancel"))
switch(prompt)
if("Cancel")
event.kill()
@@ -331,7 +331,7 @@
if(!check_rights(R_SERVER))
return
- var/timer = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", SSshuttle.emergency.timeLeft() ) as num|null
+ var/timer = tgui_input_num(usr, "Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", SSshuttle.emergency.timeLeft())
if(!timer)
return
SSshuttle.emergency.setTimer(timer*10)
@@ -374,7 +374,7 @@
if(!check_rights(R_ADMIN))
return
- var/timer = input("Enter new maximum time",, CONFIG_GET(number/midround_antag_time_check)) as num|null
+ var/timer = tgui_input_num(usr, "Enter new maximum time",, CONFIG_GET(number/midround_antag_time_check))
if(!timer)
return
CONFIG_SET(number/midround_antag_time_check, timer)
@@ -385,7 +385,7 @@
if(!check_rights(R_ADMIN))
return
- var/ratio = input("Enter new life ratio",, CONFIG_GET(number/midround_antag_life_check) * 100) as num
+ var/ratio = tgui_input_num(usr, "Enter new life ratio",, CONFIG_GET(number/midround_antag_life_check) * 100)
if(!ratio)
return
CONFIG_SET(number/midround_antag_life_check, ratio / 100)
@@ -409,7 +409,7 @@
if(!check_rights(R_SERVER))
return
if(!SSticker.delay_end)
- SSticker.admin_delay_notice = input(usr, "Enter a reason for delaying the round end", "Round Delay Reason") as null|text
+ SSticker.admin_delay_notice = tgui_input_text(usr, "Enter a reason for delaying the round end", "Round Delay Reason")
if(isnull(SSticker.admin_delay_notice))
return
else
@@ -428,8 +428,8 @@
return
message_admins("[key_name_admin(usr)] is considering ending the round.")
- if(alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", "Yes", "No") == "Yes")
- if(alert(usr, "Final Confirmation: End the round NOW?", "Confirmation", "Yes", "No") == "Yes")
+ if(tgui_alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", list("Yes", "No")) == "Yes")
+ if(tgui_alert(usr, "Final Confirmation: End the round NOW?", "Confirmation", list("Yes", "No")) == "Yes")
message_admins("[key_name_admin(usr)] has ended the round.")
SSticker.force_ending = 1 //Yeah there we go APC destroyed mission accomplished
return
@@ -448,7 +448,7 @@
return
var/delmob = 0
- switch(alert("Delete old mob?","Message","Yes","No","Cancel"))
+ switch(tgui_alert(usr, "Delete old mob?","Message",list("Yes","No","Cancel")))
if("Cancel")
return
if("Yes")
@@ -518,11 +518,11 @@
var/banfolder = href_list["unbanf"]
GLOB.Banlist.cd = "/base/[banfolder]"
var/key = GLOB.Banlist["key"]
- if(alert(usr, "Are you sure you want to unban [key]?", "Confirmation", "Yes", "No") == "Yes")
+ if(tgui_alert(usr, "Are you sure you want to unban [key]?", "Confirmation", list("Yes", "No")) == "Yes")
if(RemoveBan(banfolder))
unbanpanel()
else
- alert(usr, "This ban has already been lifted / does not exist.", "Error", "Ok")
+ tgui_alert(usr, "This ban has already been lifted / does not exist.", "Error", list("Ok"))
unbanpanel()
else if(href_list["unbane"])
@@ -544,25 +544,25 @@
var/duration
- switch(alert("Temporary Ban for [banned_key]?",,"Yes","No"))
+ switch(tgui_alert(usr, "Temporary Ban for [banned_key]?",,list("Yes","No")))
if("Yes")
temp = 1
var/mins = 0
if(minutes > GLOB.CMinutes)
mins = minutes - GLOB.CMinutes
- mins = input(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440) as num|null
+ mins = tgui_input_num(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440)
if(mins <= 0)
to_chat(usr, "[mins] is not a valid duration.")
return
minutes = GLOB.CMinutes + mins
duration = GetExp(minutes)
- reason = input(usr,"Please State Reason For Banning [banned_key].","Reason",reason2) as message|null
+ reason = tgui_input_message(usr,"Please State Reason For Banning [banned_key].","Reason",reason2)
if(!reason)
return
if("No")
temp = 0
duration = "Perma"
- reason = input(usr,"Please State Reason For Banning [banned_key].","Reason",reason2) as message|null
+ reason = tgui_input_message(usr,"Please State Reason For Banning [banned_key].","Reason",reason2)
if(!reason)
return
@@ -592,7 +592,7 @@
if(jobban_isbanned(M, "appearance"))
- switch(alert("Remove appearance ban?","Please Confirm","Yes","No"))
+ switch(tgui_alert(usr, "Remove appearance ban?","Please Confirm",list("Yes","No")))
if("Yes")
ban_unban_log_save("[key_name(usr)] removed [key_name(M)]'s appearance ban.")
log_admin_private("[key_name(usr)] removed [key_name(M)]'s appearance ban.")
@@ -602,12 +602,12 @@
message_admins("[key_name_admin(usr)] removed [key_name_admin(M)]'s appearance ban.")
to_chat(M, "[usr.client.key] has removed your appearance ban.")
- else switch(alert("Appearance ban [M.key]?",,"Yes","No", "Cancel"))
+ else switch(tgui_alert(usr, "Appearance ban [M.key]?",,list("Yes","No", "Cancel")))
if("Yes")
- var/reason = input(usr,"Please State Reason.","Reason") as message|null
+ var/reason = tgui_input_message(usr,"Please State Reason.","Reason")
if(!reason)
return
- var/severity = input("Set the severity of the note/ban.", "Severity", null, null) as null|anything in list("High", "Medium", "Minor", "None")
+ var/severity = tgui_input_list(usr, "Set the severity of the note/ban.", "Severity", list("High", "Medium", "Minor", "None"))
if(!severity)
return
if(!DB_ban_record(BANTYPE_JOB_PERMA, M, -1, reason, "appearance"))
@@ -1025,16 +1025,16 @@
//Banning comes first
if(notbannedlist.len) //at least 1 unbanned job exists in joblist so we have stuff to ban.
var/severity = null
- switch(alert("Temporary Ban for [M.key]?",,"Yes","No", "Cancel"))
+ switch(tgui_alert(usr, "Temporary Ban for [M.key]?",,list("Yes","No", "Cancel")))
if("Yes")
- var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
+ var/mins = tgui_input_num(usr,"How long (in minutes)?","Ban time",1440)
if(mins <= 0)
to_chat(usr, "[mins] is not a valid duration.")
return
- var/reason = input(usr,"Please State Reason For Banning [M.key].","Reason") as message|null
+ var/reason = tgui_input_message(usr,"Please State Reason For Banning [M.key].","Reason")
if(!reason)
return
- severity = input("Set the severity of the note/ban.", "Severity", null, null) as null|anything in list("High", "Medium", "Minor", "None")
+ severity = tgui_input_list(usr, "Set the severity of the note/ban.", "Severity", list("High", "Medium", "Minor", "None"))
if(!severity)
return
var/msg
@@ -1058,8 +1058,8 @@
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
if("No")
- var/reason = input(usr,"Please State Reason For Banning [M.key].","Reason") as message|null
- severity = input("Set the severity of the note/ban.", "Severity", null, null) as null|anything in list("High", "Medium", "Minor", "None")
+ var/reason = tgui_input_message(usr,"Please State Reason For Banning [M.key].","Reason")
+ severity = tgui_input_list(usr, "Set the severity of the note/ban.", "Severity", list("High", "Medium", "Minor", "None"))
if(!severity)
return
if(reason)
@@ -1094,7 +1094,7 @@
var/reason = jobban_isbanned(M, job)
if(!reason)
continue //skip if it isn't jobbanned anyway
- switch(alert("Job: '[job]' Reason: '[reason]' Un-jobban?","Please Confirm","Yes","No"))
+ switch(tgui_alert(usr, "Job: '[job]' Reason: '[reason]' Un-jobban?","Please Confirm",list("Yes","No")))
if("Yes")
ban_unban_log_save("[key_name(usr)] unjobbanned [key_name(M)] from [job]")
log_admin_private("[key_name(usr)] unbanned [key_name(M)] from [job]")
@@ -1122,7 +1122,7 @@
if(!check_if_greater_rights_than(M.client))
to_chat(usr, "Error: They have more rights than you do.")
return
- if(alert(usr, "Kick [key_name(M)]?", "Confirm", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Kick [key_name(M)]?", "Confirm", list("Yes", "No")) != "Yes")
return
if(!M)
to_chat(usr, "Error: [M] no longer exists!")
@@ -1176,7 +1176,7 @@
else if(href_list["deletemessage"])
if(!check_rights(R_ADMIN))
return
- var/safety = alert("Delete message/note?",,"Yes","No");
+ var/safety = tgui_alert(usr, "Delete message/note?",,list("Yes","No"));
if (safety == "Yes")
var/message_id = href_list["deletemessage"]
delete_message(message_id)
@@ -1184,7 +1184,7 @@
else if(href_list["deletemessageempty"])
if(!check_rights(R_ADMIN))
return
- var/safety = alert("Delete message/note?",,"Yes","No");
+ var/safety = tgui_alert(usr, "Delete message/note?",,list("Yes","No"));
if (safety == "Yes")
var/message_id = href_list["deletemessageempty"]
delete_message(message_id, browse = TRUE)
@@ -1301,13 +1301,13 @@
if(M.client && M.client.holder)
return //admins cannot be banned. Even if they could, the ban doesn't affect them anyway
- switch(alert("Temporary Ban for [M.key]?",,"Yes","No", "Cancel"))
+ switch(tgui_alert(usr, "Temporary Ban for [M.key]?",,list("Yes","No", "Cancel")))
if("Yes")
- var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
+ var/mins = tgui_input_num(usr,"How long (in minutes)?","Ban time",1440)
if(mins <= 0)
to_chat(usr, "[mins] is not a valid duration.")
return
- var/reason = input(usr,"Please State Reason For Banning [M.key].","Reason") as message|null
+ var/reason = tgui_input_message(usr,"Please State Reason For Banning [M.key].","Reason")
if(!reason)
return
if(!DB_ban_record(BANTYPE_TEMP, M, mins, reason))
@@ -1330,10 +1330,10 @@
AH.Resolve()
qdel(M.client)
if("No")
- var/reason = input(usr,"Please State Reason For Banning [M.key].","Reason") as message|null
+ var/reason = tgui_input_message(usr,"Please State Reason For Banning [M.key].","Reason")
if(!reason)
return
- switch(alert(usr,"IP ban?",,"Yes","No","Cancel"))
+ switch(tgui_alert(usr,"IP ban?",,list("Yes","No","Cancel")))
if("Cancel")
return
if("Yes")
@@ -1381,7 +1381,7 @@
for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart))
var/datum/dynamic_ruleset/roundstart/newrule = new rule()
roundstart_rules[newrule.name] = newrule
- var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in sortList(roundstart_rules)
+ var/added_rule = tgui_input_list(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", sortList(roundstart_rules))
if (added_rule)
GLOB.dynamic_forced_roundstart_ruleset += roundstart_rules[added_rule]
log_admin("[key_name(usr)] set [added_rule] to be a forced roundstart ruleset.")
@@ -1434,7 +1434,7 @@
if(!check_rights(R_ADMIN))
return
- GLOB.dynamic_stacking_limit = input(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) as num
+ GLOB.dynamic_stacking_limit = tgui_input_num(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null)
log_admin("[key_name(usr)] set 'stacking_limit' to [GLOB.dynamic_stacking_limit].")
message_admins("[key_name(usr)] set 'stacking_limit' to [GLOB.dynamic_stacking_limit].")
dynamic_mode_options(usr)
@@ -1446,7 +1446,7 @@
if(SSticker?.mode)
return tgui_alert(usr, "The game has already started.")
- var/new_value = input(usr, "Enter the forced threat level for dynamic mode.", "Forced threat level") as num
+ var/new_value = tgui_input_num(usr, "Enter the forced threat level for dynamic mode.", "Forced threat level")
if (new_value > 100)
return tgui_alert(usr, "The value must be be under 100.")
GLOB.dynamic_forced_threat_level = new_value
@@ -1460,7 +1460,7 @@
return
if (SSticker.HasRoundStarted())
- return alert(usr, "The game has already started.", null, null, null, null)
+ return tgui_alert(usr, "The game has already started.", null, null, null, null)
GLOB.master_mode = href_list["c_mode2"]
log_admin("[key_name(usr)] set the mode as [GLOB.master_mode].")
message_admins("[key_name_admin(usr)] set the mode as [GLOB.master_mode].")
@@ -1474,9 +1474,9 @@
return
if(SSticker.HasRoundStarted())
- return alert(usr, "The game has already started.", null, null, null, null)
+ return tgui_alert(usr, "The game has already started.", null, null, null, null)
if(GLOB.master_mode != "secret")
- return alert(usr, "The game mode has to be secret!", null, null, null, null)
+ return tgui_alert(usr, "The game mode has to be secret!", null, null, null, null)
GLOB.secret_force_mode = href_list["f_secret2"]
log_admin("[key_name(usr)] set the forced secret mode as [GLOB.secret_force_mode].")
message_admins("[key_name_admin(usr)] set the forced secret mode as [GLOB.secret_force_mode].")
@@ -1531,7 +1531,7 @@
if(!ismob(M))
to_chat(usr, "this can only be used on instances of type /mob.")
- var/speech = input("What will [key_name(M)] say?", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
+ var/speech = tgui_input_text(usr, "What will [key_name(M)] say?", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
if(!speech)
return
M.say(speech, forced = "admin speech")
@@ -1560,7 +1560,7 @@
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai.")
return
- if(alert(usr, "Send [key_name(M)] to Prison?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Send [key_name(M)] to Prison?", "Message", list("Yes", "No")) != "Yes")
return
M.forceMove(pick(GLOB.prisonwarp))
@@ -1583,7 +1583,7 @@
to_chat(usr, "[M] doesn't seem to have an active client.")
return
- if(alert(usr, "Send [key_name(M)] back to Lobby?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Send [key_name(M)] back to Lobby?", "Message", list("Yes", "No")) != "Yes")
return
log_admin("[key_name(usr)] has sent [key_name(M)] back to the Lobby, removing their respawn restrictions if they existed.")
@@ -1600,7 +1600,7 @@
if(!check_rights(R_FUN))
return
- if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
return
var/mob/M = locate(href_list["tdome1"])
@@ -1627,7 +1627,7 @@
if(!check_rights(R_FUN))
return
- if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
return
var/mob/M = locate(href_list["tdome2"])
@@ -1654,7 +1654,7 @@
if(!check_rights(R_FUN))
return
- if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
return
var/mob/M = locate(href_list["tdomeadmin"])
@@ -1678,7 +1678,7 @@
if(!check_rights(R_FUN))
return
- if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
return
var/mob/M = locate(href_list["tdomeobserve"])
@@ -1917,7 +1917,7 @@
for(var/datum/job/job in SSjob.occupations)
if(job.title == Add)
var/newtime = null
- newtime = input(usr, "How many jebs do you want?", "Add wanted posters", "[newtime]") as num|null
+ newtime = tgui_input_num(usr, "How many jebs do you want?", "Add wanted posters", "[newtime]")
if(!newtime)
to_chat(src.owner, "Setting to amount of positions filled for the job")
job.total_positions = job.current_positions
@@ -2049,7 +2049,7 @@
if(!check_rights(R_ADMIN))
return
- if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
+ if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
return
var/mob/M = locate(href_list["getmob"])
usr.client.Getmob(M)
@@ -2101,7 +2101,7 @@
return
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(usr, "The game hasn't started yet!")
return
var/mob/M = locate(href_list["traitor"])
@@ -2182,10 +2182,10 @@
paths += path
if(!paths)
- alert("The path list you sent is empty.")
+ tgui_alert(usr, "The path list you sent is empty.")
return
if(length(paths) > 5)
- alert("Select fewer object types, (max 5).")
+ tgui_alert(usr, "Select fewer object types, (max 5).")
return
var/list/offset = splittext(href_list["offset"],",")
@@ -2310,7 +2310,7 @@
if(src.admincaster_feed_channel.channel_name == "" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]" || check )
src.admincaster_screen=7
else
- var/choice = alert("Please confirm Feed channel creation.","Network Channel Handler","Confirm","Cancel")
+ var/choice = tgui_alert(usr, "Please confirm Feed channel creation.","Network Channel Handler",list("Confirm","Cancel"))
if(choice=="Confirm")
GLOB.news_network.CreateFeedChannel(src.admincaster_feed_channel.channel_name, src.admin_signature, src.admincaster_feed_channel.locked, 1)
SSblackbox.record_feedback("tally", "newscaster_channels", 1, src.admincaster_feed_channel.channel_name)
@@ -2324,7 +2324,7 @@
var/list/available_channels = list()
for(var/datum/news/feed_channel/F in GLOB.news_network.network_channels)
available_channels += F.channel_name
- src.admincaster_feed_channel.channel_name = adminscrub(input(usr, "Choose receiving Feed Channel.", "Network Channel Handler") in available_channels )
+ src.admincaster_feed_channel.channel_name = adminscrub(tgui_input_list(usr, "Choose receiving Feed Channel.", "Network Channel Handler", available_channels))
src.access_news_network()
else if(href_list["ac_set_new_message"])
@@ -2405,7 +2405,7 @@
if(src.admincaster_wanted_message.criminal == "" || src.admincaster_wanted_message.body == "")
src.admincaster_screen = 16
else
- var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel")
+ var/choice = tgui_alert(usr, "Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler",list("Confirm","Cancel"))
if(choice=="Confirm")
if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one. See the else below
GLOB.news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature, null, 1, 1)
@@ -2419,7 +2419,7 @@
else if(href_list["ac_cancel_wanted"])
if(!check_rights(R_ADMIN))
return
- var/choice = alert("Please confirm Wanted Issue removal.","Network Security Handler","Confirm","Cancel")
+ var/choice = tgui_alert(usr, "Please confirm Wanted Issue removal.","Network Security Handler",list("Confirm","Cancel"))
if(choice=="Confirm")
GLOB.news_network.deleteWanted()
src.admincaster_screen=17
@@ -2504,7 +2504,7 @@
else if(href_list["ac_set_signature"])
if(!check_rights(R_ADMIN))
return
- src.admin_signature = adminscrub(input(usr, "Provide your desired signature.", "Network Identity Handler", ""))
+ src.admin_signature = adminscrub(tgui_input_text(usr, "Provide your desired signature.", "Network Identity Handler", ""))
src.access_news_network()
else if(href_list["ac_del_comment"])
@@ -2533,7 +2533,7 @@
return
if(SSticker.IsRoundInProgress())
var/afkonly = text2num(href_list["afkonly"])
- if(alert("Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message","Yes","Cancel") != "Yes")
+ if(tgui_alert(usr, "Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message",list("Yes","Cancel")) != "Yes")
to_chat(usr, "Kick clients from lobby aborted")
return
var/list/listkicked = kick_clients_in_lobby("You were kicked from the lobby by [usr.client.holder.fakekey ? "an Administrator" : "[usr.client.key]"].", afkonly)
@@ -2586,16 +2586,16 @@
if(!check_rights(R_ADMIN))
return
var/list/type_choices = typesof(/datum/station_goal)
- var/picked = input("Choose goal type") in type_choices|null
+ var/picked = tgui_input_list(usr, "Choose goal type", type_choices)
if(!picked)
return
var/datum/station_goal/G = new picked()
if(picked == /datum/station_goal)
- var/newname = input("Enter goal name:") as text|null
+ var/newname = tgui_input_text(usr, "Enter goal name:")
if(!newname)
return
G.name = newname
- var/description = input("Enter CentCom message contents:") as message|null
+ var/description = tgui_input_message(usr, "Enter CentCom message contents:")
if(!description)
return
G.report_message = description
@@ -2711,8 +2711,8 @@
var/answer = href_list["slowquery"]
if(answer == "yes")
log_query_debug("[usr.key] | Reported a server hang")
- if(alert(usr, "Had you just press any admin buttons?", "Query server hang report", "Yes", "No") == "Yes")
- var/response = input(usr,"What were you just doing?","Query server hang report") as null|text
+ if(tgui_alert(usr, "Had you just press any admin buttons?", "Query server hang report", list("Yes", "No")) == "Yes")
+ var/response = tgui_input_text(usr,"What were you just doing?","Query server hang report")
if(response)
log_query_debug("[usr.key] | [response]")
else if(answer == "no")
@@ -2723,7 +2723,7 @@
return
if(SSticker.HasRoundStarted())
- return alert(usr, "The game has already started.", null, null, null, null)
+ return tgui_alert(usr, "The game has already started.", null, null, null, null)
var/dat = {"What mode do you wish to play?"}
for(var/mode in config.modes)
dat += {"[config.mode_names[mode]] "}
@@ -2737,9 +2737,9 @@
return
if(SSticker.HasRoundStarted())
- return alert(usr, "The game has already started.", null, null, null, null)
+ return tgui_alert(usr, "The game has already started.", null, null, null, null)
if(GLOB.master_mode != "secret")
- return alert(usr, "The game mode has to be secret!", null, null, null, null)
+ return tgui_alert(usr, "The game mode has to be secret!", null, null, null, null)
var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret."}
for(var/mode in config.modes)
dat += {"[config.mode_names[mode]] "}
diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm
index f721bcc5fc..6baea9463f 100644
--- a/code/modules/admin/verbs/adminhelp.dm
+++ b/code/modules/admin/verbs/adminhelp.dm
@@ -444,7 +444,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
usr << browse(dat.Join(), "window=ahelp[id];size=620x480")
/datum/admin_help/proc/Retitle()
- var/new_title = input(usr, "Enter a title for the ticket", "Rename Ticket", name) as text|null
+ var/new_title = tgui_input_text(usr, "Enter a title for the ticket", "Rename Ticket", name)
if(new_title)
name = new_title
//not saying the original name cause it could be a long ass message
@@ -508,7 +508,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
// Used for methods where input via arg doesn't work
/client/proc/get_adminhelp()
- var/msg = input(src, "Please describe your problem concisely and an admin will help as soon as they're able.", "Adminhelp contents") as text
+ var/msg = tgui_input_text(src, "Please describe your problem concisely and an admin will help as soon as they're able.", "Adminhelp contents")
adminhelp(msg)
/client/verb/adminhelp(msg as text)
@@ -533,7 +533,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Adminhelp") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(current_ticket)
- if(alert(usr, "You already have a ticket open. Is this for the same issue?",,"Yes","No") != "No")
+ if(tgui_alert(usr, "You already have a ticket open. Is this for the same issue?",,list("Yes","No")) != "No")
if(current_ticket)
current_ticket.MessageNoRecipient(msg)
current_ticket.TimeoutVerb()
diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm
index 2f89dc82eb..72680eaadc 100644
--- a/code/modules/admin/verbs/adminjump.dm
+++ b/code/modules/admin/verbs/adminjump.dm
@@ -84,7 +84,7 @@
var/list/keys = list()
for(var/mob/M in GLOB.player_list)
keys += M.client
- var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
+ var/client/selection = tgui_input_list(src, "Please, select a player!", "Admin Jumping", sortKey(keys))
if(!selection)
to_chat(src, "No keys found.", confidential = TRUE)
return
@@ -124,7 +124,7 @@
var/list/keys = list()
for(var/mob/M in GLOB.player_list)
keys += M.client
- var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
+ var/client/selection = tgui_input_list(src, "Please, select a player!", "Admin Jumping", sortKey(keys))
if(!selection)
return
var/mob/M = selection.mob
@@ -146,7 +146,7 @@
if(!src.holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
- var/area/A = input(usr, "Pick an area.", "Pick an area") in GLOB.sortedAreas|null
+ var/area/A = tgui_input_list(usr, "Pick an area.", "Pick an area", GLOB.sortedAreas)
if(A && istype(A))
var/list/turfs = get_area_turfs(A)
if(length(turfs) && M.forceMove(pick(turfs)))
diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm
index 3a708ef182..d3c8a770df 100644
--- a/code/modules/admin/verbs/adminpm.dm
+++ b/code/modules/admin/verbs/adminpm.dm
@@ -30,7 +30,7 @@
targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T
else
targets["(No Mob) - [T]"] = T
- var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sortList(targets)
+ var/target = tgui_input_list(src,"To whom shall we send a message?","Admin PM", sortList(targets))
cmd_admin_pm(targets[target],null)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin PM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -54,7 +54,7 @@
if(AH)
message_admins("[key_name_admin(src)] has started replying to [key_name_admin(C, 0, 0)]'s admin help.")
- var/msg = input(src,"Message:", "Private message to [C.holder?.fakekey ? "an Administrator" : key_name(C, 0, 0)].") as message|null
+ var/msg = tgui_input_message(src,"Message:", "Private message to [C.holder?.fakekey ? "an Administrator" : key_name(C, 0, 0)].")
if (!msg)
message_admins("[key_name_admin(src)] has cancelled their reply to [key_name_admin(C, 0, 0)]'s admin help.")
return
@@ -105,7 +105,7 @@
if(!ircreplyamount) //to prevent people from spamming irc/discord
return
if(!msg)
- msg = input(src,"Message:", "Private message to Administrator") as message|null
+ msg = tgui_input_message(src,"Message:", "Private message to Administrator")
if(!msg)
return
@@ -116,7 +116,7 @@
else
//get message text, limit it's length.and clean/escape html
if(!msg)
- msg = input(src,"Message:", "Private message to [recipient.holder?.fakekey ? "an Administrator" : key_name(recipient, 0, 0)].") as message|null
+ msg = tgui_input_message(src,"Message:", "Private message to [recipient.holder?.fakekey ? "an Administrator" : key_name(recipient, 0, 0)].")
msg = trim(msg)
if(!msg)
return
@@ -238,7 +238,7 @@
/client/proc/popup_admin_pm(client/recipient, msg)
var/sender = src
var/sendername = key
- var/reply = input(recipient, msg,"Admin PM from-[sendername]", "") as message|null //show message and await a reply
+ var/reply = tgui_input_message(recipient, msg,"Admin PM from-[sendername]", "") //show message and await a reply
if(recipient && reply)
if(sender)
recipient.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm
index fdd1e8dcad..5afbda4e19 100644
--- a/code/modules/admin/verbs/adminsay.dm
+++ b/code/modules/admin/verbs/adminsay.dm
@@ -31,5 +31,5 @@
SSblackbox.record_feedback("tally", "admin_verb", 1, "Asay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/get_admin_say()
- var/msg = input(src, null, "asay \"text\"") as text
+ var/msg = tgui_input_text(src, null, "asay \"text\"")
cmd_admin_say(msg)
diff --git a/code/modules/admin/verbs/ak47s.dm b/code/modules/admin/verbs/ak47s.dm
index 561037060f..b2081b84d2 100644
--- a/code/modules/admin/verbs/ak47s.dm
+++ b/code/modules/admin/verbs/ak47s.dm
@@ -1,7 +1,7 @@
GLOBAL_VAR_INIT(terrorism, FALSE)
/client/proc/ak47s() // For when you just can't summon guns worthy of a firefight
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(usr, "The game hasn't started yet!")
return
GLOB.terrorism = TRUE
diff --git a/code/modules/admin/verbs/borgpanel.dm b/code/modules/admin/verbs/borgpanel.dm
index 4b60ecc0ff..ff6b3938cf 100644
--- a/code/modules/admin/verbs/borgpanel.dm
+++ b/code/modules/admin/verbs/borgpanel.dm
@@ -7,7 +7,7 @@
return
if (!istype(borgo, /mob/living/silicon/robot))
- borgo = input("Select a borg", "Select a borg", null, null) as null|anything in sortNames(GLOB.silicon_mobs)
+ borgo = tgui_input_list(usr, "Select a borg", "Select a borg", sortNames(GLOB.silicon_mobs))
if (!istype(borgo, /mob/living/silicon/robot))
to_chat(usr, "Borg is required for borgpanel", confidential = TRUE)
@@ -83,7 +83,7 @@
return
switch (action)
if ("set_charge")
- var/newcharge = input("New charge (0-[borg.cell.maxcharge]):", borg.name, borg.cell.charge) as num|null
+ var/newcharge = tgui_input_num(usr, "New charge (0-[borg.cell.maxcharge]):", borg.name, borg.cell.charge)
if (newcharge)
borg.cell.charge = clamp(newcharge, 0, borg.cell.maxcharge)
message_admins("[key_name_admin(user)] set the charge of [ADMIN_LOOKUPFLW(borg)] to [borg.cell.charge].")
diff --git a/code/modules/admin/verbs/cinematic.dm b/code/modules/admin/verbs/cinematic.dm
index b23cd0af0b..85a4a5773d 100644
--- a/code/modules/admin/verbs/cinematic.dm
+++ b/code/modules/admin/verbs/cinematic.dm
@@ -6,6 +6,6 @@
if(!SSticker)
return
- var/datum/cinematic/choice = input(src,"Cinematic","Choose",null) as anything in subtypesof(/datum/cinematic)
+ var/datum/cinematic/choice = tgui_input_list(src,"Cinematic","Choose", subtypesof(/datum/cinematic))
if(choice)
Cinematic(initial(choice.id),world,null)
diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm
index 1cddbe9509..42c588056b 100644
--- a/code/modules/admin/verbs/deadsay.dm
+++ b/code/modules/admin/verbs/deadsay.dm
@@ -32,7 +32,7 @@
SSblackbox.record_feedback("tally", "admin_verb", 1, "Dsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/get_dead_say()
- var/msg = input(src, null, "dsay \"text\"") as text|null
+ var/msg = tgui_input_text(src, null, "dsay \"text\"")
if (isnull(msg))
return
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 138913b3a4..c4e882cef2 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -31,7 +31,7 @@
set name = "Make Robot"
if(!SSticker.HasRoundStarted())
- alert("Wait until the game starts")
+ tgui_alert(usr, "Wait until the game starts")
return
if(ishuman(M))
log_admin("[key_name(src)] has robotized [M.key].")
@@ -40,21 +40,21 @@
H.Robotize()
else
- alert("Invalid mob")
+ tgui_alert(usr, "Invalid mob")
/client/proc/cmd_admin_blobize(mob/M in GLOB.mob_list)
set category = "Admin.Fun"
set name = "Make Blob"
if(!SSticker.HasRoundStarted())
- alert("Wait until the game starts")
+ tgui_alert(usr, "Wait until the game starts")
return
if(ishuman(M))
log_admin("[key_name(src)] has blobized [M.key].")
var/mob/living/carbon/human/H = M
H.become_overmind()
else
- alert("Invalid mob")
+ tgui_alert(usr, "Invalid mob")
/client/proc/cmd_admin_animalize(mob/M in GLOB.mob_list)
@@ -62,15 +62,15 @@
set name = "Make Simple Animal"
if(!SSticker.HasRoundStarted())
- alert("Wait until the game starts")
+ tgui_alert(usr, "Wait until the game starts")
return
if(!M)
- alert("That mob doesn't seem to exist, close the panel and try again.")
+ tgui_alert(usr, "That mob doesn't seem to exist, close the panel and try again.")
return
if(isnewplayer(M))
- alert("The mob must not be a new_player.")
+ tgui_alert(usr, "The mob must not be a new_player.")
return
log_admin("[key_name(src)] has animalized [M.key].")
@@ -87,16 +87,16 @@
for(var/mob/C in GLOB.mob_list)
if(C.key)
available.Add(C)
- var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
+ var/mob/choice = tgui_input_list(src, "Choose a player to play the pAI", "Spawn pAI", available)
if(!choice)
return 0
if(!isobserver(choice))
- var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
+ var/confirm = tgui_input_list(src, "[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", list("Yes", "No"))
if(confirm != "Yes")
return 0
var/obj/item/paicard/card = new(T)
var/mob/living/silicon/pai/pai = new(card)
- pai.name = input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text
+ pai.name = tgui_input_text(choice, "Enter your pAI name:", "pAI Name", "Personal AI")
pai.real_name = pai.name
choice.transfer_ckey(pai)
card.setPersonality(pai)
@@ -110,7 +110,7 @@
set name = "Make Alien"
if(!SSticker.HasRoundStarted())
- alert("Wait until the game starts")
+ tgui_alert(usr, "Wait until the game starts")
return
if(ishuman(M))
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/Alienize)
@@ -118,14 +118,14 @@
log_admin("[key_name(usr)] made [key_name(M)] into an alien at [AREACOORD(M)].")
message_admins("[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into an alien.")
else
- alert("Invalid mob")
+ tgui_alert(usr, "Invalid mob")
/client/proc/cmd_admin_slimeize(mob/M in GLOB.mob_list)
set category = "Admin.Fun"
set name = "Make slime"
if(!SSticker.HasRoundStarted())
- alert("Wait until the game starts")
+ tgui_alert(usr, "Wait until the game starts")
return
if(ishuman(M))
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/slimeize)
@@ -133,7 +133,7 @@
log_admin("[key_name(usr)] made [key_name(M)] into a slime at [AREACOORD(M)].")
message_admins("[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into a slime.")
else
- alert("Invalid mob")
+ tgui_alert(usr, "Invalid mob")
//TODO: merge the vievars version into this or something maybe mayhaps
/client/proc/cmd_debug_del_all(object as text)
@@ -146,7 +146,7 @@
if(matches.len==0)
return
- var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in matches
+ var/hsbitem = tgui_input_list(usr, "Choose an object to delete.", "Delete:", matches)
if(hsbitem)
hsbitem = matches[hsbitem]
var/counter = 0
@@ -173,7 +173,7 @@
set name = "Grant Full Access"
if(!SSticker.HasRoundStarted())
- alert("Wait until the game starts")
+ tgui_alert(usr, "Wait until the game starts")
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -205,7 +205,7 @@
H.equip_to_slot(id,SLOT_WEAR_ID)
else
- alert("Invalid mob")
+ tgui_alert(usr, "Invalid mob")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Grant Full Access") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(src)] has granted [M.key] full access.")
message_admins("[key_name_admin(usr)] has granted [M.key] full access.")
@@ -216,7 +216,7 @@
set desc = "Direct intervention"
if(M.ckey)
- if(alert("This mob is being controlled by [M.key]. Are you sure you wish to assume control of it? [M.key] will be made a ghost.",,"Yes","No") != "Yes")
+ if(tgui_alert(src, "This mob is being controlled by [M.key]. Are you sure you wish to assume control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes")
return
else
var/mob/dead/observer/ghost = new/mob/dead/observer(get_turf(M), M)
@@ -236,12 +236,12 @@
if(!M)
return
if(M.ckey)
- if(alert("This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,"Yes","No") != "Yes")
+ if(tgui_alert(usr, "This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes")
return
- var/client/newkey = input(src, "Pick the player to put in control.", "New player") as null|anything in sortList(GLOB.clients)
+ var/client/newkey = tgui_input_list(src, "Pick the player to put in control.", "New player", sortList(GLOB.clients))
var/mob/oldmob = newkey.mob
var/delmob = FALSE
- if((isobserver(oldmob) || alert("Do you want to delete [newkey]'s old mob?","Delete?","Yes","No") != "No"))
+ if((isobserver(oldmob) || tgui_alert(usr, "Do you want to delete [newkey]'s old mob?","Delete?",list("Yes","No")) != "No"))
delmob = TRUE
if(!M || QDELETED(M))
to_chat(usr, "The target mob no longer exists, aborting.")
@@ -494,7 +494,7 @@
var/datum/outfit/O = path //not much to initalize here but whatever
outfits[initial(O.name)] = path
- var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in baseoutfits + sortList(outfits)
+ var/dresscode = tgui_input_list(src, "Select outfit", "Robust quick dress shop", baseoutfits + sortList(outfits))
if (isnull(dresscode))
return
@@ -508,7 +508,7 @@
var/datum/outfit/O = path
job_outfits[initial(O.name)] = path
- dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in sortList(job_outfits)
+ dresscode = tgui_input_list(src, "Select job equipment", "Robust quick dress shop", sortList(job_outfits))
dresscode = job_outfits[dresscode]
if(isnull(dresscode))
return
@@ -520,7 +520,7 @@
var/datum/outfit/O = path
plasmaman_outfits[initial(O.name)] = path
- dresscode = input("Select plasmeme equipment", "Robust quick dress shop") as null|anything in sortList(plasmaman_outfits)
+ dresscode = tgui_input_list(src, "Select plasmeme equipment", "Robust quick dress shop", sortList(plasmaman_outfits))
dresscode = plasmaman_outfits[dresscode]
if(isnull(dresscode))
return
@@ -529,7 +529,7 @@
var/list/custom_names = list()
for(var/datum/outfit/D in GLOB.custom_outfits)
custom_names[D.name] = D
- var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in sortList(custom_names)
+ var/selected_name = tgui_input_list(src, "Select outfit", "Robust quick dress shop", sortList(custom_names))
dresscode = custom_names[selected_name]
if(isnull(dresscode))
return
@@ -542,7 +542,7 @@
set name = "Start Singularity"
set desc = "Sets up the singularity and all machines to get power flowing through the station"
- if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
+ if(tgui_alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!",,list("Yes","No")) != "Yes")
return
for(var/obj/machinery/power/emitter/E in GLOB.machines)
@@ -598,7 +598,7 @@
set name = "Debug Mob Lists"
set desc = "For when you just gotta know"
- switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients"))
+ switch(tgui_input_list(src, "Which list?", "", list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients")))
if("Players")
to_chat(usr, jointext(GLOB.player_list,","))
if("Admins")
@@ -687,7 +687,7 @@
names[name] = ruin_landmark
- var/ruinname = input("Select ruin", "Jump to Ruin") as null|anything in names
+ var/ruinname = tgui_input_list(src, "Select ruin", "Jump to Ruin", names)
var/obj/effect/landmark/ruin/landmark = names[ruinname]
@@ -725,13 +725,13 @@
for(var/name in SSmapping.ice_ruins_underground_templates)
names[name] = list(SSmapping.ice_ruins_underground_templates[name], ZTRAIT_ICE_RUINS_UNDERGROUND, list(/area/icemoon/underground/unexplored))
- var/ruinname = input("Select ruin", "Spawn Ruin") as null|anything in names
+ var/ruinname = tgui_input_list(src, "Select ruin", "Spawn Ruin", names)
var/data = names[ruinname]
if (!data)
return
var/datum/map_template/ruin/template = data[1]
if (exists[template])
- var/response = alert("There is already a [template] in existence.", "Spawn Ruin", "Jump", "Place Another", "Cancel")
+ var/response = tgui_alert(usr, "There is already a [template] in existence.", "Spawn Ruin", list("Jump", "Place Another", "Cancel"))
if (response == "Jump")
usr.forceMove(get_turf(exists[template]))
return
@@ -755,7 +755,7 @@
set desc = "Deallocates all reserved space, restoring it to round start conditions."
if(!holder)
return
- var/answer = alert("WARNING: THIS WILL WIPE ALL RESERVED SPACE TO A CLEAN SLATE! ANY MOVING SHUTTLES, ELEVATORS, OR IN-PROGRESS PHOTOGRAPHY WILL BE DELETED!", "Really wipe dynamic turfs?", "YES", "NO")
+ var/answer = tgui_alert(usr, "WARNING: THIS WILL WIPE ALL RESERVED SPACE TO A CLEAN SLATE! ANY MOVING SHUTTLES, ELEVATORS, OR IN-PROGRESS PHOTOGRAPHY WILL BE DELETED!", "Really wipe dynamic turfs?", list("YES", "NO"))
if(answer != "YES")
return
message_admins("[key_name_admin(src)] cleared dynamic transit space.")
@@ -833,7 +833,7 @@
"Total Time" = /proc/cmp_profile_time_dsc,
"Call Count" = /proc/cmp_profile_count_dsc
)
- var/sort = input(src, "Sort type?", "Sort Type", "Avg time") as null|anything in sortlist
+ var/sort = tgui_input_list(src, "Sort type?", "Sort Type", sortlist)
if (!sort)
return
sort = sortlist[sort]
@@ -845,5 +845,5 @@
set desc = "Force config reload to world default"
if(!check_rights(R_DEBUG))
return
- if(alert(usr, "Are you absolutely sure you want to reload the configuration from the default path on the disk, wiping any in-round modificatoins?", "Really reset?", "No", "Yes") == "Yes")
+ if(tgui_alert(usr, "Are you absolutely sure you want to reload the configuration from the default path on the disk, wiping any in-round modificatoins?", "Really reset?", list("No", "Yes")) == "Yes")
config.admin_reload()
diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm
index 8defd78a06..ff476ee716 100644
--- a/code/modules/admin/verbs/diagnostics.dm
+++ b/code/modules/admin/verbs/diagnostics.dm
@@ -56,7 +56,7 @@
if(!src.holder)
return
- var/confirm = alert(src, "Are you sure you want to reload all admins?", "Confirm", "Yes", "No")
+ var/confirm = tgui_alert(src, "Are you sure you want to reload all admins?", "Confirm", list("Yes", "No"))
if(confirm !="Yes")
return
@@ -68,7 +68,7 @@
set name = "Toggle CDN"
set category = "Server"
var/static/admin_disabled_cdn_transport = null
- if (alert(usr, "Are you sure you want to toggle the CDN asset transport?", "Confirm", "Yes", "No") != "Yes")
+ if (tgui_alert(usr, "Are you sure you want to toggle the CDN asset transport?", "Confirm", list("Yes", "No")) != "Yes")
return
var/current_transport = CONFIG_GET(string/asset_transport)
if (!current_transport || current_transport == "simple")
@@ -80,7 +80,7 @@
log_admin("[key_name(usr)] re-enabled the CDN asset transport")
else
to_chat(usr, "The CDN is not enabled!")
- if (alert(usr, "The CDN asset transport is not enabled! If you having issues with assets you can also try disabling filename mutations.", "The CDN asset transport is not enabled!", "Try disabling filename mutations", "Nevermind") == "Try disabling filename mutations")
+ if (tgui_alert(usr, "The CDN asset transport is not enabled! If you having issues with assets you can also try disabling filename mutations.", "The CDN asset transport is not enabled!", list("Try disabling filename mutations", "Nevermind")) == "Try disabling filename mutations")
SSassets.transport.dont_mutate_filenames = !SSassets.transport.dont_mutate_filenames
message_admins("[key_name_admin(usr)] [(SSassets.transport.dont_mutate_filenames ? "disabled" : "re-enabled")] asset filename transforms")
log_admin("[key_name(usr)] [(SSassets.transport.dont_mutate_filenames ? "disabled" : "re-enabled")] asset filename transforms")
diff --git a/code/modules/admin/verbs/dice.dm b/code/modules/admin/verbs/dice.dm
index f033351f96..25f067c392 100644
--- a/code/modules/admin/verbs/dice.dm
+++ b/code/modules/admin/verbs/dice.dm
@@ -4,8 +4,8 @@
if(!check_rights(R_FUN))
return
- var/sum = input("How many times should we throw?") as num
- var/side = input("Select the number of sides.") as num
+ var/sum = tgui_input_num(src, "How many times should we throw?")
+ var/side = tgui_input_num(src, "Select the number of sides.")
if(!side)
side = 6
if(!sum)
@@ -13,12 +13,12 @@
var/dice = num2text(sum) + "d" + num2text(side)
- if(alert("Do you want to inform the world about your game?",,"Yes", "No") == "Yes")
+ if(tgui_alert(src, "Do you want to inform the world about your game?",,list("Yes", "No")) == "Yes")
to_chat(world, "
The dice have been rolled by Gods!
")
var/result = roll(dice)
- if(alert("Do you want to inform the world about the result?",,"Yes", "No") == "Yes")
+ if(tgui_alert(src, "Do you want to inform the world about the result?",,list("Yes", "No")) == "Yes")
to_chat(world, "
Gods rolled [dice], result is [result]
")
message_admins("[key_name_admin(src)] rolled dice [dice], result is [result]")
diff --git a/code/modules/admin/verbs/fps.dm b/code/modules/admin/verbs/fps.dm
index 2b65d2a44c..4364840220 100644
--- a/code/modules/admin/verbs/fps.dm
+++ b/code/modules/admin/verbs/fps.dm
@@ -8,13 +8,13 @@
return
var/cfg_fps = CONFIG_GET(number/fps)
- var/new_fps = round(input("Sets game frames-per-second. Can potentially break the game (default: [cfg_fps])","FPS", world.fps) as num|null)
+ var/new_fps = round(tgui_input_num(src, "Sets game frames-per-second. Can potentially break the game (default: [cfg_fps])","FPS", world.fps))
if(new_fps <= 0)
to_chat(src, "Error: set_server_fps(): Invalid world.fps value. No changes made.")
return
if(new_fps > cfg_fps * 1.5)
- if(alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [cfg_fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm")
+ if(tgui_alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [cfg_fps]","Warning!",list("Confirm","ABORT-ABORT-ABORT")) != "Confirm")
return
var/msg = "[key_name(src)] has modified world.fps to [new_fps]"
diff --git a/code/modules/admin/verbs/getlogs.dm b/code/modules/admin/verbs/getlogs.dm
index 446dbcc69a..46f9092bdb 100644
--- a/code/modules/admin/verbs/getlogs.dm
+++ b/code/modules/admin/verbs/getlogs.dm
@@ -24,7 +24,7 @@
return
message_admins("[key_name_admin(src)] accessed file: [path]")
- switch(alert("View (in game), Open (in your system's text editor), or Download?", path, "View", "Open", "Download"))
+ switch(tgui_alert(src, "View (in game), Open (in your system's text editor), or Download?", path, list("View", "Open", "Download")))
if ("View")
src << browse("
[html_encode(file2text(file(path)))]
", list2params(list("window" = "viewfile.[path]")))
if ("Open")
diff --git a/code/modules/admin/verbs/machine_upgrade.dm b/code/modules/admin/verbs/machine_upgrade.dm
index 58deff2a24..f5652da846 100644
--- a/code/modules/admin/verbs/machine_upgrade.dm
+++ b/code/modules/admin/verbs/machine_upgrade.dm
@@ -4,7 +4,7 @@
if (!istype(M))
return
- var/new_rating = input("Enter new rating:","Num") as num
+ var/new_rating = tgui_input_num(usr, "Enter new rating:","Num")
if(new_rating && M.component_parts)
for(var/obj/item/stock_parts/P in M.component_parts)
P.rating = new_rating
diff --git a/code/modules/admin/verbs/manipulate_organs.dm b/code/modules/admin/verbs/manipulate_organs.dm
index b2648735ec..6461778eed 100644
--- a/code/modules/admin/verbs/manipulate_organs.dm
+++ b/code/modules/admin/verbs/manipulate_organs.dm
@@ -1,7 +1,7 @@
/client/proc/manipulate_organs(mob/living/carbon/C in world)
set name = "Manipulate Organs"
set category = "Debug"
- var/operation = input("Select organ operation.", "Organ Manipulation", "cancel") as null|anything in list("add organ", "add implant", "drop organ/implant", "remove organ/implant", "cancel")
+ var/operation = tgui_input_list(src, "Select organ operation.", "Organ Manipulation", list("add organ", "add implant", "drop organ/implant", "remove organ/implant", "cancel"))
if (!operation)
return
@@ -12,7 +12,7 @@
var/dat = replacetext("[path]", "/obj/item/organ/", ":")
organs[dat] = path
- var/obj/item/organ/organ = input("Select organ type:", "Organ Manipulation", null) as null|anything in organs
+ var/obj/item/organ/organ = tgui_input_list(src, "Select organ type:", "Organ Manipulation", organs)
if(!organ)
return
organ = organs[organ]
@@ -26,7 +26,7 @@
var/dat = replacetext("[path]", "/obj/item/implant/", ":")
organs[dat] = path
- var/obj/item/implant/organ = input("Select implant type:", "Organ Manipulation", null) as null|anything in organs
+ var/obj/item/implant/organ = tgui_input_list(src, "Select implant type:", "Organ Manipulation", organs)
if(!organ)
return
organ = organs[organ]
@@ -44,7 +44,7 @@
var/obj/item/implant/I = X
organs["[I.name] ([I.type])"] = I
- var/obj/item/organ = input("Select organ/implant:", "Organ Manipulation", null) as null|anything in organs
+ var/obj/item/organ = tgui_input_list(src, "Select organ/implant:", "Organ Manipulation", organs)
if(!organ)
return
organ = organs[organ]
diff --git a/code/modules/admin/verbs/map_template_loadverb.dm b/code/modules/admin/verbs/map_template_loadverb.dm
index e89c3ad5a6..620667046e 100644
--- a/code/modules/admin/verbs/map_template_loadverb.dm
+++ b/code/modules/admin/verbs/map_template_loadverb.dm
@@ -4,7 +4,7 @@
var/datum/map_template/template
- var/map = input(src, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in SSmapping.map_templates
+ var/map = tgui_input_list(src, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template", SSmapping.map_templates)
if(!map)
return
template = SSmapping.map_templates[map]
@@ -19,10 +19,10 @@
item.plane = ABOVE_LIGHTING_PLANE
preview += item
var/list/orientations = list("South" = SOUTH, "North" = NORTH, "East" = EAST, "West" = WEST)
- var/choice = input(src, "Which orientation? Maps are normally facing SOUTH.", "Template Orientation", "South") as null|anything in orientations
+ var/choice = tgui_input_list(src, "Which orientation? Maps are normally facing SOUTH.", "Template Orientation", orientations)
var/orientation = orientations[choice]
images += preview
- if(alert(src,"Confirm location.","Template Confirm","Yes","No") == "Yes")
+ if(tgui_alert(src, "Confirm location.","Template Confirm",list("Yes","No")) == "Yes")
if(template.load(T, centered = TRUE, orientation = orientation))
message_admins("[key_name_admin(src)] has placed a map template ([template.name]) at [ADMIN_COORDJMP(T)]")
else
@@ -40,7 +40,7 @@
to_chat(src, "Filename must end in '.dmm': [map]")
return
var/datum/map_template/M
- switch(alert(src, "What kind of map is this?", "Map type", "Normal", "Shuttle", "Cancel"))
+ switch(tgui_alert(src, "What kind of map is this?", "Map type", list("Normal", "Shuttle", "Cancel")))
if("Normal")
M = new /datum/map_template(map, "[map]", TRUE)
if("Shuttle")
@@ -58,11 +58,11 @@
report_link = " - validation report"
to_chat(src, "Map template '[map]' failed validation.")
if(report.loadable)
- var/response = alert(src, "The map failed validation, would you like to load it anyways?", "Map Errors", "Cancel", "Upload Anyways")
+ var/response = tgui_alert(src, "The map failed validation, would you like to load it anyways?", "Map Errors", list("Cancel", "Upload Anyways"))
if(response != "Upload Anyways")
return
else
- alert(src, "The map failed validation and cannot be loaded.", "Map Errors", "Oh Darn")
+ tgui_alert(src, "The map failed validation and cannot be loaded.", "Map Errors", list("Oh Darn"))
return
SSmapping.map_templates[M.name] = M
diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm
index 0dfee4c38c..8b01981ace 100644
--- a/code/modules/admin/verbs/mapping.dm
+++ b/code/modules/admin/verbs/mapping.dm
@@ -110,7 +110,7 @@ GLOBAL_LIST_EMPTY(dirty_vars)
set name = "Camera Report"
if(!Master)
- alert(usr,"Master_controller not found.","Sec Camera Report")
+ tgui_alert(usr, "Master_controller not found.","Sec Camera Report")
return 0
var/list/obj/machinery/camera/CL = list()
@@ -219,7 +219,7 @@ GLOBAL_LIST_EMPTY(dirty_vars)
/client/proc/count_objects_on_z_level()
set category = "Mapping"
set name = "Count Objects On Level"
- var/level = input("Which z-level?","Level?") as text
+ var/level = tgui_input_text(src, "Which z-level?","Level?")
if(!level)
return
var/num_level = text2num(level)
@@ -228,7 +228,7 @@ GLOBAL_LIST_EMPTY(dirty_vars)
if(!isnum(num_level))
return
- var/type_text = input("Which type path?","Path?") as text
+ var/type_text = tgui_input_text(src, "Which type path?","Path?")
if(!type_text)
return
var/type_path = text2path(type_text)
@@ -259,7 +259,7 @@ GLOBAL_LIST_EMPTY(dirty_vars)
set category = "Mapping"
set name = "Count Objects All"
- var/type_text = input("Which type path?","") as text
+ var/type_text = tgui_input_text(src, "Which type path?","")
if(!type_text)
return
var/type_path = text2path(type_text)
diff --git a/code/modules/admin/verbs/maprotation.dm b/code/modules/admin/verbs/maprotation.dm
index af8bd6e9fb..08b4dfff5b 100644
--- a/code/modules/admin/verbs/maprotation.dm
+++ b/code/modules/admin/verbs/maprotation.dm
@@ -1,7 +1,7 @@
/client/proc/forcerandomrotate()
set category = "Server"
set name = "Trigger Random Map Rotation"
- var/rotate = alert("Force a random map rotation to trigger?", "Rotate map?", "Yes", "Cancel")
+ var/rotate = tgui_alert(usr, "Force a random map rotation to trigger?", "Rotate map?", list("Yes", "Cancel"))
if (rotate != "Yes")
return
message_admins("[key_name_admin(usr)] is forcing a random map rotation.")
@@ -33,7 +33,7 @@
mapname += "\]"
maprotatechoices[mapname] = VM
- var/chosenmap = input("Choose a map to change to", "Change Map") as null|anything in maprotatechoices
+ var/chosenmap = tgui_input_list(src, "Choose a map to change to", "Change Map", maprotatechoices)
if (!chosenmap)
return
SSticker.maprotatechecked = 1
diff --git a/code/modules/admin/verbs/onlyone.dm b/code/modules/admin/verbs/onlyone.dm
index 3860706538..a2b8ce3418 100644
--- a/code/modules/admin/verbs/onlyone.dm
+++ b/code/modules/admin/verbs/onlyone.dm
@@ -1,7 +1,7 @@
GLOBAL_VAR_INIT(highlander, FALSE)
/client/proc/only_one() //Gives everyone kilts, berets, claymores, and pinpointers, with the objective to hijack the emergency shuttle.
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(usr, "The game hasn't started yet!")
return
GLOB.highlander = TRUE
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index c9a5cafd9b..87eb782aee 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -5,7 +5,7 @@
return
var/freq = 1
- var/vol = input(usr, "What volume would you like the sound to play at?",, 100) as null|num
+ var/vol = tgui_input_num(usr, "What volume would you like the sound to play at?",, 100)
if(!vol)
return
vol = clamp(vol, 1, 100)
@@ -20,7 +20,7 @@
admin_sound.status = SOUND_STREAM
admin_sound.volume = vol
- var/res = alert(usr, "Show the title of this song to the players?",, "Yes","No", "Cancel")
+ var/res = tgui_alert(usr, "Show the title of this song to the players?",, list("Yes","No", "Cancel"))
switch(res)
if("Yes")
to_chat(world, "An admin played: [S]", confidential = TRUE)
@@ -61,7 +61,7 @@
to_chat(src, "Youtube-dl was not configured, action unavailable") //Check config.txt for the INVOKE_YOUTUBEDL value
return
- var/web_sound_input = input("Enter content URL (supported sites only, leave blank to stop playing)", "Play Internet Sound via youtube-dl") as text|null
+ var/web_sound_input = tgui_input_text(src, "Enter content URL (supported sites only, leave blank to stop playing)", "Play Internet Sound via youtube-dl")
if(istext(web_sound_input))
var/web_sound_url = ""
var/stop_web_sounds = FALSE
@@ -98,7 +98,7 @@
music_extra_data["link"] = data["webpage_url"]
music_extra_data["title"] = data["title"]
- var/res = alert(usr, "Show the title of and link to this song to the players?\n[title]",, "No", "Yes", "Cancel")
+ var/res = tgui_alert(usr, "Show the title of and link to this song to the players?\n[title]",, list("No", "Yes", "Cancel"))
switch(res)
if("Yes")
to_chat(world, "An admin played: [webpage_url]")
@@ -139,7 +139,7 @@
if(!check_rights(R_SOUNDS))
return
- var/web_sound_input = input("Enter content stream URL (must be a direct link)", "Play Internet Sound via direct URL") as text|null
+ var/web_sound_input = tgui_input_text(src, "Enter content stream URL (must be a direct link)", "Play Internet Sound via direct URL")
if(istext(web_sound_input))
if(!length(web_sound_input))
log_admin("[key_name(src)] stopped web sound")
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 72ec804d28..02d2591d85 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -4,7 +4,7 @@
if(!check_rights(R_ADMIN))
return
- var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No")
+ var/confirm = tgui_alert(src, "Make [M] drop everything?", "Message", list("Yes", "No"))
if(confirm != "Yes")
return
@@ -29,7 +29,7 @@
return
message_admins("[key_name_admin(src)] has started answering [ADMIN_LOOKUPFLW(M)]'s prayer.")
- var/msg = input("Message:", text("Subtle PM to [M.key]")) as text|null
+ var/msg = tgui_input_text(src, "Message:", text("Subtle PM to [M.key]"))
if (!msg)
message_admins("[key_name_admin(src)] decided not to answer [ADMIN_LOOKUPFLW(M)]'s prayer")
@@ -65,12 +65,12 @@
return
if (!sender)
- sender = input("Who is the message from?", "Sender") as null|anything in list(RADIO_CHANNEL_CENTCOM,RADIO_CHANNEL_SYNDICATE)
+ sender = tgui_input_list(src, "Who is the message from?", "Sender", list(RADIO_CHANNEL_CENTCOM,RADIO_CHANNEL_SYNDICATE))
if(!sender)
return
message_admins("[key_name_admin(src)] has started answering [key_name_admin(H)]'s [sender] request.")
- var/input = input("Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from [sender]", "") as text|null
+ var/input = tgui_input_text(src, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from [sender]", "")
if(!input)
message_admins("[key_name_admin(src)] decided not to answer [key_name_admin(H)]'s [sender] request.")
return
@@ -100,7 +100,7 @@
if(operation == "set")
prompt = "Please enter the new reputation value:"
- msg = input("Message:", prompt) as num|null
+ msg = tgui_input_num(src, "Message:", prompt)
if (!msg)
return
@@ -134,7 +134,7 @@
if(!check_rights(R_ADMIN))
return
- var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text|null
+ var/msg = tgui_input_text(src, "Message:", text("Enter the text you wish to appear to everyone:"))
if (!msg)
return
@@ -151,12 +151,12 @@
return
if(!M)
- M = input("Direct narrate to whom?", "Active Players") as null|anything in GLOB.player_list
+ M = tgui_input_list(src, "Direct narrate to whom?", "Active Players", GLOB.player_list)
if(!M)
return
- var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text|null
+ var/msg = tgui_input_text(src, "Message:", text("Enter the text you wish to appear to your target:"))
if( !msg )
return
@@ -176,10 +176,10 @@
return
if(!A)
return
- var/range = input("Range:", "Narrate to mobs within how many tiles:", 7) as num|null
+ var/range = tgui_input_num(src, "Range:", "Narrate to mobs within how many tiles:", 7)
if(!range)
return
- var/msg = input("Message:", text("Enter the text you wish to appear to everyone within view:")) as text|null
+ var/msg = tgui_input_text(src, "Message:", text("Enter the text you wish to appear to everyone within view:"))
if (!msg)
return
for(var/mob/M in view(range,A))
@@ -296,13 +296,13 @@
continue //we have a live body we are tied to
candidates += M.ckey
if(candidates.len)
- ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates
+ ckey = tgui_input_list(usr, "Pick the player you want to respawn as a xeno.", "Suitable Candidates", candidates)
else
to_chat(usr, "Error: create_xeno(): no suitable candidates.")
if(!istext(ckey))
return 0
- var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva")
+ var/alien_caste = tgui_input_list(usr, "Please choose which caste to spawn.","Pick a caste", list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva"))
var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : null
var/mob/living/carbon/alien/new_xeno
switch(alien_caste)
@@ -341,7 +341,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/input = ckey(input(src, "Please specify which key will be respawned.", "Key", ""))
+ var/input = ckey(tgui_input_text(src, "Please specify which key will be respawned.", "Key", ""))
if(!input)
return
@@ -358,7 +358,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
//Check if they were an alien
if(G_found.mind.assigned_role == ROLE_ALIEN)
- if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes")
+ if(tgui_alert(usr, "This character appears to have been an alien. Would you like to respawn them as such?",,list("Yes","No"))=="Yes")
var/turf/T
if(GLOB.xeno_spawn.len)
T = pick(GLOB.xeno_spawn)
@@ -393,7 +393,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//check if they were a monkey
else if(findtext(G_found.real_name,"monkey"))
- if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes")
+ if(tgui_alert(usr, "This character appears to have been a monkey. Would you like to respawn them as such?",,list("Yes","No"))=="Yes")
var/mob/living/carbon/monkey/new_monkey = new
SSjob.SendToLateJoin(new_monkey)
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
@@ -487,10 +487,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!issilicon(new_character))//If they are not a cyborg/AI.
if(!record_found&&new_character.mind.assigned_role!=new_character.mind.special_role)//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
//Power to the user!
- if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes")
+ if(tgui_alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,list("No","Yes"))=="Yes")
GLOB.data_core.manifest_inject(new_character)
- if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
+ if(tgui_alert(new_character,"Would you like an active AI to announce this character?",,list("No","Yes"))=="Yes")
AnnounceArrival(new_character, new_character.mind.assigned_role)
var/msg = "[admin] has respawned [player_key] as [new_character.real_name]."
@@ -509,14 +509,14 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
+ var/input = tgui_input_text(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "")
if(!input)
return
log_admin("Admin [key_name(usr)] has added a new AI law - [input]")
message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]")
- var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
+ var/show_log = tgui_alert(src, "Show ion message?", "Message", list("Yes", "No"))
var/announce_ion_laws = (show_log == "Yes" ? 1 : -1)
var/datum/round_event/ion_storm/add_law_only/ion = new()
@@ -535,7 +535,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!mob)
return
if(!istype(M))
- alert("Cannot revive a ghost")
+ tgui_alert(src, "Cannot revive a ghost")
return
M.revive(full_heal = 1, admin_revive = 1)
@@ -552,11 +552,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/input = input(usr, "Enter a Command Report. Ensure it makes sense IC.", "What?", "") as message|null
+ var/input = tgui_input_message(usr, "Enter a Command Report. Ensure it makes sense IC.", "What?", "")
if(!input)
return
- var/confirm = alert(src, "Do you want to announce the contents of the report to the crew?", "Announce", "Yes", "No", "Cancel")
+ var/confirm = tgui_alert(src, "Do you want to announce the contents of the report to the crew?", "Announce", list("Yes", "No", "Cancel"))
var/announce_command_report = TRUE
switch(confirm)
if("Yes")
@@ -578,13 +578,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/input = input(usr, "Enter a priority announcement. Ensure it makes sense IC.", "What?", "") as message|null
+ var/input = tgui_input_message(src, "Enter a priority announcement. Ensure it makes sense IC.", "What?", "")
if(!input)
return
- var/title = input(src, "What should the title be?", "What?","") as text|null
+ var/title = tgui_input_text(src, "What should the title be?", "What?","")
- var/special_name = input(src, "Who is making the announcement?", "Who?", "") as text|null
+ var/special_name = tgui_input_text(src, "Who is making the announcement?", "Who?", "")
priority_announce(input, title, sender_override = special_name)
log_admin("[key_name(src)] has sent a priority announcement: [input]")
@@ -598,7 +598,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/input = input(usr, "Please input a new name for Central Command.", "What?", "") as text|null
+ var/input = tgui_input_text(usr, "Please input a new name for Central Command.", "What?", "")
if(!input)
return
change_command_name(input)
@@ -630,25 +630,25 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
+ var/devastation = tgui_input_num(src, "Range of total devastation. -1 to none", text("Input"))
if(devastation == null)
return
- var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
+ var/heavy = tgui_input_num(src, "Range of heavy impact. -1 to none", text("Input"))
if(heavy == null)
return
- var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
+ var/light = tgui_input_num(src, "Range of light impact. -1 to none", text("Input"))
if(light == null)
return
- var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
+ var/flash = tgui_input_num(src, "Range of flash. -1 to none", text("Input"))
if(flash == null)
return
- var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
+ var/flames = tgui_input_num(src, "Range of flames. -1 to none", text("Input"))
if(flames == null)
return
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
- if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
+ if (tgui_alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", list("Yes", "No")) == "No")
return
explosion(O, devastation, heavy, light, flash, null, null,flames)
@@ -666,7 +666,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/range = input("Range.", text("Input")) as num|null
+ var/range = tgui_input_num(src, "Range.", text("Input"))
if(!range)
return
log_admin("[key_name(usr)] created an EM Pulse - log below") //because we'll just log the empulse itself
@@ -682,7 +682,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/confirm = alert(src, "Drop a brain?", "Confirm", "Yes", "No","Cancel")
+ var/confirm = tgui_alert(src, "Drop a brain?", "Confirm", list("Yes", "No","Cancel"))
if(confirm == "Cancel")
return
//Due to the delay here its easy for something to have happened to the mob
@@ -705,7 +705,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Gibself"
set category = "Admin.Fun"
- var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
+ var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No"))
if(confirm == "Yes")
log_admin("[key_name(usr)] used gibself.")
message_admins("[key_name_admin(usr)] used gibself.")
@@ -727,7 +727,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set desc = "switches between 1x and custom views"
if(view_size.getView() == view_size.default)
- view_size.setTo(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128) - 7)
+ view_size.setTo(tgui_input_list(src, "Select view range:", "FUCK YE", list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128) - 7))
else
view_size.resetToDefault(getScreenSize(prefs.widescreenpref))
@@ -746,7 +746,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
+ var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No"))
if(confirm != "Yes")
return
@@ -761,7 +761,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Cancel Shuttle"
if(!check_rights(0))
return
- if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
+ if(tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
return
if(EMERGENCY_AT_LEAST_DOCKED)
@@ -783,7 +783,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(SSshuttle.emergency.mode == SHUTTLE_DISABLED)
to_chat(usr, "Error, shuttle is already disabled.")
return
- if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
+ if(tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
return
message_admins("[key_name_admin(usr)] disabled the shuttle.")
SSshuttle.lastMode = SSshuttle.emergency.mode
@@ -803,7 +803,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(SSshuttle.emergency.mode != SHUTTLE_DISABLED)
to_chat(usr, "Error, shuttle not disabled.")
return
- if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
+ if(tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
return
message_admins("[key_name_admin(usr)] enabled the emergency shuttle.")
SSshuttle.adminEmergencyNoRecall = FALSE
@@ -833,7 +833,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
- var/notifyplayers = alert(src, "Do you want to notify the players?", "Options", "Yes", "No", "Cancel")
+ var/notifyplayers = tgui_alert(src, "Do you want to notify the players?", "Options", list("Yes", "No", "Cancel"))
if(notifyplayers == "Cancel")
return
@@ -872,7 +872,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/level = input("Select security level to change to","Set Security Level") as null|anything in list("green","blue","amber","red","delta")
+ var/level = tgui_input_list(src, "Select security level to change to","Set Security Level", list("green","blue","amber","red","delta"))
if(level)
set_security_level(level)
@@ -888,7 +888,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
if(!N.timing)
- var/newtime = input(usr, "Set activation timer.", "Activate Nuke", "[N.timer_set]") as num|null
+ var/newtime = tgui_input_num(usr, "Set activation timer.", "Activate Nuke", "[N.timer_set]")
if(!newtime)
return
N.timer_set = newtime
@@ -1117,11 +1117,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!holder)
return
- var/weather_type = input("Choose a weather", "Weather") as null|anything in subtypesof(/datum/weather)
+ var/weather_type = tgui_input_list(src, "Choose a weather", "Weather", subtypesof(/datum/weather))
if(!weather_type)
return
- var/z_level = input("Z-Level to target? Leave blank to target current Z-Level.", "Z-Level") as num|null
+ var/z_level = tgui_input_num(src, "Z-Level to target? Leave blank to target current Z-Level.", "Z-Level")
if(!isnum(z_level))
if(!src.mob)
return
@@ -1142,7 +1142,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/confirm = alert(src, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", "Yes", "No")
+ var/confirm = tgui_alert(src, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", list("Yes", "No"))
if(confirm != "Yes")
return
@@ -1160,7 +1160,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/confirm = alert(src, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", "Yes", "No")
+ var/confirm = tgui_alert(src, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", list("Yes", "No"))
if(confirm != "Yes")
return
@@ -1179,7 +1179,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/confirm = alert(src, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", "Yes", "No")
+ var/confirm = tgui_alert(src, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", list("Yes", "No"))
if(confirm != "Yes")
return
@@ -1213,7 +1213,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
- var/input = input(usr, "Please specify your tip that you want to send to the players.", "Tip", "") as message|null
+ var/input = tgui_input_message(usr, "Please specify your tip that you want to send to the players.", "Tip", "")
if(!input)
return
@@ -1338,7 +1338,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
ADMIN_PUNISHMENT_SCARIFY,
ADMIN_PUNISHMENT_CLUWNE)
- var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list
+ var/punishment = tgui_input_list(usr, "Choose a punishment", "DIVINE SMITING", punishment_list)
if(QDELETED(target) || !punishment)
return
@@ -1365,7 +1365,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/turf/endT = spaceDebrisFinishLoc(startside, T.z)
new /obj/effect/immovablerod(startT, endT,target)
if(ADMIN_PUNISHMENT_SUPPLYPOD_QUICK)
- var/target_path = input(usr,"Enter typepath of an atom you'd like to send with the pod (type \"empty\" to send an empty pod):" ,"Typepath","/obj/item/reagent_containers/food/snacks/grown/harebell") as null|text
+ var/target_path = tgui_input_text(usr,"Enter typepath of an atom you'd like to send with the pod (type \"empty\" to send an empty pod):" ,"Typepath","/obj/item/reagent_containers/food/snacks/grown/harebell")
var/area/pod_storage_area = locate(/area/centcom/supplypod/podStorage) in GLOB.sortedAreas
var/obj/structure/closet/supplypod/centcompod/pod = new(pick(get_area_turfs(pod_storage_area))) //Lets not runtime
pod.damage = 40
@@ -1378,7 +1378,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!ispath(delivery))
delivery = pick_closest_path(target_path)
if(!delivery)
- alert("ERROR: Incorrect / improper path given.")
+ tgui_alert(src, "ERROR: Incorrect / improper path given.")
new delivery(pod)
new /obj/effect/pod_landingzone(get_turf(target), pod)
if(ADMIN_PUNISHMENT_SUPPLYPOD)
@@ -1404,13 +1404,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(ADMIN_PUNISHMENT_CUSTOM_PIE)
var/obj/item/reagent_containers/food/snacks/pie/cream/nostun/A = new()
if(!A.reagents)
- var/amount = input(usr, "Specify the reagent size of [A]", "Set Reagent Size", 50) as num|null
+ var/amount = tgui_input_num(usr, "Specify the reagent size of [A]", "Set Reagent Size", 50)
if(amount)
A.create_reagents(amount)
if(A.reagents)
var/chosen_id = choose_reagent_id(usr)
if(chosen_id)
- var/amount = input(usr, "Choose the amount to add.", "Choose the amount.", A.reagents.maximum_volume) as num|null
+ var/amount = tgui_input_num(usr, "Choose the amount to add.", "Choose the amount.", A.reagents.maximum_volume)
if(amount)
A.reagents.add_reagent(chosen_id, amount)
A.splat(target)
@@ -1449,7 +1449,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/list/how_fucked_is_this_dude = list("A little", "A lot", "So fucking much", "FUCK THIS DUDE")
- var/hatred = input("How much do you hate this guy?") in how_fucked_is_this_dude
+ var/hatred = tgui_input_list(usr, "How much do you hate this guy?", "", how_fucked_is_this_dude)
var/repetitions
var/shots_per_limb_per_rep = 2
var/damage
@@ -1545,7 +1545,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
var/message = pick(GLOB.admiral_messages)
- message = input("Enter message from the on-call admiral to be put in the recall report.", "Admiral Message", message) as text|null
+ message = tgui_input_text(src, "Enter message from the on-call admiral to be put in the recall report.", "Admiral Message", message)
if(!message)
return
@@ -1659,7 +1659,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!D)
return
- var/add_or_remove = input("Remove/Add?", "Trait Remove/Add") as null|anything in list("Add","Remove")
+ var/add_or_remove = tgui_input_list(usr, "Remove/Add?", "Trait Remove/Add", list("Add","Remove"))
if(!add_or_remove)
return
var/list/availible_traits = list()
@@ -1676,7 +1676,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/name = GLOB.trait_name_map[trait] || trait
availible_traits[name] = trait
- var/chosen_trait = input("Select trait to modify", "Trait") as null|anything in sortList(availible_traits)
+ var/chosen_trait = tgui_input_list(src, "Select trait to modify", "Trait", sortList(availible_traits))
if(!chosen_trait)
return
chosen_trait = availible_traits[chosen_trait]
@@ -1686,14 +1686,14 @@ Traitors and the like can also be revived with the previous role mostly intact.
if("Add") //Not doing source choosing here intentionally to make this bit faster to use, you can always vv it.
ADD_TRAIT(D,chosen_trait,source)
if("Remove")
- var/specific = input("All or specific source ?", "Trait Remove/Add") as null|anything in list("All","Specific")
+ var/specific = tgui_input_list(src, "All or specific source ?", "Trait Remove/Add", list("All","Specific"))
if(!specific)
return
switch(specific)
if("All")
source = null
if("Specific")
- source = input("Source to be removed","Trait Remove/Add") as null|anything in sortList(D.status_traits[chosen_trait])
+ source = tgui_input_list(src, "Source to be removed","Trait Remove/Add", sortList(D.status_traits[chosen_trait]))
if(!source)
return
REMOVE_TRAIT(D,chosen_trait,source)
@@ -1708,7 +1708,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/turf/T = get_turf(usr)
- target = input("Any specific target in mind? Please note only live, non cluwned, human targets are valid.", "Target", target) as null|anything in GLOB.player_list
+ target = tgui_input_list(src, "Any specific target in mind? Please note only live, non cluwned, human targets are valid.", "Target", GLOB.player_list)
if(target && ishuman(target))
var/mob/living/carbon/human/H = target
var/mob/living/simple_animal/hostile/floor_cluwne/FC = new /mob/living/simple_animal/hostile/floor_cluwne(T)
diff --git a/code/modules/admin/verbs/reestablish_db_connection.dm b/code/modules/admin/verbs/reestablish_db_connection.dm
index 2090902ebc..503379c551 100644
--- a/code/modules/admin/verbs/reestablish_db_connection.dm
+++ b/code/modules/admin/verbs/reestablish_db_connection.dm
@@ -7,10 +7,10 @@
if (SSdbcore.IsConnected())
if (!check_rights(R_DEBUG,0))
- alert("The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!")
+ tgui_alert(src, "The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!")
return
- var/reconnect = alert("The database is already connected! If you *KNOW* that this is incorrect, you can force a reconnection", "The database is already connected!", "Force Reconnect", "Cancel")
+ var/reconnect = tgui_alert(src, "The database is already connected! If you *KNOW* that this is incorrect, you can force a reconnection", "The database is already connected!", list("Force Reconnect", "Cancel"))
if (reconnect != "Force Reconnect")
return
diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm
index 80344d076c..de5d641bde 100644
--- a/code/modules/admin/verbs/secrets.dm
+++ b/code/modules/admin/verbs/secrets.dm
@@ -104,7 +104,7 @@
message_admins("[key_name_admin(holder)] has removed the cap on security officers.")
//Buttons for helpful stuff. This is where people land in the tgui
if("clear_virus")
- var/choice = input("Are you sure you want to cure all disease?") in list("Yes", "Cancel")
+ var/choice = tgui_input_list(holder, "Are you sure you want to cure all disease?", "", list("Yes", "Cancel"))
if(choice == "Yes")
message_admins("[key_name_admin(holder)] has cured all diseases.")
for(var/thing in SSdisease.active_diseases)
@@ -130,11 +130,11 @@
holder.holder.output_ai_laws()//huh, inconvenient var naming, huh?
if("showgm")
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(holder, "The game hasn't started yet!")
else if (SSticker.mode)
- alert("The game mode is [SSticker.mode.name]")
+ tgui_alert(holder, "The game mode is [SSticker.mode.name]")
else
- alert("For some reason there's a SSticker, but not a game mode")
+ tgui_alert(holder, "For some reason there's a SSticker, but not a game mode")
if("manifest")
var/dat = "Showing Crew Manifest."
dat += "
Name
Position
"
@@ -163,7 +163,7 @@
if("ctfbutton")
toggle_all_ctf(holder)
if("tdomereset")
- var/delete_mobs = alert("Clear all mobs?","Confirm","Yes","No","Cancel")
+ var/delete_mobs = tgui_alert(holder, "Clear all mobs?","Confirm",list("Yes","No","Cancel"))
if(delete_mobs == "Cancel")
return
@@ -181,7 +181,7 @@
var/area/template = GLOB.areas_by_type[/area/tdome/arena_source]
template.copy_contents_to(thunderdome)
if("set_name")
- var/new_name = input(holder, "Please input a new name for the station.", "What?", "") as text|null
+ var/new_name = tgui_input_text(holder, "Please input a new name for the station.", "What?", "")
if(!new_name)
return
set_station_name(new_name)
@@ -195,7 +195,7 @@
message_admins("[key_name_admin(holder)] reset the station name.")
priority_announce("[command_name()] has renamed the station to \"[new_name]\".")
if("night_shift_set")
- var/val = alert(holder, "What do you want to set night shift to? This will override the automatic system until set to automatic again.", "Night Shift", "On", "Off", "Automatic")
+ var/val = tgui_alert(holder, "What do you want to set night shift to? This will override the automatic system until set to automatic again.", "Night Shift", list("On", "Off", "Automatic"))
switch(val)
if("Automatic")
if(CONFIG_GET(flag/enable_night_shifts))
@@ -239,14 +239,14 @@
if(!is_funmin)
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Virus Outbreak"))
- switch(alert("Do you want this to be a random disease or do you have something in mind?",,"Make Your Own","Random","Choose"))
+ switch(tgui_alert(holder, "Do you want this to be a random disease or do you have something in mind?",,list("Make Your Own","Random","Choose")))
if("Make Your Own")
AdminCreateVirus(holder)
if("Random")
var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
E = DC.runEvent()
if("Choose")
- var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in sortList(typesof(/datum/disease), /proc/cmp_typepaths_asc)
+ var/virus = tgui_input_list(holder, "Choose the virus to spread", "BIOHAZARD", sortList(typesof(/datum/disease), /proc/cmp_typepaths_asc))
var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
var/datum/round_event/disease_outbreak/DO = DC.runEvent()
DO.virus_type = virus
@@ -254,7 +254,7 @@
if("allspecies")
if(!is_funmin)
return
- var/result = input(holder, "Please choose a new species","Species") as null|anything in GLOB.species_list
+ var/result = tgui_input_list(holder, "Please choose a new species","Species", GLOB.species_list)
if(result)
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Mass Species Change", "[result]"))
log_admin("[key_name(holder)] turned all humans into [result]", 1)
@@ -297,7 +297,7 @@
if("onlyone")
if(!is_funmin)
return
- var/response = alert("Delay by 40 seconds?", "There can, in fact, only be one", "Instant!", "40 seconds (crush the hope of a normal shift)")
+ var/response = tgui_alert(holder, "Delay by 40 seconds?", "There can, in fact, only be one", list("Instant!", "40 seconds (crush the hope of a normal shift)"))
if(response == "Instant!")
holder.only_one()
else
@@ -308,7 +308,7 @@
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Guns"))
var/survivor_probability = 0
- switch(alert("Do you want this to create survivors antagonists?",,"No Antags","Some Antags","All Antags!"))
+ switch(tgui_alert(holder, "Do you want this to create survivors antagonists?",,list("No Antags","Some Antags","All Antags!")))
if("Some Antags")
survivor_probability = 25
if("All Antags!")
@@ -320,7 +320,7 @@
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Magic"))
var/survivor_probability = 0
- switch(alert("Do you want this to create magician antagonists?",,"No Antags","Some Antags","All Antags!"))
+ switch(tgui_alert(holder, "Do you want this to create magician antagonists?",,list("No Antags","Some Antags","All Antags!")))
if("Some Antags")
survivor_probability = 25
if("All Antags!")
@@ -331,12 +331,12 @@
if(!is_funmin)
return
if(!SSevents.wizardmode)
- if(alert("Do you want to toggle summon events on?",,"Yes","No") == "Yes")
+ if(tgui_alert(holder, "Do you want to toggle summon events on?",,list("Yes","No")) == "Yes")
summonevents()
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Events", "Activate"))
else
- switch(alert("What would you like to do?",,"Intensify Summon Events","Turn Off Summon Events","Nothing"))
+ switch(tgui_alert(holder, "What would you like to do?","Intensify Summon Events",list("Turn Off Summon Events","Nothing")))
if("Intensify Summon Events")
summonevents()
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Events", "Intensify"))
@@ -452,7 +452,7 @@
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Bomb Cap"))
- var/newBombCap = input(holder,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", GLOB.MAX_EX_LIGHT_RANGE) as num|null
+ var/newBombCap = tgui_input_num(holder,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", GLOB.MAX_EX_LIGHT_RANGE)
if (!CONFIG_SET(number/bombcap, newBombCap))
return
@@ -471,7 +471,7 @@
if(!is_funmin)
return
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(holder, "The game hasn't started yet!")
return
var/objective = stripped_input(holder, "Enter an objective")
if(!objective)
@@ -497,7 +497,7 @@
if(!is_funmin)
return
if(!SSticker.HasRoundStarted())
- alert("The game hasn't started yet!")
+ tgui_alert(holder, "The game hasn't started yet!")
return
message_admins("[key_name_admin(holder)] activated AK-47s for Everyone!")
holder.ak47s()
@@ -516,11 +516,11 @@
if("anime")
if(!is_funmin)
return
- var/animetype = alert("Would you like to have the clothes be changed?",,"Yes","No","Cancel")
+ var/animetype = tgui_alert(holder, "Would you like to have the clothes be changed?",,list("Yes","No","Cancel"))
var/droptype
if(animetype =="Yes")
- droptype = alert("Make the uniforms Nodrop?",,"Yes","No","Cancel")
+ droptype = tgui_alert(holder, "Make the uniforms Nodrop?",,list("Yes","No","Cancel"))
if(animetype == "Cancel" || droptype == "Cancel")
return
@@ -584,7 +584,7 @@
if(E)
E.processing = FALSE
if(E.announceWhen>0)
- switch(alert(holder, "Would you like to alert the crew?", "Alert", "Yes", "No", "Cancel"))
+ switch(tgui_alert(holder, "Would you like to alert the crew?", "Alert", list("Yes", "No", "Cancel")))
if("Cancel")
E.kill()
return
diff --git a/code/modules/admin/verbs/selectequipment.dm b/code/modules/admin/verbs/selectequipment.dm
index eb75df9ac1..12b2c42d9f 100644
--- a/code/modules/admin/verbs/selectequipment.dm
+++ b/code/modules/admin/verbs/selectequipment.dm
@@ -37,7 +37,7 @@
user = CLIENT_FROM_VAR(_user)
if(!ishuman(target) && !isobserver(target))
- alert("Invalid mob")
+ tgui_alert(usr, "Invalid mob")
return
target_mob = target
@@ -197,7 +197,7 @@
/client/proc/admin_apply_outfit(mob/target, dresscode)
if(!ishuman(target) && !isobserver(target))
- alert("Invalid mob")
+ tgui_alert(usr, "Invalid mob")
return
if(!dresscode)
@@ -210,7 +210,7 @@
else
human_target = target
if(human_target.l_store || human_target.r_store || human_target.s_store) //saves a lot of time for admins and coders alike
- if(alert("Drop Items in Pockets? No will delete them.", "Robust quick dress shop", "Yes", "No") == "No")
+ if(tgui_alert(src, "Drop Items in Pockets? No will delete them.", "Robust quick dress shop", list("Yes", "No")) == "No")
delete_pocket = TRUE
SSblackbox.record_feedback("tally", "admin_verb", 1, "Select Equipment") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/admin/verbs/shuttlepanel.dm b/code/modules/admin/verbs/shuttlepanel.dm
index 7552936136..e69c9aa050 100644
--- a/code/modules/admin/verbs/shuttlepanel.dm
+++ b/code/modules/admin/verbs/shuttlepanel.dm
@@ -24,7 +24,7 @@
options += "Delete Shuttle"
options += "Into The Sunset (delete & greentext 'escape')"
- var/selection = input(user, "Select where to fly [name || id]:", "Fly Shuttle") as null|anything in options
+ var/selection = tgui_input_list(user, "Select where to fly [name || id]:", "Fly Shuttle", options)
if(!selection)
return
@@ -35,12 +35,12 @@
setTimer(ignitionTime)
if("Delete Shuttle")
- if(alert(user, "Really delete [name || id]?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
+ if(tgui_alert(user, "Really delete [name || id]?", "Delete Shuttle", list("Cancel", "Really!")) != "Really!")
return
jumpToNullSpace()
if("Into The Sunset (delete & greentext 'escape')")
- if(alert(user, "Really delete [name || id] and greentext escape objectives?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
+ if(tgui_alert(user, "Really delete [name || id] and greentext escape objectives?", "Delete Shuttle", list("Cancel", "Really!")) != "Really!")
return
intoTheSunset()
@@ -52,7 +52,7 @@
return // use the existing verbs for this
/obj/docking_port/mobile/arrivals/admin_fly_shuttle(mob/user)
- switch(alert(user, "Would you like to fly the arrivals shuttle once or change its destination?", "Fly Shuttle", "Fly", "Retarget", "Cancel"))
+ switch(tgui_alert(user, "Would you like to fly the arrivals shuttle once or change its destination?", "Fly Shuttle", list("Fly", "Retarget", "Cancel")))
if("Cancel")
return
if("Fly")
@@ -67,7 +67,7 @@
if (canDock(S) == SHUTTLE_CAN_DOCK)
options[S.name || S.id] = S
- var/selection = input(user, "Select the new arrivals destination:", "Fly Shuttle") as null|anything in options
+ var/selection = tgui_input_list(user, "Select the new arrivals destination:", "Fly Shuttle", options)
if(!selection)
return
target_dock = options[selection]
diff --git a/code/modules/admin/view_variables/admin_delete.dm b/code/modules/admin/view_variables/admin_delete.dm
index 947ad5db2c..592b2680be 100644
--- a/code/modules/admin/view_variables/admin_delete.dm
+++ b/code/modules/admin/view_variables/admin_delete.dm
@@ -10,7 +10,7 @@
else
jmp_coords = coords = "in nullspace"
- if (alert(src, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", "Yes", "No") == "Yes")
+ if (tgui_alert(src, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", list("Yes", "No")) == "Yes")
log_admin("[key_name(usr)] deleted [D] [coords]")
message_admins("[key_name_admin(usr)] deleted [D] [jmp_coords]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/admin/view_variables/get_variables.dm b/code/modules/admin/view_variables/get_variables.dm
index 3f90002edc..ee53a06ce1 100644
--- a/code/modules/admin/view_variables/get_variables.dm
+++ b/code/modules/admin/view_variables/get_variables.dm
@@ -83,25 +83,25 @@
if(extra_classes)
classes += extra_classes
- .["class"] = input(src, "What kind of data?", "Variable Type", default_class) as null|anything in classes
+ .["class"] = tgui_input_list(src, "What kind of data?", "Variable Type", classes)
if(holder && holder.marked_datum && .["class"] == markstring)
.["class"] = VV_MARKED_DATUM
switch(.["class"])
if(VV_TEXT)
- .["value"] = input("Enter new text:", "Text", current_value) as null|text
+ .["value"] = tgui_input_text(src, "Enter new text:", "Text", current_value)
if(.["value"] == null)
.["class"] = null
return
if(VV_MESSAGE)
- .["value"] = input("Enter new text:", "Text", current_value) as null|message
+ .["value"] = tgui_input_message(src, "Enter new text:", "Text", current_value)
if(.["value"] == null)
.["class"] = null
return
if(VV_NUM)
- .["value"] = input("Enter new number:", "Num", current_value) as null|num
+ .["value"] = tgui_input_num(src, "Enter new number:", "Num", current_value)
if(.["value"] == null)
.["class"] = null
return
@@ -128,7 +128,7 @@
var/type = current_value
var/error = ""
do
- type = input("Enter type:[error]", "Type", type) as null|text
+ type = tgui_input_text(src, "Enter type:[error]", "Type", type)
if(!type)
break
type = text2path(type)
@@ -146,7 +146,7 @@
.["class"] = null
return
var/list/things = vv_reference_list(type, subtypes)
- var/value = input("Select reference:", "Reference", current_value) as null|anything in things
+ var/value = tgui_input_list(src, "Select reference:", "Reference", things)
if(!value)
.["class"] = null
return
@@ -159,7 +159,7 @@
.["class"] = null
return
var/list/things = vv_reference_list(type, subtypes)
- var/value = input("Select reference:", "Reference", current_value) as null|anything in things
+ var/value = tgui_input_list(src, "Select reference:", "Reference", things)
if(!value)
.["class"] = null
return
@@ -172,14 +172,14 @@
.["class"] = null
return
var/list/things = vv_reference_list(type, subtypes)
- var/value = input("Select reference:", "Reference", current_value) as null|anything in things
+ var/value = tgui_input_list(src, "Select reference:", "Reference", things)
if(!value)
.["class"] = null
return
.["value"] = things[value]
if(VV_CLIENT)
- .["value"] = input("Select reference:", "Reference", current_value) as null|anything in GLOB.clients
+ .["value"] = tgui_input_list(src, "Select reference:", "Reference", GLOB.clients)
if(.["value"] == null)
.["class"] = null
return
@@ -234,7 +234,7 @@
var/type = current_value
var/error = ""
do
- type = input("Enter type:[error]", "Type", type) as null|text
+ type = tgui_input_text(src, "Enter type:[error]", "Type", type)
if(!type)
break
type = text2path(type)
@@ -256,15 +256,15 @@
if(VV_TEXT_LOCATE)
var/datum/D
do
- var/ref = input("Enter reference:", "Reference") as null|text
+ var/ref = tgui_input_text(src, "Enter reference:", "Reference")
if(!ref)
break
D = locate(ref)
if(!D)
- alert("Invalid ref!")
+ tgui_alert(usr, "Invalid ref!")
continue
if(!D.can_vv_mark())
- alert("Datum can not be marked!")
+ tgui_alert(usr, "Datum can not be marked!")
continue
while(!D)
.["type"] = D.type
diff --git a/code/modules/admin/view_variables/mass_edit_variables.dm b/code/modules/admin/view_variables/mass_edit_variables.dm
index 5b120b6cef..b2171e5df1 100644
--- a/code/modules/admin/view_variables/mass_edit_variables.dm
+++ b/code/modules/admin/view_variables/mass_edit_variables.dm
@@ -31,7 +31,7 @@
names = sortList(names)
- variable = input("Which var?", "Var") as null|anything in names
+ variable = tgui_input_list(src, "Which var?", "Var", names)
else
variable = var_name
@@ -52,7 +52,7 @@
if(variable in GLOB.VVpixelmovement)
if(!check_rights(R_DEBUG))
return
- var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT")
+ var/prompt = tgui_alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", list("ABORT ", "Continue", " ABORT"))
if (prompt != "Continue")
return
@@ -118,7 +118,7 @@
var/pre_processing = new_value
var/unique
if (varsvars?.len)
- unique = alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", "Unique", "Same")
+ unique = tgui_alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", list("Unique", "Same"))
if(unique == "Unique")
unique = TRUE
else
@@ -145,7 +145,7 @@
CHECK_TICK
if (VV_NEW_TYPE)
- var/many = alert(src, "Create only one [value["type"]] and assign each or a new one for each thing", "How Many", "One", "Many", "Cancel")
+ var/many = tgui_alert(src, "Create only one [value["type"]] and assign each or a new one for each thing", "How Many", list("One", "Many", "Cancel"))
if (many == "Cancel")
return
if (many == "Many")
diff --git a/code/modules/admin/view_variables/modify_variables.dm b/code/modules/admin/view_variables/modify_variables.dm
index b9de3e09bc..3287c04cb8 100644
--- a/code/modules/admin/view_variables/modify_variables.dm
+++ b/code/modules/admin/view_variables/modify_variables.dm
@@ -9,7 +9,7 @@ GLOBAL_PROTECT(VVpixelmovement)
/client/proc/vv_parse_text(O, new_var)
if(O && findtext(new_var,"\["))
- var/process_vars = alert(usr,"\[] detected in string, process as variables?","Process Variables?","Yes","No")
+ var/process_vars = tgui_alert(usr, "\[] detected in string, process as variables?","Process Variables?",list("Yes","No"))
if(process_vars == "Yes")
. = string2listofvars(new_var, O)
@@ -24,7 +24,7 @@ GLOBAL_PROTECT(VVpixelmovement)
if (!subtypes || !subtypes.len)
return FALSE
if (subtypes?.len)
- switch(alert("Strict object type detection?", "Type detection", "Strictly this type","This type and subtypes", "Cancel"))
+ switch(tgui_alert(src, "Strict object type detection?", "Type detection", list("Strictly this type","This type and subtypes", "Cancel")))
if("Strictly this type")
return FALSE
if("This type and subtypes")
@@ -97,7 +97,7 @@ GLOBAL_PROTECT(VVpixelmovement)
L += var_value
- switch(alert("Would you like to associate a value with the list entry?",,"Yes","No"))
+ switch(tgui_alert(src, "Would you like to associate a value with the list entry?",,list("Yes","No")))
if("Yes")
L[var_value] = mod_list_add_ass(O) //hehe
if (O)
@@ -116,7 +116,7 @@ GLOBAL_PROTECT(VVpixelmovement)
return
if(L.len > 1000)
- var/confirm = alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort")
+ var/confirm = tgui_alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", list("Continue", "Abort"))
if(confirm != "Continue")
return
@@ -131,7 +131,7 @@ GLOBAL_PROTECT(VVpixelmovement)
value = "null"
names["#[i] [key] = [value]"] = i
if (!index)
- var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)" + "(CLEAR NULLS)" + "(CLEAR DUPES)" + "(SHUFFLE)"
+ var/variable = tgui_input_list(src, "Which var?","Var",names + "(ADD VAR)" + "(CLEAR NULLS)" + "(CLEAR DUPES)" + "(SHUFFLE)")
if(variable == null)
return
@@ -178,7 +178,7 @@ GLOBAL_PROTECT(VVpixelmovement)
if (index == null)
return
var/assoc = 0
- var/prompt = alert(src, "Do you want to edit the key or its assigned value?", "Associated List", "Key", "Assigned Value", "Cancel")
+ var/prompt = tgui_alert(src, "Do you want to edit the key or its assigned value?", "Associated List", list("Key", "Assigned Value", "Cancel"))
if (prompt == "Cancel")
return
if (prompt == "Assigned Value")
@@ -308,7 +308,7 @@ GLOBAL_PROTECT(VVpixelmovement)
names = sortList(names)
- variable = input("Which var?","Var") as null|anything in names
+ variable = tgui_input_list(src, "Which var?","Var",names)
if(!variable)
return
diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm
index c32b7a9ad7..e4f289ec21 100644
--- a/code/modules/admin/view_variables/topic.dm
+++ b/code/modules/admin/view_variables/topic.dm
@@ -32,7 +32,7 @@
// If the new name is something that would be restricted by IC chat filters,
// give the admin a warning but allow them to do it anyway if they want.
- // if(CHAT_FILTER_CHECK(new_name) && alert(usr, "Your selected name contains words restricted by IC chat filters. Confirm this new name?", "IC Chat Filter Conflict", "Confirm", "Cancel") == "Cancel")
+ // if(CHAT_FILTER_CHECK(new_name) && tgui_alert(usr, "Your selected name contains words restricted by IC chat filters. Confirm this new name?", "IC Chat Filter Conflict", list("Confirm", "Cancel")) == "Cancel")
// return
if( !new_name || !M )
@@ -69,7 +69,7 @@
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/monkey", confidential = TRUE)
return
- if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
+ if(tgui_alert(usr, "Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
return
if(!Mo)
to_chat(usr, "Mob doesn't exist anymore", confidential = TRUE)
@@ -86,7 +86,7 @@
var/Text = href_list["adjustDamage"]
- var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num|null
+ var/amount = tgui_input_num(usr, "Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0)
if (isnull(amount))
return
diff --git a/code/modules/admin/view_variables/topic_basic.dm b/code/modules/admin/view_variables/topic_basic.dm
index 043c50173d..f8c1b6174e 100644
--- a/code/modules/admin/view_variables/topic_basic.dm
+++ b/code/modules/admin/view_variables/topic_basic.dm
@@ -68,7 +68,7 @@
names += componentsubtypes
names += "---Elements---"
names += sortList(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
- var/result = input(usr, "Choose a component/element to add","better know what ur fuckin doin pal") as null|anything in names
+ var/result = tgui_input_list(usr, "Choose a component/element to add","better know what ur fuckin doin pal",names)
if(!usr || !result || result == "---Components---" || result == "---Elements---")
return
if(QDELETED(src))
diff --git a/code/modules/admin/view_variables/topic_list.dm b/code/modules/admin/view_variables/topic_list.dm
index 349d9da698..9351f58152 100644
--- a/code/modules/admin/view_variables/topic_list.dm
+++ b/code/modules/admin/view_variables/topic_list.dm
@@ -9,7 +9,7 @@
mod_list(target, null, "list", "contents", target_index, autodetect_class = FALSE)
if(href_list[VV_HK_LIST_REMOVE])
var/variable = target[target_index]
- var/prompt = alert("Do you want to remove item number [target_index] from list?", "Confirm", "Yes", "No")
+ var/prompt = tgui_alert(src, "Do you want to remove item number [target_index] from list?", "Confirm", list("Yes", "No"))
if (prompt != "Yes")
return
target.Cut(target_index, target_index+1)
diff --git a/code/modules/antagonists/abductor/abductor.dm b/code/modules/antagonists/abductor/abductor.dm
index f7e66ee90a..a7fb1fd859 100644
--- a/code/modules/antagonists/abductor/abductor.dm
+++ b/code/modules/antagonists/abductor/abductor.dm
@@ -99,7 +99,7 @@
var/list/current_teams = list()
for(var/datum/team/abductor_team/T in GLOB.antagonist_teams)
current_teams[T.name] = T
- var/choice = input(admin,"Add to which team ?") as null|anything in (current_teams + "new team")
+ var/choice = tgui_input_list(admin,"Add to which team ?", "", current_teams + "new team")
if (choice == "new team")
team = new
else if(choice in current_teams)
@@ -119,7 +119,7 @@
to_chat(admin, "This only works on humans!")
return
var/mob/living/carbon/human/H = owner.current
- var/gear = alert(admin,"Agent or Scientist Gear","Gear","Agent","Scientist")
+ var/gear = tgui_alert(admin, "Agent or Scientist Gear","Gear",list("Agent","Scientist"))
if(gear)
if(gear=="Agent")
H.equipOutfit(/datum/outfit/abductor/agent)
diff --git a/code/modules/antagonists/blob/blob/powers.dm b/code/modules/antagonists/blob/blob/powers.dm
index 9256d0d16b..f26a0e0002 100644
--- a/code/modules/antagonists/blob/blob/powers.dm
+++ b/code/modules/antagonists/blob/blob/powers.dm
@@ -72,7 +72,7 @@
for(var/i in 1 to GLOB.blob_nodes.len)
var/obj/structure/blob/node/B = GLOB.blob_nodes[i]
nodes["Blob Node #[i] ([get_area_name(B)])"] = B
- var/node_name = input(src, "Choose a node to jump to.", "Node Jump") in nodes
+ var/node_name = tgui_input_list(src, "Choose a node to jump to.", "Node Jump", nodes)
var/obj/structure/blob/node/chosen_node = nodes[node_name]
if(chosen_node)
forceMove(chosen_node.loc)
@@ -352,7 +352,7 @@
var/datum/blobstrain/bs = pick((GLOB.valid_blobstrains))
choices[initial(bs.name)] = bs
- var/choice = input(usr, "Please choose a new strain","Strain") as anything in choices
+ var/choice = tgui_input_list(usr, "Please choose a new strain","Strain", choices)
if (choice && choices[choice] && !QDELETED(src))
var/datum/blobstrain/bs = choices[choice]
set_strain(bs)
diff --git a/code/modules/antagonists/bloodsucker/datum_bloodsucker.dm b/code/modules/antagonists/bloodsucker/datum_bloodsucker.dm
index 07c92bfd97..27f33ce546 100644
--- a/code/modules/antagonists/bloodsucker/datum_bloodsucker.dm
+++ b/code/modules/antagonists/bloodsucker/datum_bloodsucker.dm
@@ -289,7 +289,7 @@
options["\[ Not Now \]"] = null
// Abort?
if(options.len > 1)
- var/choice = input(owner.current, "You have the opportunity to grow more ancient at the cost of [level_bloodcost] units of blood. Select a power to advance your Rank.", "Your Blood Thickens...") in options
+ var/choice = tgui_input_list(owner.current, "You have the opportunity to grow more ancient at the cost of [level_bloodcost] units of blood. Select a power to advance your Rank.", "Your Blood Thickens...", options)
// Cheat-Safety: Can't keep opening/closing coffin to spam levels
if(bloodsucker_level_unspent <= 0) // Already spent all your points, and tried opening/closing your coffin, pal.
return
diff --git a/code/modules/antagonists/bloodsucker/objects/bloodsucker_coffin.dm b/code/modules/antagonists/bloodsucker/objects/bloodsucker_coffin.dm
index 881da8f282..d93ae9ed2b 100644
--- a/code/modules/antagonists/bloodsucker/objects/bloodsucker_coffin.dm
+++ b/code/modules/antagonists/bloodsucker/objects/bloodsucker_coffin.dm
@@ -143,7 +143,7 @@
A = get_area(src)
// Claim?
if(!bloodsuckerdatum.coffin && !resident && (is_station_level(Turf.z) || !A.map_name == "Space"))
- switch(alert(user,"Do you wish to claim this as your coffin? [get_area(src)] will be your lair.","Claim Lair","Yes", "No"))
+ switch(tgui_alert(user, "Do you wish to claim this as your coffin? [get_area(src)] will be your lair.","Claim Lair",list("Yes", "No")))
if("Yes")
ClaimCoffin(user)
if (user.AmStaked()) // Stake? No Heal!
diff --git a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm
index e8fb82a5d1..c0c500e619 100644
--- a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm
+++ b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm
@@ -232,7 +232,7 @@
if(B.lair != get_area(src))
to_chat(user, "You may only activate this structure in your lair: [B.lair].")
return
- switch(alert(user,"Do you wish to afix this structure here? Be aware you wont be able to unsecure it anymore", "Secure [src]", "Yes", "No"))
+ switch(tgui_alert(user, "Do you wish to afix this structure here? Be aware you wont be able to unsecure it anymore", "Secure [src]", list("Yes", "No")))
if("Yes")
owner = user
density = FALSE
@@ -398,7 +398,7 @@
alert_text += "\n\nYou will no longer be loyal to the station!"
if(SSticker.mode.AmValidAntag(target.mind)) */
alert_text += "\n\nYou will not lose your current objectives, but they come second to the will of your new master!"
- switch(alert(target, alert_text,"THE HORRIBLE PAIN! WHEN WILL IT END?!","Yes, Master!", "NEVER!"))
+ switch(tgui_alert(target, alert_text,"THE HORRIBLE PAIN! WHEN WILL IT END?!",list("Yes, Master!", "NEVER!")))
if("Yes, Master!")
disloyalty_accept(target)
else
diff --git a/code/modules/antagonists/brainwashing/brainwashing.dm b/code/modules/antagonists/brainwashing/brainwashing.dm
index 491ee9d2e5..0bcdd980bf 100644
--- a/code/modules/antagonists/brainwashing/brainwashing.dm
+++ b/code/modules/antagonists/brainwashing/brainwashing.dm
@@ -54,9 +54,9 @@
var/objective = stripped_input(admin, "Add an objective, or leave empty to finish.", "Brainwashing", null, MAX_MESSAGE_LEN)
if(objective)
objectives += objective
- while(alert(admin,"Add another objective?","More Brainwashing","Yes","No") == "Yes")
+ while(tgui_alert(admin, "Add another objective?","More Brainwashing",list("Yes","No")) == "Yes")
- if(alert(admin,"Confirm Brainwashing?","Are you sure?","Yes","No") == "No")
+ if(tgui_alert(admin, "Confirm Brainwashing?","Are you sure?",list("Yes","No")) == "No")
return
if(!LAZYLEN(objectives))
diff --git a/code/modules/antagonists/brother/brother.dm b/code/modules/antagonists/brother/brother.dm
index 30e6a80e85..8a5f23ae58 100644
--- a/code/modules/antagonists/brother/brother.dm
+++ b/code/modules/antagonists/brother/brother.dm
@@ -63,7 +63,7 @@
continue
candidates[L.mind.name] = L.mind
- var/choice = input(admin,"Choose the blood brother.", "Brother") as null|anything in candidates
+ var/choice = tgui_input_list(admin,"Choose the blood brother.", "Brother", candidates)
if(!choice)
return
var/datum/mind/bro = candidates[choice]
diff --git a/code/modules/antagonists/changeling/powers/fakedeath.dm b/code/modules/antagonists/changeling/powers/fakedeath.dm
index 08dc85efbf..0bbbeefbd3 100644
--- a/code/modules/antagonists/changeling/powers/fakedeath.dm
+++ b/code/modules/antagonists/changeling/powers/fakedeath.dm
@@ -36,7 +36,7 @@
to_chat(user, "We are already reviving.")
return
if(!user.stat) //Confirmation for living changelings if they want to fake their death
- switch(alert("Are we sure we wish to fake our own death?",,"Yes", "No"))
+ switch(tgui_alert(user, "Are we sure we wish to fake our own death?",,list("Yes", "No")))
if("No")
return
return ..()
diff --git a/code/modules/antagonists/changeling/powers/headcrab.dm b/code/modules/antagonists/changeling/powers/headcrab.dm
index 867f160081..c88790b800 100644
--- a/code/modules/antagonists/changeling/powers/headcrab.dm
+++ b/code/modules/antagonists/changeling/powers/headcrab.dm
@@ -12,7 +12,7 @@
/obj/effect/proc_holder/changeling/headcrab/sting_action(mob/user)
set waitfor = FALSE
- if(alert("Are we sure we wish to kill ourself and create a headslug?",,"Yes", "No") == "No")
+ if(tgui_alert(user, "Are we sure we wish to kill ourself and create a headslug?",,list("Yes", "No")) == "No")
return
var/datum/mind/M = user.mind
var/list/organs = user.getorganszone(BODY_ZONE_HEAD, 1)
diff --git a/code/modules/antagonists/changeling/powers/hivemind.dm b/code/modules/antagonists/changeling/powers/hivemind.dm
index f7718d7708..a342ae7b32 100644
--- a/code/modules/antagonists/changeling/powers/hivemind.dm
+++ b/code/modules/antagonists/changeling/powers/hivemind.dm
@@ -60,7 +60,7 @@ GLOBAL_LIST_EMPTY(hivemind_bank)
to_chat(user, "The airwaves already have all of our DNA.")
return
- var/chosen_name = input("Select a DNA to channel: ", "Channel DNA", null) as null|anything in names
+ var/chosen_name = tgui_input_list(user, "Select a DNA to channel: ", "Channel DNA", names)
if(!chosen_name)
return
@@ -107,7 +107,7 @@ GLOBAL_LIST_EMPTY(hivemind_bank)
to_chat(user, "There's no new DNA to absorb from the air.")
return
- var/S = input("Select a DNA absorb from the air: ", "Absorb DNA", null) as null|anything in names
+ var/S = tgui_input_list(user, "Select a DNA absorb from the air: ", "Absorb DNA", names)
if(!S)
return
var/datum/changelingprofile/chosen_prof = names[S]
diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
index 1e8c7242ad..a4cbdaa08f 100644
--- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
+++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
@@ -459,13 +459,13 @@
for(var/datum/clockwork_rite/R in GLOB.all_clockwork_rites)
if(is_servant_of_ratvar(user, require_full_power = TRUE) || !R.requires_full_power)
possible_rites[R] = R
- var/input_key = input(user, "Choose a rite", "Choosing a rite") as null|anything in possible_rites
+ var/input_key = tgui_input_list(user, "Choose a rite", "Choosing a rite", possible_rites)
if(!input_key)
return
var/datum/clockwork_rite/CR = possible_rites[input_key]
if(!CR)
return
- var/choice = alert(user, "What to do with this rite?", "What to do?", "Cast", "Show Info", "Cancel")
+ var/choice = tgui_alert(user, "What to do with this rite?", "What to do?", list("Cast", "Show Info", "Cancel"))
switch(choice)
if("Cast")
CR.try_cast(src, user)
diff --git a/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm b/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm
index ab8c7abd0a..e4fe9e8c9d 100644
--- a/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm
+++ b/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm
@@ -187,7 +187,7 @@
if(!possible_targets.len)
to_chat(invoker, "There are no other eligible targets for a Spatial Gateway!")
return FALSE
- var/input_target_key = input(invoker, "Choose a target to form a rift to.", "Spatial Gateway") as null|anything in possible_targets
+ var/input_target_key = tgui_input_list(invoker, "Choose a target to form a rift to.", "Spatial Gateway", possible_targets)
var/atom/movable/target = possible_targets[input_target_key]
if(!src || !input_target_key || !invoker || !invoker.canUseTopic(src, !issilicon(invoker)) || !is_servant_of_ratvar(invoker) || (isitem(src) && invoker.get_active_held_item() != src) || !invoker.can_speak_vocal())
return FALSE //if any of the involved things no longer exist, the invoker is stunned, too far away to use the object, or does not serve ratvar, or if the object is an item and not in the mob's active hand, fail
diff --git a/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm b/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm
index 8060b7b0cd..77b81ee536 100644
--- a/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm
+++ b/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm
@@ -371,7 +371,7 @@
update_quickbind()
else
// todo: async this due to ((input)) but its fine for now
- var/target_index = input("Position of [initial(path.name)], 1 to [maximum_quickbound]?", "Input") as num|null
+ var/target_index = tgui_input_num(usr, "Position of [initial(path.name)], 1 to [maximum_quickbound]?", "Input")
if(isnum(target_index) && target_index > 0 && target_index <= maximum_quickbound && !..())
var/datum/clockwork_scripture/S
if(LAZYLEN(quickbound) >= target_index)
diff --git a/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm b/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm
index daee9f5c2c..eba7c4be72 100644
--- a/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm
+++ b/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm
@@ -48,7 +48,7 @@
to_chat(user, "You were too late! Better luck next time.")
return
user.forceMove(get_turf(src)) //If we attack through the alert, jump to the chassis so we know what we're getting into
- if(alert(user, "Become a [construct_name]? You can no longer be cloned!", construct_name, "Yes", "Cancel") == "Cancel")
+ if(tgui_alert(user, "Become a [construct_name]? You can no longer be cloned!", construct_name, list("Yes", "Cancel")) == "Cancel")
return
if(QDELETED(src))
to_chat(user, "You were too late! Better luck next time.")
diff --git a/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm b/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm
index e7aeb7e796..faea34b53e 100644
--- a/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm
+++ b/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm
@@ -131,7 +131,7 @@
if(!G.recalls_remaining)
to_chat(src, "The Ark can no longer recall!")
return
- if(alert(src, "Initiate mass recall?", "Mass Recall", "Yes", "No") != "Yes" || QDELETED(src) || QDELETED(G) || !G.obj_integrity)
+ if(tgui_alert(src, "Initiate mass recall?", "Mass Recall", list("Yes", "No")) != "Yes" || QDELETED(src) || QDELETED(G) || !G.obj_integrity)
return
G.initiate_mass_recall() //wHOOPS LOOKS LIKE A HULK GOT THROUGH
@@ -156,7 +156,7 @@
commands += "Power This Structure"
if(P.obj_integrity < P.max_integrity)
commands += "Repair This Structure"
- var/roma_invicta = input(src, "Choose a command to issue to your cult!", "Issue Commands") as null|anything in commands
+ var/roma_invicta = tgui_input_list(src, "Choose a command to issue to your cult!", "Issue Commands", commands)
if(!roma_invicta)
return
var/command_text = ""
@@ -290,7 +290,7 @@
to_chat(owner, "There are no Obelisks to warp to!")
return
- var/target_key = input(owner, "Choose an Obelisk to warp to.", "Obelisk Warp") as null|anything in possible_targets
+ var/target_key = tgui_input_list(owner, "Choose an Obelisk to warp to.", "Obelisk Warp", possible_targets)
var/obj/structure/destructible/clockwork/powered/clockwork_obelisk/target = possible_targets[target_key]
if(!target_key || !owner)
@@ -334,6 +334,6 @@
/datum/action/innate/eminence/mass_recall/Activate()
var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar
if(G && !G.recalling && G.recalls_remaining)
- if(alert(owner, "Initiate mass recall?", "Mass Recall", "Yes", "No") != "Yes" || QDELETED(owner) || QDELETED(G) || !G.obj_integrity)
+ if(tgui_alert(owner, "Initiate mass recall?", "Mass Recall", list("Yes", "No")) != "Yes" || QDELETED(owner) || QDELETED(G) || !G.obj_integrity)
return
G.initiate_mass_recall()
diff --git a/code/modules/antagonists/clockcult/clock_scripture.dm b/code/modules/antagonists/clockcult/clock_scripture.dm
index 6922c7cd81..17d03c020f 100644
--- a/code/modules/antagonists/clockcult/clock_scripture.dm
+++ b/code/modules/antagonists/clockcult/clock_scripture.dm
@@ -276,7 +276,7 @@ Judgement 80k power or nine converts
return
var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar
if(G && !G.active && combat_construct && is_reebe(invoker.z) && !confirmed) //Putting marauders on the base during the prep phase is a bad idea mmkay
- if(alert(invoker, "This is a combat construct, and you cannot easily get it to the station. Are you sure you want to make one here?", "Construct Alert", "Yes", "Cancel") == "Cancel")
+ if(tgui_alert(invoker, "This is a combat construct, and you cannot easily get it to the station. Are you sure you want to make one here?", "Construct Alert", list("Yes", "Cancel")) == "Cancel")
return
if(!is_servant_of_ratvar(invoker) || !invoker.canUseTopic(slab))
return
diff --git a/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm b/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm
index 6204871a77..9d0adfdba8 100644
--- a/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm
@@ -42,7 +42,7 @@
/obj/structure/destructible/clockwork/massive/celestial_gateway/on_attack_hand(mob/user, act_intent, unarmed_attack_flags)
if(!active && is_servant_of_ratvar(user) && user.canUseTopic(src, !issilicon(user), NO_DEXTERY))
- if(alert(user, "Are you sure you want to activate the ark? Once enabled, there will be no turning back.", "Enabling the ark", "Activate!", "Cancel") == "Activate!")
+ if(tgui_alert(user, "Are you sure you want to activate the ark? Once enabled, there will be no turning back.", "Enabling the ark", list("Activate!", "Cancel")) == "Activate!")
if(active)
return
log_game("[key_name(user)] has activated an Ark of the Clockwork Justicar at [COORD(src)].")
@@ -356,9 +356,9 @@
if(GLOB.servants_active)
to_chat(user, "The Ark is already counting down.")
return ..()
- if(alert(user, "Activate the Ark's countdown?", name, "Yes", "No") == "Yes")
- if(alert(user, "REALLY activate the Ark's countdown?", name, "Yes", "No") == "Yes")
- if(alert(user, "You're REALLY SURE? This cannot be undone.", name, "Yes - Activate the Ark", "No") == "Yes - Activate the Ark")
+ if(tgui_alert(user, "Activate the Ark's countdown?", name, list("Yes", "No")) == "Yes")
+ if(tgui_alert(user, "REALLY activate the Ark's countdown?", name, list("Yes", "No")) == "Yes")
+ if(tgui_alert(user, "You're REALLY SURE? This cannot be undone.", name, list("Yes - Activate the Ark", "No")) == "Yes - Activate the Ark")
message_admins("Admin [key_name_admin(user)] started the Ark's countdown!")
log_admin("Admin [key_name(user)] started the Ark's countdown on a non-clockcult mode!")
to_chat(user, "The gamemode is now being treated as clockwork cult, and the Ark is counting down from 5 \
diff --git a/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm b/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm
index 2b4b797b4d..cef6e70ec3 100644
--- a/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm
@@ -53,7 +53,7 @@
if(!is_servant_of_ratvar(user) || !can_access_clockwork_power(src, hierophant_cost) || !anchored)
to_chat(user, "You place your hand on [src], but it doesn't react.")
return
- var/choice = alert(user,"You place your hand on [src]...",,"Hierophant Broadcast","Spatial Gateway","Cancel") //Will create a stable gateway instead if between two obelisks one of which is onstation and the other on reebe
+ var/choice = tgui_alert(user, "You place your hand on [src]...",,list("Hierophant Broadcast","Spatial Gateway","Cancel")) //Will create a stable gateway instead if between two obelisks one of which is onstation and the other on reebe
switch(choice)
if("Hierophant Broadcast")
if(active)
diff --git a/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm b/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm
index 5302153b9c..de7dfabbd0 100644
--- a/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm
@@ -56,7 +56,7 @@
if(!GLOB.servants_active)
to_chat(user, "The Ark must be active first!")
return
- if(alert(user, "Become the Eminence using admin?", "Become Eminence", "Yes", "No") != "Yes")
+ if(tgui_alert(user, "Become the Eminence using admin?", "Become Eminence", list("Yes", "No")) != "Yes")
return
message_admins("Admin [key_name_admin(user)] directly became the Eminence of the cult!")
log_admin("Admin [key_name(user)] made themselves the Eminence.")
@@ -67,7 +67,7 @@
M.playsound_local(M, 'sound/machines/clockcult/eminence_selected.ogg', 50, FALSE)
/obj/structure/destructible/clockwork/eminence_spire/proc/nomination(mob/living/nominee) //A user is nominating themselves or ghosts to become Eminence
- var/nomination_choice = alert(nominee, "Who would you like to nominate?", "Eminence Nomination", "Nominate Yourself", "Nominate Ghosts", "Cancel")
+ var/nomination_choice = tgui_alert(nominee, "Who would you like to nominate?", "Eminence Nomination", list("Nominate Yourself", "Nominate Ghosts", "Cancel"))
if(!is_servant_of_ratvar(nominee) || !nominee.canUseTopic(src) || eminence_nominee)
return
switch(nomination_choice)
@@ -84,7 +84,7 @@
selection_timer = addtimer(CALLBACK(src, .proc/kingmaker), 300, TIMER_STOPPABLE)
/obj/structure/destructible/clockwork/eminence_spire/proc/objection(mob/living/wright)
- if(alert(wright, "Object to the selection of [eminence_nominee] as Eminence?", "Objection!", "Object", "Cancel") == "Cancel" || !is_servant_of_ratvar(wright) || !wright.canUseTopic(src) || !eminence_nominee)
+ if(tgui_alert(wright, "Object to the selection of [eminence_nominee] as Eminence?", "Objection!", list("Object", "Cancel")) == "Cancel" || !is_servant_of_ratvar(wright) || !wright.canUseTopic(src) || !eminence_nominee)
return
hierophant_message("[wright] objects to the nomination of [eminence_nominee]! The eminence spire has been reset.")
for(var/mob/M in servants_and_ghosts())
@@ -93,7 +93,7 @@
deltimer(selection_timer)
/obj/structure/destructible/clockwork/eminence_spire/proc/cancelation(mob/living/cold_feet)
- if(alert(cold_feet, "Cancel your nomination?", "Cancel Nomination", "Withdraw Nomination", "Cancel") == "Cancel" || !is_servant_of_ratvar(cold_feet) || !cold_feet.canUseTopic(src) || !eminence_nominee)
+ if(tgui_alert(cold_feet, "Cancel your nomination?", "Cancel Nomination", list("Withdraw Nomination", "Cancel")) == "Cancel" || !is_servant_of_ratvar(cold_feet) || !cold_feet.canUseTopic(src) || !eminence_nominee)
return
hierophant_message("[eminence_nominee] has withdrawn their nomination! The eminence spire has been reset.")
for(var/mob/M in servants_and_ghosts())
diff --git a/code/modules/antagonists/clockcult/clock_structures/heralds_beacon.dm b/code/modules/antagonists/clockcult/clock_structures/heralds_beacon.dm
index f8a3afbf91..76220702c0 100644
--- a/code/modules/antagonists/clockcult/clock_structures/heralds_beacon.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/heralds_beacon.dm
@@ -71,7 +71,7 @@
to_chat(user, "You can no longer vote with [src].")
return
var/voting = !(user.key in voters)
- if(alert(user, "[voting ? "Cast a" : "Undo your"] vote to activate the beacon?", "Herald's Beacon", "Change Vote", "Cancel") == "Cancel")
+ if(tgui_alert(user, "[voting ? "Cast a" : "Undo your"] vote to activate the beacon?", "Herald's Beacon", list("Change Vote", "Cancel")) == "Cancel")
return
if(!user.canUseTopic(src) || !is_servant_of_ratvar(user) || !available)
return
diff --git a/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm b/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm
index 51f8dc7101..b08b90bbfa 100644
--- a/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm
@@ -42,7 +42,7 @@
//ATTACK GHOST IGNORING PARENT RETURN VALUE
/obj/structure/destructible/clockwork/massive/ratvar/attack_ghost(mob/dead/observer/O)
- var/alertresult = alert(O, "Embrace the Justiciar's light? You can no longer be cloned!",,"Yes", "No")
+ var/alertresult = tgui_alert(O, "Embrace the Justiciar's light? You can no longer be cloned!",,list("Yes", "No"))
if(alertresult == "No" || QDELETED(O) || !istype(O) || !O.key)
return FALSE
var/mob/living/simple_animal/drone/cogscarab/ratvar/R = new/mob/living/simple_animal/drone/cogscarab/ratvar(get_turf(src))
diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm
index 9bd1030685..a8fe894eda 100644
--- a/code/modules/antagonists/cult/blood_magic.dm
+++ b/code/modules/antagonists/cult/blood_magic.dm
@@ -49,7 +49,7 @@
to_chat(owner, "Your body has reached its limit, you cannot store more than [MAX_BLOODCHARGE] spells at once. Pick a spell to nullify.")
else
to_chat(owner, "Your body has reached its limit, you cannot have more than [RUNELESS_MAX_BLOODCHARGE] spells at once without an empowering rune! Pick a spell to nullify.")
- var/nullify_spell = input(owner, "Choose a spell to remove.", "Current Spells") as null|anything in spells
+ var/nullify_spell = tgui_input_list(owner, "Choose a spell to remove.", "Current Spells", spells)
if(nullify_spell)
qdel(nullify_spell)
return
@@ -61,9 +61,9 @@
var/cult_name = initial(J.name)
possible_spells[cult_name] = J
possible_spells += "(REMOVE SPELL)"
- entered_spell_name = input(owner, "Pick a blood spell to prepare...", "Spell Choices") as null|anything in possible_spells
+ entered_spell_name = tgui_input_list(owner, "Pick a blood spell to prepare...", "Spell Choices", possible_spells)
if(entered_spell_name == "(REMOVE SPELL)")
- var/nullify_spell = input(owner, "Choose a spell to remove.", "Current Spells") as null|anything in spells
+ var/nullify_spell = tgui_input_list(owner, "Choose a spell to remove.", "Current Spells", spells)
if(nullify_spell)
qdel(nullify_spell)
return
@@ -192,7 +192,7 @@
magic_path = "/obj/item/melee/blood_magic/armor"
/datum/action/innate/cult/blood_spell/equipment/Activate()
- var/choice = alert(owner,"Choose your equipment type",,"Combat Equipment","Ritual Dagger","Cancel")
+ var/choice = tgui_alert(owner, "Choose your equipment type",,"Combat Equipment",list("Ritual Dagger","Cancel"))
if(choice == "Ritual Dagger")
var/turf/T = get_turf(owner)
owner.visible_message("[owner]'s hand glows red for a moment.", \
@@ -497,7 +497,7 @@
log_game("Teleport spell failed - user in away mission")
return
- var/input_rune_key = input(user, "Choose a rune to teleport to.", "Rune to Teleport to") as null|anything in potential_runes //we know what key they picked
+ var/input_rune_key = tgui_input_list(user, "Choose a rune to teleport to.", "Rune to Teleport to", potential_runes) //we know what key they picked
var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to?
if(QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !actual_selected_rune || !proximity)
return
@@ -610,7 +610,7 @@
candidate.color = "black"
if(do_after(user, 90, target = candidate))
candidate.emp_act(80)
- var/construct_class = alert(user, "Please choose which type of construct you wish to create.",,"Juggernaut","Wraith","Artificer")
+ var/construct_class = tgui_alert(user, "Please choose which type of construct you wish to create.",,list("Juggernaut","Wraith","Artificer"))
user.visible_message("The dark cloud receedes from what was formerly [candidate], revealing a\n [construct_class]!")
switch(construct_class)
if("Juggernaut")
@@ -787,7 +787,7 @@
/obj/item/melee/blood_magic/manipulator/attack_self(mob/living/user)
if(iscultist(user))
var/list/options = list("Blood Spear (150)", "Blood Bolt Barrage (300)", "Blood Beam (500)")
- var/choice = input(user, "Choose a greater blood rite...", "Greater Blood Rites") as null|anything in options
+ var/choice = tgui_input_list(user, "Choose a greater blood rite...", "Greater Blood Rites", options)
if(!choice)
to_chat(user, "You decide against conducting a greater blood rite.")
return
diff --git a/code/modules/antagonists/cult/cult_comms.dm b/code/modules/antagonists/cult/cult_comms.dm
index bbdf41ff48..dcc6379c1f 100644
--- a/code/modules/antagonists/cult/cult_comms.dm
+++ b/code/modules/antagonists/cult/cult_comms.dm
@@ -79,7 +79,7 @@
return ..()
/datum/action/innate/cult/mastervote/Activate()
- var/choice = alert(owner, "The mantle of leadership is heavy. Success in this role requires an expert level of communication and experience. Are you sure?",, "Yes", "No")
+ var/choice = tgui_alert(owner, "The mantle of leadership is heavy. Success in this role requires an expert level of communication and experience. Are you sure?",, list("Yes", "No"))
if(choice == "Yes" && IsAvailable())
var/datum/antagonist/cult/C = owner.mind.has_antag_datum(/datum/antagonist/cult,TRUE)
if(!C.cult_team)
diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm
index 35151953a0..e55d6bcb02 100644
--- a/code/modules/antagonists/cult/cult_items.dm
+++ b/code/modules/antagonists/cult/cult_items.dm
@@ -665,7 +665,7 @@
for(var/datum/mind/M in SSticker.mode.cult)
if(M.current && M.current.stat != DEAD)
cultists |= M.current
- var/mob/living/cultist_to_receive = input(user, "Who do you wish to call to [src]?", "Followers of the Geometer") as null|anything in (cultists - user)
+ var/mob/living/cultist_to_receive = tgui_input_list(user, "Who do you wish to call to [src]?", "Followers of the Geometer", cultists - user)
if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated())
return
if(!cultist_to_receive)
diff --git a/code/modules/antagonists/cult/ritual.dm b/code/modules/antagonists/cult/ritual.dm
index 98889169c6..0a93dc3675 100644
--- a/code/modules/antagonists/cult/ritual.dm
+++ b/code/modules/antagonists/cult/ritual.dm
@@ -53,7 +53,7 @@ This file contains the cult dagger and rune list code
if(!check_rune_turf(Turf, user))
return
- entered_rune_name = input(user, "Choose a rite to scribe.", "Sigils of Power") as null|anything in GLOB.rune_types
+ entered_rune_name = tgui_input_list(user, "Choose a rite to scribe.", "Sigils of Power", GLOB.rune_types)
if(!src || QDELETED(src) || !Adjacent(user) || user.incapacitated() || !check_rune_turf(Turf, user))
return
rune_to_scribe = GLOB.rune_types[entered_rune_name]
@@ -101,7 +101,7 @@ This file contains the cult dagger and rune list code
if(!(A in summon_objective.summon_spots))
to_chat(user, "The Geometer can only be summoned where the veil is weak - in [english_list(summon_objective.summon_spots)]!")
return
- var/confirm_final = alert(user, "This is the FINAL step to summon Nar'Sie; it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", "My life for Nar'Sie!", "No")
+ var/confirm_final = tgui_alert(user, "This is the FINAL step to summon Nar'Sie; it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", list("My life for Nar'Sie!", "No"))
if(confirm_final == "No")
to_chat(user, "You decide to prepare further before scribing the rune.")
return
diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm
index 7981a10701..46ffba70b4 100644
--- a/code/modules/antagonists/cult/runes.dm
+++ b/code/modules/antagonists/cult/runes.dm
@@ -385,7 +385,7 @@ structure_check() searches for nearby cultist structures required for the invoca
fail_invoke()
return
- var/input_rune_key = input(user, "Choose a rune to teleport to.", "Rune to Teleport to") as null|anything in potential_runes //we know what key they picked
+ var/input_rune_key = tgui_input_list(user, "Choose a rune to teleport to.", "Rune to Teleport to", potential_runes) //we know what key they picked
var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to?
if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated() || !actual_selected_rune)
fail_invoke()
@@ -562,7 +562,7 @@ structure_check() searches for nearby cultist structures required for the invoca
fail_invoke()
return
if(potential_revive_mobs.len > 1)
- mob_to_revive = input(user, "Choose a cultist to revive.", "Cultist to Revive") as null|anything in potential_revive_mobs
+ mob_to_revive = tgui_input_list(user, "Choose a cultist to revive.", "Cultist to Revive", potential_revive_mobs)
else
mob_to_revive = potential_revive_mobs[1]
if(QDELETED(src) || !validness_checks(mob_to_revive, user))
@@ -719,7 +719,7 @@ structure_check() searches for nearby cultist structures required for the invoca
for(var/datum/mind/M in SSticker.mode.cult)
if(!(M.current in invokers) && M.current && M.current.stat != DEAD)
cultists |= M.current
- var/mob/living/cultist_to_summon = input(user, "Who do you wish to call to [src]?", "Followers of the Geometer") as null|anything in cultists
+ var/mob/living/cultist_to_summon = tgui_input_list(user, "Who do you wish to call to [src]?", "Followers of the Geometer", cultists)
if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated())
return
if(!cultist_to_summon)
@@ -853,7 +853,7 @@ structure_check() searches for nearby cultist structures required for the invoca
. = ..()
var/mob/living/user = invokers[1]
var/turf/T = get_turf(src)
- var/choice = alert(user,"You tear open a connection to the spirit realm...",,"Summon a Cult Ghost","Ascend as a Dark Spirit","Cancel")
+ var/choice = tgui_alert(user, "You tear open a connection to the spirit realm...",,list("Summon a Cult Ghost","Ascend as a Dark Spirit","Cancel"))
if(choice == "Summon a Cult Ghost")
var/area/A = get_area(T)
if(A.map_name == "Space" || is_mining_level(T.z))
diff --git a/code/modules/antagonists/devil/devil.dm b/code/modules/antagonists/devil/devil.dm
index 65ce89d33f..9db621db40 100644
--- a/code/modules/antagonists/devil/devil.dm
+++ b/code/modules/antagonists/devil/devil.dm
@@ -131,7 +131,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
log_admin("[key_name_admin(admin)] set [owner.current] devil ascendable to [ascendable])")
/datum/antagonist/devil/admin_add(datum/mind/new_owner,mob/admin)
- switch(alert(admin,"Should the devil be able to ascend",,"Yes","No","Cancel"))
+ switch(tgui_alert(admin, "Should the devil be able to ascend",,list("Yes","No","Cancel")))
if("Yes")
ascendable = TRUE
if("No")
diff --git a/code/modules/antagonists/devil/sintouched/sintouched.dm b/code/modules/antagonists/devil/sintouched/sintouched.dm
index c9bf474567..67fed36bb3 100644
--- a/code/modules/antagonists/devil/sintouched/sintouched.dm
+++ b/code/modules/antagonists/devil/sintouched/sintouched.dm
@@ -56,7 +56,7 @@
/datum/antagonist/sintouched/admin_add(datum/mind/new_owner,mob/admin)
var/choices = sins + "Random"
- var/chosen_sin = input(admin,"What kind ?","Sin kind") as null|anything in choices
+ var/chosen_sin = tgui_input_list(admin,"What kind ?","Sin kind", choices)
if(!chosen_sin)
return
if(chosen_sin in sins)
diff --git a/code/modules/antagonists/disease/disease_mob.dm b/code/modules/antagonists/disease/disease_mob.dm
index f6c8c3dbe1..654986d355 100644
--- a/code/modules/antagonists/disease/disease_mob.dm
+++ b/code/modules/antagonists/disease/disease_mob.dm
@@ -296,7 +296,7 @@ the new instance inside the host to be updated to the template's stats.
/mob/camera/disease/proc/confirm_initial_infection(mob/living/carbon/human/H)
set waitfor = FALSE
- if(alert(src, "Select [H.name] as your initial host?", "Select Host", "Yes", "No") != "Yes")
+ if(tgui_alert(src, "Select [H.name] as your initial host?", "Select Host", list("Yes", "No")) != "Yes")
return
if(!freemove)
return
diff --git a/code/modules/antagonists/eldritch_cult/eldritch_items.dm b/code/modules/antagonists/eldritch_cult/eldritch_items.dm
index 28228aedd6..0f297ccb28 100644
--- a/code/modules/antagonists/eldritch_cult/eldritch_items.dm
+++ b/code/modules/antagonists/eldritch_cult/eldritch_items.dm
@@ -350,7 +350,7 @@
drawing = TRUE
- var/type = pick_list[input(user,"Choose the rune","Rune") as null|anything in pick_list ]
+ var/type = pick_list[tgui_input_list(user,"Choose the rune","Rune", pick_list)]
if(!type)
drawing = FALSE
return
diff --git a/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm b/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm
index 33a17c3278..71a2d0580e 100644
--- a/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm
+++ b/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm
@@ -170,7 +170,7 @@
to_chat(user, "These items don't possess the required fingerprints or DNA.")
return FALSE
- var/chosen_mob = input("Select the person you wish to curse","Your target") as null|anything in sortList(compiled_list, /proc/cmp_mob_realname_dsc)
+ var/chosen_mob = tgui_input_list(user, "Select the person you wish to curse","Your target", sortList(compiled_list, /proc/cmp_mob_realname_dsc))
if(!chosen_mob)
return FALSE
curse(compiled_list[chosen_mob])
@@ -296,7 +296,7 @@
if(!targeted)
break
targets["[targeted.current.real_name] the [targeted.assigned_role]"] = targeted.current
- LH.target = targets[input(user,"Choose your next target","Target") in targets]
+ LH.target = targets[tgui_input_list(user,"Choose your next target","Target", targets)]
if(!LH.target && targets.len)
LH.target = pick(targets) //Tsk tsk, you can and will get another target if you want it or not.
diff --git a/code/modules/antagonists/eldritch_cult/eldritch_magic.dm b/code/modules/antagonists/eldritch_cult/eldritch_magic.dm
index 158acc0071..1d4bcd3910 100644
--- a/code/modules/antagonists/eldritch_cult/eldritch_magic.dm
+++ b/code/modules/antagonists/eldritch_cult/eldritch_magic.dm
@@ -621,7 +621,7 @@
if(!originator?.linked_mobs[living_owner])
CRASH("Uh oh the mansus link got somehow activated without it being linked to a raw prophet or the mob not being in a list of mobs that should be able to do it.")
- var/message = sanitize(input("Message:", "Telepathy from the Manse") as text|null)
+ var/message = sanitize(tgui_input_text(usr, "Message:", "Telepathy from the Manse"))
if(QDELETED(living_owner))
return
diff --git a/code/modules/antagonists/eldritch_cult/eldritch_structures.dm b/code/modules/antagonists/eldritch_cult/eldritch_structures.dm
index 01fd945cba..b920a1040a 100644
--- a/code/modules/antagonists/eldritch_cult/eldritch_structures.dm
+++ b/code/modules/antagonists/eldritch_cult/eldritch_structures.dm
@@ -80,7 +80,7 @@
for(var/X in subtypesof(/obj/item/eldritch_potion))
var/obj/item/eldritch_potion/potion = X
lst[initial(potion.name)] = potion
- var/type = lst[input(user,"Choose your brew","Brew") in lst]
+ var/type = lst[tgui_input_list(user,"Choose your brew","Brew", lst)]
playsound(src, 'sound/misc/desceration-02.ogg', 75, TRUE)
new type(drop_location())
current_mass = 0
diff --git a/code/modules/antagonists/monkey/monkey.dm b/code/modules/antagonists/monkey/monkey.dm
index 971532958f..6c03e3c686 100644
--- a/code/modules/antagonists/monkey/monkey.dm
+++ b/code/modules/antagonists/monkey/monkey.dm
@@ -69,7 +69,7 @@
/datum/antagonist/monkey/admin_remove(mob/admin)
var/mob/living/carbon/monkey/M = owner.current
if(istype(M))
- switch(alert(admin, "Humanize?", "Humanize", "Yes", "No"))
+ switch(tgui_alert(admin, "Humanize?", "Humanize", list("Yes", "No")))
if("Yes")
if(admin == M)
admin = M.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_DEFAULTMSG)
@@ -89,7 +89,7 @@
/datum/antagonist/monkey/leader/admin_add(datum/mind/new_owner,mob/admin)
var/mob/living/carbon/human/H = new_owner.current
if(istype(H))
- switch(alert(admin, "Monkeyize?", "Monkeyize", "Yes", "No"))
+ switch(tgui_alert(admin, "Monkeyize?", "Monkeyize", list("Yes", "No")))
if("Yes")
if(admin == H)
admin = H.monkeyize()
diff --git a/code/modules/antagonists/nukeop/equipment/borgchameleon.dm b/code/modules/antagonists/nukeop/equipment/borgchameleon.dm
index b3c31152a5..c01460b386 100644
--- a/code/modules/antagonists/nukeop/equipment/borgchameleon.dm
+++ b/code/modules/antagonists/nukeop/equipment/borgchameleon.dm
@@ -66,7 +66,7 @@
if(animation_playing)
to_chat(user, "\the [src] is recharging.")
return
- var/borg_icon = input(user, "Select an icon!", "Robot Icon", null) as null|anything in engymodels
+ var/borg_icon = tgui_input_list(user, "Select an icon!", "Robot Icon", engymodels)
if(!borg_icon)
return FALSE
switch(borg_icon)
diff --git a/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm b/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm
index 78e4d38b3c..8f2e942bad 100644
--- a/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm
+++ b/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm
@@ -26,7 +26,7 @@ GLOBAL_VAR_INIT(war_declared, FALSE)
return
declaring_war = TRUE
- var/are_you_sure = alert(user, "Consult your team carefully before you declare war on [station_name()]]. Are you sure you want to alert the enemy crew? You have [DisplayTimeText(world.time-SSticker.round_start_time - CHALLENGE_TIME_LIMIT)] to decide", "Declare war?", "Yes", "No")
+ var/are_you_sure = tgui_alert(user, "Consult your team carefully before you declare war on [station_name()]]. Are you sure you want to alert the enemy crew? You have [DisplayTimeText(world.time-SSticker.round_start_time - CHALLENGE_TIME_LIMIT)] to decide", "Declare war?", list("Yes", "No"))
declaring_war = FALSE
if(!check_allowed(user))
@@ -39,7 +39,7 @@ GLOBAL_VAR_INIT(war_declared, FALSE)
var/war_declaration = "[user.real_name] has declared [user.p_their()] intent to utterly destroy [station_name()] with a nuclear device, and dares the crew to try and stop [user.p_them()]."
declaring_war = TRUE
- var/custom_threat = alert(user, "Do you want to customize your declaration?", "Customize?", "Yes", "No")
+ var/custom_threat = tgui_alert(user, "Do you want to customize your declaration?", "Customize?", list("Yes", "No"))
declaring_war = FALSE
if(!check_allowed(user))
diff --git a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm
index fcc8bcade8..f734e3289c 100644
--- a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm
+++ b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm
@@ -255,7 +255,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
if(!istype(T) || !is_station_level(T.z))
to_chat(owner, "You cannot activate the doomsday device while off-station!")
return
- if(alert(owner, "Send arming signal? (true = arm, false = cancel)", "purge_all_life()", "confirm = TRUE;", "confirm = FALSE;") != "confirm = TRUE;")
+ if(tgui_alert(owner, "Send arming signal? (true = arm, false = cancel)", "purge_all_life()", list("confirm = TRUE;", "confirm = FALSE;")) != "confirm = TRUE;")
return
if (active)
return //prevent the AI from activating an already active doomsday
@@ -695,7 +695,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
if(!owner_AI.can_place_transformer(src))
return
active = TRUE
- if(alert(owner, "Are you sure you want to place the machine here?", "Are you sure?", "Yes", "No") == "No")
+ if(tgui_alert(owner, "Are you sure you want to place the machine here?", "Are you sure?", list("Yes", "No")) == "No")
active = FALSE
return
if(!owner_AI.can_place_transformer(src))
diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm
index 44f267358a..9bd4a922bc 100644
--- a/code/modules/antagonists/wizard/equipment/artefact.dm
+++ b/code/modules/antagonists/wizard/equipment/artefact.dm
@@ -285,7 +285,7 @@
/obj/item/voodoo/attack_self(mob/user)
if(!target && length(possible))
- target = input(user, "Select your victim!", "Voodoo") as null|anything in possible
+ target = tgui_input_list(user, "Select your victim!", "Voodoo", possible)
return
if(user.zone_selected == BODY_ZONE_CHEST)
@@ -300,7 +300,7 @@
if(target && cooldown < world.time)
switch(user.zone_selected)
if(BODY_ZONE_PRECISE_MOUTH)
- var/wgw = sanitize(input(user, "What would you like the victim to say", "Voodoo", null) as text)
+ var/wgw = sanitize(tgui_input_text(user, "What would you like the victim to say", "Voodoo", null))
target.say(wgw, forced = "voodoo doll")
log_game("[key_name(user)] made [key_name(target)] say [wgw] with a voodoo doll.")
if(BODY_ZONE_PRECISE_EYES)
diff --git a/code/modules/antagonists/wizard/equipment/soulstone.dm b/code/modules/antagonists/wizard/equipment/soulstone.dm
index fe9770e64a..5a876ea9db 100644
--- a/code/modules/antagonists/wizard/equipment/soulstone.dm
+++ b/code/modules/antagonists/wizard/equipment/soulstone.dm
@@ -222,7 +222,7 @@
var/obj/structure/constructshell/T = target
var/mob/living/simple_animal/hostile/construct/shade/A = locate() in src
if(A)
- var/construct_class = alert(user, "Please choose which type of construct you wish to create.",,"Juggernaut","Wraith","Artificer")
+ var/construct_class = tgui_alert(user, "Please choose which type of construct you wish to create.",,list("Juggernaut","Wraith","Artificer"))
if(!T || !T.loc)
return
switch(construct_class)
diff --git a/code/modules/arousal/arousal.dm b/code/modules/arousal/arousal.dm
index 36da6c73ba..7f80cae837 100644
--- a/code/modules/arousal/arousal.dm
+++ b/code/modules/arousal/arousal.dm
@@ -16,7 +16,7 @@
set name = "Toggle undergarments"
set category = "IC"
- var/confirm = input(src, "Select what part of your form to alter", "Undergarment Toggling") as null|anything in list("Top", "Bottom", "Socks", "All")
+ var/confirm = tgui_input_list(src, "Select what part of your form to alter", "Undergarment Toggling", list("Top", "Bottom", "Socks", "All"))
if(!confirm)
return
if(confirm == "Top")
@@ -127,7 +127,7 @@
if(CHECK_BITFIELD(G.genital_flags, CAN_CLIMAX_WITH) && G.is_exposed(worn_stuff)) //filter out what you can't masturbate with
LAZYADD(genitals_list, G)
if(LAZYLEN(genitals_list))
- var/obj/item/organ/genital/ret_organ = input(src, "with what?", "Climax", null) as null|obj in genitals_list
+ var/obj/item/organ/genital/ret_organ = tgui_input_list(src, "with what?", "Climax", genitals_list)
return ret_organ
else if(!silent)
to_chat(src, "You cannot climax without available genitals.")
@@ -151,10 +151,10 @@
if(!silent)
to_chat(src, "You cannot do this alone.")
return //No one left.
- var/mob/living/target = input(src, "With whom?", "Sexual partner", null) as null|anything in partners //pick one, default to null
+ var/mob/living/target = tgui_input_list(src, "With whom?", "Sexual partner", partners) //pick one, default to null
if(target && in_range(src, target))
to_chat(src,"Waiting for consent...")
- var/consenting = input(target, "Do you want [src] to climax with you?","Climax mechanics","No") in list("Yes","No")
+ var/consenting = tgui_input_list(target, "Do you want [src] to climax with you?","Climax mechanics", list("Yes","No"))
if(consenting == "Yes")
return target
else
@@ -172,7 +172,7 @@
containers_list += C
if(containers_list.len)
- var/obj/item/reagent_containers/SC = input(src, "Into or onto what?(Cancel for nowhere)", null) as null|obj in containers_list
+ var/obj/item/reagent_containers/SC = tgui_input_list(src, "Into or onto what?(Cancel for nowhere)", "", containers_list)
if(SC && CanReach(SC))
return SC
else if(!silent)
@@ -226,7 +226,7 @@
return
//Ok, now we check what they want to do.
- var/choice = input(src, "Select sexual activity", "Sexual activity:") as null|anything in list("Climax alone","Climax with partner", "Fill container")
+ var/choice = tgui_input_list(src, "Select sexual activity", "Sexual activity:", list("Climax alone","Climax with partner", "Fill container"))
if(!choice)
return
@@ -243,7 +243,7 @@
if(picked_organ)
var/mob/living/partner = pick_partner() //Get someone
if(partner)
- var/spillage = input(src, "Would your fluids spill outside?", "Choose overflowing option", "Yes") as null|anything in list("Yes", "No")
+ var/spillage = tgui_input_list(src, "Would your fluids spill outside?", "Choose overflowing option", list("Yes", "No"))
if(spillage && in_range(src, partner))
mob_climax_partner(picked_organ, partner, spillage == "Yes" ? TRUE : FALSE)
if("Fill container")
diff --git a/code/modules/arousal/genitals.dm b/code/modules/arousal/genitals.dm
index 313f108b0f..99b43488f1 100644
--- a/code/modules/arousal/genitals.dm
+++ b/code/modules/arousal/genitals.dm
@@ -118,9 +118,9 @@
return
//Full list of exposable genitals created
var/obj/item/organ/genital/picked_organ
- picked_organ = input(src, "Choose which genitalia to expose/hide", "Expose/Hide genitals") as null|anything in genital_list
+ picked_organ = tgui_input_list(src, "Choose which genitalia to expose/hide", "Expose/Hide genitals", genital_list)
if(picked_organ && (picked_organ in internal_organs))
- var/picked_visibility = input(src, "Choose visibility setting", "Expose/Hide genitals") as null|anything in GLOB.genitals_visibility_toggles
+ var/picked_visibility = tgui_input_list(src, "Choose visibility setting", "Expose/Hide genitals", GLOB.genitals_visibility_toggles)
if(picked_visibility && picked_organ && (picked_organ in internal_organs))
picked_organ.toggle_visibility(picked_visibility)
return
@@ -136,7 +136,7 @@
if(!genital_list.len) //There's nothing that can show arousal
return
var/obj/item/organ/genital/picked_organ
- picked_organ = input(src, "Choose which genitalia to toggle arousal on", "Set genital arousal", null) in genital_list
+ picked_organ = tgui_input_list(src, "Choose which genitalia to toggle arousal on", "Set genital arousal", genital_list)
if(picked_organ)
var/original_state = picked_organ.aroused_state
picked_organ.set_aroused_state(!picked_organ.aroused_state)
diff --git a/code/modules/arousal/toys/dildos.dm b/code/modules/arousal/toys/dildos.dm
index 4de6877915..a4d014c1c0 100644
--- a/code/modules/arousal/toys/dildos.dm
+++ b/code/modules/arousal/toys/dildos.dm
@@ -46,25 +46,25 @@
if(!can_customize)
return FALSE
if(src && !user.incapacitated() && in_range(user,src))
- var/color_choice = input(user,"Choose a color for your dildo.","Dildo Color") as null|anything in GLOB.dildo_colors
+ var/color_choice = tgui_input_list(user,"Choose a color for your dildo.","Dildo Color", GLOB.dildo_colors)
if(src && color_choice && !user.incapacitated() && in_range(user,src))
sanitize_inlist(color_choice, GLOB.dildo_colors, "Red")
color = GLOB.dildo_colors[color_choice]
update_appearance()
if(src && !user.incapacitated() && in_range(user,src))
- var/shape_choice = input(user,"Choose a shape for your dildo.","Dildo Shape") as null|anything in GLOB.dildo_shapes
+ var/shape_choice = tgui_input_list(user,"Choose a shape for your dildo.","Dildo Shape", GLOB.dildo_shapes)
if(src && shape_choice && !user.incapacitated() && in_range(user,src))
sanitize_inlist(shape_choice, GLOB.dildo_colors, "Knotted")
dildo_shape = GLOB.dildo_shapes[shape_choice]
update_appearance()
if(src && !user.incapacitated() && in_range(user,src))
- var/size_choice = input(user,"Choose the size for your dildo.","Dildo Size") as null|anything in GLOB.dildo_sizes
+ var/size_choice = tgui_input_list(user,"Choose the size for your dildo.","Dildo Size", GLOB.dildo_sizes)
if(src && size_choice && !user.incapacitated() && in_range(user,src))
sanitize_inlist(size_choice, GLOB.dildo_colors, "Medium")
dildo_size = GLOB.dildo_sizes[size_choice]
update_appearance()
if(src && !user.incapacitated() && in_range(user,src))
- var/transparency_choice = input(user,"Choose the transparency of your dildo. Lower is more transparent!(192-255)","Dildo Transparency") as null|num
+ var/transparency_choice = tgui_input_num(user,"Choose the transparency of your dildo. Lower is more transparent!(192-255)","Dildo Transparency", alpha)
if(src && transparency_choice && !user.incapacitated() && in_range(user,src))
sanitize_integer(transparency_choice, 192, 255, 192)
alpha = transparency_choice
diff --git a/code/modules/assembly/doorcontrol.dm b/code/modules/assembly/doorcontrol.dm
index 32e262ce65..c2994e7998 100644
--- a/code/modules/assembly/doorcontrol.dm
+++ b/code/modules/assembly/doorcontrol.dm
@@ -29,7 +29,7 @@
if(!can_change_id)
return
var/new_id
- new_id = input(user, "Set ID", "Set ID", show_id? id : null) as text|null
+ new_id = tgui_input_text(user, "Set ID", "Set ID", show_id? id : null)
if(!isnull(new_id)) //0/"" is considered !, so check null instead of just !.
id = new_id
diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm
index 84e70bbbb3..9decf4ab88 100644
--- a/code/modules/assembly/holder.dm
+++ b/code/modules/assembly/holder.dm
@@ -116,7 +116,7 @@
to_chat(user, "Assembly part missing!")
return
if(istype(a_left,a_right.type))//If they are the same type it causes issues due to window code
- switch(alert("Which side would you like to use?",,"Left","Right"))
+ switch(tgui_alert(user, "Which side would you like to use?",,list("Left","Right")))
if("Left")
a_left.attack_self(user)
if("Right")
diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm
index 0af024985e..2d680fe212 100644
--- a/code/modules/asset_cache/asset_list_items.dm
+++ b/code/modules/asset_cache/asset_list_items.dm
@@ -273,24 +273,6 @@
"frenching" = 'icons/UI_Icons/Achievements/Misc/frenchingthebubble.png'
)
-/datum/asset/spritesheet/simple/minesweeper
- name = "minesweeper"
- assets = list(
- "1" = 'icons/UI_Icons/minesweeper_tiles/one.png',
- "2" = 'icons/UI_Icons/minesweeper_tiles/two.png',
- "3" = 'icons/UI_Icons/minesweeper_tiles/three.png',
- "4" = 'icons/UI_Icons/minesweeper_tiles/four.png',
- "5" = 'icons/UI_Icons/minesweeper_tiles/five.png',
- "6" = 'icons/UI_Icons/minesweeper_tiles/six.png',
- "7" = 'icons/UI_Icons/minesweeper_tiles/seven.png',
- "8" = 'icons/UI_Icons/minesweeper_tiles/eight.png',
- "empty" = 'icons/UI_Icons/minesweeper_tiles/empty.png',
- "flag" = 'icons/UI_Icons/minesweeper_tiles/flag.png',
- "hidden" = 'icons/UI_Icons/minesweeper_tiles/hidden.png',
- "mine" = 'icons/UI_Icons/minesweeper_tiles/mine.png',
- "minehit" = 'icons/UI_Icons/minesweeper_tiles/minehit.png'
- )
-
/datum/asset/spritesheet/simple/pills
name = "pills"
assets = list(
diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
index b670baaae7..5cc6fa33d6 100644
--- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm
+++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
@@ -63,7 +63,7 @@ GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE)
if(!.)
return
if(href_list[VV_HK_PARSE_GASSTRING])
- var/gasstring = input(usr, "Input Gas String (WARNING: Advanced. Don't use this unless you know how these work.", "Gas String Parse") as text|null
+ var/gasstring = tgui_input_text(usr, "Input Gas String (WARNING: Advanced. Don't use this unless you know how these work.)", "Gas String Parse")
if(!istext(gasstring))
return
log_admin("[key_name(usr)] modified gas mixture [REF(src)]: Set to gas string [gasstring].")
@@ -77,10 +77,10 @@ GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE)
var/list/gases = get_gases()
for(var/gas in gases)
gases[gas] = get_moles(gas)
- var/gasid = input(usr, "What kind of gas?", "Set Gas") as null|anything in GLOB.gas_data.ids
+ var/gasid = tgui_input_list(usr, "What kind of gas?", "Set Gas", GLOB.gas_data.ids)
if(!gasid)
return
- var/amount = input(usr, "Input amount", "Set Gas", gases[gasid] || 0) as num|null
+ var/amount = tgui_input_num(usr, "Input amount", "Set Gas", gases[gasid] || 0)
if(!isnum(amount))
return
amount = max(0, amount)
@@ -88,7 +88,7 @@ GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE)
message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Set gas [gasid] to [amount] moles.")
set_moles(gasid, amount)
if(href_list[VV_HK_SET_TEMPERATURE])
- var/temp = input(usr, "Set the temperature of this mixture to?", "Set Temperature", return_temperature()) as num|null
+ var/temp = tgui_input_num(usr, "Set the temperature of this mixture to?", "Set Temperature", return_temperature())
if(!isnum(temp))
return
temp = max(2.7, temp)
@@ -96,7 +96,7 @@ GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE)
message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Changed temperature to [temp].")
set_temperature(temp)
if(href_list[VV_HK_SET_VOLUME])
- var/volume = input(usr, "Set the volume of this mixture to?", "Set Volume", return_volume()) as num|null
+ var/volume = tgui_input_num(usr, "Set the volume of this mixture to?", "Set Volume", return_volume())
if(!isnum(volume))
return
volume = max(0, volume)
diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm
index 2313d9c71d..03158b22d1 100644
--- a/code/modules/atmospherics/machinery/airalarm.dm
+++ b/code/modules/atmospherics/machinery/airalarm.dm
@@ -428,7 +428,7 @@
var/datum/tlv/tlv = TLV[env]
if(isnull(tlv))
return
- var/value = input("New [name] for [env]:", name, tlv.vars[name]) as num|null
+ var/value = tgui_input_num(usr, "New [name] for [env]:", name, tlv.vars[name])
if(!isnull(value) && !..())
if(value < 0)
tlv.vars[name] = -1
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm
index 56a7d78288..d7bfb46af5 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm
@@ -107,7 +107,7 @@ Passive gate is similar to the regular pump except:
pressure = MAX_OUTPUT_PRESSURE
. = TRUE
else if(pressure == "input")
- pressure = input("New output pressure (0-[MAX_OUTPUT_PRESSURE] kPa):", name, target_pressure) as num|null
+ pressure = tgui_input_num(usr, "New output pressure (0-[MAX_OUTPUT_PRESSURE] kPa):", name, target_pressure)
if(!isnull(pressure) || !..())
. = TRUE
else if(text2num(pressure) != null)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
index dc5a6eccd4..133c280728 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
@@ -135,7 +135,7 @@
pressure = MAX_OUTPUT_PRESSURE
. = TRUE
else if(pressure == "input")
- pressure = input("New output pressure (0-[MAX_OUTPUT_PRESSURE] kPa):", name, target_pressure) as num|null
+ pressure = tgui_input_num(usr, "New output pressure (0-[MAX_OUTPUT_PRESSURE] kPa):", name, target_pressure)
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm b/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm
index d0b663e4ad..6ff796f4c1 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm
@@ -83,7 +83,7 @@
pressure = 50*ONE_ATMOSPHERE
. = TRUE
else if(pressure == "input") // The manual expirience.
- pressure = input("New output pressure ([close_pressure]-[50*ONE_ATMOSPHERE] kPa):", name, open_pressure) as num|null
+ pressure = tgui_input_num(usr, "New output pressure ([close_pressure]-[50*ONE_ATMOSPHERE] kPa):", name, open_pressure)
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
@@ -98,7 +98,7 @@
pressure = open_pressure
. = TRUE
else if(pressure == "input")
- pressure = input("New output pressure (0-[open_pressure] kPa):", name, close_pressure) as num|null
+ pressure = tgui_input_num(usr, "New output pressure (0-[open_pressure] kPa):", name, close_pressure)
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
index 46d584339b..258ee21d9b 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
@@ -125,7 +125,7 @@
rate = MAX_TRANSFER_RATE
. = TRUE
else if(rate == "input")
- rate = input("New transfer rate (0-[MAX_TRANSFER_RATE] L/s):", name, transfer_rate) as num|null
+ rate = tgui_input_num(usr, "New transfer rate (0-[MAX_TRANSFER_RATE] L/s):", name, transfer_rate)
if(!isnull(rate) && !..())
. = TRUE
else if(text2num(rate) != null)
diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm
index f8866877fe..7ade864a92 100644
--- a/code/modules/atmospherics/machinery/components/components_base.dm
+++ b/code/modules/atmospherics/machinery/components/components_base.dm
@@ -126,7 +126,7 @@
air_update_turf(1)
/obj/machinery/atmospherics/components/proc/safe_input(var/title, var/text, var/default_set)
- var/new_value = input(usr,text,title,default_set) as num
+ var/new_value = tgui_input_num(usr,text,title,default_set)
if(usr.canUseTopic(src))
return new_value
return default_set
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
index 4182f5ceca..dbad55e9ef 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
@@ -143,7 +143,7 @@
rate = MAX_TRANSFER_RATE
. = TRUE
else if(rate == "input")
- rate = input("New transfer rate (0-[MAX_TRANSFER_RATE] L/s):", name, transfer_rate) as num|null
+ rate = tgui_input_num(usr, "New transfer rate (0-[MAX_TRANSFER_RATE] L/s):", name, transfer_rate)
if(!isnull(rate) && !..())
. = TRUE
else if(text2num(rate) != null)
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
index 3296981e5e..1257cb9bb2 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
@@ -151,7 +151,7 @@
pressure = MAX_OUTPUT_PRESSURE
. = TRUE
else if(pressure == "input")
- pressure = input("New output pressure (0-[MAX_OUTPUT_PRESSURE] kPa):", name, target_pressure) as num|null
+ pressure = tgui_input_num(usr, "New output pressure (0-[MAX_OUTPUT_PRESSURE] kPa):", name, target_pressure)
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
index b2fa26edba..0a64d458d2 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
@@ -166,7 +166,7 @@
rate = MAX_TRANSFER_RATE
. = TRUE
else if(rate == "input")
- rate = input("New transfer rate (0-[MAX_TRANSFER_RATE] L/s):", name, volume_rate) as num|null
+ rate = tgui_input_num(usr, "New transfer rate (0-[MAX_TRANSFER_RATE] L/s):", name, volume_rate)
if(!isnull(rate) && !..())
. = TRUE
else if(text2num(rate) != null)
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm
index ee4223b157..ecc9bc624f 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm
@@ -82,7 +82,7 @@
pressure = 50*ONE_ATMOSPHERE
. = TRUE
else if(pressure == "input")
- pressure = input("New output pressure ([close_pressure]-[50*ONE_ATMOSPHERE] kPa):", name, open_pressure) as num|null
+ pressure = tgui_input_num(usr, "New output pressure ([close_pressure]-[50*ONE_ATMOSPHERE] kPa):", name, open_pressure)
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
@@ -97,7 +97,7 @@
pressure = open_pressure
. = TRUE
else if(pressure == "input")
- pressure = input("New output pressure (0-[open_pressure] kPa):", name, close_pressure) as num|null
+ pressure = tgui_input_num(usr, "New output pressure (0-[open_pressure] kPa):", name, close_pressure)
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
index 8456c0b346..c8ed757b29 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
@@ -158,7 +158,7 @@
var/target = params["target"]
var/adjust = text2num(params["adjust"])
if(target == "input")
- target = input("Set new target ([min_temperature]-[max_temperature] K):", name, target_temperature) as num|null
+ target = tgui_input_num(usr, "Set new target ([min_temperature]-[max_temperature] K):", name, target_temperature)
if(!isnull(target))
. = TRUE
else if(adjust)
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index 868c5dafa3..e99ac55357 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -388,7 +388,7 @@
return
switch(action)
if("relabel")
- var/label = input("New canister label:", name) as null|anything in sortList(label2types)
+ var/label = tgui_input_list(usr, "New canister label:", name, sortList(label2types))
if(label && !..())
var/newtype = label2types[label]
if(newtype)
@@ -416,7 +416,7 @@
pressure = can_max_release_pressure
. = TRUE
else if(pressure == "input")
- pressure = input("New release pressure ([can_min_release_pressure]-[can_max_release_pressure] kPa):", name, release_pressure) as num|null
+ pressure = tgui_input_num(usr, "New release pressure ([can_min_release_pressure]-[can_max_release_pressure] kPa):", name, release_pressure)
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
@@ -461,7 +461,7 @@
if("increase")
timer_set = min(maximum_timer_set, timer_set + 10)
if("input")
- var/user_input = input(usr, "Set time to valve toggle.", name) as null|num
+ var/user_input = tgui_input_num(usr, "Set time to valve toggle.", name, timer_set)
if(!user_input)
return
var/N = text2num(user_input)
diff --git a/code/modules/awaymissions/bluespaceartillery.dm b/code/modules/awaymissions/bluespaceartillery.dm
index ee4090b680..0dafac89d1 100644
--- a/code/modules/awaymissions/bluespaceartillery.dm
+++ b/code/modules/awaymissions/bluespaceartillery.dm
@@ -38,7 +38,7 @@
if(..())
return
var/A
- A = input("Area to bombard", "Open Fire", A) in GLOB.teleportlocs
+ A = tgui_input_list(usr, "Area to bombard", "Open Fire", GLOB.teleportlocs)
var/area/thearea = GLOB.teleportlocs[A]
if(usr.stat || usr.restrained())
return
diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm
index d32905e007..d76c85848c 100644
--- a/code/modules/awaymissions/capture_the_flag.dm
+++ b/code/modules/awaymissions/capture_the_flag.dm
@@ -210,7 +210,7 @@
/obj/machinery/capture_the_flag/attack_ghost(mob/user)
if(ctf_enabled == FALSE)
if(user.client && user.client.holder)
- var/response = alert("Enable CTF?", "CTF", "Yes", "No")
+ var/response = tgui_alert(user, "Enable CTF?", "CTF", list("Yes", "No"))
if(response == "Yes")
toggle_all_ctf(user)
return
diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm
index cd5c2f76f3..27138a9d40 100644
--- a/code/modules/awaymissions/corpse.dm
+++ b/code/modules/awaymissions/corpse.dm
@@ -49,7 +49,7 @@
var/mob/dead/observer/O = user
if(!O.can_reenter_round() && !skip_reentry_check)
return FALSE
- var/ghost_role = alert(latejoinercalling ? "Latejoin as [mob_name]? (This is a ghost role, and as such, it's very likely to be off-station.)" : "Become [mob_name]? (Warning, You can no longer be cloned!)",,"Yes","No")
+ var/ghost_role = tgui_alert(user, latejoinercalling ? "Latejoin as [mob_name]? (This is a ghost role, and as such, it's very likely to be off-station.)" : "Become [mob_name]? (Warning, You can no longer be cloned!)",,list("Yes","No"))
if(ghost_role == "No" || !loc)
return
if(QDELETED(src) || QDELETED(user))
@@ -595,7 +595,7 @@
job_description = "Space Bar Patron"
/obj/effect/mob_spawn/human/alive/space_bar_patron/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
- var/despawn = alert("Return to cryosleep? (Warning, Your mob will be deleted!)",,"Yes","No")
+ var/despawn = tgui_alert(user, "Return to cryosleep? (Warning, Your mob will be deleted!)",,list("Yes","No"))
if(despawn == "No" || !loc || !Adjacent(user))
return
user.visible_message("[user.name] climbs back into cryosleep...")
diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm
index bc7e2cbd08..a027995acc 100644
--- a/code/modules/awaymissions/mission_code/wildwest.dm
+++ b/code/modules/awaymissions/mission_code/wildwest.dm
@@ -88,7 +88,7 @@
else
chargesa--
insistinga = 0
- var/wish = input("You want...","Wish") as null|anything in list("Power","Wealth","Immortality","To Kill","Peace")
+ var/wish = tgui_input_list(usr, "You want...","Wish", list("Power","Wealth","Immortality","To Kill","Peace"))
switch(wish)
if("Power")
to_chat(user, "Your wish is granted, but at a terrible cost...")
diff --git a/code/modules/awaymissions/signpost.dm b/code/modules/awaymissions/signpost.dm
index 4d85d947c2..76f4e004bd 100644
--- a/code/modules/awaymissions/signpost.dm
+++ b/code/modules/awaymissions/signpost.dm
@@ -16,7 +16,7 @@
. = ..()
if(.)
return
- if(alert(question,name,"Yes","No") == "Yes" && Adjacent(user))
+ if(tgui_alert(user, question,name,list("Yes","No")) == "Yes" && Adjacent(user))
var/turf/T = find_safe_turf(zlevels=zlevels)
if(T)
diff --git a/code/modules/buildmode/submodes/advanced.dm b/code/modules/buildmode/submodes/advanced.dm
index 418f504777..69cb6ec588 100644
--- a/code/modules/buildmode/submodes/advanced.dm
+++ b/code/modules/buildmode/submodes/advanced.dm
@@ -17,16 +17,16 @@
to_chat(c, "***********************************************************")
/datum/buildmode_mode/advanced/change_settings(client/c)
- var/target_path = input(c, "Enter typepath:", "Typepath", "/obj/structure/closet")
+ var/target_path = tgui_input_text(c, "Enter typepath:", "Typepath", "/obj/structure/closet")
objholder = text2path(target_path)
if(!ispath(objholder))
objholder = pick_closest_path(target_path)
if(!objholder)
- alert("No path was selected")
+ tgui_alert(c, "No path was selected")
return
else if(ispath(objholder, /area))
objholder = null
- alert("That path is not allowed.")
+ tgui_alert(c, "That path is not allowed.")
return
/datum/buildmode_mode/advanced/handle_click(client/c, params, obj/object)
diff --git a/code/modules/buildmode/submodes/area_edit.dm b/code/modules/buildmode/submodes/area_edit.dm
index 19f536e073..e5ee2babf3 100644
--- a/code/modules/buildmode/submodes/area_edit.dm
+++ b/code/modules/buildmode/submodes/area_edit.dm
@@ -28,10 +28,10 @@
to_chat(c, "***********************************************************")
/datum/buildmode_mode/area_edit/change_settings(client/c)
- var/target_path = input(c, "Enter typepath:", "Typepath", "/area")
+ var/target_path = tgui_input_text(c, "Enter typepath:", "Typepath", "/area")
var/areatype = text2path(target_path)
if(ispath(areatype,/area))
- var/areaname = input(c, "Enter area name:", "Area name", "Area")
+ var/areaname = tgui_input_text(c, "Enter area name:", "Area name", "Area")
if(!areaname || !length(areaname))
return
storedarea = new areatype
diff --git a/code/modules/buildmode/submodes/boom.dm b/code/modules/buildmode/submodes/boom.dm
index 8340a21b0f..fc18154206 100644
--- a/code/modules/buildmode/submodes/boom.dm
+++ b/code/modules/buildmode/submodes/boom.dm
@@ -14,19 +14,19 @@
to_chat(c, "***********************************************************")
/datum/buildmode_mode/boom/change_settings(client/c)
- devastation = input(c, "Range of total devastation. -1 to none", text("Input")) as num|null
+ devastation = tgui_input_num(c, "Range of total devastation. -1 to none", text("Input"))
if(devastation == null)
devastation = -1
- heavy = input(c, "Range of heavy impact. -1 to none", text("Input")) as num|null
+ heavy = tgui_input_num(c, "Range of heavy impact. -1 to none", text("Input"))
if(heavy == null)
heavy = -1
- light = input(c, "Range of light impact. -1 to none", text("Input")) as num|null
+ light = tgui_input_num(c, "Range of light impact. -1 to none", text("Input"))
if(light == null)
light = -1
- flash = input(c, "Range of flash. -1 to none", text("Input")) as num|null
+ flash = tgui_input_num(c, "Range of flash. -1 to none", text("Input"))
if(flash == null)
flash = -1
- flames = input(c, "Range of flames. -1 to none", text("Input")) as num|null
+ flames = tgui_input_num(c, "Range of flames. -1 to none", text("Input"))
if(flames == null)
flames = -1
diff --git a/code/modules/buildmode/submodes/fill.dm b/code/modules/buildmode/submodes/fill.dm
index b7d87edef2..a37937b5f4 100644
--- a/code/modules/buildmode/submodes/fill.dm
+++ b/code/modules/buildmode/submodes/fill.dm
@@ -1,6 +1,6 @@
/datum/buildmode_mode/fill
key = "fill"
-
+
use_corner_selection = TRUE
var/objholder = null
@@ -12,16 +12,16 @@
to_chat(c, "***********************************************************")
/datum/buildmode_mode/fill/change_settings(client/c)
- var/target_path = input(c, "Enter typepath:" ,"Typepath","/obj/structure/closet")
+ var/target_path = tgui_input_text(c, "Enter typepath:" ,"Typepath","/obj/structure/closet")
objholder = text2path(target_path)
if(!ispath(objholder))
objholder = pick_closest_path(target_path)
if(!objholder)
- alert("No path has been selected.")
+ tgui_alert(c, "No path has been selected.")
return
else if(ispath(objholder, /area))
objholder = null
- alert("Area paths are not supported for this mode, use the area edit mode instead.")
+ tgui_alert(c, "Area paths are not supported for this mode, use the area edit mode instead.")
return
deselect_region()
diff --git a/code/modules/buildmode/submodes/mapgen.dm b/code/modules/buildmode/submodes/mapgen.dm
index 7ed99afd50..34bd0ddf6c 100644
--- a/code/modules/buildmode/submodes/mapgen.dm
+++ b/code/modules/buildmode/submodes/mapgen.dm
@@ -16,7 +16,7 @@
for(var/path in gen_paths)
var/datum/mapGenerator/MP = path
options[initial(MP.buildmode_name)] = path
- var/type = input(c,"Select Generator Type","Type") as null|anything in options
+ var/type = tgui_input_list(c,"Select Generator Type","Type", options)
if(!type)
return
@@ -42,7 +42,7 @@
return
G.defineRegion(cornerA, cornerB, 1)
highlight_region(G.map)
- var/confirm = alert("Are you sure you want run the map generator?", "Run generator", "Yes", "No")
+ var/confirm = tgui_alert(c, "Are you sure you want run the map generator?", "Run generator", list("Yes", "No"))
if(confirm == "Yes")
G.generate()
log_admin("Build Mode: [key_name(c)] ran the map generator '[G.buildmode_name]' in the region from [AREACOORD(cornerA)] to [AREACOORD(cornerB)]")
diff --git a/code/modules/buildmode/submodes/variable_edit.dm b/code/modules/buildmode/submodes/variable_edit.dm
index ac4c1ef66a..9b09e41c68 100644
--- a/code/modules/buildmode/submodes/variable_edit.dm
+++ b/code/modules/buildmode/submodes/variable_edit.dm
@@ -22,8 +22,8 @@
valueholder = null
/datum/buildmode_mode/varedit/change_settings(client/c)
- varholder = input(c, "Enter variable name:" ,"Name", "name")
-
+ varholder = tgui_input_text(c, "Enter variable name:" ,"Name", "name")
+
if(!vv_varname_lockcheck(varholder))
return
diff --git a/code/modules/cargo/blackmarket/blackmarket_uplink.dm b/code/modules/cargo/blackmarket/blackmarket_uplink.dm
index 7d5b333f13..830b4a6b6a 100644
--- a/code/modules/cargo/blackmarket/blackmarket_uplink.dm
+++ b/code/modules/cargo/blackmarket/blackmarket_uplink.dm
@@ -1,6 +1,6 @@
/obj/item/blackmarket_uplink
name = "Black Market Uplink"
- desc = "A mishmash of a subspace amplifier, a radio, and an analyzer. Somehow able to access the black market, with a variable inventory in limited stock at inflated prices. No refunds, customer responsible for pick-ups."
+ desc = "A mishmash of a subspace amplifier, a radio, and an analyzer. Somehow able to access the black market, with a variable inventory in limited stock at inflated prices. No refunds, customer responsible for pick-ups."
icon = 'icons/obj/blackmarket.dmi'
icon_state = "uplink"
// UI variables.
@@ -35,7 +35,7 @@
/obj/item/blackmarket_uplink/AltClick(mob/user)
if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
- var/amount_to_remove = FLOOR(input(user, "How much do you want to withdraw? Current Amount: [money]", "Withdraw Funds", 5) as num|null, 1)
+ var/amount_to_remove = FLOOR(tgui_input_num(user, "How much do you want to withdraw? Current Amount: [money]", "Withdraw Funds", 5), 1)
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
if(!amount_to_remove || amount_to_remove < 0)
diff --git a/code/modules/cargo/centcom_podlauncher.dm b/code/modules/cargo/centcom_podlauncher.dm
index e4060de1a2..f5490d5e85 100644
--- a/code/modules/cargo/centcom_podlauncher.dm
+++ b/code/modules/cargo/centcom_podlauncher.dm
@@ -284,11 +284,11 @@
var/list/expNames = list("Devastation", "Heavy Damage", "Light Damage", "Flame") //Explosions have a range of different types of damage
var/list/boomInput = list()
for (var/i=1 to expNames.len) //Gather input from the user for the value of each type of damage
- boomInput.Add(input("Enter the [expNames[i]] range of the explosion. WARNING: This ignores the bomb cap!", "[expNames[i]] Range", 0) as null|num)
+ boomInput.Add(tgui_input_num(usr, "Enter the [expNames[i]] range of the explosion. WARNING: This ignores the bomb cap!", "[expNames[i]] Range", 0))
if (isnull(boomInput[i]))
return
if (!isnum(boomInput[i])) //If the user doesn't input a number, set that specific explosion value to zero
- alert(usr, "That wasn't a number! Value set to default (zero) instead.")
+ tgui_alert(usr, "That wasn't a number! Value set to default (zero) instead.")
boomInput = 0
explosionChoice = 1
temp_pod.explosionSize = boomInput
@@ -306,11 +306,11 @@
damageChoice = 0
temp_pod.damage = 0
return
- var/damageInput = input("Enter the amount of brute damage dealt by getting hit","How much damage to deal", 0) as null|num
+ var/damageInput = tgui_input_num(usr, "Enter the amount of brute damage dealt by getting hit","How much damage to deal", 0)
if (isnull(damageInput))
return
if (!isnum(damageInput)) //Sanitize the input for damage to deal.s
- alert(usr, "That wasn't a number! Value set to default (zero) instead.")
+ tgui_alert(usr, "That wasn't a number! Value set to default (zero) instead.")
damageInput = 0
damageChoice = 1
temp_pod.damage = damageInput
@@ -330,10 +330,10 @@
temp_pod.adminNamed = FALSE
temp_pod.setStyle(temp_pod.style) //This resets the name of the pod based on it's current style (see supplypod/setStyle() proc)
return
- var/nameInput= input("Custom name", "Enter a custom name", GLOB.podstyles[temp_pod.style][POD_NAME]) as null|text //Gather input for name and desc
+ var/nameInput= tgui_input_text(usr, "Custom name", "Enter a custom name", GLOB.podstyles[temp_pod.style][POD_NAME])
if (isnull(nameInput))
return
- var/descInput = input("Custom description", "Enter a custom desc", GLOB.podstyles[temp_pod.style][POD_DESC]) as null|text //The GLOB.podstyles is used to get the name, desc, or icon state based on the pod's style
+ var/descInput = tgui_input_text(usr, "Custom description", "Enter a custom desc", GLOB.podstyles[temp_pod.style][POD_DESC]) //The GLOB.podstyles is used to get the name, desc, or icon state based on the pod's style
if (isnull(descInput))
return
temp_pod.name = nameInput
@@ -344,14 +344,14 @@
if (temp_pod.effectShrapnel == TRUE) //If already doing custom damage, set back to default (no shrapnel)
temp_pod.effectShrapnel = FALSE
return
- var/shrapnelInput = input("Please enter the type of pellet cloud you'd like to create on landing (Can be any projectile!)", "Projectile Typepath", 0) in sortList(subtypesof(/obj/item/projectile), /proc/cmp_typepaths_asc)
+ var/shrapnelInput = tgui_input_list(usr, "Please enter the type of pellet cloud you'd like to create on landing (Can be any projectile!)", "Projectile Typepath", sortList(subtypesof(/obj/item/projectile), /proc/cmp_typepaths_asc))
if (isnull(shrapnelInput))
return
- var/shrapnelMagnitude = input("Enter the magnitude of the pellet cloud. This is usually a value around 1-5. Please note that Ryll-Ryll has asked me to tell you that if you go too crazy with the projectiles you might crash the server. So uh, be gentle!", "Shrapnel Magnitude", 0) as null|num
+ var/shrapnelMagnitude = tgui_input_num(usr, "Enter the magnitude of the pellet cloud. This is usually a value around 1-5. Please note that Ryll-Ryll has asked me to tell you that if you go too crazy with the projectiles you might crash the server. So uh, be gentle!", "Shrapnel Magnitude", 0)
if (isnull(shrapnelMagnitude))
return
if (!isnum(shrapnelMagnitude))
- alert(usr, "That wasn't a number! Value set to 3 instead.")
+ tgui_alert(usr, "That wasn't a number! Value set to 3 instead.")
shrapnelMagnitude = 3
temp_pod.shrapnel_type = shrapnelInput
temp_pod.shrapnel_magnitude = shrapnelMagnitude
@@ -403,7 +403,7 @@
specificTarget = null
return
var/list/mobs = getpois()//code stolen from observer.dm
- var/inputTarget = input("Select a mob! (Smiting does this automatically)", "Target", null, null) as null|anything in mobs
+ var/inputTarget = tgui_input_list(usr, "Select a mob! (Smiting does this automatically)", "Target", mobs)
if (isnull(inputTarget))
return
var/mob/target = mobs[inputTarget]
@@ -448,11 +448,11 @@
if (found.file == tempSound.file)
soundLen = found.len
if (!soundLen)
- soundLen = input(holder, "Couldn't auto-determine sound file length. What is the exact length of the sound file, in seconds. This number will be used to line the sound up so that it finishes right as the pod lands!", "Pick a Sound File", 0.3) as null|num
+ soundLen = tgui_input_num(holder, "Couldn't auto-determine sound file length. What is the exact length of the sound file, in seconds. This number will be used to line the sound up so that it finishes right as the pod lands!", "Pick a Sound File", 0.3)
if (isnull(soundLen))
return
if (!isnum(soundLen))
- alert(usr, "That wasn't a number! Value set to default ([initial(temp_pod.fallingSoundLength)*0.1]) instead.")
+ tgui_alert(usr, "That wasn't a number! Value set to default ([initial(temp_pod.fallingSoundLength)*0.1]) instead.")
temp_pod.fallingSound = soundInput
temp_pod.fallingSoundLength = 10 * soundLen
. = TRUE
@@ -487,7 +487,7 @@
if (temp_pod.soundVolume != initial(temp_pod.soundVolume))
temp_pod.soundVolume = initial(temp_pod.soundVolume)
return
- var/soundInput = input(holder, "Please pick a volume. Default is between 1 and 100 with 50 being average, but pick whatever. I'm a notification, not a cop. If you still cant hear your sound, consider turning on the Quiet effect. It will silence all pod sounds except for the custom admin ones set by the previous three buttons.", "Pick Admin Sound Volume") as null|num
+ var/soundInput = tgui_input_num(holder, "Please pick a volume. Default is between 1 and 100 with 50 being average, but pick whatever. I'm a notification, not a cop. If you still cant hear your sound, consider turning on the Quiet effect. It will silence all pod sounds except for the custom admin ones set by the previous three buttons.", "Pick Admin Sound Volume")
if (isnull(soundInput))
return
temp_pod.soundVolume = soundInput
@@ -521,7 +521,7 @@
updateSelector()
. = TRUE
if("clearBay") //Delete all mobs and objs in the selected bay
- if(alert(usr, "This will delete all objs and mobs in [bay]. Are you sure?", "Confirmation", "Delete that shit", "No") == "Delete that shit")
+ if(tgui_alert(usr, "This will delete all objs and mobs in [bay]. Are you sure?", "Confirmation", list("Delete that shit", "No")) == "Delete that shit")
clearBay()
refreshBay()
. = TRUE
diff --git a/code/modules/cargo/packs/misc.dm b/code/modules/cargo/packs/misc.dm
index 91663dbe0f..990e32df67 100644
--- a/code/modules/cargo/packs/misc.dm
+++ b/code/modules/cargo/packs/misc.dm
@@ -171,11 +171,11 @@
desc = "Start up your own grand casino with this crate filled with slot machine and arcade boards!"
cost = 3000
contains = list(/obj/item/circuitboard/computer/arcade/battle,
+ /obj/item/circuitboard/computer/arcade/battle,
/obj/item/circuitboard/computer/arcade/battle,
/obj/item/circuitboard/computer/arcade/orion_trail,
/obj/item/circuitboard/computer/arcade/orion_trail,
- /obj/item/circuitboard/computer/arcade/minesweeper,
- /obj/item/circuitboard/computer/arcade/minesweeper,
+ /obj/item/circuitboard/computer/arcade/orion_trail,
/obj/item/circuitboard/computer/slot_machine,
/obj/item/circuitboard/computer/slot_machine,
/obj/item/circuitboard/computer/slot_machine,
diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm
index 04b643e532..b9589d02bc 100644
--- a/code/modules/client/client_procs.dm
+++ b/code/modules/client/client_procs.dm
@@ -359,7 +359,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if(alert_mob_dupe_login)
spawn()
- alert(mob, "You have logged in already with another key this round, please log out of this one NOW or risk being banned!")
+ tgui_alert(mob, "You have logged in already with another key this round, please log out of this one NOW or risk being banned!")
connection_time = world.time
connection_realtime = world.realtime
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index cb262e57f3..90fd95bdf0 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -1612,17 +1612,17 @@ GLOBAL_LIST_EMPTY(preferences_datums)
switch(href_list["preference"])
if("ghostform")
if(unlock_content)
- var/new_form = input(user, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND",null) as null|anything in GLOB.ghost_forms
+ var/new_form = tgui_input_list(user, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND", GLOB.ghost_forms)
if(new_form)
ghost_form = new_form
if("ghostorbit")
if(unlock_content)
- var/new_orbit = input(user, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND", null) as null|anything in GLOB.ghost_orbits
+ var/new_orbit = tgui_input_list(user, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND", GLOB.ghost_orbits)
if(new_orbit)
ghost_orbit = new_orbit
if("ghostaccs")
- var/new_ghost_accs = alert("Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,GHOST_ACCS_FULL_NAME, GHOST_ACCS_DIR_NAME, GHOST_ACCS_NONE_NAME)
+ var/new_ghost_accs = tgui_alert(user, "Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,list(GHOST_ACCS_FULL_NAME, GHOST_ACCS_DIR_NAME, GHOST_ACCS_NONE_NAME))
switch(new_ghost_accs)
if(GHOST_ACCS_FULL_NAME)
ghost_accs = GHOST_ACCS_FULL
@@ -1632,7 +1632,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
ghost_accs = GHOST_ACCS_NONE
if("ghostothers")
- var/new_ghost_others = alert("Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,GHOST_OTHERS_THEIR_SETTING_NAME, GHOST_OTHERS_DEFAULT_SPRITE_NAME, GHOST_OTHERS_SIMPLE_NAME)
+ var/new_ghost_others = tgui_alert(user, "Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,list(GHOST_OTHERS_THEIR_SETTING_NAME, GHOST_OTHERS_DEFAULT_SPRITE_NAME, GHOST_OTHERS_SIMPLE_NAME))
switch(new_ghost_others)
if(GHOST_OTHERS_THEIR_SETTING_NAME)
ghost_others = GHOST_OTHERS_THEIR_SETTING
@@ -1642,7 +1642,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
ghost_others = GHOST_OTHERS_SIMPLE
if("name")
- var/new_name = input(user, "Choose your character's name:", "Character Preference") as text|null
+ var/new_name = tgui_input_text(user, "Choose your character's name:", "Character Preference", real_name)
if(new_name)
new_name = reject_bad_name(new_name)
if(new_name)
@@ -1651,7 +1651,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .")
if("age")
- var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null
+ var/new_age = tgui_input_num(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference", age)
if(new_age)
age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
@@ -1692,7 +1692,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("hair_style")
var/new_hair_style
- new_hair_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in GLOB.hair_styles_list
+ new_hair_style = tgui_input_list(user, "Choose your character's hair style:", "Character Preference", GLOB.hair_styles_list)
if(new_hair_style)
hair_style = new_hair_style
@@ -1709,7 +1709,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("facial_hair_style")
var/new_facial_hair_style
- new_facial_hair_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in GLOB.facial_hair_styles_list
+ new_facial_hair_style = tgui_input_list(user, "Choose your character's facial-hair style:", "Character Preference", GLOB.facial_hair_styles_list)
if(new_facial_hair_style)
facial_hair_style = new_facial_hair_style
@@ -1726,7 +1726,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("grad_style")
var/new_grad_style
- new_grad_style = input(user, "Choose your character's hair gradient style:", "Character Preference") as null|anything in GLOB.hair_gradients_list
+ new_grad_style = tgui_input_list(user, "Choose your character's hair gradient style:", "Character Preference", GLOB.hair_gradients_list)
if(new_grad_style)
grad_style = new_grad_style
@@ -1740,12 +1740,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
bgstate = next_list_item(bgstate, bgstate_options)
if("modify_limbs")
- var/limb_type = input(user, "Choose the limb to modify:", "Character Preference") as null|anything in LOADOUT_ALLOWED_LIMB_TARGETS
+ var/limb_type = tgui_input_list(user, "Choose the limb to modify:", "Character Preference", LOADOUT_ALLOWED_LIMB_TARGETS)
if(limb_type)
- var/modification_type = input(user, "Choose the modification to the limb:", "Character Preference") as null|anything in LOADOUT_LIMBS
+ var/modification_type = tgui_input_list(user, "Choose the modification to the limb:", "Character Preference", LOADOUT_LIMBS)
if(modification_type)
if(modification_type == LOADOUT_LIMB_PROSTHETIC)
- var/prosthetic_type = input(user, "Choose the type of prosthetic", "Character Preference") as null|anything in (list("prosthetic") + GLOB.prosthetic_limb_types)
+ var/prosthetic_type = tgui_input_list(user, "Choose the type of prosthetic", "Character Preference", list("prosthetic") + GLOB.prosthetic_limb_types)
if(prosthetic_type)
var/number_of_prosthetics = 0
for(var/modified_limb in modified_limbs)
@@ -1763,7 +1763,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
modified_limbs[limb_type] = list(modification_type)
if("underwear")
- var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_list
+ var/new_underwear = tgui_input_list(user, "Choose your character's underwear:", "Character Preference", GLOB.underwear_list)
if(new_underwear)
underwear = new_underwear
@@ -1773,7 +1773,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
undie_color = sanitize_hexcolor(n_undie_color, 6)
if("undershirt")
- var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_list
+ var/new_undershirt = tgui_input_list(user, "Choose your character's undershirt:", "Character Preference", GLOB.undershirt_list)
if(new_undershirt)
undershirt = new_undershirt
@@ -1783,7 +1783,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
shirt_color = sanitize_hexcolor(n_shirt_color, 6)
if("socks")
- var/new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in GLOB.socks_list
+ var/new_socks = tgui_input_list(user, "Choose your character's socks:", "Character Preference", GLOB.socks_list)
if(new_socks)
socks = new_socks
@@ -1809,7 +1809,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
right_eye_color = sanitize_hexcolor(new_eyes, 6)
if("eye_type")
- var/new_eye_type = input(user, "Choose your character's eye type.", "Character Preference") as null|anything in GLOB.eye_types
+ var/new_eye_type = tgui_input_list(user, "Choose your character's eye type.", "Character Preference", GLOB.eye_types)
if(new_eye_type)
eye_type = new_eye_type
@@ -1818,7 +1818,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
right_eye_color = left_eye_color
if("species")
- var/result = input(user, "Select a species", "Species Selection") as null|anything in GLOB.roundstart_race_names
+ var/result = tgui_input_list(user, "Select a species", "Species Selection", GLOB.roundstart_race_names)
if(result)
var/newtype = GLOB.species_list[GLOB.roundstart_race_names[result]]
pref_species = new newtype()
@@ -1848,7 +1848,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
eye_type = pref_species.eye_type
if("custom_species")
- var/new_species = reject_bad_name(input(user, "Choose your species subtype, if unique. This will show up on examinations and health scans. Do not abuse this:", "Character Preference", custom_species) as null|text)
+ var/new_species = reject_bad_name(tgui_input_text(user, "Choose your species subtype, if unique. This will show up on examinations and health scans. Do not abuse this:", "Character Preference", custom_species))
if(new_species)
custom_species = new_species
else
@@ -1892,7 +1892,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("ipc_screen")
var/new_ipc_screen
- new_ipc_screen = input(user, "Choose your character's screen:", "Character Preference") as null|anything in GLOB.ipc_screens_list
+ new_ipc_screen = tgui_input_list(user, "Choose your character's screen:", "Character Preference", GLOB.ipc_screens_list)
if(new_ipc_screen)
features["ipc_screen"] = new_ipc_screen
@@ -1908,31 +1908,31 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
snowflake_antenna_list[S.name] = path
var/new_ipc_antenna
- new_ipc_antenna = input(user, "Choose your character's antenna:", "Character Preference") as null|anything in snowflake_antenna_list
+ new_ipc_antenna = tgui_input_list(user, "Choose your character's antenna:", "Character Preference", snowflake_antenna_list)
if(new_ipc_antenna)
features["ipc_antenna"] = new_ipc_antenna
if("arachnid_legs")
var/new_arachnid_legs
- new_arachnid_legs = input(user, "Choose your character's variant of arachnid legs:", "Character Preference") as null|anything in GLOB.arachnid_legs_list
+ new_arachnid_legs = tgui_input_list(user, "Choose your character's variant of arachnid legs:", "Character Preference", GLOB.arachnid_legs_list)
if(new_arachnid_legs)
features["arachnid_legs"] = new_arachnid_legs
if("arachnid_spinneret")
var/new_arachnid_spinneret
- new_arachnid_spinneret = input(user, "Choose your character's spinneret markings:", "Character Preference") as null|anything in GLOB.arachnid_spinneret_list
+ new_arachnid_spinneret = tgui_input_list(user, "Choose your character's spinneret markings:", "Character Preference", GLOB.arachnid_spinneret_list)
if(new_arachnid_spinneret)
features["arachnid_spinneret"] = new_arachnid_spinneret
if("arachnid_mandibles")
var/new_arachnid_mandibles
- new_arachnid_mandibles = input(user, "Choose your character's variant of mandibles:", "Character Preference") as null|anything in GLOB.arachnid_mandibles_list
+ new_arachnid_mandibles = tgui_input_list(user, "Choose your character's variant of mandibles:", "Character Preference", GLOB.arachnid_mandibles_list)
if (new_arachnid_mandibles)
features["arachnid_mandibles"] = new_arachnid_mandibles
if("tail_lizard")
var/new_tail
- new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.tails_list_lizard
+ new_tail = tgui_input_list(user, "Choose your character's tail:", "Character Preference", GLOB.tails_list_lizard)
if(new_tail)
features["tail_lizard"] = new_tail
if(new_tail != "None")
@@ -1951,7 +1951,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
snowflake_tails_list[S.name] = path
var/new_tail
- new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in snowflake_tails_list
+ new_tail = tgui_input_list(user, "Choose your character's tail:", "Character Preference", snowflake_tails_list)
if(new_tail)
features["tail_human"] = new_tail
if(new_tail != "None")
@@ -1970,7 +1970,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
snowflake_tails_list[S.name] = path
var/new_tail
- new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in snowflake_tails_list
+ new_tail = tgui_input_list(user, "Choose your character's tail:", "Character Preference", snowflake_tails_list)
if(new_tail)
features["mam_tail"] = new_tail
if(new_tail != "None")
@@ -1980,7 +1980,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("meat_type")
var/new_meat
- new_meat = input(user, "Choose your character's meat type:", "Character Preference") as null|anything in GLOB.meat_types
+ new_meat = tgui_input_list(user, "Choose your character's meat type:", "Character Preference", GLOB.meat_types)
if(new_meat)
features["meat_type"] = new_meat
@@ -1995,7 +1995,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
snowflake_snouts_list[S.name] = path
var/new_snout
- new_snout = input(user, "Choose your character's snout:", "Character Preference") as null|anything in snowflake_snouts_list
+ new_snout = tgui_input_list(user, "Choose your character's snout:", "Character Preference", snowflake_snouts_list)
if(new_snout)
features["snout"] = new_snout
features["mam_snouts"] = "None"
@@ -2012,14 +2012,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
snowflake_mam_snouts_list[S.name] = path
var/new_mam_snouts
- new_mam_snouts = input(user, "Choose your character's snout:", "Character Preference") as null|anything in snowflake_mam_snouts_list
+ new_mam_snouts = tgui_input_list(user, "Choose your character's snout:", "Character Preference", snowflake_mam_snouts_list)
if(new_mam_snouts)
features["mam_snouts"] = new_mam_snouts
features["snout"] = "None"
if("horns")
var/new_horns
- new_horns = input(user, "Choose your character's horns:", "Character Preference") as null|anything in GLOB.horns_list
+ new_horns = tgui_input_list(user, "Choose your character's horns:", "Character Preference", GLOB.horns_list)
if(new_horns)
features["horns"] = new_horns
@@ -2033,7 +2033,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("wings")
var/new_wings
- new_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.r_wings_list
+ new_wings = tgui_input_list(user, "Choose your character's wings:", "Character Preference", GLOB.r_wings_list)
if(new_wings)
features["wings"] = new_wings
@@ -2047,61 +2047,61 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("frills")
var/new_frills
- new_frills = input(user, "Choose your character's frills:", "Character Preference") as null|anything in GLOB.frills_list
+ new_frills = tgui_input_list(user, "Choose your character's frills:", "Character Preference", GLOB.frills_list)
if(new_frills)
features["frills"] = new_frills
if("spines")
var/new_spines
- new_spines = input(user, "Choose your character's spines:", "Character Preference") as null|anything in GLOB.spines_list
+ new_spines = tgui_input_list(user, "Choose your character's spines:", "Character Preference", GLOB.spines_list)
if(new_spines)
features["spines"] = new_spines
if("legs")
var/new_legs
- new_legs = input(user, "Choose your character's legs:", "Character Preference") as null|anything in GLOB.legs_list
+ new_legs = tgui_input_list(user, "Choose your character's legs:", "Character Preference", GLOB.legs_list)
if(new_legs)
features["legs"] = new_legs
if("insect_wings")
var/new_insect_wings
- new_insect_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.insect_wings_list
+ new_insect_wings = tgui_input_list(user, "Choose your character's wings:", "Character Preference", GLOB.insect_wings_list)
if(new_insect_wings)
features["insect_wings"] = new_insect_wings
if("deco_wings")
var/new_deco_wings
- new_deco_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.deco_wings_list
+ new_deco_wings = tgui_input_list(user, "Choose your character's wings:", "Character Preference", GLOB.deco_wings_list)
if(new_deco_wings)
features["deco_wings"] = new_deco_wings
if("insect_fluff")
var/new_insect_fluff
- new_insect_fluff = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.insect_fluffs_list
+ new_insect_fluff = tgui_input_list(user, "Choose your character's wings:", "Character Preference", GLOB.insect_fluffs_list)
if(new_insect_fluff)
features["insect_fluff"] = new_insect_fluff
if("insect_markings")
var/new_insect_markings
- new_insect_markings = input(user, "Choose your character's markings:", "Character Preference") as null|anything in GLOB.insect_markings_list
+ new_insect_markings = tgui_input_list(user, "Choose your character's markings:", "Character Preference", GLOB.insect_markings_list)
if(new_insect_markings)
features["insect_markings"] = new_insect_markings
if("arachnid_legs")
var/new_arachnid_legs
- new_arachnid_legs = input(user, "Choose your character's variant of arachnid legs:", "Character Preference") as null|anything in GLOB.arachnid_legs_list
+ new_arachnid_legs = tgui_input_list(user, "Choose your character's variant of arachnid legs:", "Character Preference", GLOB.arachnid_legs_list)
if(new_arachnid_legs)
features["arachnid_legs"] = new_arachnid_legs
if("arachnid_spinneret")
var/new_arachnid_spinneret
- new_arachnid_spinneret = input(user, "Choose your character's spinneret markings:", "Character Preference") as null|anything in GLOB.arachnid_spinneret_list
+ new_arachnid_spinneret = tgui_input_list(user, "Choose your character's spinneret markings:", "Character Preference", GLOB.arachnid_spinneret_list)
if(new_arachnid_spinneret)
features["arachnid_spinneret"] = new_arachnid_spinneret
if("arachnid_mandibles")
var/new_arachnid_mandibles
- new_arachnid_mandibles = input(user, "Choose your character's variant of mandibles:", "Character Preference") as null|anything in GLOB.arachnid_mandibles_list
+ new_arachnid_mandibles = tgui_input_list(user, "Choose your character's variant of mandibles:", "Character Preference", GLOB.arachnid_mandibles_list)
if (new_arachnid_mandibles)
features["arachnid_mandibles"] = new_arachnid_mandibles
@@ -2109,7 +2109,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/list/choices = GLOB.skin_tones - GLOB.nonstandard_skin_tones
if(CONFIG_GET(flag/allow_custom_skintones))
choices += "custom"
- var/new_s_tone = input(user, "Choose your character's skin tone:", "Character Preference") as null|anything in choices
+ var/new_s_tone = tgui_input_list(user, "Choose your character's skin tone:", "Character Preference", choices)
if(new_s_tone)
if(new_s_tone == "custom")
var/default = use_custom_skin_tone ? skin_tone : null
@@ -2136,7 +2136,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
snowflake_taur_list[S.name] = path
var/new_taur
- new_taur = input(user, "Choose your character's tauric body:", "Character Preference") as null|anything in snowflake_taur_list
+ new_taur = tgui_input_list(user, "Choose your character's tauric body:", "Character Preference", snowflake_taur_list)
if(new_taur)
features["taur"] = new_taur
if(new_taur != "None")
@@ -2157,7 +2157,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
snowflake_ears_list[S.name] = path
var/new_ears
- new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in snowflake_ears_list
+ new_ears = tgui_input_list(user, "Choose your character's ears:", "Character Preference", snowflake_ears_list)
if(new_ears)
features["ears"] = new_ears
@@ -2172,20 +2172,20 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
snowflake_ears_list[S.name] = path
var/new_ears
- new_ears = input(user, "Choose your character's ears:", "Character Preference") as null|anything in snowflake_ears_list
+ new_ears = tgui_input_list(user, "Choose your character's ears:", "Character Preference", snowflake_ears_list)
if(new_ears)
features["mam_ears"] = new_ears
//Xeno Bodyparts
if("xenohead")//Head or caste type
var/new_head
- new_head = input(user, "Choose your character's caste:", "Character Preference") as null|anything in GLOB.xeno_head_list
+ new_head = tgui_input_list(user, "Choose your character's caste:", "Character Preference", GLOB.xeno_head_list)
if(new_head)
features["xenohead"] = new_head
if("xenotail")//Currently one one type, more maybe later if someone sprites them. Might include animated variants in the future.
var/new_tail
- new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in GLOB.xeno_tail_list
+ new_tail = tgui_input_list(user, "Choose your character's tail:", "Character Preference", GLOB.xeno_tail_list)
if(new_tail)
features["xenotail"] = new_tail
if(new_tail != "None")
@@ -2196,7 +2196,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("xenodorsal")
var/new_dors
- new_dors = input(user, "Choose your character's dorsal tube type:", "Character Preference") as null|anything in GLOB.xeno_dorsal_list
+ new_dors = tgui_input_list(user, "Choose your character's dorsal tube type:", "Character Preference", GLOB.xeno_dorsal_list)
if(new_dors)
features["xenodorsal"] = new_dors
@@ -2239,7 +2239,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("cock_length")
var/min_D = CONFIG_GET(number/penis_min_inches_prefs)
var/max_D = CONFIG_GET(number/penis_max_inches_prefs)
- var/new_length = input(user, "Penis length in inches:\n([min_D]-[max_D])", "Character Preference") as num|null
+ var/new_length = tgui_input_num(user, "Penis length in inches:\n([min_D]-[max_D])", "Character Preference", features["cock_length"])
if(new_length)
features["cock_length"] = clamp(round(new_length), min_D, max_D)
@@ -2252,7 +2252,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/datum/sprite_accessory/penis/P = GLOB.cock_shapes_list[A]
if(P.taur_icon && T.taur_mode & P.accepted_taurs)
LAZYSET(hockeys, "[A] (Taur)", A)
- new_shape = input(user, "Penis shape:", "Character Preference") as null|anything in (GLOB.cock_shapes_list + hockeys)
+ new_shape = tgui_input_list(user, "Penis shape:", "Character Preference", GLOB.cock_shapes_list + hockeys)
if(new_shape)
features["cock_taur"] = FALSE
if(hockeys[new_shape])
@@ -2261,7 +2261,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
features["cock_shape"] = new_shape
if("cock_visibility")
- var/n_vis = input(user, "Penis Visibility", "Character Preference") as null|anything in CONFIG_GET(keyed_list/safe_visibility_toggles)
+ var/n_vis = tgui_input_list(user, "Penis Visibility", "Character Preference", CONFIG_GET(keyed_list/safe_visibility_toggles))
if(n_vis)
features["cock_visibility"] = n_vis
@@ -2277,18 +2277,18 @@ GLOBAL_LIST_EMPTY(preferences_datums)
to_chat(user,"Invalid color. Your color is not bright enough.")
if("balls_visibility")
- var/n_vis = input(user, "Testicles Visibility", "Character Preference") as null|anything in CONFIG_GET(keyed_list/safe_visibility_toggles)
+ var/n_vis = tgui_input_list(user, "Testicles Visibility", "Character Preference", CONFIG_GET(keyed_list/safe_visibility_toggles))
if(n_vis)
features["balls_visibility"] = n_vis
if("breasts_size")
- var/new_size = input(user, "Breast Size", "Character Preference") as null|anything in CONFIG_GET(keyed_list/breasts_cups_prefs)
+ var/new_size = tgui_input_list(user, "Breast Size", "Character Preference", CONFIG_GET(keyed_list/breasts_cups_prefs))
if(new_size)
features["breasts_size"] = new_size
if("breasts_shape")
var/new_shape
- new_shape = input(user, "Breast Shape", "Character Preference") as null|anything in GLOB.breasts_shapes_list
+ new_shape = tgui_input_list(user, "Breast Shape", "Character Preference", GLOB.breasts_shapes_list)
if(new_shape)
features["breasts_shape"] = new_shape
@@ -2304,13 +2304,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
to_chat(user,"Invalid color. Your color is not bright enough.")
if("breasts_visibility")
- var/n_vis = input(user, "Breasts Visibility", "Character Preference") as null|anything in CONFIG_GET(keyed_list/safe_visibility_toggles)
+ var/n_vis = tgui_input_list(user, "Breasts Visibility", "Character Preference", CONFIG_GET(keyed_list/safe_visibility_toggles))
if(n_vis)
features["breasts_visibility"] = n_vis
if("vag_shape")
var/new_shape
- new_shape = input(user, "Vagina Type", "Character Preference") as null|anything in GLOB.vagina_shapes_list
+ new_shape = tgui_input_list(user, "Vagina Type", "Character Preference", GLOB.vagina_shapes_list)
if(new_shape)
features["vag_shape"] = new_shape
@@ -2326,7 +2326,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
to_chat(user,"Invalid color. Your color is not bright enough.")
if("vag_visibility")
- var/n_vis = input(user, "Vagina Visibility", "Character Preference") as null|anything in CONFIG_GET(keyed_list/safe_visibility_toggles)
+ var/n_vis = tgui_input_list(user, "Vagina Visibility", "Character Preference", CONFIG_GET(keyed_list/safe_visibility_toggles))
if(n_vis)
features["vag_visibility"] = n_vis
@@ -2341,7 +2341,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
aooccolor = new_aooccolor
if("bag")
- var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in GLOB.backbaglist
+ var/new_backbag = tgui_input_list(user, "Choose your character's style of bag:", "Character Preference", GLOB.backbaglist)
if(new_backbag)
backbag = new_backbag
@@ -2353,17 +2353,17 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("uplink_loc")
- var/new_loc = input(user, "Choose your character's traitor uplink spawn location:", "Character Preference") as null|anything in GLOB.uplink_spawn_loc_list
+ var/new_loc = tgui_input_list(user, "Choose your character's traitor uplink spawn location:", "Character Preference", GLOB.uplink_spawn_loc_list)
if(new_loc)
uplink_spawn_loc = new_loc
if("ai_core_icon")
- var/ai_core_icon = input(user, "Choose your preferred AI core display screen:", "AI Core Display Screen Selection") as null|anything in GLOB.ai_core_display_screens
+ var/ai_core_icon = tgui_input_list(user, "Choose your preferred AI core display screen:", "AI Core Display Screen Selection", GLOB.ai_core_display_screens)
if(ai_core_icon)
preferred_ai_core_display = ai_core_icon
if("sec_dept")
- var/department = input(user, "Choose your preferred security department:", "Security Departments") as null|anything in GLOB.security_depts_prefs
+ var/department = tgui_input_list(user, "Choose your preferred security department:", "Security Departments", GLOB.security_depts_prefs)
if(department)
prefered_security_department = department
@@ -2379,26 +2379,26 @@ GLOBAL_LIST_EMPTY(preferences_datums)
friendlyname += " (disabled)"
maplist[friendlyname] = VM.map_name
maplist[default] = null
- var/pickedmap = input(user, "Choose your preferred map. This will be used to help weight random map selection.", "Character Preference") as null|anything in maplist
+ var/pickedmap = tgui_input_list(user, "Choose your preferred map. This will be used to help weight random map selection.", "Character Preference", maplist)
if (pickedmap)
preferred_map = maplist[pickedmap]
if ("preferred_chaos")
- var/pickedchaos = input(user, "Choose your preferred level of chaos. This will help with dynamic threat level ratings.", "Character Preference") as null|anything in list(CHAOS_NONE,CHAOS_LOW,CHAOS_MED,CHAOS_HIGH,CHAOS_MAX)
+ var/pickedchaos = tgui_input_list(user, "Choose your preferred level of chaos. This will help with dynamic threat level ratings.", "Character Preference", list(CHAOS_NONE,CHAOS_LOW,CHAOS_MED,CHAOS_HIGH,CHAOS_MAX))
preferred_chaos = pickedchaos
if ("clientfps")
- var/desiredfps = input(user, "Choose your desired fps. (0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps) as null|num
+ var/desiredfps = tgui_input_num(user, "Choose your desired fps. (0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps)
if (!isnull(desiredfps))
clientfps = desiredfps
parent.fps = desiredfps
if("ui")
- var/pickedui = input(user, "Choose your UI style.", "Character Preference", UI_style) as null|anything in GLOB.available_ui_styles
+ var/pickedui = tgui_input_list(user, "Choose your UI style.", "Character Preference", GLOB.available_ui_styles)
if(pickedui)
UI_style = pickedui
if (parent && parent.mob && parent.mob.hud_used)
parent.mob.hud_used.update_ui_style(ui_style2icon(UI_style))
if("pda_style")
- var/pickedPDAStyle = input(user, "Choose your PDA style.", "Character Preference", pda_style) as null|anything in GLOB.pda_styles
+ var/pickedPDAStyle = tgui_input_list(user, "Choose your PDA style.", "Character Preference", GLOB.pda_styles)
if(pickedPDAStyle)
pda_style = pickedPDAStyle
if("pda_color")
@@ -2406,11 +2406,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(pickedPDAColor)
pda_color = pickedPDAColor
if("pda_skin")
- var/pickedPDASkin = input(user, "Choose your PDA reskin.", "Character Preference", pda_skin) as null|anything in GLOB.pda_reskins
+ var/pickedPDASkin = tgui_input_list(user, "Choose your PDA reskin.", "Character Preference", pda_skin, GLOB.pda_reskins)
if(pickedPDASkin)
pda_skin = pickedPDASkin
if ("max_chat_length")
- var/desiredlength = input(user, "Choose the max character length of shown Runechat messages. Valid range is 1 to [CHAT_MESSAGE_MAX_LENGTH] (default: [initial(max_chat_length)]))", "Character Preference", max_chat_length) as null|num
+ var/desiredlength = tgui_input_num(user, "Choose the max character length of shown Runechat messages. Valid range is 1 to [CHAT_MESSAGE_MAX_LENGTH] (default: [initial(max_chat_length)]))", "Character Preference", max_chat_length)
if (!isnull(desiredlength))
max_chat_length = clamp(desiredlength, 1, CHAT_MESSAGE_MAX_LENGTH)
@@ -2420,7 +2420,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
hud_toggle_color = new_toggle_color
if("gender")
- var/chosengender = input(user, "Select your character's gender.", "Gender Selection", gender) as null|anything in list(MALE,FEMALE,"nonbinary","object")
+ var/chosengender = tgui_input_list(user, "Select your character's gender.", "Gender Selection", list(MALE,FEMALE,"nonbinary","object"))
if(!chosengender)
return
switch(chosengender)
@@ -2435,27 +2435,27 @@ GLOBAL_LIST_EMPTY(preferences_datums)
gender = chosengender
if("body_size")
- var/new_body_size = input(user, "Choose your desired sprite size: (90-125%)\nWarning: This may make your character look distorted. Additionally, any size under 100% takes a 10% maximum health penalty", "Character Preference", features["body_size"]*100) as num|null
+ var/new_body_size = tgui_input_num(user, "Choose your desired sprite size: (90-125%)\nWarning: This may make your character look distorted. Additionally, any size under 100% takes a 10% maximum health penalty", "Character Preference", features["body_size"]*100)
if(new_body_size)
features["body_size"] = clamp(new_body_size * 0.01, CONFIG_GET(number/body_size_min), CONFIG_GET(number/body_size_max))
if("tongue")
- var/selected_custom_tongue = input(user, "Choose your desired tongue (none means your species tongue)", "Character Preference") as null|anything in GLOB.roundstart_tongues
+ var/selected_custom_tongue = tgui_input_list(user, "Choose your desired tongue (none means your species tongue)", "Character Preference", GLOB.roundstart_tongues)
if(selected_custom_tongue)
custom_tongue = selected_custom_tongue
if("speech_verb")
- var/selected_custom_speech_verb = input(user, "Choose your desired speech verb (none means your species speech verb)", "Character Preference") as null|anything in GLOB.speech_verbs
+ var/selected_custom_speech_verb = tgui_input_list(user, "Choose your desired speech verb (none means your species speech verb)", "Character Preference", GLOB.speech_verbs)
if(selected_custom_speech_verb)
custom_speech_verb = selected_custom_speech_verb
if("language")
- var/selected_language = input(user, "Choose your desired additional language", "Character Preference") as null|anything in GLOB.roundstart_languages
+ var/selected_language = tgui_input_list(user, "Choose your desired additional language", "Character Preference", GLOB.roundstart_languages)
if(selected_language)
additional_language = selected_language
if("bodysprite")
- var/selected_body_sprite = input(user, "Choose your desired body sprite", "Character Preference") as null|anything in pref_species.allowed_limb_ids
+ var/selected_body_sprite = tgui_input_list(user, "Choose your desired body sprite", "Character Preference", pref_species.allowed_limb_ids)
if(selected_body_sprite)
chosen_limb_id = selected_body_sprite //this gets sanitized before loading
@@ -2496,7 +2496,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
// add a marking
var/marking_type = href_list["marking_type"]
if(marking_type && features[marking_type])
- var/selected_limb = input(user, "Choose the limb to apply to.", "Character Preference") as null|anything in list("Head", "Chest", "Left Arm", "Right Arm", "Left Leg", "Right Leg", "All")
+ var/selected_limb = tgui_input_list(user, "Choose the limb to apply to.", "Character Preference", list("Head", "Chest", "Left Arm", "Right Arm", "Left Leg", "Right Leg", "All"))
if(selected_limb)
var/list/marking_list = GLOB.mam_body_markings_list
var/list/snowflake_markings_list = list()
@@ -2511,7 +2511,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
snowflake_markings_list[S.name] = path
- var/selected_marking = input(user, "Select the marking to apply to the limb.") as null|anything in snowflake_markings_list
+ var/selected_marking = tgui_input_list(user, "Select the marking to apply to the limb.", snowflake_markings_list)
if(selected_marking)
if(selected_limb != "All")
var/limb_value = text2num(GLOB.bodypart_values[selected_limb])
@@ -2534,7 +2534,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
options += "Secondary"
if(number_colors == 3)
options += "Tertiary"
- var/color_option = input(user, "Select the colour you wish to edit") as null|anything in options
+ var/color_option = tgui_input_list(user, "Select the colour you wish to edit", "", options)
if(color_option)
if(color_option == "Secondary") color_number = 2
if(color_option == "Tertiary") color_number = 3
@@ -2623,7 +2623,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("no_tetris_storage")
no_tetris_storage = !no_tetris_storage
if ("screenshake")
- var/desiredshake = input(user, "Set the amount of screenshake you want. \n(0 = disabled, 100 = full, 200 = maximum.)", "Character Preference", screenshake) as null|num
+ var/desiredshake = tgui_input_num(user, "Set the amount of screenshake you want. \n(0 = disabled, 100 = full, 200 = maximum.)", "Character Preference", screenshake)
if (!isnull(desiredshake))
screenshake = desiredshake
if("damagescreenshake")
@@ -2718,7 +2718,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
save_preferences()
if("keybindings_reset")
- var/choice = tgalert(user, "Would you prefer 'hotkey' or 'classic' defaults?", "Setup keybindings", "Hotkey", "Classic", "Cancel")
+ var/choice = tgui_alert(user, "Would you prefer 'hotkey' or 'classic' defaults?", "Setup keybindings", list("Hotkey", "Classic", "Cancel"))
if(choice == "Cancel")
ShowChoices(user)
return
@@ -2971,7 +2971,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/list/color_options = list()
for(var/i=1, i<=length(G.loadout_initial_colors), i++)
color_options += "Color [i]"
- var/color_to_change = input(user, "Polychromic options", "Recolor [name]") as null|anything in color_options
+ var/color_to_change = tgui_input_list(user, "Polychromic options", "Recolor [name]", color_options)
if(color_to_change)
var/color_index = text2num(copytext(color_to_change, 7))
var/current_color = user_gear[LOADOUT_COLOR][color_index]
@@ -3175,7 +3175,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(!namedata)
return
- var/raw_name = input(user, "Choose your character's [namedata["qdesc"]]:","Character Preference") as text|null
+ var/raw_name = tgui_input_text(user, "Choose your character's [namedata["qdesc"]]:","Character Preference", custom_names[name_id])
if(!raw_name)
if(namedata["allow_null"])
custom_names[name_id] = get_default_name(name_id)
@@ -3199,7 +3199,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
/// Resets the client's keybindings. Asks them for which
/datum/preferences/proc/force_reset_keybindings()
- var/choice = tgalert(parent.mob, "Your basic keybindings need to be reset, emotes will remain as before. Would you prefer 'hotkey' or 'classic' mode?", "Reset keybindings", "Hotkey", "Classic")
+ var/choice = tgui_alert(parent.mob, "Your basic keybindings need to be reset, emotes will remain as before. Would you prefer 'hotkey' or 'classic' mode?", "Reset keybindings", list("Hotkey", "Classic"))
hotkeys = (choice != "Classic")
force_reset_keybindings_direct(hotkeys)
diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm
index a019ade471..c2b06253c9 100644
--- a/code/modules/client/preferences_toggles.dm
+++ b/code/modules/client/preferences_toggles.dm
@@ -277,9 +277,9 @@ GLOBAL_LIST_INIT(ghost_forms, list("ghost","ghostking","ghostian2","skeleghost",
"ghost_mellow","ghost_rainbow","ghost_camo","ghost_fire", "catghost"))
/client/proc/pick_form()
if(!is_content_unlocked())
- alert("This setting is for accounts with BYOND premium only.")
+ tgui_alert(src, "This setting is for accounts with BYOND premium only.")
return
- var/new_form = input(src, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND",null) as null|anything in GLOB.ghost_forms
+ var/new_form = tgui_input_list(src, "Thanks for supporting BYOND - Choose your ghostly form:","Thanks for supporting BYOND", GLOB.ghost_forms)
if(new_form)
prefs.ghost_form = new_form
prefs.save_preferences()
@@ -291,9 +291,9 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
/client/proc/pick_ghost_orbit()
if(!is_content_unlocked())
- alert("This setting is for accounts with BYOND premium only.")
+ tgui_alert(src, "This setting is for accounts with BYOND premium only.")
return
- var/new_orbit = input(src, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND",null) as null|anything in GLOB.ghost_orbits
+ var/new_orbit = tgui_input_list(src, "Thanks for supporting BYOND - Choose your ghostly orbit:","Thanks for supporting BYOND", GLOB.ghost_orbits)
if(new_orbit)
prefs.ghost_orbit = new_orbit
prefs.save_preferences()
@@ -302,7 +302,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
O.ghost_orbit = new_orbit
/client/proc/pick_ghost_accs()
- var/new_ghost_accs = alert("Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,"full accessories", "only directional sprites", "default sprites")
+ var/new_ghost_accs = tgui_alert(src, "Do you want your ghost to show full accessories where possible, hide accessories but still use the directional sprites where possible, or also ignore the directions and stick to the default sprites?",,list("full accessories", "only directional sprites", "default sprites"))
if(new_ghost_accs)
switch(new_ghost_accs)
if("full accessories")
@@ -321,7 +321,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
set category = "Preferences"
set desc = "Customize your ghastly appearance."
if(is_content_unlocked())
- switch(alert("Which setting do you want to change?",,"Ghost Form","Ghost Orbit","Ghost Accessories"))
+ switch(tgui_alert(src, "Which setting do you want to change?",,list("Ghost Form","Ghost Orbit","Ghost Accessories")))
if("Ghost Form")
pick_form()
if("Ghost Orbit")
@@ -335,7 +335,7 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
set name = "Ghosts of Others"
set category = "Preferences"
set desc = "Change display settings for the ghosts of other players."
- var/new_ghost_others = alert("Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,"Their Setting", "Default Sprites", "White Ghost")
+ var/new_ghost_others = tgui_alert(src, "Do you want the ghosts of others to show up as their own setting, as their default sprites or always as the default white ghost?",,list("Their Setting", "Default Sprites", "White Ghost"))
if(new_ghost_others)
switch(new_ghost_others)
if("Their Setting")
diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm
index 07087e70a3..f8a3cf5ffb 100644
--- a/code/modules/client/verbs/ooc.dm
+++ b/code/modules/client/verbs/ooc.dm
@@ -37,7 +37,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
msg = emoji_parse(msg)
if((msg[1] in list(".",";",":","#")) || findtext_char(msg, "say", 1, 5))
- if(alert("Your message \"[raw_msg]\" looks like it was meant for in game communication, say it in OOC?", "Meant for OOC?", "No", "Yes") != "Yes")
+ if(tgui_alert(src, "Your message \"[raw_msg]\" looks like it was meant for in game communication, say it in OOC?", "Meant for OOC?", list("No", "Yes")) != "Yes")
return
if(!holder)
@@ -215,7 +215,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
else
choices[C] = C
choices = sortList(choices)
- var/selection = input("Please, select a player!", "Ignore", null, null) as null|anything in choices
+ var/selection = tgui_input_list(src, "Please, select a player!", "Ignore", choices)
if(!selection || !(selection in choices))
return
selection = choices[selection]
diff --git a/code/modules/client/verbs/suicide.dm b/code/modules/client/verbs/suicide.dm
index 453c22e7f2..fbfba04996 100644
--- a/code/modules/client/verbs/suicide.dm
+++ b/code/modules/client/verbs/suicide.dm
@@ -5,7 +5,7 @@
if(!canSuicide())
return
var/oldkey = ckey
- var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
+ var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
if(ckey != oldkey)
return
if(!canSuicide())
@@ -84,7 +84,7 @@
set hidden = 1
if(!canSuicide())
return
- var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
+ var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
if(!canSuicide())
return
if(confirm == "Yes")
@@ -100,7 +100,7 @@
set hidden = 1
if(!canSuicide())
return
- var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
+ var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
if(!canSuicide())
return
if(confirm == "Yes")
@@ -117,7 +117,7 @@
set hidden = 1
if(!canSuicide())
return
- var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
+ var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
if(!canSuicide())
return
if(confirm == "Yes")
@@ -135,7 +135,7 @@
set hidden = 1
if(!canSuicide())
return
- var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
+ var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
if(!canSuicide())
return
if(confirm == "Yes")
@@ -151,7 +151,7 @@
/mob/living/silicon/pai/verb/suicide()
set hidden = 1
- var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
+ var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
if(confirm == "Yes")
var/turf/T = get_turf(src.loc)
T.visible_message("[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"", null, \
@@ -167,7 +167,7 @@
set hidden = 1
if(!canSuicide())
return
- var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
+ var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
if(!canSuicide())
return
if(confirm == "Yes")
@@ -186,7 +186,7 @@
set hidden = 1
if(!canSuicide())
return
- var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
+ var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
if(!canSuicide())
return
if(confirm == "Yes")
diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm
index 008772663d..1713a558cd 100644
--- a/code/modules/clothing/chameleon.dm
+++ b/code/modules/clothing/chameleon.dm
@@ -93,7 +93,7 @@
/datum/action/chameleon_outfit/proc/select_outfit(mob/user)
if(!user || !IsAvailable())
return FALSE
- var/selected = input("Select outfit to change into", "Chameleon Outfit") as null|anything in outfit_options
+ var/selected = tgui_input_list(user, "Select outfit to change into", "Chameleon Outfit", outfit_options)
if(!IsAvailable() || QDELETED(src) || QDELETED(user))
return FALSE
var/outfit_type = outfit_options[selected]
@@ -178,7 +178,7 @@
/datum/action/item_action/chameleon/change/proc/select_look(mob/user)
var/obj/item/picked_item
var/picked_name
- picked_name = input("Select [chameleon_name] to change into", "Chameleon [chameleon_name]", picked_name) as null|anything in chameleon_list
+ picked_name = tgui_input_list(user, "Select [chameleon_name] to change into", "Chameleon [chameleon_name]", chameleon_list)
if(!picked_name)
return
picked_item = chameleon_list[picked_name]
diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm
index cd48a81350..60db121b72 100644
--- a/code/modules/clothing/spacesuits/hardsuit.dm
+++ b/code/modules/clothing/spacesuits/hardsuit.dm
@@ -986,7 +986,7 @@
to_chat(user, "You can't do that right now!")
return TRUE
- if(alert("Are you sure you want to recolor your armor stripes?", "Confirm Repaint", "Yes", "No") == "Yes")
+ if(tgui_alert(user, "Are you sure you want to recolor your armor stripes?", "Confirm Repaint", list("Yes", "No")) == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",energy_color) as color|null
if(energy_color_input)
energy_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm
index 59af632d2a..1535e9265d 100644
--- a/code/modules/clothing/under/_under.dm
+++ b/code/modules/clothing/under/_under.dm
@@ -232,7 +232,7 @@
return 0
var/list/modes = list("Off", "Binary vitals", "Exact vitals", "Tracking beacon")
- var/switchMode = input("Select a sensor mode:", "Suit Sensor Mode", modes[sensor_mode + 1]) in modes
+ var/switchMode = tgui_input_list(usr, "Select a sensor mode:", "Suit Sensor Mode", modes)
if(get_dist(usr, src) > 1)
to_chat(usr, "You have moved too far away!")
return
diff --git a/code/modules/economy/paystand.dm b/code/modules/economy/paystand.dm
index f674bc230d..6b36c6a10b 100644
--- a/code/modules/economy/paystand.dm
+++ b/code/modules/economy/paystand.dm
@@ -22,7 +22,7 @@
name = rename_msg
return
else if(user.a_intent == INTENT_GRAB)
- var/force_fee_input = input(user,"Set the fee!","Set a fee!",0) as num|null
+ var/force_fee_input = tgui_input_num(user,"Set the fee!","Set a fee!",force_fee)
if(isnull(force_fee_input) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
force_fee = force_fee_input
@@ -46,7 +46,7 @@
if(vbucks.registered_account)
var/momsdebitcard = 0
if(!force_fee)
- momsdebitcard = input(user, "How much would you like to deposit?", "Money Deposit") as null|num
+ momsdebitcard = tgui_input_num(user, "How much would you like to deposit?", "Money Deposit", force_fee)
else
momsdebitcard = force_fee
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
@@ -66,7 +66,7 @@
return
if(istype(W, /obj/item/holochip))
var/obj/item/holochip/H = W
- var/cashmoney = input(user, "How much would you like to deposit?", "Money Deposit") as null|num
+ var/cashmoney = tgui_input_num(user, "How much would you like to deposit?", "Money Deposit", force_fee)
if(H.spend(cashmoney, FALSE))
purchase(user, cashmoney)
to_chat(user, "Thanks for purchasing! The vendor has been informed.")
@@ -89,7 +89,7 @@
to_chat(user, "ERROR: No identification card has been assigned to this paystand yet!")
return
if(!signaler)
- var/cash_limit = input(user, "Enter the minimum amount of cash needed to deposit before the signaler is activated.", "Signaler Activation Threshold") as null|num
+ var/cash_limit = tgui_input_num(user, "Enter the minimum amount of cash needed to deposit before the signaler is activated.", "Signaler Activation Threshold", signaler_threshold)
if(cash_limit < 1)
to_chat(user, "ERROR: Invalid amount designated.")
return
diff --git a/code/modules/events/false_alarm.dm b/code/modules/events/false_alarm.dm
index 5ac75cf087..650af7eeb8 100644
--- a/code/modules/events/false_alarm.dm
+++ b/code/modules/events/false_alarm.dm
@@ -17,8 +17,8 @@
if(!initial(event.fakeable))
continue
possible_types += E
-
- forced_type = input(usr, "Select the scare.","False event") as null|anything in possible_types
+
+ forced_type = tgui_input_list(usr, "Select the scare.","False event", possible_types)
/datum/round_event_control/falsealarm/canSpawnEvent(players_amt, gamemode)
return ..() && length(gather_false_events())
diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm
index a9ee0f5412..0675ea39f4 100644
--- a/code/modules/events/immovable_rod.dm
+++ b/code/modules/events/immovable_rod.dm
@@ -19,7 +19,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
if(!check_rights(R_FUN))
return
- var/aimed = alert("Aimed at current location?","Sniperod", "Yes", "No")
+ var/aimed = tgui_alert(usr, "Aimed at current location?","Sniperod", list("Yes", "No"))
if(aimed == "Yes")
special_target = get_turf(usr)
diff --git a/code/modules/events/mass_hallucination.dm b/code/modules/events/mass_hallucination.dm
index 0801e38507..a86e7f34ef 100644
--- a/code/modules/events/mass_hallucination.dm
+++ b/code/modules/events/mass_hallucination.dm
@@ -10,7 +10,7 @@
if(!check_rights(R_FUN))
return
- forced_hallucination = input(usr, "Choose the hallucination to apply","Send Hallucination") as null|anything in subtypesof(/datum/hallucination)
+ forced_hallucination = tgui_input_list(usr, "Choose the hallucination to apply","Send Hallucination", subtypesof(/datum/hallucination))
/datum/round_event/mass_hallucination
fakeable = FALSE
diff --git a/code/modules/events/pirates.dm b/code/modules/events/pirates.dm
index 31859b4fc0..cc02d7b7d0 100644
--- a/code/modules/events/pirates.dm
+++ b/code/modules/events/pirates.dm
@@ -145,7 +145,7 @@
/obj/machinery/shuttle_scrambler/interact(mob/user)
if(!active)
- if(alert(user, "Turning the scrambler on will make the shuttle trackable by GPS. Are you sure you want to do it?", "Scrambler", "Yes", "Cancel") == "Cancel")
+ if(tgui_alert(user, "Turning the scrambler on will make the shuttle trackable by GPS. Are you sure you want to do it?", "Scrambler", list("Yes", "Cancel")) == "Cancel")
return
if(active || !user.canUseTopic(src, BE_CLOSE))
return
diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm
index 6fcaa5e6b0..9f90a4e288 100644
--- a/code/modules/events/spacevine.dm
+++ b/code/modules/events/spacevine.dm
@@ -391,7 +391,7 @@
/datum/spacevine_controller/vv_do_topic(href_list)
. = ..()
if(href_list[VV_HK_SPACEVINE_PURGE])
- if(alert(usr, "Are you sure you want to delete this spacevine cluster?", "Delete Vines", "Yes", "No") == "Yes")
+ if(tgui_alert(usr, "Are you sure you want to delete this spacevine cluster?", "Delete Vines", list("Yes", "No")) == "Yes")
DeleteVines()
/datum/spacevine_controller/proc/DeleteVines() //this is kill
diff --git a/code/modules/events/wizard/madness.dm b/code/modules/events/wizard/madness.dm
index ac86236623..8619590b49 100644
--- a/code/modules/events/wizard/madness.dm
+++ b/code/modules/events/wizard/madness.dm
@@ -12,7 +12,7 @@
var/suggested = pick(strings(REDPILL_FILE, "redpill_questions"))
- forced_secret = (input(usr, "What horrifying truth will you reveal?", "Curse of Madness", sortList(suggested)) as text|null) || suggested
+ forced_secret = (tgui_input_text(usr, "What horrifying truth will you reveal?", "Curse of Madness", sortList(suggested))) || suggested
/datum/round_event/wizard/madness/start()
var/datum/round_event_control/wizard/madness/C = control
diff --git a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm
index f09d3d6728..70bfd80217 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm
@@ -122,7 +122,7 @@
log_combat(usr, src, "dispensed [O] from", null, "with [stored_food[href_list["dispense"]]] remaining")
if(href_list["portion"])
- portion = clamp(input("How much drink do you want to dispense per glass?") as num|null, 0, 50)
+ portion = clamp(tgui_input_num(usr, "How much drink do you want to dispense per glass?"), 0, 50)
if (isnull(portion))
return
diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
index 58769cebf1..0d338c583b 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
@@ -213,7 +213,7 @@
if (params["amount"])
desired = text2num(params["amount"])
else
- desired = input("How many items?", "How many items would you like to take out?", 1) as null|num
+ desired = tgui_input_num(usr, "How many items?", "How many items would you like to take out?", 1)
if(QDELETED(src) || QDELETED(usr) || !usr.Adjacent(src)) // Sanity checkin' in case stupid stuff happens while we wait for input()
return FALSE
diff --git a/code/modules/food_and_drinks/pizzabox.dm b/code/modules/food_and_drinks/pizzabox.dm
index a2603d07ab..cf3e9f69b3 100644
--- a/code/modules/food_and_drinks/pizzabox.dm
+++ b/code/modules/food_and_drinks/pizzabox.dm
@@ -123,7 +123,7 @@
update_icon()
return
else
- bomb_timer = input(user, "Set the [bomb] timer from [BOMB_TIMER_MIN] to [BOMB_TIMER_MAX].", bomb, bomb_timer) as num
+ bomb_timer = tgui_input_num(user, "Set the [bomb] timer from [BOMB_TIMER_MIN] to [BOMB_TIMER_MAX].", bomb, bomb_timer)
bomb_timer = clamp(CEILING(bomb_timer / 2, 1), BOMB_TIMER_MIN, BOMB_TIMER_MAX)
bomb_defused = FALSE
diff --git a/code/modules/holiday/halloween/jacqueen.dm b/code/modules/holiday/halloween/jacqueen.dm
index ed7453ad3e..49cb3ff630 100644
--- a/code/modules/holiday/halloween/jacqueen.dm
+++ b/code/modules/holiday/halloween/jacqueen.dm
@@ -183,7 +183,7 @@
progression["[C.real_name]"] = progression["[C.real_name]"] | JACQ_HELLO
var/choices = list("Trick", "Treat", "How do I get candies?", "Do I know you from somewhere?")
- var/choice = input(C, "Trick or Treat?", "Trick or Treat?") in choices
+ var/choice = tgui_input_list(C, "Trick or Treat?", "Trick or Treat?", choices)
switch(choice)
if("Trick")
trick(C)
@@ -207,7 +207,7 @@
visible_message("[src] gives off a glowing smile, \"What ken Ah offer ye? I can magic up an object, a potion or a plushie fer ye.\"")
jacqrunes("What ken Ah offer ye? I can magic up an object, a potion or a plushie fer ye.", C)
var/choices_reward = list("Object - 3 candies", "Potion - 2 candies", "Jacqueline Tracker - 2 candies", "Plushie - 1 candy", "Can I get to know you instead?", "Become a pumpkinhead dullahan (perma) - 4 candies")
- var/choice_reward = input(usr, "Trick or Treat?", "Trick or Treat?") in choices_reward
+ var/choice_reward = tgui_input_list(usr, "Trick or Treat?", "Trick or Treat?", choices_reward)
//rewards
switch(choice_reward)
@@ -320,7 +320,7 @@
jacqrunes("A question? Sure, it'll cost you a candy though!", C)
choices += "Nevermind"
//Candies for chitchats
- var/choice = input(C, "What do you want to ask?", "What do you want to ask?") in choices
+ var/choice = tgui_input_list(C, "What do you want to ask?", "What do you want to ask?", choices)
if(!take_candies(C, 1))
visible_message("[src] raises an eyebrow, \"It's a candy per question [gender]! Thems the rules!\"")
jacqrunes("It's a candy per question [gender]! Thems the rules!", C)
diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm
index 2857099d0f..1655f7769f 100644
--- a/code/modules/hydroponics/beekeeping/beebox.dm
+++ b/code/modules/hydroponics/beekeeping/beebox.dm
@@ -212,7 +212,7 @@
else
visible_message("[user] disturbs the [name] to no effect!")
else
- var/option = alert(user, "What action do you wish to perform?","Apiary","Remove a Honey Frame","Remove the Queen Bee", "Cancel")
+ var/option = tgui_alert(user, "What action do you wish to perform?","Apiary",list("Remove a Honey Frame","Remove the Queen Bee", "Cancel"))
if(!Adjacent(user))
return
switch(option)
diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm
index 38e4fcc6ff..dc7b6c576d 100644
--- a/code/modules/hydroponics/grown/towercap.dm
+++ b/code/modules/hydroponics/grown/towercap.dm
@@ -173,7 +173,7 @@
/obj/structure/bonfire/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/rods) && !can_buckle && !grill)
var/obj/item/stack/rods/R = W
- var/choice = input(user, "What would you like to construct?", "Bonfire") as null|anything in list("Stake","Grill")
+ var/choice = tgui_input_list(user, "What would you like to construct?", "Bonfire", list("Stake","Grill"))
switch(choice)
if("Stake")
R.use(1)
diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index fa7decc437..62f14127bf 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -626,7 +626,7 @@
for(var/muties in myseed.mutatelist)
var/obj/item/seeds/another_mut = new muties
fresh_mut_list[another_mut.plantname] = muties
- var/locked_mutation = (input(user, "Select a mutation to lock.", "Plant Mutation Locks") as null|anything in sortList(fresh_mut_list))
+ var/locked_mutation = (tgui_input_list(user, "Select a mutation to lock.", "Plant Mutation Locks", sortList(fresh_mut_list)))
if(!user.canUseTopic(src, BE_CLOSE) || !locked_mutation)
return
myseed.mutatelist = list(fresh_mut_list[locked_mutation])
@@ -684,7 +684,7 @@
if(!anchored)
update_icon()
return FALSE
- var/warning = alert(user, "Are you sure you wish to empty the tray's nutrient beaker?","Empty Tray Nutrients?", "Yes", "No")
+ var/warning = tgui_alert(user, "Are you sure you wish to empty the tray's nutrient beaker?","Empty Tray Nutrients?", list("Yes", "No"))
if(warning == "Yes" && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
reagents.clear_reagents()
to_chat(user, "You empty [src]'s nutrient tank.")
diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm
index 577635cd1c..79cd96e0b2 100644
--- a/code/modules/hydroponics/seeds.dm
+++ b/code/modules/hydroponics/seeds.dm
@@ -444,7 +444,7 @@
return
if(istype(O, /obj/item/pen))
- var/choice = input("What would you like to change?") in list("Plant Name", "Seed Description", "Product Description", "Cancel")
+ var/choice = tgui_input_list(user, "What would you like to change?", "", list("Plant Name", "Seed Description", "Product Description", "Cancel"))
if(!user.canUseTopic(src, BE_CLOSE))
return
switch(choice)
diff --git a/code/modules/instruments/songs/editor.dm b/code/modules/instruments/songs/editor.dm
index e385eed142..47347315bd 100644
--- a/code/modules/instruments/songs/editor.dm
+++ b/code/modules/instruments/songs/editor.dm
@@ -127,12 +127,12 @@
else if(href_list["import"])
var/t = ""
do
- t = html_encode(input(usr, "Please paste the entire song, formatted:", text("[]", name), t) as message)
+ t = html_encode(tgui_input_message(usr, "Please paste the entire song, formatted:", text("[]", name), t))
if(!in_range(parent, usr))
return
if(length_char(t) >= MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
- var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no")
+ var/cont = tgui_input_list(usr, "Your message is too long! Would you like to continue editing it?", "", list("yes", "no"))
if(cont == "no")
break
while(length_char(t) > MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
@@ -160,7 +160,7 @@
INVOKE_ASYNC(src, .proc/start_playing, usr)
else if(href_list["newline"])
- var/newline = html_encode(input("Enter your line: ", parent.name) as text|null)
+ var/newline = html_encode(tgui_input_text(usr, "Enter your line: ", parent.name))
if(!newline || !in_range(parent, usr))
return
if(lines.len > MUSIC_MAXLINES)
@@ -188,22 +188,22 @@
stop_playing()
else if(href_list["setlinearfalloff"])
- var/amount = input(usr, "Set linear sustain duration in seconds", "Linear Sustain Duration") as null|num
+ var/amount = tgui_input_num(usr, "Set linear sustain duration in seconds", "Linear Sustain Duration")
if(!isnull(amount))
set_linear_falloff_duration(round(amount * 10, world.tick_lag))
else if(href_list["setexpfalloff"])
- var/amount = input(usr, "Set exponential sustain factor", "Exponential sustain factor") as null|num
+ var/amount = tgui_input_num(usr, "Set exponential sustain factor", "Exponential sustain factor")
if(!isnull(amount))
set_exponential_drop_rate(round(amount, 0.00001))
else if(href_list["setvolume"])
- var/amount = input(usr, "Set volume", "Volume") as null|num
+ var/amount = tgui_input_num(usr, "Set volume", "Volume")
if(!isnull(amount))
set_volume(round(amount, 1))
else if(href_list["setdropoffvolume"])
- var/amount = input(usr, "Set dropoff threshold", "Dropoff Threshold Volume") as null|num
+ var/amount = tgui_input_num(usr, "Set dropoff threshold", "Dropoff Threshold Volume")
if(!isnull(amount))
set_dropoff_volume(round(amount, 0.01))
@@ -218,11 +218,11 @@
var/datum/instrument/I = SSinstruments.get_instrument(i)
if(I)
LAZYSET(categories[I.category || "ERROR CATEGORY"], I.name, I.id)
- var/cat = input(usr, "Select Category", "Instrument Category") as null|anything in categories
+ var/cat = tgui_input_list(usr, "Select Category", "Instrument Category", categories)
if(!cat)
return
var/list/instruments = categories[cat]
- var/choice = input(usr, "Select Instrument", "Instrument Selection") as null|anything in instruments
+ var/choice = tgui_input_list(usr, "Select Instrument", "Instrument Selection", instruments)
if(!choice)
return
choice = instruments[choice] //get id
@@ -230,12 +230,12 @@
set_instrument(choice)
else if(href_list["setnoteshift"])
- var/amount = input(usr, "Set note shift", "Note Shift") as null|num
+ var/amount = tgui_input_num(usr, "Set note shift", "Note Shift", note_shift)
if(!isnull(amount))
note_shift = clamp(amount, note_shift_min, note_shift_max)
else if(href_list["setsustainmode"])
- var/choice = input(usr, "Choose a sustain mode", "Sustain Mode") as null|anything in list("Linear", "Exponential")
+ var/choice = tgui_input_list(usr, "Choose a sustain mode", "Sustain Mode", list("Linear", "Exponential"))
switch(choice)
if("Linear")
sustain_mode = SUSTAIN_LINEAR
diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm
index ac27b4a30e..2706558391 100644
--- a/code/modules/integrated_electronics/core/assemblies.dm
+++ b/code/modules/integrated_electronics/core/assemblies.dm
@@ -294,7 +294,7 @@
if(!check_interactivity(M))
return
- var/input = reject_bad_name(input("What do you want to name this?", "Rename", src.name) as null|text, TRUE)
+ var/input = reject_bad_name(tgui_input_text(usr, "What do you want to name this?", "Rename", src.name), TRUE)
if(!check_interactivity(M))
return
if(src && input)
@@ -506,7 +506,7 @@
if(input_selection.len == 1)
choice = input_selection[input_selection[1]]
else
- var/selection = input(user, "Where do you want to insert that item?", "Interaction") as null|anything in input_selection
+ var/selection = tgui_input_list(user, "Where do you want to insert that item?", "Interaction", input_selection)
if(!check_interactivity(user))
return ..()
if(selection)
@@ -548,7 +548,7 @@
if(input_selection.len ==1)
choice = input_selection[input_selection[1]]
else
- var/selection = input(user, "What do you want to interact with?", "Interaction") as null|anything in input_selection
+ var/selection = tgui_input_list(user, "What do you want to interact with?", "Interaction", input_selection)
if(!check_interactivity(user))
return
if(selection)
diff --git a/code/modules/integrated_electronics/core/debugger.dm b/code/modules/integrated_electronics/core/debugger.dm
index e3fded3a82..7f5dd87dbc 100644
--- a/code/modules/integrated_electronics/core/debugger.dm
+++ b/code/modules/integrated_electronics/core/debugger.dm
@@ -12,7 +12,7 @@
var/copy_values = FALSE
/obj/item/integrated_electronics/debugger/attack_self(mob/user)
- var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in list("string","number","ref","copy","null")
+ var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", list("string","number","ref","copy","null"))
if(!user.IsAdvancedToolUser())
return
@@ -28,7 +28,7 @@
if("number")
accepting_refs = FALSE
copy_values = FALSE
- new_data = input(user, "Now type in a number.","[src] number writing") as null|num
+ new_data = tgui_input_num(user, "Now type in a number.","[src] number writing")
if(isnum(new_data) && user.IsAdvancedToolUser())
data_to_write = new_data
to_chat(user, "You set \the [src]'s memory to [new_data].")
diff --git a/code/modules/integrated_electronics/core/detailer.dm b/code/modules/integrated_electronics/core/detailer.dm
index 9720bccfe5..387ec22e94 100644
--- a/code/modules/integrated_electronics/core/detailer.dm
+++ b/code/modules/integrated_electronics/core/detailer.dm
@@ -40,7 +40,7 @@
/obj/item/integrated_electronics/detailer/attack_self(mob/user)
- var/color_choice = input(user, "Select color.", "Assembly Detailer") as null|anything in color_list
+ var/color_choice = tgui_input_list(user, "Select color.", "Assembly Detailer", color_list)
if(!color_list[color_choice])
return
if(!in_range(src, user))
diff --git a/code/modules/integrated_electronics/core/pins.dm b/code/modules/integrated_electronics/core/pins.dm
index e08d77007d..43421ec7eb 100644
--- a/code/modules/integrated_electronics/core/pins.dm
+++ b/code/modules/integrated_electronics/core/pins.dm
@@ -177,7 +177,7 @@ D [1]/ ||
/datum/integrated_io/proc/ask_for_data_type(mob/user, var/default, var/list/allowed_data_types = list("string","number","null"))
- var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in allowed_data_types
+ var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", allowed_data_types)
if(!holder.check_interactivity(user))
return
@@ -189,7 +189,7 @@ D [1]/ ||
to_chat(user, "You input "+new_data+" into the pin.")
return new_data
if("number")
- new_data = input("Now type in a number.","[src] number writing", isnum(default) ? default : null) as null|num
+ new_data = tgui_input_num(user, "Now type in a number.","[src] number writing", isnum(default) ? default : null)
if(isnum(new_data) && holder.check_interactivity(user) )
to_chat(user, "You input [new_data] into the pin.")
return new_data
diff --git a/code/modules/integrated_electronics/core/printer.dm b/code/modules/integrated_electronics/core/printer.dm
index 5f6440bffb..b585b51a42 100644
--- a/code/modules/integrated_electronics/core/printer.dm
+++ b/code/modules/integrated_electronics/core/printer.dm
@@ -232,7 +232,7 @@
if("load")
if(cloning)
return
- var/input = input("Put your code there:", "loading", null, null) as message | null
+ var/input = tgui_input_message(usr, "Put your code there:", "loading", null, null)
if(!check_interactivity(usr) || cloning)
return
if(!input)
diff --git a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm b/code/modules/integrated_electronics/core/special_pins/dir_pin.dm
index 24dae1439d..f971b28e3e 100644
--- a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm
+++ b/code/modules/integrated_electronics/core/special_pins/dir_pin.dm
@@ -3,7 +3,7 @@
name = "dir pin"
/datum/integrated_io/dir/ask_for_pin_data(mob/user)
- var/new_data = input("Please type in a valid dir number. \
+ var/new_data = tgui_input_num(user, "Please type in a valid dir number. \
Valid dirs are;\n\
North/Fore = [NORTH],\n\
South/Aft = [SOUTH],\n\
@@ -12,7 +12,7 @@
Northeast = [NORTHEAST],\n\
Northwest = [NORTHWEST],\n\
Southeast = [SOUTHEAST],\n\
- Southwest = [SOUTHWEST]","[src] dir writing") as null|num
+ Southwest = [SOUTHWEST]","[src] dir writing")
if(isnum(new_data) && holder.check_interactivity(user) )
to_chat(user, "You input [new_data] into the pin.")
write_data_to_pin(new_data)
diff --git a/code/modules/integrated_electronics/core/special_pins/index_pin.dm b/code/modules/integrated_electronics/core/special_pins/index_pin.dm
index e904c4c6d0..981a0c6ea0 100644
--- a/code/modules/integrated_electronics/core/special_pins/index_pin.dm
+++ b/code/modules/integrated_electronics/core/special_pins/index_pin.dm
@@ -4,7 +4,7 @@
data = 1
/datum/integrated_io/index/ask_for_pin_data(mob/user)
- var/new_data = input("Please type in an index.","[src] index writing") as num
+ var/new_data = tgui_input_num(user, "Please type in an index.","[src] index writing")
if(isnum(new_data) && holder.check_interactivity(user))
to_chat(user, "You input [new_data] into the pin.")
write_data_to_pin(new_data)
diff --git a/code/modules/integrated_electronics/core/special_pins/list_pin.dm b/code/modules/integrated_electronics/core/special_pins/list_pin.dm
index 3532d68d70..d96a253871 100644
--- a/code/modules/integrated_electronics/core/special_pins/list_pin.dm
+++ b/code/modules/integrated_electronics/core/special_pins/list_pin.dm
@@ -54,7 +54,7 @@
to_chat(user, "The list is empty, there's nothing to remove.")
return
if(!target_entry)
- target_entry = input(user, "Which piece of data do you want to remove?", "Remove") as null|anything in my_list
+ target_entry = tgui_input_list(user, "Which piece of data do you want to remove?", "Remove", my_list)
if(holder.check_interactivity(user) && target_entry)
my_list.Remove(target_entry)
@@ -64,7 +64,7 @@
to_chat(user, "The list is empty, there's nothing to modify.")
return
if(!target_entry)
- target_entry = input(user, "Which piece of data do you want to edit?", "Edit") as null|anything in my_list
+ target_entry = tgui_input_list(user, "Which piece of data do you want to edit?", "Edit", my_list)
if(holder.check_interactivity(user) && target_entry)
var/edited_entry = ask_for_data_type(user, target_entry)
if(edited_entry)
@@ -89,11 +89,11 @@
to_chat(user, "The list is empty, or too small to do any meaningful swapping.")
return
if(!first_target)
- first_target = input(user, "Which piece of data do you want to swap? (1)", "Swap") as null|anything in my_list
+ first_target = tgui_input_list(user, "Which piece of data do you want to swap? (1)", "Swap", my_list)
if(holder.check_interactivity(user) && first_target)
if(!second_target)
- second_target = input(user, "Which piece of data do you want to swap? (2)", "Swap") as null|anything in my_list - first_target
+ second_target = tgui_input_list(user, "Which piece of data do you want to swap? (2)", "Swap", my_list - first_target)
if(holder.check_interactivity(user) && second_target)
var/first_pos = my_list.Find(first_target)
diff --git a/code/modules/integrated_electronics/core/special_pins/number_pin.dm b/code/modules/integrated_electronics/core/special_pins/number_pin.dm
index e864c3c789..2b47739d9a 100644
--- a/code/modules/integrated_electronics/core/special_pins/number_pin.dm
+++ b/code/modules/integrated_electronics/core/special_pins/number_pin.dm
@@ -3,7 +3,7 @@
name = "number pin"
/datum/integrated_io/number/ask_for_pin_data(mob/user)
- var/new_data = input("Please type in a number.","[src] number writing") as null|num
+ var/new_data = tgui_input_num(user, "Please type in a number.","[src] number writing")
if(isnum(new_data) && holder.check_interactivity(user) )
to_chat(user, "You input [new_data] into the pin.")
write_data_to_pin(new_data)
diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm
index f66931e253..4b23d83e1d 100644
--- a/code/modules/integrated_electronics/subtypes/input.dm
+++ b/code/modules/integrated_electronics/subtypes/input.dm
@@ -51,7 +51,7 @@
power_draw_per_use = 4
/obj/item/integrated_circuit/input/numberpad/ask_for_input(mob/user)
- var/new_input = input(user, "Enter a number, please.",displayed_name) as null|num
+ var/new_input = tgui_input_num(user, "Enter a number, please.",displayed_name)
if(isnum(new_input) && user.IsAdvancedToolUser())
set_pin_data(IC_OUTPUT, 1, new_input)
push_data()
@@ -1263,7 +1263,7 @@
var/I = get_pin_data(IC_INPUT, k)
if(istext(I))
selection.Add(I)
- var/selected = input(user,"Choose input.","Selection") in selection
+ var/selected = tgui_input_list(user,"Choose input.","Selection", selection)
if(!selected)
return
set_pin_data(IC_OUTPUT, 1, selected)
diff --git a/code/modules/integrated_electronics/subtypes/memory.dm b/code/modules/integrated_electronics/subtypes/memory.dm
index 34c36883d1..26893af5ff 100644
--- a/code/modules/integrated_electronics/subtypes/memory.dm
+++ b/code/modules/integrated_electronics/subtypes/memory.dm
@@ -104,19 +104,19 @@
var/datum/integrated_io/O = outputs[1]
if(!user.IsAdvancedToolUser())
return
- var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in list("string","number","ref", "null")
+ var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null"))
var/new_data = null
switch(type_to_use)
if("string")
accepting_refs = FALSE
- new_data = input("Now type in a string.","[src] string writing") as null|text
+ new_data = tgui_input_text(user, "Now type in a string.","[src] string writing")
if(istext(new_data) && user.IsAdvancedToolUser())
O.data = new_data
to_chat(user, "You set \the [src]'s memory to [O.display_data(O.data)].")
if("number")
accepting_refs = FALSE
- new_data = input("Now type in a number.","[src] number writing") as null|num
+ new_data = tgui_input_num(user, "Now type in a number.","[src] number writing")
if(isnum(new_data) && user.IsAdvancedToolUser())
O.data = new_data
to_chat(user, "You set \the [src]'s memory to [O.display_data(O.data)].")
diff --git a/code/modules/language/language_menu.dm b/code/modules/language/language_menu.dm
index bffd3d59af..b773404da0 100644
--- a/code/modules/language/language_menu.dm
+++ b/code/modules/language/language_menu.dm
@@ -84,7 +84,7 @@
if("grant_language")
if((is_admin || isobserver(AM)) && language_datum)
var/list/choices = list("Only Spoken", "Only Understood", "Both")
- var/choice = input(user,"How do you want to add this language?","[language_datum]",null) as null|anything in choices
+ var/choice = tgui_input_list(user,"How do you want to add this language?","[language_datum]", choices)
var/spoken = FALSE
var/understood = FALSE
switch(choice)
@@ -103,7 +103,7 @@
if("remove_language")
if((is_admin || isobserver(AM)) && language_datum)
var/list/choices = list("Only Spoken", "Only Understood", "Both")
- var/choice = input(user,"Which part do you wish to remove?","[language_datum]",null) as null|anything in choices
+ var/choice = tgui_input_list(user,"Which part do you wish to remove?","[language_datum]", choices)
var/spoken = FALSE
var/understood = FALSE
switch(choice)
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index 9d5dbe8f63..8e132071d4 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -140,7 +140,7 @@
create_random_books(books_to_load, src, FALSE, random_category)
load_random_books = FALSE
if(contents.len)
- var/obj/item/book/choice = input(user, "Which book would you like to remove from the shelf?") as null|obj in sortNames(contents.Copy())
+ var/obj/item/book/choice = tgui_input_list(user, "Which book would you like to remove from the shelf?", "", sortNames(contents.Copy()))
if(choice)
if(!(user.mobility_flags & MOBILITY_USE) || user.stat != CONSCIOUS || !in_range(loc, user))
return
@@ -239,7 +239,7 @@
if(!literate)
to_chat(user, "You scribble illegibly on the cover of [src]!")
return
- var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel")
+ var/choice = tgui_input_list(user, "What would you like to change?", "", list("Title", "Contents", "Author", "Cancel"))
if(!user.canUseTopic(src, BE_CLOSE, literate))
return
switch(choice)
diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm
index 1125d15bca..6609f56345 100644
--- a/code/modules/library/lib_machines.dm
+++ b/code/modules/library/lib_machines.dm
@@ -110,19 +110,19 @@
return
if(href_list["settitle"])
- var/newtitle = input("Enter a title to search for:") as text|null
+ var/newtitle = tgui_input_text(usr, "Enter a title to search for:")
if(newtitle)
title = sanitize(newtitle)
else
title = null
if(href_list["setcategory"])
- var/newcategory = input("Choose a category to search for:") in list("Any", "Fiction", "Non-Fiction", "Adult", "Reference", "Religion")
+ var/newcategory = tgui_input_list(usr, "Choose a category to search for:", "", list("Any", "Fiction", "Non-Fiction", "Adult", "Reference", "Religion"))
if(newcategory)
category = sanitize(newcategory)
else
category = "Any"
if(href_list["setauthor"])
- var/newauthor = input("Enter an author to search for:") as text|null
+ var/newauthor = tgui_input_text(usr, "Enter an author to search for:")
if(newauthor)
author = sanitize(newauthor)
else
@@ -407,16 +407,16 @@
if(newauthor)
scanner.cache.author = newauthor
if(href_list["setcategory"])
- var/newcategory = input("Choose a category: ") in list("Fiction", "Non-Fiction", "Adult", "Reference", "Religion","Technical")
+ var/newcategory = tgui_input_list(usr, "Choose a category: ", "", list("Fiction", "Non-Fiction", "Adult", "Reference", "Religion","Technical"))
if(newcategory)
upload_category = newcategory
if(href_list["upload"])
if(scanner)
if(scanner.cache)
- var/choice = input("Are you certain you wish to upload this title to the Archive?") in list("Confirm", "Abort")
+ var/choice = tgui_input_list(usr, "Are you certain you wish to upload this title to the Archive?", "", list("Confirm", "Abort"))
if(choice == "Confirm")
if (!SSdbcore.Connect())
- alert("Connection to Archive has been severed. Aborting.")
+ tgui_alert(usr, "Connection to Archive has been severed. Aborting.")
else
var/msg = "[key_name(usr)] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs"
var/datum/db_query/query_library_upload = SSdbcore.NewQuery({"
@@ -425,15 +425,15 @@
"}, list("title" = scanner.cache.name, "author" = scanner.cache.author, "content" = scanner.cache.dat, "category" = upload_category, "ckey" = usr.ckey, "round_id" = GLOB.round_id))
if(!query_library_upload.Execute())
qdel(query_library_upload)
- alert("Database error encountered uploading to Archive")
+ tgui_alert(usr, "Database error encountered uploading to Archive")
return
else
log_game(msg)
qdel(query_library_upload)
- alert("Upload Complete. Uploaded title will be unavailable for printing for a short period")
+ tgui_alert(usr, "Upload Complete. Uploaded title will be unavailable for printing for a short period")
if(href_list["newspost"])
if(!GLOB.news_network)
- alert("No news network found on station. Aborting.")
+ tgui_alert(usr, "No news network found on station. Aborting.")
var/channelexists = 0
for(var/datum/news/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.channel_name == "Nanotrasen Book Club")
@@ -442,12 +442,12 @@
if(!channelexists)
GLOB.news_network.CreateFeedChannel("Nanotrasen Book Club", "Library", null)
GLOB.news_network.SubmitArticle(scanner.cache.dat, "[scanner.cache.name]", "Nanotrasen Book Club", null)
- alert("Upload complete. Your uploaded title is now available on station newscasters.")
+ tgui_alert(usr, "Upload complete. Your uploaded title is now available on station newscasters.")
if(href_list["orderbyid"])
if(printer_cooldown > world.time)
say("Printer unavailable. Please allow a short time before attempting to print.")
else
- var/orderid = input("Enter your order:") as num|null
+ var/orderid = tgui_input_num(usr, "Enter your order:")
if(orderid)
if(isnum(orderid) && ISINTEGER(orderid))
href_list["targetid"] = num2text(orderid)
@@ -455,7 +455,7 @@
if(href_list["targetid"])
var/id = href_list["targetid"]
if (!SSdbcore.Connect())
- alert("Connection to Archive has been severed. Aborting.")
+ tgui_alert(usr, "Connection to Archive has been severed. Aborting.")
if(printer_cooldown > world.time)
say("Printer unavailable. Please allow a short time before attempting to print.")
else
diff --git a/code/modules/library/soapstone.dm b/code/modules/library/soapstone.dm
index fd268a7774..86da58339e 100644
--- a/code/modules/library/soapstone.dm
+++ b/code/modules/library/soapstone.dm
@@ -265,7 +265,7 @@
if("delete")
if(!is_admin)
return
- var/confirm = alert(user, "Confirm deletion of engraved message?", "Confirm Deletion", "Yes", "No")
+ var/confirm = tgui_alert(user, "Confirm deletion of engraved message?", "Confirm Deletion", list("Yes", "No"))
if(confirm == "Yes")
persists = FALSE
qdel(src)
diff --git a/code/modules/mafia/controller.dm b/code/modules/mafia/controller.dm
index 43d15ebffe..f2e11b1bad 100644
--- a/code/modules/mafia/controller.dm
+++ b/code/modules/mafia/controller.dm
@@ -728,13 +728,13 @@
rolelist_dict = list("CANCEL", "FINISH") + rolelist_dict
while(!done)
to_chat(usr, "You have a total player count of [assoc_value_sum(debug_setup)] in this setup.")
- var/chosen_role_name = input(usr,"Select a role!","Custom Setup Creation",rolelist_dict[1]) as null|anything in rolelist_dict
+ var/chosen_role_name = tgui_input_list(usr,"Select a role!","Custom Setup Creation", rolelist_dict)
if(chosen_role_name == "CANCEL")
return
if(chosen_role_name == "FINISH")
break
var/found_path = rolelist_dict[chosen_role_name]
- var/role_count = input(usr,"How many? Zero to cancel.","Custom Setup Creation",0) as null|num
+ var/role_count = tgui_input_num(usr,"How many? Zero to cancel.","Custom Setup Creation",0)
if(role_count > 0)
debug_setup[found_path] = role_count
custom_setup = debug_setup
diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm
index e97060b45d..9b83e15d8f 100644
--- a/code/modules/mining/abandoned_crates.dm
+++ b/code/modules/mining/abandoned_crates.dm
@@ -152,7 +152,7 @@
/obj/structure/closet/crate/secure/loot/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(locked)
to_chat(user, "The crate is locked with a Deca-code lock.")
- var/input = input(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "") as text
+ var/input = tgui_input_text(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "")
if(user.canUseTopic(src, BE_CLOSE))
var/list/sanitised = list()
var/sanitycheck = TRUE
diff --git a/code/modules/mining/aux_base_camera.dm b/code/modules/mining/aux_base_camera.dm
index be0a41427f..18eef50e80 100644
--- a/code/modules/mining/aux_base_camera.dm
+++ b/code/modules/mining/aux_base_camera.dm
@@ -200,7 +200,7 @@
return
var/list/buildlist = list("Walls and Floors" = 1,"Airlocks" = 2,"Deconstruction" = 3,"Windows and Grilles" = 4)
- var/buildmode = input("Set construction mode.", "Base Console", null) in buildlist
+ var/buildmode = tgui_input_list(usr, "Set construction mode.", "Base Console", buildlist)
if(buildmode)
B.RCD.mode = buildlist[buildmode]
to_chat(owner, "Build mode is now [buildmode].")
diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm
index 2149967049..91078bb135 100644
--- a/code/modules/mining/equipment/kinetic_crusher.dm
+++ b/code/modules/mining/equipment/kinetic_crusher.dm
@@ -184,6 +184,7 @@
icon_state = "crusher-glaive"
item_state = "crusher0-glaive"
block_parry_data = /datum/block_parry_data/crusherglaive
+ obj_flags = UNIQUE_RENAME
//ideas: altclick that lets you pummel people with the handguard/handle?
//parrying functionality?
@@ -238,6 +239,36 @@
/obj/item/kinetic_crusher/glaive/bone/update_icon_state()
item_state = "crusher[wielded]-bone"
+/obj/item/kinetic_crusher/glaive/gauntlets
+ name = "proto-kinetic gauntlets"
+ desc = "A pair of scaled-down proto-kinetic crusher destabilizer modules shoved into gauntlets and greaves, often used by \
+ those who wish to spit in the eyes of God. Sacrifices outright damage for \
+ a reliance on backstabs and the ability to give fauna concussions on a parry."
+ attack_verb = list("pummeled", "punched", "jabbed", "hammer-fisted", "uppercut", "slammed")
+ icon_state = "crusher-hands"
+ item_state = "crusher0-fist"
+ unique_reskin = list("Gauntlets" = "crusher-hands",
+ "Fingerless" = "crusher-hands-bare")
+ detonation_damage = 45 // 60 on wield, compared to normal crusher's 70
+ backstab_bonus = 70 // 130 on backstab though
+
+/obj/item/kinetic_crusher/glaive/gauntlets/ComponentInitialize()
+ . = ..()
+ AddComponent(/datum/component/two_handed, force_unwielded=0, force_wielded=15)
+
+/obj/item/kinetic_crusher/glaive/gauntlets/active_parry_reflex_counter(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/return_list, parry_efficiency, list/effect_text)
+ . = ..()
+ if(isliving(attacker))
+ var/mob/living/liv_atk = attacker
+ if(liv_atk.mob_size >= MOB_SIZE_LARGE && !ismegafauna(liv_atk))
+ liv_atk.apply_status_effect(STATUS_EFFECT_GAUNTLET_CONC)
+
+/obj/item/kinetic_crusher/glaive/gauntlets/update_icon_state()
+ if(current_skin == "Fingerless")
+ item_state = "crusher[wielded]-fistbare"
+ else
+ item_state = "crusher[wielded]-fist"
+
//destablizing force
/obj/item/projectile/destabilizer
name = "destabilizing force"
diff --git a/code/modules/mining/equipment/marker_beacons.dm b/code/modules/mining/equipment/marker_beacons.dm
index 296513af8d..31025c6153 100644
--- a/code/modules/mining/equipment/marker_beacons.dm
+++ b/code/modules/mining/equipment/marker_beacons.dm
@@ -60,7 +60,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list(
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
return
. = TRUE
- var/input_color = input(user, "Choose a color.", "Beacon Color") as null|anything in GLOB.marker_beacon_colors
+ var/input_color = tgui_input_list(user, "Choose a color.", "Beacon Color", GLOB.marker_beacon_colors)
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
return
if(input_color)
@@ -133,7 +133,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list(
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
return
. = TRUE
- var/input_color = input(user, "Choose a color.", "Beacon Color") as null|anything in GLOB.marker_beacon_colors
+ var/input_color = tgui_input_list(user, "Choose a color.", "Beacon Color", GLOB.marker_beacon_colors)
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
return
if(input_color)
diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm
index 5044a73c10..dec21100ca 100644
--- a/code/modules/mining/fulton.dm
+++ b/code/modules/mining/fulton.dm
@@ -31,7 +31,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
else
var/A
- A = input("Select a beacon to connect to", "Balloon Extraction Pack", A) as null|anything in possible_beacons
+ A = tgui_input_list(user, "Select a beacon to connect to", "Balloon Extraction Pack", possible_beacons)
if(!A)
return
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index e64505df7e..c91663d0e6 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -1138,7 +1138,7 @@
var/mob/living/L = I
da_list[L.real_name] = L
- var/choice = input(user,"Who do you want dead?","Choose Your Victim") as null|anything in da_list
+ var/choice = tgui_input_list(user,"Who do you want dead?","Choose Your Victim", da_list)
choice = da_list[choice]
diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm
index 1adc951447..45e88a1ae0 100644
--- a/code/modules/mining/machine_redemption.dm
+++ b/code/modules/mining/machine_redemption.dm
@@ -287,7 +287,7 @@
if (params["sheets"])
desired = text2num(params["sheets"])
else
- desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num
+ desired = tgui_input_num(usr, "How many sheets?", "How many sheets would you like to smelt?", 1)
var/sheets_to_remove = round(min(desired,50,stored_amount))
@@ -332,7 +332,7 @@
if (params["sheets"])
desired = text2num(params["sheets"])
else
- desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num
+ desired = tgui_input_num(usr, "How many sheets?", "How many sheets would you like to smelt?", 1)
var/amount = round(min(desired,50,smelt_amount))
mat_container.use_materials(alloy.materials, amount)
materials.silo_log(src, "released", -amount, "sheets", alloy.materials)
diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm
index 7a3cd9140b..b1bde7d454 100644
--- a/code/modules/mining/machine_vending.dm
+++ b/code/modules/mining/machine_vending.dm
@@ -74,7 +74,7 @@
new /datum/data/mining_equipment("KA AoE Damage", /obj/item/borg/upgrade/modkit/aoe/mobs, 2000),
new /datum/data/mining_equipment("Miner Full Replacement", /obj/item/storage/backpack/duffelbag/mining/cloned, 3000),
new /datum/data/mining_equipment("Premium Accelerator", /obj/item/gun/energy/kinetic_accelerator/premiumka, 8000),
- new /datum/data/mining_equipment("Kinetic Glaive Kit", /obj/item/storage/backpack/duffelbag/mining/glaivekit, 2250),
+ new /datum/data/mining_equipment("Premium Kinetic Melee Kit", /obj/item/storage/backpack/duffelbag/mining/glaivekit, 2250),
new /datum/data/mining_equipment("Survival Dagger", /obj/item/kitchen/knife/combat/survival/knuckledagger, 550),
)
@@ -166,6 +166,7 @@
return
I.mining_points -= prize.cost
to_chat(usr, "[src] clanks to life briefly before vending [prize.equipment_name]!")
+ playsound(src, 'sound/machines/machine_vend.ogg', 50, TRUE, extrarange = -3)
new prize.equipment_path(loc)
SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]"))
. = TRUE
@@ -187,6 +188,9 @@
if(istype(I, /obj/item/suit_voucher))
RedeemSVoucher(I, user)
return
+ if(istype(I, /obj/item/premium_crusher_voucher))
+ RedeemPCVoucher(I, user)
+ return
if(default_deconstruction_screwdriver(user, "mining-open", "mining", I))
updateUsrDialog()
return
@@ -226,10 +230,46 @@
new /obj/item/kinetic_crusher(drop_location)
if("Mining Conscription Kit")
new /obj/item/storage/backpack/duffelbag/mining/conscript(drop_location)
-
+ playsound(src, 'sound/machines/machine_vend.ogg', 50, TRUE, extrarange = -3)
SSblackbox.record_feedback("tally", "mining_voucher_redeemed", 1, selection)
qdel(voucher)
+/obj/machinery/mineral/equipment_vendor/proc/RedeemSVoucher(obj/item/suit_voucher/voucher, mob/redeemer)
+ var/items = list( "Exo-suit" = image(icon = 'icons/obj/clothing/suits.dmi', icon_state = "exo"),
+ "SEVA suit" = image(icon = 'icons/obj/clothing/suits.dmi', icon_state = "seva"))
+
+ var/selection = show_radial_menu(redeemer, src, items, require_near = TRUE, tooltips = TRUE)
+ if(!selection || !Adjacent(redeemer) || QDELETED(voucher) || voucher.loc != redeemer)
+ return
+ var/drop_location = drop_location()
+ switch(selection)
+ if("Exo-suit")
+ new /obj/item/clothing/suit/hooded/explorer/exo(drop_location)
+ new /obj/item/clothing/mask/gas/exo(drop_location)
+ if("SEVA suit")
+ new /obj/item/clothing/suit/hooded/explorer/seva(drop_location)
+ new /obj/item/clothing/mask/gas/seva(drop_location)
+ playsound(src, 'sound/machines/machine_vend.ogg', 50, TRUE, extrarange = -3)
+ SSblackbox.record_feedback("tally", "suit_voucher_redeemed", 1, selection)
+ qdel(voucher)
+
+/obj/machinery/mineral/equipment_vendor/proc/RedeemPCVoucher(obj/item/premium_crusher_voucher/voucher, mob/redeemer) // someone should REALLY just refactor this
+ var/items = list("Kinetic Glaive" = image(icon = 'icons/obj/mining.dmi', icon_state = "crusher-glaive"),
+ "Kinetic Gauntlets" = image(icon = 'icons/obj/mining.dmi', icon_state = "crusher-hands"))
+
+ var/selection = show_radial_menu(redeemer, src, items, require_near = TRUE, tooltips = TRUE)
+ if(!selection || !Adjacent(redeemer) || QDELETED(voucher) || voucher.loc != redeemer)
+ return
+ var/drop_location = drop_location()
+ switch(selection)
+ if("Kinetic Glaive")
+ new /obj/item/kinetic_crusher/glaive(drop_location)
+ if("Kinetic Gauntlets")
+ new /obj/item/kinetic_crusher/glaive/gauntlets(drop_location)
+ playsound(src, 'sound/machines/machine_vend.ogg', 50, TRUE, extrarange = -3)
+ SSblackbox.record_feedback("tally", "crusher_voucher_redeemed", 1, selection)
+ qdel(voucher)
+
/obj/machinery/mineral/equipment_vendor/ex_act(severity, target)
do_sparks(5, TRUE, src)
if(prob(50 / severity) && severity < 3)
@@ -245,7 +285,7 @@
. = ..()
desc += "\nIt seems a few selections have been added."
prize_list += list(
- new /datum/data/mining_equipment("Extra Id", /obj/item/card/id/mining, 250),
+ new /datum/data/mining_equipment("Extra ID", /obj/item/card/id/mining, 250),
new /datum/data/mining_equipment("Science Goggles", /obj/item/clothing/glasses/science, 250),
new /datum/data/mining_equipment("Monkey Cube", /obj/item/reagent_containers/food/snacks/cube/monkey, 300),
new /datum/data/mining_equipment("Toolbelt", /obj/item/storage/belt/utility, 350),
@@ -273,6 +313,13 @@
icon_state = "mining_voucher"
w_class = WEIGHT_CLASS_TINY
+/obj/item/premium_crusher_voucher
+ name = "premium crusher voucher"
+ desc = "A token to redeem for a premium proto-kinetic melee weapon. Use it on a mining equipment vendor."
+ icon = 'icons/obj/mining.dmi'
+ icon_state = "mining_voucher"
+ w_class = WEIGHT_CLASS_TINY
+
/**********************Mining Point Card**********************/
//mp = Miner Pointers
//c = Cash
@@ -375,24 +422,5 @@
/obj/item/storage/backpack/duffelbag/mining/glaivekit
/obj/item/storage/backpack/duffelbag/mining/glaivekit/PopulateContents()
- new /obj/item/kinetic_crusher/glaive(src)
new /obj/item/kitchen/knife/combat/survival/knuckledagger(src)
-
-/obj/machinery/mineral/equipment_vendor/proc/RedeemSVoucher(obj/item/suit_voucher/voucher, mob/redeemer)
- var/items = list( "Exo-suit" = image(icon = 'icons/obj/clothing/suits.dmi', icon_state = "exo"),
- "SEVA suit" = image(icon = 'icons/obj/clothing/suits.dmi', icon_state = "seva"))
-
- var/selection = show_radial_menu(redeemer, src, items, require_near = TRUE, tooltips = TRUE)
- if(!selection || !Adjacent(redeemer) || QDELETED(voucher) || voucher.loc != redeemer)
- return
- var/drop_location = drop_location()
- switch(selection)
- if("Exo-suit")
- new /obj/item/clothing/suit/hooded/explorer/exo(drop_location)
- new /obj/item/clothing/mask/gas/exo(drop_location)
- if("SEVA suit")
- new /obj/item/clothing/suit/hooded/explorer/seva(drop_location)
- new /obj/item/clothing/mask/gas/seva(drop_location)
-
- SSblackbox.record_feedback("tally", "suit_voucher_redeemed", 1, selection)
- qdel(voucher)
+ new /obj/item/premium_crusher_voucher(src)
diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm
index ce767ae00d..d3ee2a87ea 100644
--- a/code/modules/mob/dead/dead.dm
+++ b/code/modules/mob/dead/dead.dm
@@ -79,14 +79,14 @@ INITIALIZE_IMMEDIATE(/mob/dead)
if(1)
pick = csa[1]
else
- pick = input(src, "Pick a server to jump to", "Server Hop") as null|anything in csa
+ pick = tgui_input_list(src, "Pick a server to jump to", "Server Hop", csa)
if(!pick)
return
var/addr = csa[pick]
- if(alert(src, "Jump to server [pick] ([addr])?", "Server Hop", "Yes", "No") != "Yes")
+ if(tgui_alert(src, "Jump to server [pick] ([addr])?", "Server Hop", list("Yes", "No")) != "Yes")
return
var/client/C = client
diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm
index 9df7dea1f1..cda6aa2b73 100644
--- a/code/modules/mob/dead/new_player/new_player.dm
+++ b/code/modules/mob/dead/new_player/new_player.dm
@@ -258,7 +258,7 @@
var/list/days = list()
for(var/number in 1 to total_days_in_player_month)
days += number
- var/player_day = input(src, "What day of the month were you born in.") as anything in days
+ var/player_day = tgui_input_list(src, "What day of the month were you born in.", "", days)
if(player_day <= current_day)
//their birthday has passed
age_gate_result = TRUE
@@ -455,7 +455,7 @@
var/mintime = max(CONFIG_GET(number/respawn_delay), (SSticker.round_start_time + (CONFIG_GET(number/respawn_minimum_delay_roundstart) * 600)) - world.time, 0)
- var/this_is_like_playing_right = alert(src,"Are you sure you wish to observe? You will not be able to respawn for [round(mintime / 600, 0.1)] minutes!!","Player Setup","Yes","No")
+ var/this_is_like_playing_right = tgui_alert(src, "Are you sure you wish to observe? You will not be able to respawn for [round(mintime / 600, 0.1)] minutes!!","Player Setup",list("Yes","No"))
if(QDELETED(src) || !src.client || this_is_like_playing_right != "Yes")
ready = PLAYER_NOT_READY
@@ -537,11 +537,11 @@
/mob/dead/new_player/proc/AttemptLateSpawn(rank)
var/error = IsJobUnavailable(rank)
if(error != JOB_AVAILABLE)
- alert(src, get_job_unavailable_error_message(error, rank))
+ tgui_alert(src, get_job_unavailable_error_message(error, rank))
return FALSE
if(SSticker.late_join_disabled)
- alert(src, "An administrator has disabled late join spawning.")
+ tgui_alert(src, "An administrator has disabled late join spawning.")
return FALSE
if(!respawn_latejoin_check(notify = TRUE))
@@ -551,7 +551,7 @@
if(SSshuttle.arrivals)
close_spawn_windows() //In case we get held up
if(SSshuttle.arrivals.damaged && CONFIG_GET(flag/arrivals_shuttle_require_safe_latejoin))
- src << alert("The arrivals shuttle is currently malfunctioning! You cannot join.")
+ tgui_alert(src, "The arrivals shuttle is currently malfunctioning! You cannot join.")
return FALSE
if(CONFIG_GET(flag/arrivals_shuttle_require_undocked))
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 0f30fe20fc..5f7fb58e38 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -336,7 +336,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(stat == DEAD || sig_flags & COMPONENT_FREE_GHOSTING)
ghostize(1)
else
- var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body")
+ var/response = tgui_alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?",list("Ghost","Stay in body"))
if(response != "Ghost")
return //didn't want to ghost after-all
if(istype(loc, /obj/machinery/cryopod))
@@ -372,7 +372,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(sig_flags & COMPONENT_FREE_GHOSTING)
ghostize(1)
else
- var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body")
+ var/response = tgui_alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?",list("Ghost","Stay in body"))
if(response != "Ghost")
return
ghostize(0, penalize = TRUE)
@@ -431,7 +431,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
to_chat(usr, "You're already stuck out of your body!")
return FALSE
- var/response = alert(src, "Are you sure you want to prevent (almost) all means of resuscitation? This cannot be undone. THIS WILL ALSO STOP YOU FROM RESPAWNING!!!","Are you sure you want to stay dead and never respawn?","Yes","No")
+ var/response = tgui_alert(src, "Are you sure you want to prevent (almost) all means of resuscitation? This cannot be undone. THIS WILL ALSO STOP YOU FROM RESPAWNING!!!","Are you sure you want to stay dead and never respawn?",list("Yes","No"))
if(response != "Yes")
return
@@ -475,7 +475,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/area/A = V
if(!A.hidden)
filtered += A
- var/area/thearea = input("Area to jump to", "BOOYEA") as null|anything in filtered
+ var/area/thearea = tgui_input_list(usr, "Area to jump to", "BOOYEA", filtered)
if(!thearea)
return
@@ -557,7 +557,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/target = null //Chosen target.
dest += getpois(mobs_only = TRUE) //Fill list, prompt user with list
- target = input("Please, select a player!", "Jump to Mob", null, null) as null|anything in dest
+ target = tgui_input_list(usr, "Please, select a player!", "Jump to Mob", dest)
if (!target)//Make sure we actually have a target
return
@@ -582,7 +582,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/list/views = list()
for(var/i in 7 to max_view)
views |= i
- var/new_view = input("Choose your new view", "Modify view range", 0) as null|anything in views
+ var/new_view = tgui_input_list(usr, "Choose your new view", "Modify view range", views)
if(new_view)
client.view_size.setTo(clamp(new_view, 7, max_view) - 7)
else
@@ -697,7 +697,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!(L in GLOB.player_list) && !L.mind)
possessible += L
- var/mob/living/target = input("Your new life begins today!", "Possess Mob", null, null) as null|anything in possessible
+ var/mob/living/target = tgui_input_list(usr, "Your new life begins today!", "Possess Mob", possessible)
if(!target)
return 0
@@ -707,7 +707,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return 0
if(can_reenter_corpse && mind && mind.current)
- if(alert(src, "Your soul is still tied to your former life as [mind.current.name], if you go forward there is no going back to that life. Are you sure you wish to continue?", "Move On", "Yes", "No") == "No")
+ if(tgui_alert(src, "Your soul is still tied to your former life as [mind.current.name], if you go forward there is no going back to that life. Are you sure you wish to continue?", "Move On", list("Yes", "No")) == "No")
return 0
if(target.key)
to_chat(src, "Someone has taken this body while you were choosing!")
@@ -888,7 +888,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/eye_name = null
- eye_name = input("Please, select a player!", "Observe", null, null) as null|anything in creatures
+ eye_name = tgui_input_list(usr, "Please, select a player!", "Observe", creatures)
if (!eye_name)
return
diff --git a/code/modules/mob/dead/observer/respawn.dm b/code/modules/mob/dead/observer/respawn.dm
index 94ebf42a2a..0b0c86e360 100644
--- a/code/modules/mob/dead/observer/respawn.dm
+++ b/code/modules/mob/dead/observer/respawn.dm
@@ -21,7 +21,7 @@
if(!valid.len)
to_chat(src, "No player found that is either a ghost or is in lobby with restrictions active.")
return
- var/ckey = valid[input(src, "Choose a player (only showing logged in players who have restrictions)", "Unrestricted Respawn") as null|anything in valid]
+ var/ckey = valid[tgui_input_list(src, "Choose a player (only showing logged in players who have restrictions)", "Unrestricted Respawn", valid)]
var/client/player = GLOB.directory[ckey]
if(!player)
to_chat(src, "Client not found.")
@@ -29,7 +29,7 @@
var/mob/M = player.mob
if(istype(M, /mob/dead/observer))
var/mob/dead/observer/O = M
- var/confirm = alert(src, "Send [O]([ckey]) back to the lobby without respawn restrictions?", "Send to Lobby", "Yes", "No")
+ var/confirm = tgui_alert(src, "Send [O]([ckey]) back to the lobby without respawn restrictions?", "Send to Lobby", list("Yes", "No"))
if(confirm != "Yes")
return
message_admins("[key_name_admin(src)] gave [key_name_admin(O)] a full respawn and sent them back to the lobby.")
@@ -39,7 +39,7 @@
O.client.prefs.dnr_triggered = FALSE
else if(istype(M, /mob/dead/new_player))
var/mob/dead/new_player/NP = M
- var/confirm = alert(src, "Remove [NP]'s respawn restrictions?", "Remove Restrictions", "Yes", "No")
+ var/confirm = tgui_alert(src, "Remove [NP]'s respawn restrictions?", "Remove Restrictions", list("Yes", "No"))
if(confirm != "Yes")
return
message_admins("[key_name_admin(src)] removed [ckey]'s respawn restrictions.")
@@ -67,7 +67,7 @@
if(!valid.len)
to_chat(src, "No logged in ghosts found.")
return
- var/mob/dead/observer/O = valid[input(src, "Choose a player (only showing logged in)", "Remove Respawn Timer") as null|anything in valid]
+ var/mob/dead/observer/O = valid[tgui_input_list(src, "Choose a player (only showing logged in)", "Remove Respawn Timer", valid)]
if(!O.client)
to_chat(src, "[O] has no client.")
@@ -165,7 +165,7 @@
/**
* Actual proc that removes us and puts us back on lobby
- *
+ *
* Returns the new mob.
*/
/mob/dead/observer/proc/transfer_to_lobby()
diff --git a/code/modules/mob/living/brain/posibrain.dm b/code/modules/mob/living/brain/posibrain.dm
index e1eb09405a..c30c4c13eb 100644
--- a/code/modules/mob/living/brain/posibrain.dm
+++ b/code/modules/mob/living/brain/posibrain.dm
@@ -119,7 +119,7 @@ GLOBAL_VAR(posibrain_notify_cooldown)
if(!O.can_reenter_round())
return FALSE
- var/posi_ask = alert("Become a [name]? (Warning, You can no longer be cloned, and all past lives will be forgotten!)","Are you positive?","Yes","No")
+ var/posi_ask = tgui_alert(user, "Become a [name]? (Warning, You can no longer be cloned, and all past lives will be forgotten!)","Are you positive?",list("Yes","No"))
if(posi_ask == "No" || QDELETED(src))
return
transfer_personality(user)
diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
index 28d311b034..b38b982e69 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
@@ -61,7 +61,7 @@ Doesn't work on other aliens/AI.*/
/obj/effect/proc_holder/alien/proc/check_vent_block(mob/living/user)
var/obj/machinery/atmospherics/components/unary/atmos_thing = locate() in user.loc
if(atmos_thing)
- var/rusure = alert(user, "Laying eggs and shaping resin here would block access to [atmos_thing]. Do you want to continue?", "Blocking Atmospheric Component", "Yes", "No")
+ var/rusure = tgui_alert(user, "Laying eggs and shaping resin here would block access to [atmos_thing]. Do you want to continue?", "Blocking Atmospheric Component", list("Yes", "No"))
if(rusure != "Yes")
return FALSE
return TRUE
@@ -91,13 +91,13 @@ Doesn't work on other aliens/AI.*/
var/list/options = list()
for(var/mob/living/Ms in oview(user))
options += Ms
- var/mob/living/M = input("Select who to whisper to:","Whisper to?",null) as null|mob in options
+ var/mob/living/M = tgui_input_list(user, "Select who to whisper to:","Whisper to?", options)
if(!M)
return 0
if(M.anti_magic_check(FALSE, FALSE, TRUE, 0))
to_chat(user, "As you try to communicate with [M], you're suddenly stopped by a vision of a massive tinfoil wall that streches beyond visible range. It seems you've been foiled.")
return FALSE
- var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
+ var/msg = sanitize(tgui_input_text(user, "Message:", "Alien Whisper"))
if(msg)
if(M.anti_magic_check(FALSE, FALSE, TRUE, 0))
to_chat(user, "As you try to communicate with [M], you're suddenly stopped by a vision of a massive tinfoil wall that streches beyond visible range. It seems you've been foiled.")
@@ -126,10 +126,10 @@ Doesn't work on other aliens/AI.*/
for(var/mob/living/carbon/A in oview(user))
if(A.getorgan(/obj/item/organ/alien/plasmavessel))
aliens_around.Add(A)
- var/mob/living/carbon/M = input("Select who to transfer to:","Transfer plasma to?",null) as mob in aliens_around
+ var/mob/living/carbon/M = tgui_input_list(user, "Select who to transfer to:","Transfer plasma to?", aliens_around)
if(!M)
return 0
- var/amount = input("Amount:", "Transfer Plasma to [M]") as num
+ var/amount = tgui_input_num(user, "Amount:", "Transfer Plasma to [M]")
if (amount)
amount = min(abs(round(amount)), user.getPlasma())
if (get_dist(user,M) <= 1)
@@ -169,7 +169,7 @@ Doesn't work on other aliens/AI.*/
/obj/effect/proc_holder/alien/acid/fire(mob/living/carbon/alien/user)
- var/O = input("Select what to dissolve:","Dissolve",null) as obj|turf in oview(1,user)
+ var/O = tgui_input_list(user, "Select what to dissolve:","Dissolve", oview(1,user))
if(!O || user.incapacitated())
return 0
else
@@ -272,7 +272,7 @@ Doesn't work on other aliens/AI.*/
if(!check_vent_block(user))
return FALSE
- var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in structures
+ var/choice = tgui_input_list(user, "Choose what you wish to shape.","Resin building", structures)
if(!choice)
return FALSE
if (!cost_check(check_turf,user))
diff --git a/code/modules/mob/living/carbon/alien/larva/powers.dm b/code/modules/mob/living/carbon/alien/larva/powers.dm
index 7204759db5..cb26d7b51f 100644
--- a/code/modules/mob/living/carbon/alien/larva/powers.dm
+++ b/code/modules/mob/living/carbon/alien/larva/powers.dm
@@ -42,7 +42,7 @@
to_chat(L, "Huntersare the most agile caste, tasked with hunting for hosts. They are faster than a human and can even pounce, but are not much tougher than a drone.")
to_chat(L, "Sentinelsare tasked with protecting the hive. With their ranged spit, invisibility, and high health, they make formidable guardians and acceptable secondhand hunters.")
to_chat(L, "Dronesare the weakest and slowest of the castes, but can grow into a praetorian and then queen if no queen exists, and are vital to maintaining a hive with their resin secretion abilities.")
- var/alien_caste = alert(L, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
+ var/alien_caste = tgui_alert(L, "Please choose which alien caste you shall belong to.",,list("Hunter","Sentinel","Drone"))
if(user.incapacitated()) //something happened to us while we were choosing.
return
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index f6ef8e8177..69dc2f220f 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -1038,7 +1038,7 @@
if(href_list[VV_HK_MODIFY_BODYPART])
if(!check_rights(R_SPAWN))
return
- var/edit_action = input(usr, "What would you like to do?","Modify Body Part") as null|anything in list("add","remove", "augment")
+ var/edit_action = tgui_input_list(usr, "What would you like to do?","Modify Body Part", list("add","remove", "augment"))
if(!edit_action)
return
var/list/limb_list = list()
@@ -1051,7 +1051,7 @@
limb_list = list(BODY_ZONE_HEAD, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
for(var/obj/item/bodypart/B in bodyparts)
limb_list -= B.body_zone
- var/result = input(usr, "Please choose which body part to [edit_action]","[capitalize(edit_action)] Body Part") as null|anything in limb_list
+ var/result = tgui_input_list(usr, "Please choose which body part to [edit_action]","[capitalize(edit_action)] Body Part", limb_list)
if(result)
var/obj/item/bodypart/BP = get_bodypart(result)
switch(edit_action)
@@ -1078,7 +1078,7 @@
if(href_list[VV_HK_MAKE_AI])
if(!check_rights(R_SPAWN))
return
- if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
+ if(tgui_alert(usr, "Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
return
usr.client.holder.Topic("vv_override", list("makeai"=href_list[VV_HK_TARGET]))
if(href_list[VV_HK_MODIFY_ORGANS])
@@ -1093,7 +1093,7 @@
for(var/i in artpaths)
var/datum/martial_art/M = i
artnames[initial(M.name)] = M
- var/result = input(usr, "Choose the martial art to teach","JUDO CHOP") as null|anything in artnames
+ var/result = tgui_input_list(usr, "Choose the martial art to teach","JUDO CHOP", artnames)
if(!usr)
return
if(QDELETED(src))
@@ -1109,7 +1109,7 @@
if(!check_rights(NONE))
return
var/list/traumas = subtypesof(/datum/brain_trauma)
- var/result = input(usr, "Choose the brain trauma to apply","Traumatize") as null|anything in traumas
+ var/result = tgui_input_list(usr, "Choose the brain trauma to apply","Traumatize", traumas)
if(!usr)
return
if(QDELETED(src))
@@ -1131,7 +1131,7 @@
if(!check_rights(NONE))
return
var/list/hallucinations = subtypesof(/datum/hallucination)
- var/result = input(usr, "Choose the hallucination to apply","Send Hallucination") as null|anything in hallucinations
+ var/result = tgui_input_list(usr, "Choose the hallucination to apply","Send Hallucination", hallucinations)
if(!usr)
return
if(QDELETED(src))
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 8669a1458a..55afe78e2e 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -333,7 +333,7 @@
if(href_list["hud"] == "m")
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical))
if(href_list["p_stat"])
- var/health_status = input(usr, "Specify a new physical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("Active", "Physically Unfit", "*Unconscious*", "*Deceased*", "Cancel")
+ var/health_status = tgui_input_list(usr, "Specify a new physical status for this person.", "Medical HUD", list("Active", "Physically Unfit", "*Unconscious*", "*Deceased*", "Cancel"))
if(R)
if(!H.canUseHUD())
return
@@ -343,7 +343,7 @@
R.fields["p_stat"] = health_status
return
if(href_list["m_stat"])
- var/health_status = input(usr, "Specify a new mental status for this person.", "Medical HUD", R.fields["m_stat"]) in list("Stable", "*Watch*", "*Unstable*", "*Insane*", "Cancel")
+ var/health_status = tgui_input_list(usr, "Specify a new mental status for this person.", "Medical HUD", list("Stable", "*Watch*", "*Unstable*", "*Insane*", "Cancel"))
if(R)
if(!H.canUseHUD())
return
@@ -419,7 +419,7 @@
R = find_record("name", perpname, GLOB.data_core.security)
if(R)
if(href_list["status"])
- var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Paroled", "Discharged", "Cancel")
+ var/setcriminal = tgui_input_list(usr, "Specify a new criminal status for this person.", "Security HUD", list("None", "*Arrest*", "Incarcerated", "Paroled", "Discharged", "Cancel"))
if(setcriminal != "Cancel")
if(R)
if(H.canUseHUD())
@@ -452,7 +452,7 @@
return
if(href_list["add_crime"])
- switch(alert("What crime would you like to add?","Security HUD","Minor Crime","Major Crime","Cancel"))
+ switch(tgui_alert(usr, "What crime would you like to add?","Security HUD",list("Minor Crime","Major Crime","Cancel")))
if("Minor Crime")
if(R)
var/t1 = stripped_input("Please input minor crime names:", "Security HUD", "", null)
@@ -878,7 +878,7 @@
var/qname = initial(T.name)
options[has_quirk(T) ? "[qname] (Remove)" : "[qname] (Add)"] = T
- var/result = input(usr, "Choose quirk to add/remove","Quirk Mod") as null|anything in options
+ var/result = tgui_input_list(usr, "Choose quirk to add/remove","Quirk Mod", options)
if(result)
if(result == "Clear")
for(var/datum/quirk/q in roundstart_quirks)
@@ -892,31 +892,31 @@
if(href_list[VV_HK_MAKE_MONKEY])
if(!check_rights(R_SPAWN))
return
- if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
+ if(tgui_alert(usr, "Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
return
usr.client.holder.Topic("vv_override", list("monkeyone"=href_list[VV_HK_TARGET]))
if(href_list[VV_HK_MAKE_CYBORG])
if(!check_rights(R_SPAWN))
return
- if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
+ if(tgui_alert(usr, "Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
return
usr.client.holder.Topic("vv_override", list("makerobot"=href_list[VV_HK_TARGET]))
if(href_list[VV_HK_MAKE_ALIEN])
if(!check_rights(R_SPAWN))
return
- if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
+ if(tgui_alert(usr, "Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
return
usr.client.holder.Topic("vv_override", list("makealien"=href_list[VV_HK_TARGET]))
if(href_list[VV_HK_MAKE_SLIME])
if(!check_rights(R_SPAWN))
return
- if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
+ if(tgui_alert(usr, "Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
return
usr.client.holder.Topic("vv_override", list("makeslime"=href_list[VV_HK_TARGET]))
if(href_list[VV_HK_SET_SPECIES])
if(!check_rights(R_SPAWN))
return
- var/result = input(usr, "Please choose a new species","Species") as null|anything in GLOB.species_list
+ var/result = tgui_input_list(usr, "Please choose a new species","Species", GLOB.species_list)
if(result)
var/newtype = GLOB.species_list[result]
admin_ticket_log("[key_name_admin(usr)] has modified the bodyparts of [src] to [result]")
diff --git a/code/modules/mob/living/carbon/human/innate_abilities/customization.dm b/code/modules/mob/living/carbon/human/innate_abilities/customization.dm
index 363f6ecbb2..ccce6141b6 100644
--- a/code/modules/mob/living/carbon/human/innate_abilities/customization.dm
+++ b/code/modules/mob/living/carbon/human/innate_abilities/customization.dm
@@ -22,7 +22,7 @@
/datum/action/innate/ability/humanoid_customization/proc/change_form()
var/mob/living/carbon/human/H = owner
- var/select_alteration = input(owner, "Select what part of your form to alter", "Form Alteration", "cancel") in list("Body Color","Hair Style", "Genitals", "Tail", "Snout", "Markings", "Ears", "Taur body", "Penis", "Vagina", "Penis Length", "Breast Size", "Breast Shape", "Cancel")
+ var/select_alteration = tgui_input_list(owner, "Select what part of your form to alter", "Form Alteration", list("Body Color","Hair Style", "Genitals", "Tail", "Snout", "Markings", "Ears", "Taur body", "Penis", "Vagina", "Penis Length", "Breast Size", "Breast Shape", "Cancel"))
if(select_alteration == "Body Color")
var/new_color = input(owner, "Choose your skin color:", "Race change","#"+H.dna.features["mcolor"]) as color|null
@@ -36,21 +36,21 @@
to_chat(H, "Invalid color. Your color is not bright enough.")
else if(select_alteration == "Hair Style")
if(H.gender == MALE)
- var/new_style = input(owner, "Select a facial hair style", "Hair Alterations") as null|anything in GLOB.facial_hair_styles_list
+ var/new_style = tgui_input_list(owner, "Select a facial hair style", "Hair Alterations", GLOB.facial_hair_styles_list)
if(new_style)
H.facial_hair_style = new_style
else
H.facial_hair_style = "Shaved"
//handle normal hair
- var/new_style = input(owner, "Select a hair style", "Hair Alterations") as null|anything in GLOB.hair_styles_list
+ var/new_style = tgui_input_list(owner, "Select a hair style", "Hair Alterations", GLOB.hair_styles_list)
if(new_style)
H.hair_style = new_style
H.update_hair()
else if (select_alteration == "Genitals")
- var/operation = input("Select organ operation.", "Organ Manipulation", "cancel") in list("add sexual organ", "remove sexual organ", "cancel")
+ var/operation = tgui_input_list(owner, "Select organ operation.", "Organ Manipulation", list("add sexual organ", "remove sexual organ", "cancel"))
switch(operation)
if("add sexual organ")
- var/new_organ = input("Select sexual organ:", "Organ Manipulation") as null|anything in GLOB.genitals_list
+ var/new_organ = tgui_input_list(owner, "Select sexual organ:", "Organ Manipulation", GLOB.genitals_list)
if(!new_organ)
return
H.give_genital(GLOB.genitals_list[new_organ])
@@ -60,7 +60,7 @@
for(var/obj/item/organ/genital/X in H.internal_organs)
var/obj/item/organ/I = X
organs["[I.name] ([I.type])"] = I
- var/obj/item/O = input("Select sexual organ:", "Organ Manipulation", null) as null|anything in organs
+ var/obj/item/O = tgui_input_list(owner, "Select sexual organ:", "Organ Manipulation", organs)
var/obj/item/organ/genital/G = organs[O]
if(!G)
return
@@ -77,7 +77,7 @@
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey)))
snowflake_ears_list[S.name] = path
var/new_ears
- new_ears = input(owner, "Choose your character's ears:", "Ear Alteration") as null|anything in snowflake_ears_list
+ new_ears = tgui_input_list(owner, "Choose your character's ears:", "Ear Alteration", snowflake_ears_list)
if(new_ears)
H.dna.features["mam_ears"] = new_ears
H.update_body()
@@ -91,7 +91,7 @@
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey)))
snowflake_snouts_list[S.name] = path
var/new_snout
- new_snout = input(owner, "Choose your character's face:", "Face Alteration") as null|anything in snowflake_snouts_list
+ new_snout = tgui_input_list(owner, "Choose your character's face:", "Face Alteration", snowflake_snouts_list)
if(new_snout)
H.dna.features["mam_snouts"] = new_snout
H.update_body()
@@ -105,7 +105,7 @@
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey)))
snowflake_markings_list[S.name] = path
var/new_mam_body_markings
- new_mam_body_markings = input(H, "Choose your character's body markings:", "Marking Alteration") as null|anything in snowflake_markings_list
+ new_mam_body_markings = tgui_input_list(H, "Choose your character's body markings:", "Marking Alteration", snowflake_markings_list)
if(new_mam_body_markings)
H.dna.features["mam_body_markings"] = new_mam_body_markings
for(var/X in H.bodyparts) //propagates the markings changes
@@ -122,7 +122,7 @@
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey)))
snowflake_tails_list[S.name] = path
var/new_tail
- new_tail = input(owner, "Choose your character's Tail(s):", "Tail Alteration") as null|anything in snowflake_tails_list
+ new_tail = tgui_input_list(owner, "Choose your character's Tail(s):", "Tail Alteration", snowflake_tails_list)
if(new_tail)
H.dna.features["mam_tail"] = new_tail
if(new_tail != "None")
@@ -138,7 +138,7 @@
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey)))
snowflake_taur_list[S.name] = path
var/new_taur
- new_taur = input(owner, "Choose your character's tauric body:", "Tauric Alteration") as null|anything in snowflake_taur_list
+ new_taur = tgui_input_list(owner, "Choose your character's tauric body:", "Tauric Alteration", snowflake_taur_list)
if(new_taur)
H.dna.features["taur"] = new_taur
if(new_taur != "None")
@@ -149,7 +149,7 @@
for(var/obj/item/organ/genital/penis/X in H.internal_organs)
qdel(X)
var/new_shape
- new_shape = input(owner, "Choose your character's dong", "Genital Alteration") as null|anything in GLOB.cock_shapes_list
+ new_shape = tgui_input_list(owner, "Choose your character's dong", "Genital Alteration", GLOB.cock_shapes_list)
if(new_shape)
H.dna.features["cock_shape"] = new_shape
H.update_genitals()
@@ -162,7 +162,7 @@
for(var/obj/item/organ/genital/vagina/X in H.internal_organs)
qdel(X)
var/new_shape
- new_shape = input(owner, "Choose your character's pussy", "Genital Alteration") as null|anything in GLOB.vagina_shapes_list
+ new_shape = tgui_input_list(owner, "Choose your character's pussy", "Genital Alteration", GLOB.vagina_shapes_list)
if(new_shape)
H.dna.features["vag_shape"] = new_shape
H.update_genitals()
@@ -175,7 +175,7 @@
qdel(X)
var/min_D = CONFIG_GET(number/penis_min_inches_prefs)
var/max_D = CONFIG_GET(number/penis_max_inches_prefs)
- var/new_length = input(owner, "Penis length in inches:\n([min_D]-[max_D])", "Genital Alteration") as num|null
+ var/new_length = tgui_input_num(owner, "Penis length in inches:\n([min_D]-[max_D])", "Genital Alteration", H.dna.features["cock_length"])
if(new_length)
H.dna.features["cock_length"] = clamp(round(new_length), min_D, max_D)
H.update_genitals()
@@ -186,7 +186,7 @@
else if (select_alteration == "Breast Size")
for(var/obj/item/organ/genital/breasts/X in H.internal_organs)
qdel(X)
- var/new_size = input(owner, "Breast Size", "Genital Alteration") as null|anything in CONFIG_GET(keyed_list/breasts_cups_prefs)
+ var/new_size = tgui_input_list(owner, "Breast Size", "Genital Alteration", CONFIG_GET(keyed_list/breasts_cups_prefs))
if(new_size)
H.dna.features["breasts_size"] = new_size
H.update_genitals()
@@ -197,7 +197,7 @@
for(var/obj/item/organ/genital/breasts/X in H.internal_organs)
qdel(X)
var/new_shape
- new_shape = input(owner, "Breast Shape", "Genital Alteration") as null|anything in GLOB.breasts_shapes_list
+ new_shape = tgui_input_list(owner, "Breast Shape", "Genital Alteration", GLOB.breasts_shapes_list)
if(new_shape)
H.dna.features["breasts_shape"] = new_shape
H.update_genitals()
diff --git a/code/modules/mob/living/carbon/human/species_types/ipc.dm b/code/modules/mob/living/carbon/human/species_types/ipc.dm
index eb870f9624..6797881279 100644
--- a/code/modules/mob/living/carbon/human/species_types/ipc.dm
+++ b/code/modules/mob/living/carbon/human/species_types/ipc.dm
@@ -51,7 +51,7 @@
/datum/action/innate/monitor_change/Activate()
var/mob/living/carbon/human/H = owner
- var/new_ipc_screen = input(usr, "Choose your character's screen:", "Monitor Display") as null|anything in GLOB.ipc_screens_list
+ var/new_ipc_screen = tgui_input_list(usr, "Choose your character's screen:", "Monitor Display", GLOB.ipc_screens_list)
if(!new_ipc_screen)
return
H.dna.features["ipc_screen"] = new_ipc_screen
diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
index 04c69a4138..9e1c5e63bc 100644
--- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
@@ -663,7 +663,7 @@
Remove(H)
return
- var/message = sanitize(input("Message:", "Slime Telepathy") as text|null)
+ var/message = sanitize(tgui_input_text(usr, "Message:", "Slime Telepathy"))
if(!species || !(H in species.linked_mobs))
to_chat(H, "The link seems to have been severed...")
@@ -700,13 +700,13 @@
var/list/options = list()
for(var/mob/living/Ms in oview(H))
options += Ms
- var/mob/living/M = input("Select who to send your message to:","Send thought to?",null) as null|mob in options
+ var/mob/living/M = tgui_input_list(usr, "Select who to send your message to:","Send thought to?", options)
if(!M)
return
if(M.anti_magic_check(FALSE, FALSE, TRUE, 0))
to_chat(H, "As you try to communicate with [M], you're suddenly stopped by a vision of a massive tinfoil wall that streches beyond visible range. It seems you've been foiled.")
return
- var/msg = sanitize(input("Message:", "Telepathy") as text|null)
+ var/msg = sanitize(tgui_input_text(usr, "Message:", "Telepathy"))
if(msg)
if(M.anti_magic_check(FALSE, FALSE, TRUE, 0))
to_chat(H, "As you try to communicate with [M], you're suddenly stopped by a vision of a massive tinfoil wall that streches beyond visible range. It seems you've been foiled.")
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index be8241c063..a68f20aa18 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -116,19 +116,19 @@
to_chat(src, "[L] is restraining [P], you cannot push past.")
return 1
- //CIT CHANGES START HERE - makes it so resting stops you from moving through standing folks without a short delay
- if(!CHECK_MOBILITY(src, MOBILITY_STAND) && CHECK_MOBILITY(L, MOBILITY_STAND))
+ //CIT CHANGES START HERE - makes it so resting stops you from moving through standing folks or over prone bodies without a short delay
+ if(!CHECK_MOBILITY(src, MOBILITY_STAND))
var/origtargetloc = L.loc
if(!pulledby)
if(combat_flags & COMBAT_FLAG_ATTEMPTING_CRAWL)
return TRUE
if(IS_STAMCRIT(src))
- to_chat(src, "You're too exhausted to crawl under [L].")
+ to_chat(src, "You're too exhausted to crawl [(CHECK_MOBILITY(L, MOBILITY_STAND)) ? "under": "over"] [L].")
return TRUE
ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_ATTEMPTING_CRAWL)
- visible_message("[src] is attempting to crawl under [L].",
- "You are now attempting to crawl under [L].",
- target = L, target_message = "[src] is attempting to crawl under you.")
+ visible_message("[src] is attempting to crawl [(CHECK_MOBILITY(L, MOBILITY_STAND)) ? "under" : "over"] [L].",
+ "You are now attempting to crawl [(CHECK_MOBILITY(L, MOBILITY_STAND)) ? "under": "over"] [L].",
+ target = L, target_message = "[src] is attempting to crawl [(CHECK_MOBILITY(L, MOBILITY_STAND)) ? "under" : "over"] you.")
if(!do_after(src, CRAWLUNDER_DELAY, target = src) || CHECK_MOBILITY(src, MOBILITY_STAND))
DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_ATTEMPTING_CRAWL)
return TRUE
@@ -489,7 +489,7 @@
to_chat(src, "You are already sleeping.")
return
else
- if(alert(src, "You sure you want to sleep for a while?", "Sleep", "Yes", "No") == "Yes")
+ if(tgui_alert(src, "You sure you want to sleep for a while?", "Sleep", list("Yes", "No")) == "Yes")
SetSleeping(400) //Short nap
/mob/proc/get_contents()
diff --git a/code/modules/mob/living/living_movement.dm b/code/modules/mob/living/living_movement.dm
index 07b40b3ab1..075a135f76 100644
--- a/code/modules/mob/living/living_movement.dm
+++ b/code/modules/mob/living/living_movement.dm
@@ -37,6 +37,8 @@
if(mover in buckled_mobs)
return TRUE
var/mob/living/L = mover //typecast first, check isliving and only check this if living using short circuit
+ if(lying && L.lying) //if we're both lying down and aren't already being thrown/shipped around, don't pass
+ return FALSE
return (!density || (isliving(mover)? L.can_move_under_living(src) : !mover.density))
/mob/living/toggle_move_intent()
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index b2b1d2fb5f..58ba34e1fb 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -271,7 +271,7 @@
to_chat(usr, "Wireless control is disabled!")
return
- var/reason = input(src, "What is the nature of your emergency? ([CALL_SHUTTLE_REASON_LENGTH] characters required.)", "Confirm Shuttle Call") as null|text
+ var/reason = tgui_input_text(src, "What is the nature of your emergency? ([CALL_SHUTTLE_REASON_LENGTH] characters required.)", "Confirm Shuttle Call")
if(incapacitated())
return
@@ -573,7 +573,7 @@
for(var/i in C.network)
cameralist[i] = i
var/old_network = network
- network = input(U, "Which network would you like to view?") as null|anything in cameralist
+ network = tgui_input_list(U, "Which network would you like to view?", "", cameralist)
if(!U.eyeobj)
U.view_core()
@@ -605,7 +605,7 @@
if(incapacitated())
return
var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Sad", "BSOD", "Blank", "Problems?", "Awesome", "Facepalm", "Thinking", "Friend Computer", "Dorfy", "Blue Glow", "Red Glow")
- var/n_emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
+ var/n_emote = tgui_input_list(src, "Please, select a status!", "AI Status", ai_emotions)
if(!n_emote)
return
emote_display = n_emote
@@ -632,7 +632,7 @@
if(incapacitated())
return
var/input
- switch(alert("Would you like to select a hologram based on a crew member, an animal, or switch to a unique avatar?",,"Crew Member","Unique","Animal"))
+ switch(tgui_alert(src, "Would you like to select a hologram based on a crew member, an animal, or switch to a unique avatar?",,list("Crew Member","Unique","Animal")))
if("Crew Member")
var/list/personnel_list = list()
@@ -640,13 +640,13 @@
personnel_list["[t.fields["name"]]: [t.fields["rank"]]"] = t.fields["image"]//Pull names, rank, and image.
if(personnel_list.len)
- input = input("Select a crew member:") as null|anything in personnel_list
+ input = tgui_input_list(src, "Select a crew member:", "", personnel_list)
var/icon/character_icon = personnel_list[input]
if(character_icon)
qdel(holo_icon)//Clear old icon so we're not storing it in memory.
holo_icon = getHologramIcon(icon(character_icon))
else
- alert("No suitable records found. Aborting.")
+ tgui_alert(src, "No suitable records found. Aborting.")
if("Animal")
var/list/icon_list = list(
@@ -665,7 +665,7 @@
"spider" = 'icons/mob/animal.dmi'
)
- input = input("Please select a hologram:") as null|anything in icon_list
+ input = tgui_input_list(src, "Please select a hologram:", "", icon_list)
if(input)
qdel(holo_icon)
switch(input)
@@ -689,7 +689,7 @@
"custom"
)
- input = input("Please select a hologram:") as null|anything in icon_list
+ input = tgui_input_list(src, "Please select a hologram:", "", icon_list)
if(input)
qdel(holo_icon)
switch(input)
@@ -949,7 +949,7 @@
to_chat(src, "No usable AI shell beacons detected.")
if(!target || !(target in possible)) //If the AI is looking for a new shell, or its pre-selected shell is no longer valid
- target = input(src, "Which body to control?") as null|anything in possible
+ target = tgui_input_list(src, "Which body to control?", "", possible)
if (!target || target.stat == DEAD || target.deployed || !(!target.connected_ai ||(target.connected_ai == src)))
return
@@ -1018,7 +1018,7 @@
if(incapacitated())
return
- switch(alert("Would you like to enter cryo? This will ghost you. Remember to AHELP before cryoing out of important roles, even with no admins online.",,"Yes.","No."))
+ switch(tgui_alert(src, "Would you like to enter cryo? This will ghost you. Remember to AHELP before cryoing out of important roles, even with no admins online.",,list("Yes.","No.")))
if("Yes.")
src.ghostize(FALSE, penalize = TRUE)
var/announce_rank = "Artificial Intelligence,"
diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm
index 2b5d3d98f2..2e9a9ef62e 100644
--- a/code/modules/mob/living/silicon/ai/say.dm
+++ b/code/modules/mob/living/silicon/ai/say.dm
@@ -97,11 +97,11 @@
to_chat(src, "Please wait [DisplayTimeText(announcing_vox - world.time)].")
return
- var/message = input(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", src.last_announcement) as text
+ var/message = tgui_input_text(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", src.last_announcement)
last_announcement = message
- var/voxType = input(src, "Male or female VOX?", "VOX-gender") in list("male", "female")
+ var/voxType = tgui_input_list(src, "Male or female VOX?", "VOX-gender", list("male", "female"))
if(!message || announcing_vox > world.time)
return
diff --git a/code/modules/mob/living/silicon/pai/pai_shell.dm b/code/modules/mob/living/silicon/pai/pai_shell.dm
index 63fb82082f..2a5cb9cdc7 100644
--- a/code/modules/mob/living/silicon/pai/pai_shell.dm
+++ b/code/modules/mob/living/silicon/pai/pai_shell.dm
@@ -77,19 +77,19 @@
if(CONFIG_GET(flag/pai_custom_holoforms))
choices += "Custom"
var/old_chassis = chassis
- var/choicetype = input(src, "What type of chassis do you want to use?") as null|anything in choices
+ var/choicetype = tgui_input_list(src, "What type of chassis do you want to use?", "", choices)
if(!choicetype)
return FALSE
switch(choicetype)
if("Custom")
chassis = "custom"
if("Preset - Basic")
- var/choice = input(src, "What would you like to use for your holochassis composite?") as null|anything in possible_chassis
+ var/choice = tgui_input_list(src, "What would you like to use for your holochassis composite?", "", possible_chassis)
if(!choice)
return FALSE
chassis = choice
if("Preset - Dynamic")
- var/choice = input(src, "What would you like to use for your holochassis composite?") as null|anything in dynamic_chassis_icons
+ var/choice = tgui_input_list(src, "What would you like to use for your holochassis composite?", "", dynamic_chassis_icons)
if(!choice)
return FALSE
chassis = "dynamic"
diff --git a/code/modules/mob/living/silicon/pai/personality.dm b/code/modules/mob/living/silicon/pai/personality.dm
index 62f2ed7047..41be56268d 100644
--- a/code/modules/mob/living/silicon/pai/personality.dm
+++ b/code/modules/mob/living/silicon/pai/personality.dm
@@ -51,7 +51,7 @@
if (isnull(version) || version != 1)
fdel(path)
if (!silent)
- alert(user, "Your savefile was incompatible with this version and was deleted.")
+ tgui_alert(user, "Your savefile was incompatible with this version and was deleted.")
return 0
F["name"] >> src.name
diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm
index 04665401c5..de17c9edbe 100644
--- a/code/modules/mob/living/silicon/pai/software.dm
+++ b/code/modules/mob/living/silicon/pai/software.dm
@@ -147,7 +147,7 @@
radio.attack_self(src)
if("image")
- var/newImage = input("Select your new display image.", "Display Image", "Happy") in list("Happy", "Cat", "Extremely Happy", "Face", "Laugh", "Off", "Sad", "Angry", "What" , "Exclamation" ,"Question", "Sunglasses")
+ var/newImage = tgui_input_list(usr, "Select your new display image.", "Display Image", list("Happy", "Cat", "Extremely Happy", "Face", "Laugh", "Off", "Sad", "Angry", "What" , "Exclamation" ,"Question", "Sunglasses"))
var/pID = 1
switch(newImage)
@@ -222,7 +222,7 @@
pda.silent = !pda.silent
else if(href_list["target"])
if(silent)
- return alert("Communications circuits remain uninitialized.")
+ return tgui_alert(src, "Communications circuits remain uninitialized.")
var/target = locate(href_list["target"])
pda.create_message(src, target)
@@ -395,7 +395,7 @@
return dat
/mob/living/silicon/pai/proc/CheckDNA(mob/living/carbon/M, mob/living/silicon/pai/P)
- var/answer = input(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", "No") in list("Yes", "No")
+ var/answer = tgui_input_list(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", list("Yes", "No"))
if(answer == "Yes")
M.visible_message("[M] presses [M.p_their()] thumb against [P].",\
"You press your thumb against [P].",\
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index bd1c260bf5..d18494fd0d 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -150,7 +150,7 @@
if(BORG_SEC_AVAILABLE)
modulelist["Security"] = /obj/item/robot_module/security
- var/input_module = input("Please, select a module!", "Robot", null, null) as null|anything in sortList(modulelist)
+ var/input_module = tgui_input_list(src, "Please, select a module!", "Robot", sortList(modulelist))
if(!input_module || module.type != /obj/item/robot_module)
return
@@ -516,7 +516,7 @@
if(stat == DEAD)
return //won't work if dead
if(locked)
- switch(alert("You cannot lock your cover again, are you sure?\n (You can still ask for a human to lock it)", "Unlock Own Cover", "Yes", "No"))
+ switch(tgui_alert(src, "You cannot lock your cover again, are you sure?\n (You can still ask for a human to lock it)", "Unlock Own Cover", list("Yes", "No")))
if("Yes")
locked = FALSE
update_icons()
@@ -1298,7 +1298,7 @@
set desc = "Select your resting pose."
sitting = 0
bellyup = 0
- var/choice = alert(src, "Select resting pose", "", "Resting", "Sitting", "Belly up")
+ var/choice = tgui_alert(src, "Select resting pose", "", list("Resting", "Sitting", "Belly up"))
switch(choice)
if("Resting")
update_icons()
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 77d1be2bcd..a83f4e84ca 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -338,7 +338,7 @@
return
//Ask the user to pick a channel from what it has available.
- var/Autochan = input("Select a channel:") as null|anything in list("Default","None") + radio.channels
+ var/Autochan = tgui_input_list(src, "Select a channel:", "", list("Default","None") + radio.channels)
if(!Autochan)
return
diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm
index ff6941ec70..d2a2f841a3 100644
--- a/code/modules/mob/living/simple_animal/bot/floorbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm
@@ -181,7 +181,7 @@
empty_tiles()
if("linemode")
- var/setdir = input("Select construction direction:") as null|anything in list("north","east","south","west","disable")
+ var/setdir = tgui_input_list(usr, "Select construction direction:", "", list("north","east","south","west","disable"))
switch(setdir)
if("north")
targetdirection = 1
@@ -433,4 +433,4 @@
if(robot.mode == BOT_REPAIRING)
return TRUE
return FALSE
-
+
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index b287b854a3..554bd247e8 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -240,7 +240,7 @@
if("destination")
var/new_dest
if(pda)
- new_dest = input(user, "Enter Destination:", name, destination) as null|anything in GLOB.deliverybeacontags
+ new_dest = tgui_input_list(user, "Enter Destination:", name, GLOB.deliverybeacontags)
else
new_dest = params["value"]
if(new_dest)
@@ -256,7 +256,7 @@
if("sethome")
var/new_home
if(pda)
- new_home = input(user, "Enter Home:", name, home_destination) as null|anything in GLOB.deliverybeacontags
+ new_home = tgui_input_list(user, "Enter Home:", name, GLOB.deliverybeacontags)
else
new_home = params["value"]
if(new_home)
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm
index 948be53abc..921c600f5a 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm
@@ -54,7 +54,7 @@
if(!SSticker.mode)
to_chat(user, "Can't become a drone before the game has started.")
return
- var/be_drone = alert("Become a drone? (Warning, You can no longer be cloned!)",,"Yes","No")
+ var/be_drone = tgui_alert(user, "Become a drone? (Warning, You can no longer be cloned!)",,list("Yes","No"))
if(be_drone == "No" || QDELETED(src) || !isobserver(user))
return
var/mob/living/simple_animal/drone/D = new drone_type(get_turf(loc))
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm b/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm
index d9ea6f4a8a..6ab2eb5e3e 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm
@@ -8,7 +8,7 @@
/mob/living/simple_animal/drone/attack_drone(mob/living/simple_animal/drone/D)
if(D != src && stat == DEAD)
- var/d_input = alert(D,"Perform which action?","Drone Interaction","Reactivate","Cannibalize","Nothing")
+ var/d_input = tgui_alert(D, "Perform which action?","Drone Interaction",list("Reactivate","Cannibalize","Nothing"))
if(d_input)
switch(d_input)
if("Reactivate")
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm b/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm
index 0f0d4dea72..710341e923 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/verbs.dm
@@ -16,7 +16,7 @@
set category = "Drone"
set name = "Drone ping"
- var/alert_s = input(src,"Alert severity level","Drone ping",null) as null|anything in list("Low","Medium","High","Critical")
+ var/alert_s = tgui_input_list(src,"Alert severity level","Drone ping",list("Low","Medium","High","Critical"))
var/area/A = get_area(loc)
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm b/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm
index 815c2bc0db..be67455177 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm
@@ -95,11 +95,11 @@
/mob/living/simple_animal/drone/proc/pickVisualAppearence()
picked = FALSE
- var/appearence = input("Choose your appearance!", "Appearance", "Maintenance Drone") in list("Maintenance Drone", "Repair Drone", "Scout Drone")
+ var/appearence = tgui_input_list(usr, "Choose your appearance!", "Appearance", list("Maintenance Drone", "Repair Drone", "Scout Drone"))
switch(appearence)
if("Maintenance Drone")
visualAppearence = MAINTDRONE
- colour = input("Choose your colour!", "Colour", "grey") in list("grey", "blue", "red", "green", "pink", "orange")
+ colour = tgui_input_list(usr, "Choose your colour!", "Colour", list("grey", "blue", "red", "green", "pink", "orange"))
icon_state = "[visualAppearence]_[colour]"
icon_living = "[visualAppearence]_[colour]"
icon_dead = "[visualAppearence]_dead"
diff --git a/code/modules/mob/living/simple_animal/friendly/plushie.dm b/code/modules/mob/living/simple_animal/friendly/plushie.dm
index ff95e8fe86..5c4b8d40f1 100644
--- a/code/modules/mob/living/simple_animal/friendly/plushie.dm
+++ b/code/modules/mob/living/simple_animal/friendly/plushie.dm
@@ -45,7 +45,7 @@
//attacking yourself transfers your mind into the plush!
/obj/item/toy/plushie_shell/attack_self(mob/user)
if(user.mind)
- var/safety = alert(user, "The plushie is staring back at you intensely, it seems cursed! (Permanently become a plushie)", "Hugging this is a bad idea.", "Hug it!", "Cancel")
+ var/safety = tgui_alert(user, "The plushie is staring back at you intensely, it seems cursed! (Permanently become a plushie)", "Hugging this is a bad idea.", list("Hug it!", "Cancel"))
if(safety == "Cancel" || !in_range(src, user))
return
to_chat(user, "You hug the strange plushie. You fool.")
diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm
index ec11a3e83e..547d808673 100644
--- a/code/modules/mob/living/simple_animal/guardian/guardian.dm
+++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm
@@ -461,7 +461,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
if(P.reset)
guardians -= P //clear out guardians that are already reset
if(guardians.len)
- var/mob/living/simple_animal/hostile/guardian/G = input(src, "Pick the guardian you wish to reset", "Guardian Reset") as null|anything in guardians
+ var/mob/living/simple_animal/hostile/guardian/G = tgui_input_list(src, "Pick the guardian you wish to reset", "Guardian Reset", guardians)
if(G)
to_chat(src, "You attempt to reset [G.real_name]'s personality...")
var/list/mob/candidates = pollGhostCandidates("Do you want to play as [src.real_name]'s [G.real_name]?", ROLE_PAI, null, FALSE, 100)
@@ -555,7 +555,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
if(random)
guardiantype = pick(possible_guardians)
else
- guardiantype = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians
+ guardiantype = tgui_input_list(user, "Pick the type of [mob_name]", "[mob_name] Creation", possible_guardians)
if(!guardiantype)
to_chat(user, "[failure_message]" )
used = FALSE
diff --git a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
index 5df446085a..6a082fbc88 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
@@ -96,7 +96,7 @@
set name = "Remove Surveillance Snare"
set category = "Guardian"
set desc = "Disarm unwanted surveillance snares."
- var/picked_snare = input(src, "Pick which snare to remove", "Remove Snare") as null|anything in src.snares
+ var/picked_snare = tgui_input_list(src, "Pick which snare to remove", "Remove Snare", src.snares)
if(picked_snare)
src.snares -= picked_snare
qdel(picked_snare)
diff --git a/code/modules/mob/living/simple_animal/hostile/banana_spider.dm b/code/modules/mob/living/simple_animal/hostile/banana_spider.dm
index a88593ed74..9c1c0dae89 100644
--- a/code/modules/mob/living/simple_animal/hostile/banana_spider.dm
+++ b/code/modules/mob/living/simple_animal/hostile/banana_spider.dm
@@ -51,7 +51,7 @@
if(!SSticker.mode)
to_chat(user, "Can't become a banana spider before the game has started.")
return
- var/be_spider = alert("Become a banana spider? (Warning, You can no longer be cloned!)",,"Yes","No")
+ var/be_spider = tgui_alert(user, "Become a banana spider? (Warning, You can no longer be cloned!)",,list("Yes","No"))
if(be_spider == "No" || QDELETED(src) || !isobserver(user))
return
if(key)
diff --git a/code/modules/mob/living/simple_animal/hostile/bread.dm b/code/modules/mob/living/simple_animal/hostile/bread.dm
index 70c8b0c540..3eadc7104c 100644
--- a/code/modules/mob/living/simple_animal/hostile/bread.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bread.dm
@@ -52,7 +52,7 @@
if(!SSticker.mode)
to_chat(user, "Can't become a tumor bread before the game has started.")
return
- var/be_bread = alert("Become a tumor bread? (Warning, You can no longer be cloned!)",,"Yes","No")
+ var/be_bread = tgui_alert(user, "Become a tumor bread? (Warning, You can no longer be cloned!)",,list("Yes","No"))
if(be_bread == "No" || QDELETED(src) || !isobserver(user))
return
if(key)
diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
index 2349685a4e..9c165f3ef4 100644
--- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
+++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
@@ -93,7 +93,7 @@
var/mob/dead/observer/O = user
if(!O.can_reenter_round())
return FALSE
- var/spider_ask = alert("Become a spider?", "Are you australian?", "Yes", "No")
+ var/spider_ask = tgui_alert(user, "Become a spider?", "Are you australian?", list("Yes", "No"))
if(spider_ask == "No" || !src || QDELETED(src))
return TRUE
if(key)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
index 7ca2f6c561..46d3463684 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
@@ -426,7 +426,7 @@ Difficulty: Very Hard
/obj/machinery/anomalous_crystal/honk //Strips and equips you as a clown. I apologize for nothing
observer_desc = "This crystal strips and equips its targets as clowns."
- possible_methods = list(ACTIVATE_TOUCH) //Because We love AOE transformations!
+ possible_methods = list(ACTIVATE_TOUCH) //Because We love AOE transformations!
activation_sound = 'sound/items/bikehorn.ogg'
/obj/machinery/anomalous_crystal/honk/ActivationReaction(mob/user)
@@ -574,7 +574,7 @@ Difficulty: Very Hard
if(ready_to_deploy)
if(!user.can_reenter_round())
return FALSE
- var/be_helper = alert("Become a Lightgeist? (Warning, You can no longer be cloned!)",,"Yes","No")
+ var/be_helper = tgui_alert(user, "Become a Lightgeist? (Warning, You can no longer be cloned!)",,list("Yes","No"))
if(be_helper == "Yes" && !QDELETED(src) && isobserver(user))
var/mob/living/simple_animal/hostile/lightgeist/W = new /mob/living/simple_animal/hostile/lightgeist(get_turf(loc))
user.transfer_ckey(W, FALSE)
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
index de6b858f79..82df5af169 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
@@ -44,7 +44,7 @@
if(istype(target, /obj/structure/elite_tumor))
var/obj/structure/elite_tumor/T = target
if(T.mychild == src && T.activity == TUMOR_PASSIVE)
- var/elite_remove = alert("Re-enter the tumor?", "Despawn yourself?", "Yes", "No")
+ var/elite_remove = tgui_alert(usr, "Re-enter the tumor?", "Despawn yourself?", list("Yes", "No"))
if(elite_remove == "No" || !src || QDELETED(src))
return
T.mychild = null
diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
index 800c7d29ca..74f5f0c2bf 100644
--- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
+++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
@@ -99,7 +99,7 @@
if(!chosen_color)
dragon_name()
color_selection()
-
+
/mob/living/simple_animal/hostile/space_dragon/Life()
. = ..()
@@ -666,7 +666,7 @@
/obj/structure/carp_rift/proc/summon_carp(mob/user)
if(carp_stored <= 0)//Not enough carp points
return FALSE
- var/carp_ask = alert("Become a carp?", "Help bring forth the horde?", "Yes", "No")
+ var/carp_ask = tgui_alert(user, "Become a carp?", "Help bring forth the horde?", list("Yes", "No"))
if(carp_ask == "No" || !src || QDELETED(src) || QDELETED(user))
return FALSE
if(carp_stored <= 0)
diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
index cc5b0b8a75..cf86fcfe7a 100644
--- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
+++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
@@ -157,7 +157,7 @@
/mob/living/simple_animal/hostile/venus_human_trap/proc/humanize_plant(mob/user)
if(key || !playable_plant || stat)
return
- var/plant_ask = alert("Become a venus human trap?", "Are you reverse vegan?", "Yes", "No")
+ var/plant_ask = tgui_alert(user, "Become a venus human trap?", "Are you reverse vegan?", list("Yes", "No"))
if(plant_ask == "No" || QDELETED(src))
return
if(key)
diff --git a/code/modules/mob/living/simple_animal/simple_animal_vr.dm b/code/modules/mob/living/simple_animal/simple_animal_vr.dm
index de5bb578b8..355c940d76 100644
--- a/code/modules/mob/living/simple_animal/simple_animal_vr.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal_vr.dm
@@ -113,13 +113,13 @@
return
if(vore_selected.digest_mode == DM_HOLD)
- var/confirm = alert(usr, "Enabling digestion on [name] will cause it to digest all stomach contents. Using this to break OOC prefs is against the rules. Digestion will disable itself after 20 minutes.", "Enabling [name]'s Digestion", "Enable", "Cancel")
+ var/confirm = tgui_alert(usr, "Enabling digestion on [name] will cause it to digest all stomach contents. Using this to break OOC prefs is against the rules. Digestion will disable itself after 20 minutes.", "Enabling [name]'s Digestion", list("Enable", "Cancel"))
if(confirm == "Enable")
vore_selected.digest_mode = DM_DIGEST
sleep(20 MINUTES)
vore_selected.digest_mode = vore_default_mode
else
- var/confirm = alert(usr, "This mob is currently set to digest all stomach contents. Do you want to disable this?", "Disabling [name]'s Digestion", "Disable", "Cancel")
+ var/confirm = tgui_alert(usr, "This mob is currently set to digest all stomach contents. Do you want to disable this?", "Disabling [name]'s Digestion", list("Disable", "Cancel"))
if(confirm == "Disable")
vore_selected.digest_mode = DM_HOLD
diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm
index d93993bf1f..6327ef77df 100644
--- a/code/modules/mob/living/simple_animal/slime/powers.dm
+++ b/code/modules/mob/living/simple_animal/slime/powers.dm
@@ -32,7 +32,7 @@
if(C!=src && Adjacent(C))
choices += C
- var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
+ var/mob/living/M = tgui_input_list(src,"Who do you wish to feed on?", "", choices)
if(!M)
return 0
if(CanFeedon(M))
diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm
index 2c2efee534..7c4325fdcd 100644
--- a/code/modules/mob/mob_transformation_simple.dm
+++ b/code/modules/mob/mob_transformation_simple.dm
@@ -9,7 +9,7 @@
return
if(!new_type)
- new_type = input("Mob type path:", "Mob type") as text|null
+ new_type = tgui_input_text(usr, "Mob type path:", "Mob type")
if(istext(new_type))
new_type = text2path(new_type)
diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm
index d8ef440ef9..d41f59d104 100644
--- a/code/modules/mob/say.dm
+++ b/code/modules/mob/say.dm
@@ -5,8 +5,13 @@
set hidden = TRUE
set category = "IC"
client?.last_activity = world.time
+ for(var/datum/tgui/window in tgui_open_uis)
+ if(istype(window.src_object, /datum/tgui_input_dialog))
+ var/datum/tgui_input_dialog/say_box = window.src_object
+ if(say_box.title == "say") // Yes, i am dead serious.
+ return
display_typing_indicator()
- var/message = input(usr, "", "say") as text|null
+ var/message = tgui_input_text(usr, null, "say")
// If they don't type anything just drop the message.
clear_typing_indicator() // clear it immediately!
if(!length(message))
@@ -32,8 +37,13 @@
set hidden = TRUE
set category = "IC"
client?.last_activity = world.time
+ for(var/datum/tgui/window in tgui_open_uis)
+ if(istype(window.src_object, /datum/tgui_input_dialog))
+ var/datum/tgui_input_dialog/emote_box = window.src_object
+ if(emote_box.title == "me") // Yes, i am dead serious.
+ return
display_typing_indicator()
- var/message = input(usr, "", "me") as message|null
+ var/message = tgui_input_message(usr, null, "me")
// If they don't type anything just drop the message.
clear_typing_indicator() // clear it immediately!
if(!length(message))
@@ -81,7 +91,7 @@
/mob/proc/whisper_keybind()
client?.last_activity = world.time
- var/message = input(src, "", "whisper") as text|null
+ var/message = tgui_input_text(src, "", "whisper")
if(!length(message))
return
return whisper_verb(message)
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index fcaa77cac4..15e28ceaf1 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -538,11 +538,11 @@
/mob/living/carbon/human/Animalize(mind_transfer = TRUE)
var/list/mobtypes = typesof(/mob/living/simple_animal)
- var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") as null|anything in mobtypes
+ var/mobpath = tgui_input_list(usr, "Which type of mob should [src] turn into?", "Choose a type", mobtypes)
if(!mobpath)
return
if(mind)
- mind_transfer = alert("Want to transfer their mind into the new mob", "Mind Transfer", "Yes", "No") == "Yes" ? TRUE : FALSE
+ mind_transfer = tgui_alert(usr, "Want to transfer their mind into the new mob", "Mind Transfer", list("Yes", "No")) == "Yes" ? TRUE : FALSE
if(mob_transforming)
return
@@ -573,11 +573,11 @@
/mob/proc/Animalize(mind_transfer = TRUE)
var/list/mobtypes = typesof(/mob/living/simple_animal)
- var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") as null|anything in mobtypes
+ var/mobpath = tgui_input_list(usr, "Which type of mob should [src] turn into?", "Choose a type", mobtypes)
if(!mobpath)
return
if(mind)
- mind_transfer = alert("Want to transfer their mind into the new mob", "Mind Transfer", "Yes", "No") == "Yes" ? TRUE : FALSE
+ mind_transfer = tgui_alert(usr, "Want to transfer their mind into the new mob", "Mind Transfer", list("Yes", "No")) == "Yes" ? TRUE : FALSE
var/mob/new_mob = new mobpath(src.loc)
diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm
index 635ec2e54c..3cfd342122 100644
--- a/code/modules/modular_computers/computers/item/computer.dm
+++ b/code/modules/modular_computers/computers/item/computer.dm
@@ -137,7 +137,7 @@
if(enabled)
ui_interact(user)
else if(IsAdminGhost(user))
- var/response = alert(user, "This computer is turned off. Would you like to turn it on?", "Admin Override", "Yes", "No")
+ var/response = tgui_alert(user, "This computer is turned off. Would you like to turn it on?", "Admin Override", list("Yes", "No"))
if(response == "Yes")
turn_on(user)
@@ -425,7 +425,7 @@
var/obj/item/computer_hardware/H = all_components[h]
component_names.Add(H.name)
- var/choice = input(user, "Which component do you want to uninstall?", "Computer maintenance", null) as null|anything in sortList(component_names)
+ var/choice = tgui_input_list(user, "Which component do you want to uninstall?", "Computer maintenance", sortList(component_names))
if(!choice)
return
diff --git a/code/modules/modular_computers/file_system/programs/cargoship.dm b/code/modules/modular_computers/file_system/programs/cargoship.dm
index 89a3b3247d..a023f92831 100644
--- a/code/modules/modular_computers/file_system/programs/cargoship.dm
+++ b/code/modules/modular_computers/file_system/programs/cargoship.dm
@@ -54,7 +54,7 @@
if("resetid")
payments_acc = null
if("setsplit")
- var/potential_cut = input("How much would you like to payout to the registered card?","Percentage Profit") as num|null
+ var/potential_cut = tgui_input_num(usr, "How much would you like to payout to the registered card?","Percentage Profit")
percent_cut = potential_cut ? clamp(round(potential_cut, 1), 1, 50) : 20
if("print")
if(!printer)
diff --git a/code/modules/movespeed/modifiers/mobs.dm b/code/modules/movespeed/modifiers/mobs.dm
index 153d7dd973..ddeef393ac 100644
--- a/code/modules/movespeed/modifiers/mobs.dm
+++ b/code/modules/movespeed/modifiers/mobs.dm
@@ -167,3 +167,6 @@
/datum/movespeed_modifier/dragon_depression
multiplicative_slowdown = 5
+
+/datum/movespeed_modifier/gauntlet_concussion
+ multiplicative_slowdown = 5
diff --git a/code/modules/newscaster/newscaster_machine.dm b/code/modules/newscaster/newscaster_machine.dm
index c81a8f5d1a..819d7411ae 100644
--- a/code/modules/newscaster/newscaster_machine.dm
+++ b/code/modules/newscaster/newscaster_machine.dm
@@ -369,7 +369,7 @@ GLOBAL_LIST_EMPTY(allCasters)
if(channel_name == "" || channel_name == "\[REDACTED\]" || scanned_user == "Unknown" || check || (scanned_user in existing_authors) )
screen=7
else
- var/choice = alert("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel")
+ var/choice = tgui_alert(usr, "Please confirm Feed channel creation","Network Channel Handler",list("Confirm","Cancel"))
if(choice=="Confirm")
scan_user(usr)
GLOB.news_network.CreateFeedChannel(channel_name, scanned_user, c_locked)
@@ -381,7 +381,7 @@ GLOBAL_LIST_EMPTY(allCasters)
for(var/datum/news/feed_channel/F in GLOB.news_network.network_channels)
if( (!F.locked || F.author == scanned_user) && !F.censored)
available_channels += F.channel_name
- channel_name = input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels
+ channel_name = tgui_input_list(usr, "Choose receiving Feed Channel", "Network Channel Handler", available_channels)
updateUsrDialog()
else if(href_list["set_new_message"])
var/temp_message = trim(stripped_multiline_input(usr, "Write your Feed story", "Network Channel Handler", msg))
@@ -442,7 +442,7 @@ GLOBAL_LIST_EMPTY(allCasters)
if(msg == "" || channel_name == "" || scanned_user == "Unknown")
screen = 16
else
- var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel")
+ var/choice = tgui_alert(usr, "Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler",list("Confirm","Cancel"))
if(choice=="Confirm")
scan_user(usr)
if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one.
@@ -450,16 +450,16 @@ GLOBAL_LIST_EMPTY(allCasters)
screen = 15
else
if(GLOB.news_network.wanted_issue.isAdminMsg)
- alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot edit it.","Ok")
+ tgui_alert(usr, "The wanted issue has been distributed by a Nanotrasen higherup. You cannot edit it.",list("Ok"))
return
GLOB.news_network.submitWanted(channel_name, msg, scanned_user, picture)
screen = 19
updateUsrDialog()
else if(href_list["cancel_wanted"])
if(GLOB.news_network.wanted_issue.isAdminMsg)
- alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot take it down.","Ok")
+ tgui_alert(usr, "The wanted issue has been distributed by a Nanotrasen higherup. You cannot take it down.",list("Ok"))
return
- var/choice = alert("Please confirm Wanted Issue removal","Network Security Handler","Confirm","Cancel")
+ var/choice = tgui_alert(usr, "Please confirm Wanted Issue removal","Network Security Handler",list("Confirm","Cancel"))
if(choice=="Confirm")
GLOB.news_network.deleteWanted()
screen=17
@@ -470,21 +470,21 @@ GLOBAL_LIST_EMPTY(allCasters)
else if(href_list["censor_channel_author"])
var/datum/news/feed_channel/FC = locate(href_list["censor_channel_author"])
if(FC.is_admin_channel)
- alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok")
+ tgui_alert(usr, "This channel was created by a Nanotrasen Officer. You cannot censor it.",list("Ok"))
return
FC.toggleCensorAuthor()
updateUsrDialog()
else if(href_list["censor_channel_story_author"])
var/datum/news/feed_message/MSG = locate(href_list["censor_channel_story_author"])
if(MSG.is_admin_message)
- alert("This message was created by a Nanotrasen Officer. You cannot censor its author.","Ok")
+ tgui_alert(usr, "This message was created by a Nanotrasen Officer. You cannot censor its author.",list("Ok"))
return
MSG.toggleCensorAuthor()
updateUsrDialog()
else if(href_list["censor_channel_story_body"])
var/datum/news/feed_message/MSG = locate(href_list["censor_channel_story_body"])
if(MSG.is_admin_message)
- alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok")
+ tgui_alert(usr, "This channel was created by a Nanotrasen Officer. You cannot censor it.",list("Ok"))
return
MSG.toggleCensorBody()
updateUsrDialog()
@@ -496,7 +496,7 @@ GLOBAL_LIST_EMPTY(allCasters)
else if(href_list["toggle_d_notice"])
var/datum/news/feed_channel/FC = locate(href_list["toggle_d_notice"])
if(FC.is_admin_channel)
- alert("This channel was created by a Nanotrasen Officer. You cannot place a D-Notice upon it.","Ok")
+ tgui_alert(usr, "This channel was created by a Nanotrasen Officer. You cannot place a D-Notice upon it.",list("Ok"))
return
FC.toggleCensorDclass()
updateUsrDialog()
diff --git a/code/modules/ninja/suit/ninja_equipment_actions/ninja_net.dm b/code/modules/ninja/suit/ninja_equipment_actions/ninja_net.dm
index ab52f3e018..1b11b320c2 100644
--- a/code/modules/ninja/suit/ninja_equipment_actions/ninja_net.dm
+++ b/code/modules/ninja/suit/ninja_equipment_actions/ninja_net.dm
@@ -12,7 +12,7 @@
*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet()
var/mob/living/carbon/human/ninja = affecting
- var/mob/living/net_target = input("Select who to capture:","Capture who?",null) as null|mob in sortNames(oview(ninja))
+ var/mob/living/net_target = tgui_input_list(ninja, "Select who to capture:","Capture who?",sortNames(oview(ninja)))
if(QDELETED(net_target)||!(net_target in oview(ninja)))
return
diff --git a/code/modules/ninja/suit/ninja_equipment_actions/ninja_suit_initialisation.dm b/code/modules/ninja/suit/ninja_equipment_actions/ninja_suit_initialisation.dm
index c1a3c77814..9c041977de 100644
--- a/code/modules/ninja/suit/ninja_equipment_actions/ninja_suit_initialisation.dm
+++ b/code/modules/ninja/suit/ninja_equipment_actions/ninja_suit_initialisation.dm
@@ -95,7 +95,7 @@ GLOBAL_LIST_INIT(ninja_deinitialize_messages, list(
if (!ninja || !ninja.mind)
s_busy = FALSE
return
- if (phase == 0 && alert("Are you certain you wish to remove the suit? This will take time and remove all abilities.",,"Yes","No") == "No")
+ if (phase == 0 && tgui_alert(ninja, "Are you certain you wish to remove the suit? This will take time and remove all abilities.",,list("Yes","No")) == "No")
s_busy = FALSE
return
diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm
index f46d4bf029..ea2bcad3aa 100644
--- a/code/modules/paperwork/contract.dm
+++ b/code/modules/paperwork/contract.dm
@@ -228,11 +228,11 @@
var/response = "No"
if(ghost)
ghost.notify_cloning("A devil has offered you revival, at the cost of your soul.",'sound/effects/genetics.ogg', H)
- response = tgalert(ghost, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", "Yes", "No", "Never for this round", 0, 200)
+ response = tgui_alert(ghost, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", list("Yes", "No", "Never for this round"), 200, 0)
if(!ghost)
return //handle logouts that happen whilst the alert is waiting for a response.
else
- response = tgalert(target.current, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", "Yes", "No", "Never for this round", 0, 200)
+ response = tgui_alert(target.current, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", list("Yes", "No", "Never for this round"), 200, 0)
if(response == "Yes")
H.revive(1,0)
log_combat(user, H, "infernally revived via contract")
diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm
index 6b19831d53..fdb1a329a3 100644
--- a/code/modules/paperwork/pen.dm
+++ b/code/modules/paperwork/pen.dm
@@ -123,7 +123,7 @@
desc = "It's an expensive [current_skin] fountain pen. The nib is quite sharp."
/obj/item/pen/attack_self(mob/living/carbon/user)
- var/deg = input(user, "What angle would you like to rotate the pen head to? (1-360)", "Rotate Pen Head") as null|num
+ var/deg = tgui_input_num(user, "What angle would you like to rotate the pen head to? (1-360)", "Rotate Pen Head")
if(deg && (deg > 0 && deg <= 360))
degrees = deg
to_chat(user, "You rotate the top of the pen to [degrees] degrees.")
@@ -149,7 +149,7 @@
. = ..()
//Changing name/description of items. Only works if they have the UNIQUE_RENAME object flag set
if(isobj(O) && proximity && (O.obj_flags & UNIQUE_RENAME))
- var/penchoice = input(user, "What would you like to edit?", "Rename, change description or reset both?") as null|anything in list("Rename","Change description","Reset")
+ var/penchoice = tgui_input_list(user, "What would you like to edit?", "Rename, change description or reset both?", list("Rename","Change description","Reset"))
if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE))
return
if(penchoice == "Rename")
diff --git a/code/modules/photography/camera/camera.dm b/code/modules/photography/camera/camera.dm
index 49821e55e0..a22d5f8e16 100644
--- a/code/modules/photography/camera/camera.dm
+++ b/code/modules/photography/camera/camera.dm
@@ -52,8 +52,8 @@
. = ..()
if(!user.canUseTopic(src, BE_CLOSE))
return
- var/desired_x = input(user, "How high do you want the camera to shoot, between [picture_size_x_min] and [picture_size_x_max]?", "Zoom", picture_size_x) as num
- var/desired_y = input(user, "How wide do you want the camera to shoot, between [picture_size_y_min] and [picture_size_y_max]?", "Zoom", picture_size_y) as num
+ var/desired_x = tgui_input_num(user, "How high do you want the camera to shoot, between [picture_size_x_min] and [picture_size_x_max]?", "Zoom", picture_size_x)
+ var/desired_y = tgui_input_num(user, "How wide do you want the camera to shoot, between [picture_size_y_min] and [picture_size_y_max]?", "Zoom", picture_size_y)
picture_size_x = min(clamp(desired_x, picture_size_x_min, picture_size_x_max), CAMERA_PICTURE_SIZE_HARD_LIMIT)
picture_size_y = min(clamp(desired_y, picture_size_y_min, picture_size_y_max), CAMERA_PICTURE_SIZE_HARD_LIMIT)
return TRUE
@@ -204,7 +204,7 @@
to_chat(user, "[pictures_left] photos left.")
var/customise = "No"
if(can_customise)
- customise = alert(user, "Do you want to customize the photo?", "Customization", "Yes", "No")
+ customise = tgui_alert(user, "Do you want to customize the photo?", "Customization", list("Yes", "No"))
if(customise == "Yes")
var/name1 = stripped_input(user, "Set a name for this photo, or leave blank. 32 characters max.", "Name", max_length = 32)
var/desc1 = stripped_input(user, "Set a description to add to photo, or leave blank. 128 characters max.", "Caption", max_length = 128)
diff --git a/code/modules/photography/camera/silicon_camera.dm b/code/modules/photography/camera/silicon_camera.dm
index 28a080d5f1..69dcfd89a8 100644
--- a/code/modules/photography/camera/silicon_camera.dm
+++ b/code/modules/photography/camera/silicon_camera.dm
@@ -33,7 +33,7 @@
var/datum/picture/p = i
nametemp += p.picture_name
temp[p.picture_name] = p
- find = input(user, "Select image") in nametemp|null
+ find = tgui_input_list(user, "Select image", "", nametemp)
if(!find)
return
return temp[find]
diff --git a/code/modules/plumbing/ducts.dm b/code/modules/plumbing/ducts.dm
index 8a27f2669c..915678ef5b 100644
--- a/code/modules/plumbing/ducts.dm
+++ b/code/modules/plumbing/ducts.dm
@@ -407,10 +407,10 @@ All the important duct code:
. += "It's current color and layer are [duct_color] and [duct_layer]. Use in-hand to change."
/obj/item/stack/ducts/attack_self(mob/user)
- var/new_layer = input("Select a layer", "Layer") as null|anything in layers
+ var/new_layer = tgui_input_list(user, "Select a layer", "Layer", layers)
if(new_layer)
duct_layer = new_layer
- var/new_color = input("Select a color", "Color") as null|anything in GLOB.pipe_paint_colors
+ var/new_color = tgui_input_list(user, "Select a color", "Color", GLOB.pipe_paint_colors)
if(new_color)
duct_color = new_color
add_atom_colour(GLOB.pipe_paint_colors[new_color], FIXED_COLOUR_PRIORITY)
diff --git a/code/modules/plumbing/plumbers/bottler.dm b/code/modules/plumbing/plumbers/bottler.dm
index 396c7cac22..8bab3937b9 100644
--- a/code/modules/plumbing/plumbers/bottler.dm
+++ b/code/modules/plumbing/plumbers/bottler.dm
@@ -51,7 +51,7 @@
///changing input ammount with a window
/obj/machinery/plumbing/bottler/interact(mob/user)
. = ..()
- wanted_amount = clamp(round(input(user,"maximum is 100u","set ammount to fill with") as num|null, 1), 1, 100)
+ wanted_amount = clamp(round(tgui_input_num(user,"maximum is 100u","set ammount to fill with"), 1), 1, 100)
reagents.clear_reagents()
to_chat(user, " The [src] will now fill for [wanted_amount]u.")
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 515349d666..51388a236b 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -1303,7 +1303,7 @@
user.visible_message("[user] slots [card] into [src]...", "Transfer process initiated. Sending request for AI approval...")
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
SEND_SOUND(occupier, sound('sound/misc/notice2.ogg')) //To alert the AI that someone's trying to card them if they're tabbed out
- if(alert(occupier, "[user] is attempting to transfer you to \a [card.name]. Do you consent to this?", "APC Transfer", "Yes - Transfer Me", "No - Keep Me Here") == "No - Keep Me Here")
+ if(tgui_alert(occupier, "[user] is attempting to transfer you to \a [card.name]. Do you consent to this?", "APC Transfer", list("Yes - Transfer Me", "No - Keep Me Here")) == "No - Keep Me Here")
to_chat(user, "AI denied transfer request. Process terminated.")
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, TRUE)
transfer_in_progress = FALSE
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index 9e779b9c1b..191ec3499f 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -520,7 +520,7 @@ By design, d1 is the smallest direction and d2 is the highest
cost = 1
/obj/item/stack/cable_coil/cyborg/attack_self(mob/user)
- var/cable_color = input(user,"Pick a cable color.","Cable Color") in list("red","yellow","green","blue","pink","orange","cyan","white")
+ var/cable_color = tgui_input_list(user,"Pick a cable color.","Cable Color", list("red","yellow","green","blue","pink","orange","cyan","white"))
color = cable_color
update_icon()
diff --git a/code/modules/procedural_mapping/mapGenerator.dm b/code/modules/procedural_mapping/mapGenerator.dm
index 323f74d0ef..0487feb1d8 100644
--- a/code/modules/procedural_mapping/mapGenerator.dm
+++ b/code/modules/procedural_mapping/mapGenerator.dm
@@ -147,16 +147,16 @@
set category = "Debug"
var/datum/mapGenerator/nature/N = new()
- var/startInput = input(usr,"Start turf of Map, (X;Y;Z)", "Map Gen Settings", "1;1;1") as text|null
+ var/startInput = tgui_input_text(usr,"Start turf of Map, (X;Y;Z)", "Map Gen Settings", "1;1;1")
if (isnull(startInput))
return
- var/endInput = input(usr,"End turf of Map (X;Y;Z)", "Map Gen Settings", "[world.maxx];[world.maxy];[mob ? mob.z : 1]") as text|null
-
+ var/endInput = tgui_input_text(usr,"End turf of Map (X;Y;Z)", "Map Gen Settings", "[world.maxx];[world.maxy];[mob ? mob.z : 1]")
+
if (isnull(endInput))
return
-
+
//maxx maxy and current z so that if you fuck up, you only fuck up one entire z level instead of the entire universe
if(!startInput || !endInput)
to_chat(src, "Missing Input")
@@ -182,7 +182,7 @@
"Same turfs"=CLUSTER_CHECK_SAME_TURFS, "Same atoms"=CLUSTER_CHECK_SAME_ATOMS, "Different turfs"=CLUSTER_CHECK_DIFFERENT_TURFS, \
"Different atoms"=CLUSTER_CHECK_DIFFERENT_ATOMS, "All turfs"=CLUSTER_CHECK_ALL_TURFS,"All atoms"=CLUSTER_CHECK_ALL_ATOMS)
- var/moduleClusters = input("Cluster Flags (Cancel to leave unchanged from defaults)","Map Gen Settings") as null|anything in clusters
+ var/moduleClusters = tgui_input_list(src, "Cluster Flags (Cancel to leave unchanged from defaults)","Map Gen Settings", clusters)
//null for default
var/theCluster = 0
diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm
index cef730366e..2ff8130527 100644
--- a/code/modules/projectiles/pins.dm
+++ b/code/modules/projectiles/pins.dm
@@ -259,20 +259,20 @@
. = TRUE
if(!can_toggle || !user.canUseTopic(src, BE_CLOSE))
return
- var/selection = alert(user, "Which setting would you want to modify?", "Firing Pin Settings", "Minimum Level Setting", "Maximum Level Setting", "Lethals Only Toggle")
+ var/selection = tgui_alert(user, "Which setting would you want to modify?", "Firing Pin Settings", list("Minimum Level Setting", "Maximum Level Setting", "Lethals Only Toggle"))
if(QDELETED(src) || QDELETED(user) || !user.canUseTopic(src, BE_CLOSE))
return
var/static/list/till_designs_pr_isnt_merged = list("green", "blue", "amber", "red", "delta")
switch(selection)
if("Minimum Level Setting")
- var/input = input(user, "Input the new minimum level setting.", "Firing Pin Settings", NUM2SECLEVEL(min_sec_level)) as null|anything in till_designs_pr_isnt_merged
+ var/input = tgui_input_list(user, "Input the new minimum level setting.", "Firing Pin Settings", till_designs_pr_isnt_merged)
if(!input)
return
min_sec_level = till_designs_pr_isnt_merged.Find(input) - 1
if(min_sec_level > max_sec_level)
max_sec_level = SEC_LEVEL_DELTA
if("Maximum Level Setting")
- var/input = input(user, "Input the new maximum level setting.", "Firing Pin Settings", NUM2SECLEVEL(max_sec_level)) as null|anything in till_designs_pr_isnt_merged
+ var/input = tgui_input_list(user, "Input the new maximum level setting.", "Firing Pin Settings", till_designs_pr_isnt_merged)
if(!input)
return
max_sec_level = till_designs_pr_isnt_merged.Find(input) - 1
diff --git a/code/modules/reagents/chem_wiki_render.dm b/code/modules/reagents/chem_wiki_render.dm
index 018161b075..c4f4cab0ff 100644
--- a/code/modules/reagents/chem_wiki_render.dm
+++ b/code/modules/reagents/chem_wiki_render.dm
@@ -17,7 +17,7 @@
var/prefix = "|Name | Reagents | Reaction vars | Description | Chem properties |\n|---|---|---|-----------|---|\n"
- var/input_reagent = replacetext(lowertext(input("Input the name/type of a reagent to get it's description on it's own, or leave blank to parse every chem.", "Input") as text), " ", "") //95% of the time, the reagent type is a lowercase, no spaces / underscored version of the name
+ var/input_reagent = replacetext(lowertext(tgui_input_text(src, "Input the name/type of a reagent to get it's description on it's own, or leave blank to parse every chem.", "Input")), " ", "") //95% of the time, the reagent type is a lowercase, no spaces / underscored version of the name
if(input_reagent)
var/input_reagent2 = find_reagent(input_reagent)
if(!input_reagent2)
diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
index 22aadc06f4..e9ae0ac1cb 100644
--- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
@@ -322,7 +322,7 @@
if("clear_recipes")
if(!is_operational())
return
- var/yesno = alert("Clear all recipes?",, "Yes","No")
+ var/yesno = tgui_alert(usr, "Clear all recipes?",, list("Yes","No"))
if(yesno == "Yes")
saved_recipes = list()
. = TRUE
@@ -337,7 +337,7 @@
var/name = stripped_input(usr,"Name","What do you want to name this recipe?", "Recipe", MAX_NAME_LEN)
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
return
- if(saved_recipes[name] && alert("\"[name]\" already exists, do you want to overwrite it?",, "Yes", "No") == "No")
+ if(saved_recipes[name] && tgui_alert(usr, "\"[name]\" already exists, do you want to overwrite it?",, list("Yes", "No")) == "No")
return
if(name && recording_recipe)
var/list/logstring = list()
diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm
index 285ef70433..e6e8070663 100644
--- a/code/modules/reagents/chemistry/machinery/chem_master.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_master.dm
@@ -221,7 +221,8 @@
var/to_container = params["to"]
// Custom amount
if (amount == -1)
- amount = text2num(input(
+ amount = text2num(tgui_input_num(
+ usr,
"Enter the amount you want to transfer:",
name, ""))
if (amount == null || amount <= 0)
@@ -256,7 +257,7 @@
// Get amount of items
var/amount = text2num(params["amount"])
if(amount == null)
- amount = text2num(input(usr,
+ amount = text2num(tgui_input_num(usr,
"Max 20. Buffer content will be split evenly.",
"How many to make?", 1))
amount = clamp(round(amount), 0, 20)
@@ -285,7 +286,7 @@
if(vol_each_text == "auto")
vol_each = vol_each_max
if(vol_each == null)
- vol_each = text2num(input(usr,
+ vol_each = text2num(tgui_input_num(usr,
"Maximum [vol_each_max] units per item.",
"How many units to fill?",
vol_each_max))
diff --git a/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm b/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm
index 489f9dd179..9644cd36e6 100644
--- a/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_synthesizer.dm
@@ -30,7 +30,7 @@
beaker = null
. = TRUE
if("input")
- var/input_reagent = replacetext(lowertext(input("Enter the name of any reagent", "Input") as text|null), " ", "") //95% of the time, the reagent id is a lowercase/no spaces version of the name
+ var/input_reagent = replacetext(lowertext(tgui_input_text(usr, "Enter the name of any reagent", "Input")), " ", "") //95% of the time, the reagent id is a lowercase/no spaces version of the name
if (isnull(input_reagent))
return
diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm
index 9b8ff7b262..375aef573c 100644
--- a/code/modules/reagents/reagent_containers.dm
+++ b/code/modules/reagents/reagent_containers.dm
@@ -47,7 +47,7 @@
set name = "Set Transfer Amount"
set category = "Object"
set waitfor = FALSE
- var/N = input("Amount per transfer from this:","[src]") as null|anything in possible_transfer_amounts
+ var/N = tgui_input_list(usr, "Amount per transfer from this:","[src]", possible_transfer_amounts)
if(N)
amount_per_transfer_from_this = N
to_chat(usr, "[src]'s transfer amount is now [amount_per_transfer_from_this] units.")
diff --git a/code/modules/reagents/reagent_containers/borghypo.dm b/code/modules/reagents/reagent_containers/borghypo.dm
index 3388018280..5dd0273372 100644
--- a/code/modules/reagents/reagent_containers/borghypo.dm
+++ b/code/modules/reagents/reagent_containers/borghypo.dm
@@ -122,7 +122,7 @@ Borg Hypospray
log_combat(user, M, "injected", src, "(CHEMICALS: [english_list(injected)])")
/obj/item/reagent_containers/borghypo/attack_self(mob/user)
- var/chosen_reagent = modes[reagent_names[input(user, "What reagent do you want to dispense?") as null|anything in reagent_names]]
+ var/chosen_reagent = modes[reagent_names[tgui_input_list(user, "What reagent do you want to dispense?", "", reagent_names)]]
if(!chosen_reagent)
return
mode = chosen_reagent
diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm
index f59e45ff01..17366e31d4 100644
--- a/code/modules/reagents/reagent_containers/spray.dm
+++ b/code/modules/reagents/reagent_containers/spray.dm
@@ -111,7 +111,7 @@
set src in usr
if(usr.incapacitated())
return
- if (alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
+ if (tgui_alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", list("Yes", "No")) != "Yes")
return
if(isturf(usr.loc) && src.loc == usr)
to_chat(usr, "You empty \the [src] onto the floor.")
diff --git a/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm b/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm
index 99caa5b480..8ea883edf1 100644
--- a/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm
+++ b/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm
@@ -21,14 +21,6 @@
category = list("Computer Boards")
departmental_flags = DEPARTMENTAL_FLAG_ALL
-/datum/design/board/minesweeper
- name = "Computer Design (Minesweeper Arcade Machine)"
- desc = "Allows for the construction of circuit boards used to build a new Minesweeper machine."
- id = "arcade_minesweeper"
- build_path = /obj/item/circuitboard/computer/arcade/minesweeper
- category = list("Computer Boards")
- departmental_flags = DEPARTMENTAL_FLAG_ALL
-
/datum/design/board/slot_machine
name = "Computer Design (Slot Machine)"
desc = "Allows for the construction of circuit boards used to build a new slot machine."
diff --git a/code/modules/research/designs/machine_desings/machine_designs_all_misc.dm b/code/modules/research/designs/machine_desings/machine_designs_all_misc.dm
index 81b16d1118..570c99e6ae 100644
--- a/code/modules/research/designs/machine_desings/machine_designs_all_misc.dm
+++ b/code/modules/research/designs/machine_desings/machine_designs_all_misc.dm
@@ -10,6 +10,14 @@
category = list ("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_ALL
+/datum/design/board/autoloom
+ name = "Machine Design (Autoloom Board)"
+ desc = "The circuit board for an autoloom."
+ id = "autoloom"
+ build_path = /obj/item/circuitboard/machine/autoloom
+ category = list ("Misc. Machinery")
+ departmental_flags = DEPARTMENTAL_FLAG_SERVICE
+
/datum/design/board/holopad
name = "Machine Design (AI Holopad Board)"
desc = "The circuit board for a holopad."
diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm
index cc02e271f9..5df70f7e56 100644
--- a/code/modules/research/destructive_analyzer.dm
+++ b/code/modules/research/destructive_analyzer.dm
@@ -116,7 +116,7 @@ Note: Must be placed within 3 tiles of the R&D Console
differences[i] = value
if(length(worths) && !length(differences))
return FALSE
- var/choice = input("Are you sure you want to destroy [loaded_item] to [!length(worths) ? "reveal [TN.display_name]" : "boost [TN.display_name] by [json_encode(differences)] point\s"]?") in list("Proceed", "Cancel")
+ var/choice = tgui_input_list(user, "Are you sure you want to destroy [loaded_item] to [!length(worths) ? "reveal [TN.display_name]" : "boost [TN.display_name] by [json_encode(differences)] point\s"]?", "", list("Proceed", "Cancel"))
if(choice == "Cancel")
return FALSE
if(QDELETED(loaded_item) || QDELETED(linked_console) || !user.Adjacent(linked_console) || QDELETED(src))
@@ -134,7 +134,7 @@ Note: Must be placed within 3 tiles of the R&D Console
user_mode_string = " for [json_encode(point_value)] points"
else if(loaded_item.custom_materials?.len)
user_mode_string = " for material reclamation"
- var/choice = input("Are you sure you want to destroy [loaded_item][user_mode_string]?") in list("Proceed", "Cancel")
+ var/choice = tgui_input_list(user, "Are you sure you want to destroy [loaded_item][user_mode_string]?", "", list("Proceed", "Cancel"))
if(choice == "Cancel")
return FALSE
if(QDELETED(loaded_item) || QDELETED(linked_console) || !user.Adjacent(linked_console) || QDELETED(src))
diff --git a/code/modules/research/techweb/nodes/computer_hud_nodes.dm b/code/modules/research/techweb/nodes/computer_hud_nodes.dm
index 2db03861e9..0f2cf2e4bd 100644
--- a/code/modules/research/techweb/nodes/computer_hud_nodes.dm
+++ b/code/modules/research/techweb/nodes/computer_hud_nodes.dm
@@ -56,5 +56,5 @@
display_name = "Games and Toys"
description = "For the slackers on the station."
prereq_ids = list("comptech")
- design_ids = list("arcade_battle", "arcade_orion", "arcade_minesweeper", "slotmachine", "autoylathe")
+ design_ids = list("arcade_battle", "arcade_orion", "slotmachine", "autoylathe")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000)
diff --git a/code/modules/research/techweb/nodes/tools_nodes.dm b/code/modules/research/techweb/nodes/tools_nodes.dm
index 180cdb5778..86a48ab8de 100644
--- a/code/modules/research/techweb/nodes/tools_nodes.dm
+++ b/code/modules/research/techweb/nodes/tools_nodes.dm
@@ -37,7 +37,7 @@
display_name = "Botanical Engineering"
description = "Botanical tools."
prereq_ids = list("adv_engi", "biotech")
- design_ids = list("diskplantgene", "portaseeder", "plantgenes", "flora_gun", "hydro_tray", "biogenerator", "seed_extractor")
+ design_ids = list("diskplantgene", "portaseeder", "plantgenes", "flora_gun", "hydro_tray", "biogenerator", "seed_extractor", "autoloom")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2750)
/datum/techweb_node/exp_tools
diff --git a/code/modules/research/xenobiology/crossbreeding/_misc.dm b/code/modules/research/xenobiology/crossbreeding/_misc.dm
index 4684352ef5..cb6a2f25bc 100644
--- a/code/modules/research/xenobiology/crossbreeding/_misc.dm
+++ b/code/modules/research/xenobiology/crossbreeding/_misc.dm
@@ -100,7 +100,7 @@
return
if(M.mind)
to_chat(user, "You offer the device to [M].")
- if(alert(M, "Would you like to enter [user]'s capture device?", "Gold Capture Device", "Yes", "No") == "Yes")
+ if(tgui_alert(M, "Would you like to enter [user]'s capture device?", "Gold Capture Device", list("Yes", "No")) == "Yes")
if(user.canUseTopic(src, BE_CLOSE) && user.canUseTopic(M, BE_CLOSE))
to_chat(user, "You store [M] in the capture device.")
to_chat(M, "The world warps around you, and you're suddenly in an endless void, with a window to the outside floating in front of you.")
diff --git a/code/modules/research/xenobiology/crossbreeding/charged.dm b/code/modules/research/xenobiology/crossbreeding/charged.dm
index 75a15be9ce..e4d344f9ba 100644
--- a/code/modules/research/xenobiology/crossbreeding/charged.dm
+++ b/code/modules/research/xenobiology/crossbreeding/charged.dm
@@ -153,7 +153,7 @@ Charged extracts:
if(!istype(H))
to_chat(user, "You must be a humanoid to use this!")
return
- var/racechoice = input(H, "Choose your slime subspecies.", "Slime Selection") as null|anything in subtypesof(/datum/species/jelly)
+ var/racechoice = tgui_input_list(H, "Choose your slime subspecies.", "Slime Selection", subtypesof(/datum/species/jelly))
if(!racechoice)
to_chat(user, "You decide not to become a slime for now.")
return
diff --git a/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm b/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm
index a88b5cd35b..bc1597aac8 100644
--- a/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm
+++ b/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm
@@ -28,7 +28,7 @@ Self-sustaining extracts:
return INITIALIZE_HINT_QDEL
/obj/item/autoslime/attack_self(mob/user)
- var/reagentselect = input(user, "Choose the reagent the extract will produce.", "Self-sustaining Reaction") as null|anything in extract.activate_reagents
+ var/reagentselect = tgui_input_list(user, "Choose the reagent the extract will produce.", "Self-sustaining Reaction", extract.activate_reagents)
var/amount = 5
var/secondary
diff --git a/code/modules/research/xenobiology/crossbreeding/stabilized.dm b/code/modules/research/xenobiology/crossbreeding/stabilized.dm
index 69bd2c7e28..5fc7a628da 100644
--- a/code/modules/research/xenobiology/crossbreeding/stabilized.dm
+++ b/code/modules/research/xenobiology/crossbreeding/stabilized.dm
@@ -115,7 +115,7 @@ Stabilized extracts:
generate_mobtype()
/obj/item/slimecross/stabilized/gold/attack_self(mob/user)
- var/choice = input(user, "Which do you want to reset?", "Familiar Adjustment") as null|anything in list("Familiar Location", "Familiar Species", "Familiar Sentience", "Familiar Name")
+ var/choice = tgui_input_list(user, "Which do you want to reset?", "Familiar Adjustment", list("Familiar Location", "Familiar Species", "Familiar Sentience", "Familiar Name"))
if(!user.canUseTopic(src, BE_CLOSE))
return
if(isliving(user))
diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm
index 70cd28718c..d9679d0fb3 100644
--- a/code/modules/research/xenobiology/xenobiology.dm
+++ b/code/modules/research/xenobiology/xenobiology.dm
@@ -737,7 +737,7 @@
return
prompted = 1
- if(alert("This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?",,"Yes","No")=="No")
+ if(tgui_alert(usr, "This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?",,list("Yes","No"))=="No")
prompted = 0
return
diff --git a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
index d62b3c2611..cccb37a359 100644
--- a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
+++ b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
@@ -169,7 +169,7 @@ GLOBAL_DATUM(necropolis_gate, /obj/structure/necropolis_gate/legion_gate)
/obj/structure/necropolis_gate/legion_gate/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(!open && !changing_openness)
- var/safety = alert(user, "You think this might be a bad idea...", "Knock on the door?", "Proceed", "Abort")
+ var/safety = tgui_alert(user, "You think this might be a bad idea...", "Knock on the door?", list("Proceed", "Abort"))
if(safety == "Abort" || !in_range(src, user) || !src || open || changing_openness || user.incapacitated())
return
user.visible_message("[user] knocks on [src]...", "You tentatively knock on [src]...")
diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm
index 7109c87999..89fd64f3ad 100644
--- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm
+++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm
@@ -47,7 +47,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337)
promptAndCheckIn(user)
/obj/item/hilbertshotel/proc/promptAndCheckIn(mob/user)
- var/chosenRoomNumber = input(user, "What number room will you be checking into?", "Room Number") as null|num
+ var/chosenRoomNumber = tgui_input_num(user, "What number room will you be checking into?", "Room Number")
if(!chosenRoomNumber || !user.CanReach(src))
return
if(chosenRoomNumber > SHORT_REAL_LIMIT)
@@ -258,7 +258,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337)
if(!parentSphere)
to_chat(user, "The door seems to be malfunctioning and refuses to operate!")
return
- if(alert(user, "Hilbert's Hotel would like to remind you that while we will do everything we can to protect the belongings you leave behind, we make no guarantees of their safety while you're gone, especially that of the health of any living creatures. With that in mind, are you ready to leave?", "Exit", "Leave", "Stay") == "Leave")
+ if(tgui_alert(user, "Hilbert's Hotel would like to remind you that while we will do everything we can to protect the belongings you leave behind, we make no guarantees of their safety while you're gone, especially that of the health of any living creatures. With that in mind, are you ready to leave?", "Exit", list("Leave", "Stay")) == "Leave")
if(!CHECK_MOBILITY(user, MOBILITY_MOVE) || (get_dist(get_turf(src), get_turf(user)) > 1)) //no teleporting around if they're dead or moved away during the prompt.
return
user.forceMove(get_turf(parentSphere))
diff --git a/code/modules/shuttle/assault_pod.dm b/code/modules/shuttle/assault_pod.dm
index 1258b9f4b8..43877819a3 100644
--- a/code/modules/shuttle/assault_pod.dm
+++ b/code/modules/shuttle/assault_pod.dm
@@ -35,7 +35,7 @@
/obj/item/assault_pod/attack_self(mob/living/user)
var/target_area
- target_area = input("Area to land", "Select a Landing Zone", target_area) as null|anything in GLOB.teleportlocs
+ target_area = tgui_input_list(user, "Area to land", "Select a Landing Zone", GLOB.teleportlocs)
if(!target_area)
return
var/area/picked_area = GLOB.teleportlocs[target_area]
diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm
index a215b58b55..05ecb3f05c 100644
--- a/code/modules/shuttle/navigation_computer.dm
+++ b/code/modules/shuttle/navigation_computer.dm
@@ -346,7 +346,7 @@
L["([L.len]) [nav_beacon.name] locked"] = null
playsound(console, 'sound/machines/terminal_prompt.ogg', 25, 0)
- var/selected = input("Choose location to jump to", "Locations", null) as null|anything in L
+ var/selected = tgui_input_list(usr, "Choose location to jump to", "Locations", L)
if(QDELETED(src) || QDELETED(target) || !isliving(target))
return
playsound(src, "terminal_type", 25, 0)
diff --git a/code/modules/shuttle/spaceship_navigation_beacon.dm b/code/modules/shuttle/spaceship_navigation_beacon.dm
index dbf81d791e..de826af62f 100644
--- a/code/modules/shuttle/spaceship_navigation_beacon.dm
+++ b/code/modules/shuttle/spaceship_navigation_beacon.dm
@@ -43,7 +43,7 @@
if(!I.tool_behaviour == TOOL_MULTITOOL)
return
if(panel_open)
- var/new_name = "Beacon_[input("Enter the custom name for this beacon", "It be Beacon ..your input..") as text]"
+ var/new_name = "Beacon_[tgui_input_list(user, "Enter the custom name for this beacon", "It be Beacon ..your input..")]"
if(new_name && Adjacent(user))
name = new_name
to_chat(user, "You change beacon name to [name].")
diff --git a/code/modules/smithing/anvil.dm b/code/modules/smithing/anvil.dm
index 9dffc883d4..c89f338f29 100644
--- a/code/modules/smithing/anvil.dm
+++ b/code/modules/smithing/anvil.dm
@@ -115,7 +115,7 @@
currentquality += qualitychange
var/list/shapingsteps = list("weak hit", "strong hit", "heavy hit", "fold", "draw", "shrink", "bend", "punch", "upset") //weak/strong/heavy hit affect strength. All the other steps shape.
workpiece_state = WORKPIECE_INPROGRESS
- var/stepdone = input(user, "How would you like to work the metal?") in shapingsteps
+ var/stepdone = tgui_input_list(user, "How would you like to work the metal?", "", shapingsteps)
var/steptime = 50
if(user.mind.skill_holder)
var/skillmod = user.mind.get_skill_level(/datum/skill/level/dwarfy/blacksmithing)/10 + 1
diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm
index 2272a14612..c999f01794 100644
--- a/code/modules/spells/spell.dm
+++ b/code/modules/spells/spell.dm
@@ -376,11 +376,11 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
continue
possible_targets += M
- //targets += input("Choose the target for the spell.", "Targeting") as mob in possible_targets
+ //targets += tgui_input_list(user, "Choose the target for the spell.", "Targeting", possible_targets)
//Adds a safety check post-input to make sure those targets are actually in range.
var/mob/M
if(!random_target)
- M = input("Choose the target for the spell.", "Targeting") as null|mob in sortNames(possible_targets)
+ M = tgui_input_list(user, "Choose the target for the spell.", "Targeting", sortNames(possible_targets))
else
switch(random_target_priority)
if(TARGET_RANDOM)
diff --git a/code/modules/spells/spell_types/area_teleport.dm b/code/modules/spells/spell_types/area_teleport.dm
index 50d5ee0ad6..19a0d12a2b 100644
--- a/code/modules/spells/spell_types/area_teleport.dm
+++ b/code/modules/spells/spell_types/area_teleport.dm
@@ -28,7 +28,7 @@
var/A = null
if(!randomise_selection)
- A = input("Area to teleport to", "Teleport", A) as null|anything in GLOB.teleportlocs
+ A = tgui_input_list(usr, "Area to teleport to", "Teleport", GLOB.teleportlocs)
else
A = pick(GLOB.teleportlocs)
if(!A)
diff --git a/code/modules/spells/spell_types/devil.dm b/code/modules/spells/spell_types/devil.dm
index 3b76107905..3ff78e24c2 100644
--- a/code/modules/spells/spell_types/devil.dm
+++ b/code/modules/spells/spell_types/devil.dm
@@ -54,7 +54,7 @@
user.put_in_hands(contract)
else
var/obj/item/paper/contract/infernal/contract // = new(user.loc, C.mind, contractType, user.mind)
- var/contractTypeName = input(user, "What type of contract?") in list ("Power", "Wealth", "Prestige", "Magic", "Knowledge", "Friendship")
+ var/contractTypeName = tgui_input_list(user, "What type of contract?", "", list("Power", "Wealth", "Prestige", "Magic", "Knowledge", "Friendship"))
switch(contractTypeName)
if("Power")
contract = new /obj/item/paper/contract/infernal/power(C.loc, C.mind, user.mind)
diff --git a/code/modules/spells/spell_types/devil_boons.dm b/code/modules/spells/spell_types/devil_boons.dm
index cf11466d19..2be22f6ecb 100644
--- a/code/modules/spells/spell_types/devil_boons.dm
+++ b/code/modules/spells/spell_types/devil_boons.dm
@@ -43,7 +43,7 @@
for(var/mob/C in targets)
if(!C.client)
continue
- C.client.view_size.setTo((input("Select view range:", "Range", 4) in ranges) - 7)
+ C.client.view_size.setTo((tgui_input_list(user, "Select view range:", "Range", ranges - 7)))
/obj/effect/proc_holder/spell/targeted/summon_friend
name = "Summon Friend"
diff --git a/code/modules/spells/spell_types/shapeshift.dm b/code/modules/spells/spell_types/shapeshift.dm
index 67c2e3e941..f686fdfcd5 100644
--- a/code/modules/spells/spell_types/shapeshift.dm
+++ b/code/modules/spells/spell_types/shapeshift.dm
@@ -34,7 +34,7 @@
for(var/path in possible_shapes)
var/mob/living/simple_animal/A = path
animal_list[initial(A.name)] = path
- var/new_shapeshift_type = input(M, "Choose Your Animal Form!", "It's Morphing Time!", null) as null|anything in animal_list
+ var/new_shapeshift_type = tgui_input_list(M, "Choose Your Animal Form!", "It's Morphing Time!", animal_list)
if(shapeshift_type)
return
shapeshift_type = new_shapeshift_type
diff --git a/code/modules/spells/spell_types/voice_of_god.dm b/code/modules/spells/spell_types/voice_of_god.dm
index fa41b59c0d..77a66f74ae 100644
--- a/code/modules/spells/spell_types/voice_of_god.dm
+++ b/code/modules/spells/spell_types/voice_of_god.dm
@@ -24,7 +24,7 @@
/obj/effect/proc_holder/spell/voice_of_god/choose_targets(mob/user = usr)
perform(user=user)
/obj/effect/proc_holder/spell/voice_of_god/perform(list/targets, recharge = 1, mob/user = usr)
- command = input(user, "Speak with the Voice of God", "Command")
+ command = tgui_input_text(user, "Speak with the Voice of God", "Command")
if(QDELETED(src) || QDELETED(user))
return
if(!command)
diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm
index cb1fdcfc2e..442038c563 100644
--- a/code/modules/station_goals/bsa.dm
+++ b/code/modules/station_goals/bsa.dm
@@ -286,7 +286,7 @@
var/list/options = gps_locators
if(area_aim)
options += GLOB.teleportlocs
- var/V = input(user,"Select target", "Select target",null) in options|null
+ var/V = tgui_input_list(user,"Select target", "Select target", options)
target = options[V]
diff --git a/code/modules/surgery/graft_synthtissue.dm b/code/modules/surgery/graft_synthtissue.dm
index afe8c9d1d1..b036d86005 100644
--- a/code/modules/surgery/graft_synthtissue.dm
+++ b/code/modules/surgery/graft_synthtissue.dm
@@ -37,7 +37,7 @@
O.on_find(user)
organs -= O
organs[O.name] = O
- chosen_organ = input("Target which organ?", "Surgery", null, null) as null|anything in organs
+ chosen_organ = tgui_input_list(user, "Target which organ?", "Surgery", organs)
chosen_organ = organs[chosen_organ]
if(!chosen_organ)
return -1
diff --git a/code/modules/surgery/helpers.dm b/code/modules/surgery/helpers.dm
index 652c49519a..c28c7d9848 100644
--- a/code/modules/surgery/helpers.dm
+++ b/code/modules/surgery/helpers.dm
@@ -53,7 +53,7 @@
if(!available_surgeries.len)
return
- var/P = input("Begin which procedure?", "Surgery", null, null) as null|anything in available_surgeries
+ var/P = tgui_input_list(user, "Begin which procedure?", "Surgery", available_surgeries)
if(P && user && user.Adjacent(M) && (I in user))
var/datum/surgery/S = available_surgeries[P]
diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm
index 0876357e8e..0cbd232afc 100644
--- a/code/modules/surgery/organ_manipulation.dm
+++ b/code/modules/surgery/organ_manipulation.dm
@@ -105,7 +105,7 @@
O.on_find(user)
organs -= O
organs[O.name] = O
- I = input("Remove which organ?", "Surgery", null, null) as null|anything in organs
+ I = tgui_input_list(user, "Remove which organ?", "Surgery", organs)
if(I && user && target && user.Adjacent(target) && user.get_active_held_item() == tool)
I = organs[I]
if(!I)
diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm
index 9861a1b639..bc35298953 100644
--- a/code/modules/surgery/organs/eyes.dm
+++ b/code/modules/surgery/organs/eyes.dm
@@ -280,7 +280,7 @@
var/C = input(owner, "Select Color", "Select color", "#ffffff") as color|null
if(!C || QDELETED(src) || QDELETED(user) || QDELETED(owner) || owner != user)
return
- var/range = input(user, "Enter range (0 - [max_light_beam_distance])", "Range Select", 0) as null|num
+ var/range = tgui_input_num(user, "Enter range (0 - [max_light_beam_distance])", "Range Select", 0)
if(!isnum(range))
return
diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm
index e41980cdd3..e2ddfe6cab 100644
--- a/code/modules/surgery/organs/vocal_cords.dm
+++ b/code/modules/surgery/organs/vocal_cords.dm
@@ -46,7 +46,7 @@
/datum/action/item_action/organ_action/use/adamantine_vocal_cords/Trigger()
if(!IsAvailable())
return
- var/message = input(owner, "Resonate a message to all nearby golems.", "Resonate")
+ var/message = tgui_input_text(owner, "Resonate a message to all nearby golems.", "Resonate")
if(QDELETED(src) || QDELETED(owner) || !message)
return
owner.say(".x[message]")
@@ -100,7 +100,7 @@
if(world.time < cords.next_command)
to_chat(owner, "You must wait [DisplayTimeText(cords.next_command - world.time)] before Speaking again.")
return
- var/command = input(owner, "Speak with the Voice of God", "Command")
+ var/command = tgui_input_text(owner, "Speak with the Voice of God", "Command")
if(QDELETED(src) || QDELETED(owner))
return
if(!command)
@@ -644,7 +644,7 @@
/datum/action/item_action/organ_action/velvet/Trigger()
. = ..()
- var/command = input(owner, "Speak in a sultry tone", "Command")
+ var/command = tgui_input_text(owner, "Speak in a sultry tone", "Command")
if(QDELETED(src) || QDELETED(owner))
return
if(!command)
@@ -1220,7 +1220,7 @@
if (E.mental_capacity >= 5)
var/trigger = html_decode(stripped_input(user, "Enter the trigger phrase", MAX_MESSAGE_LEN))
var/custom_words_words_list = list("Speak", "Echo", "Shock", "Cum", "Kneel", "Strip", "Trance", "Cancel")
- var/trigger2 = input(user, "Pick an effect", "Effects") in custom_words_words_list
+ var/trigger2 = tgui_input_list(user, "Pick an effect", "Effects", custom_words_words_list)
trigger2 = lowertext(trigger2)
if ((findtext(trigger2, custom_words_words)))
if (trigger2 == "speak" || trigger2 == "echo")
@@ -1260,7 +1260,7 @@
H.SetStun(1000)
var/trigger = stripped_input(user, "Enter the loop phrase", MAX_MESSAGE_LEN)
var/customSpan = list("Notice", "Warning", "Hypnophrase", "Love", "Velvet")
- var/trigger2 = input(user, "Pick the style", "Style") in customSpan
+ var/trigger2 = tgui_input_list(user, "Pick the style", "Style", customSpan)
trigger2 = lowertext(trigger2)
E.customEcho = trigger
E.customSpan = trigger2
diff --git a/code/modules/surgery/plastic_surgery.dm b/code/modules/surgery/plastic_surgery.dm
index d3597ba516..91809859c0 100644
--- a/code/modules/surgery/plastic_surgery.dm
+++ b/code/modules/surgery/plastic_surgery.dm
@@ -30,7 +30,7 @@
for(var/_i in 1 to 9)
names += "Subject [target.gender == MALE ? "i" : "o"]-[pick("a", "b", "c", "d", "e")]-[rand(10000, 99999)]"
names += target.dna.species.random_name(target.gender, TRUE) //give one normal name in case they want to do regular plastic surgery
- var/chosen_name = input(user, "Choose a new name to assign.", "Plastic Surgery") as null|anything in names
+ var/chosen_name = tgui_input_list(user, "Choose a new name to assign.", "Plastic Surgery", names)
if(!chosen_name)
return
var/oldname = target.real_name
diff --git a/code/modules/tcg/cards.dm b/code/modules/tcg/cards.dm
index f5c7c47aaf..6b1cbd9884 100644
--- a/code/modules/tcg/cards.dm
+++ b/code/modules/tcg/cards.dm
@@ -214,11 +214,11 @@
result = show_radial_menu(user, src, possible_actions, require_near = TRUE, tooltips = TRUE)
switch(result)
if("Health")
- card_datum.health = input(user, "What do you want health to be?", "Changing [src]'s health") as num|null
+ card_datum.health = tgui_input_num(user, "What do you want health to be?", "Changing [src]'s health", card_datum.health)
if("Attack")
- card_datum.attack = input(user, "What do you want attack to be?", "Changing [src]'s attack") as num|null
+ card_datum.attack = tgui_input_num(user, "What do you want attack to be?", "Changing [src]'s attack", card_datum.attack)
if("Mana")
- card_datum.mana_cost = input(user, "What do you want mana cost to be?", "Changing [src]'s mana cost") as num|null
+ card_datum.mana_cost = tgui_input_num(user, "What do you want mana cost to be?", "Changing [src]'s mana cost", card_datum.mana_cost)
user.visible_message("[user] changes [src]'s [result].")
/obj/item/tcg_card/equipped(mob/user, slot, initial)
@@ -575,7 +575,7 @@
qdel(I)
if(istype(I, /obj/item/tcgcard_deck))
var/obj/item/tcgcard_deck/deck = I
- var/named = input(user, "How will this deck be named? Leave this field empty if you don't want to save this deck.")
+ var/named = tgui_input_text(user, "How will this deck be named? Leave this field empty if you don't want to save this deck.")
if(named)
decks[named] = list()
for(var/obj/item/tcg_card/card in deck.contents)
diff --git a/code/modules/tgui/tgui_input_text.dm b/code/modules/tgui/tgui_input_text.dm
new file mode 100644
index 0000000000..a8dcb6a984
--- /dev/null
+++ b/code/modules/tgui/tgui_input_text.dm
@@ -0,0 +1,299 @@
+/**
+ * Creates a TGUI input text window and returns the user's response.
+ *
+ * This proc should be used to create alerts that the caller will wait for a response from.
+ * Arguments:
+ * * user - The user to show the input box to.
+ * * message - The content of the input box, shown in the body of the TGUI window.
+ * * title - The title of the input box, shown on the top of the TGUI window.
+ * * default - The default value pre-populated in the input box.
+ * * timeout - The timeout of the input box, after which the input box will close and qdel itself. Set to zero for no timeout.
+ */
+/proc/tgui_input_text(mob/user, message, title, default, timeout = 0)
+ if (istext(user))
+ stack_trace("tgui_input_text() received text for user instead of mob")
+ return
+ if (!user)
+ user = usr
+ if (!istype(user))
+ if (istype(user, /client))
+ var/client/client = user
+ user = client.mob
+ else
+ return
+ var/datum/tgui_input_dialog/input = new(user, message, title, default, timeout)
+ input.input_type = "text"
+ input.ui_interact(user)
+ input.wait()
+ if (input)
+ . = input.choice
+ qdel(input)
+
+/**
+ * Creates a TGUI input message window and returns the user's response.
+ *
+ * This proc should be used to create alerts that the caller will wait for a response from.
+ * Arguments:
+ * * user - The user to show the input box to.
+ * * message - The content of the input box, shown in the body of the TGUI window.
+ * * title - The title of the input box, shown on the top of the TGUI window.
+ * * default - The default value pre-populated in the input box.
+ * * timeout - The timeout of the input box, after which the input box will close and qdel itself. Set to zero for no timeout.
+ */
+/proc/tgui_input_message(mob/user, message, title, default, timeout = 0)
+ if (istext(user))
+ stack_trace("tgui_input_message() received text for user instead of mob")
+ return
+ if (!user)
+ user = usr
+ if (!istype(user))
+ if (istype(user, /client))
+ var/client/client = user
+ user = client.mob
+ else
+ return
+ var/datum/tgui_input_dialog/input = new(user, message, title, default, timeout)
+ input.input_type = "message"
+ input.ui_interact(user)
+ input.wait()
+ if (input)
+ . = input.choice
+ qdel(input)
+
+/**
+ * Creates a TGUI input num window and returns the user's response.
+ *
+ * This proc should be used to create alerts that the caller will wait for a response from.
+ * Arguments:
+ * * user - The user to show the input box to.
+ * * message - The content of the input box, shown in the body of the TGUI window.
+ * * title - The title of the input box, shown on the top of the TGUI window.
+ * * default - The default value pre-populated in the input box.
+ * * timeout - The timeout of the input box, after which the input box will close and qdel itself. Set to zero for no timeout.
+ */
+/proc/tgui_input_num(mob/user, message, title, default, timeout = 0)
+ if (istext(user))
+ stack_trace("tgui_input_num() received text for user instead of mob")
+ return
+ if (!user)
+ user = usr
+ if (!istype(user))
+ if (istype(user, /client))
+ var/client/client = user
+ user = client.mob
+ else
+ return
+ var/datum/tgui_input_dialog/input = new(user, message, title, default, timeout)
+ input.input_type = "num"
+ input.ui_interact(user)
+ input.wait()
+ if (input)
+ . = input.choice
+ qdel(input)
+
+/**
+ * Creates an asynchronous TGUI input text window with an associated callback.
+ *
+ * This proc should be used to create inputs that invoke a callback with the user's chosen option.
+ * Arguments:
+ * * user - The user to show the input box to.
+ * * message - The content of the input box, shown in the body of the TGUI window.
+ * * title - The title of the input box, shown on the top of the TGUI window.
+ * * default - The default value pre-populated in the input box.
+ * * callback - The callback to be invoked when a choice is made.
+ * * timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout.
+ */
+/proc/tgui_input_text_async(mob/user, message, title, default, datum/callback/callback, timeout = 60 SECONDS)
+ if (istext(user))
+ stack_trace("tgui_input_text_async() received text for user instead of mob")
+ return
+ if (!user)
+ user = usr
+ if (!istype(user))
+ if (istype(user, /client))
+ var/client/client = user
+ user = client.mob
+ else
+ return
+ var/datum/tgui_input_dialog/async/input = new(user, message, title, default, callback, timeout)
+ input.input_type = "text"
+ input.ui_interact(user)
+
+/**
+ * Creates an asynchronous TGUI input message window with an associated callback.
+ *
+ * This proc should be used to create inputs that invoke a callback with the user's chosen option.
+ * Arguments:
+ * * user - The user to show the input box to.
+ * * message - The content of the input box, shown in the body of the TGUI window.
+ * * title - The title of the input box, shown on the top of the TGUI window.
+ * * default - The default value pre-populated in the input box.
+ * * callback - The callback to be invoked when a choice is made.
+ * * timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout.
+ */
+/proc/tgui_input_message_async(mob/user, message, title, default, datum/callback/callback, timeout = 60 SECONDS)
+ if (istext(user))
+ stack_trace("tgui_input_message_async() received text for user instead of mob")
+ return
+ if (!user)
+ user = usr
+ if (!istype(user))
+ if (istype(user, /client))
+ var/client/client = user
+ user = client.mob
+ else
+ return
+ var/datum/tgui_input_dialog/async/input = new(user, message, title, default, callback, timeout)
+ input.input_type = "message"
+ input.ui_interact(user)
+
+/**
+ * Creates an asynchronous TGUI input num window with an associated callback.
+ *
+ * This proc should be used to create inputs that invoke a callback with the user's chosen option.
+ * Arguments:
+ * * user - The user to show the input box to.
+ * * message - The content of the input box, shown in the body of the TGUI window.
+ * * title - The title of the input box, shown on the top of the TGUI window.
+ * * default - The default value pre-populated in the input box.
+ * * callback - The callback to be invoked when a choice is made.
+ * * timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout.
+ */
+/proc/tgui_input_num_async(mob/user, message, title, default, datum/callback/callback, timeout = 60 SECONDS)
+ if (istext(user))
+ stack_trace("tgui_input_num_async() received text for user instead of mob")
+ return
+ if (!user)
+ user = usr
+ if (!istype(user))
+ if (istype(user, /client))
+ var/client/client = user
+ user = client.mob
+ else
+ return
+ var/datum/tgui_input_dialog/async/input = new(user, message, title, default, callback, timeout)
+ input.input_type = "num"
+ input.ui_interact(user)
+
+/**
+ * # tgui_input_dialog
+ *
+ * Datum used for instantiating and using a TGUI-controlled input that prompts the user with
+ * a message and a box for accepting text/message/num input.
+ */
+/datum/tgui_input_dialog
+ /// The title of the TGUI window
+ var/title
+ /// The textual body of the TGUI window
+ var/message
+ /// The default value to initially populate the input box.
+ var/initial
+ /// The value that the user input into the input box, null if cancelled.
+ var/choice
+ /// The time at which the tgui_text_input was created, for displaying timeout progress.
+ var/start_time
+ /// The lifespan of the tgui_text_input, after which the window will close and delete itself.
+ var/timeout
+ /// Boolean field describing if the tgui_text_input was closed by the user.
+ var/closed
+ /// Indicates the data type we want to collect ("text", "message", "num")
+ var/input_type = "text"
+
+/datum/tgui_input_dialog/New(mob/user, message, title, default, timeout)
+ src.title = title
+ src.message = message
+ // TODO - Do we need to sanitize the initial value for illegal characters?
+ src.initial = default
+ if (timeout)
+ src.timeout = timeout
+ start_time = world.time
+ QDEL_IN(src, timeout)
+
+/datum/tgui_input_dialog/Destroy(force, ...)
+ SStgui.close_uis(src)
+ . = ..()
+
+/**
+ * Waits for a user's response to the tgui_text_input's prompt before returning. Returns early if
+ * the window was closed by the user.
+ */
+/datum/tgui_input_dialog/proc/wait()
+ while (!choice && !closed)
+ stoplag(1)
+
+/datum/tgui_input_dialog/ui_interact(mob/user, datum/tgui/ui)
+ ui = SStgui.try_update_ui(user, src, ui)
+ if(!ui)
+ ui = new(user, src, "InputModal")
+ ui.open()
+
+/datum/tgui_input_dialog/ui_close(mob/user)
+ . = ..()
+ closed = TRUE
+
+/datum/tgui_input_dialog/ui_state(mob/user)
+ return GLOB.always_state
+
+/datum/tgui_input_dialog/ui_static_data(mob/user)
+ . = list(
+ "title" = title,
+ "message" = message,
+ "initial" = initial,
+ "input_type" = input_type
+ )
+
+/datum/tgui_input_dialog/ui_data(mob/user)
+ . = list()
+ if(timeout)
+ .["timeout"] = clamp((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS), 0, 1)
+
+/datum/tgui_input_dialog/ui_act(action, list/params)
+ . = ..()
+ if (.)
+ return
+ switch(action)
+ if("choose")
+ set_choice(params["choice"])
+ if(isnull(src.choice))
+ return
+ SStgui.close_uis(src)
+ return TRUE
+ if("cancel")
+ SStgui.close_uis(src)
+ closed = TRUE
+ return TRUE
+
+/datum/tgui_input_dialog/proc/set_choice(choice)
+ if(input_type == "num")
+ src.choice = text2num(choice)
+ return
+ src.choice = choice
+
+/**
+ * # async tgui_text_input
+ *
+ * An asynchronous version of tgui_text_input to be used with callbacks instead of waiting on user responses.
+ */
+/datum/tgui_input_dialog/async
+ /// The callback to be invoked by the tgui_text_input upon having a choice made.
+ var/datum/callback/callback
+
+/datum/tgui_input_dialog/async/New(mob/user, message, title, default, callback, timeout)
+ ..(user, title, message, default, timeout)
+ src.callback = callback
+
+/datum/tgui_input_dialog/async/Destroy(force, ...)
+ QDEL_NULL(callback)
+ . = ..()
+
+/datum/tgui_input_dialog/async/ui_close(mob/user)
+ . = ..()
+ qdel(src)
+
+/datum/tgui_input_dialog/async/set_choice(choice)
+ . = ..()
+ if(!isnull(src.choice))
+ callback?.InvokeAsync(src.choice)
+
+/datum/tgui_input_dialog/async/wait()
+ return
diff --git a/code/modules/tgui_panel/external.dm b/code/modules/tgui_panel/external.dm
index 89973a925d..3db779c758 100644
--- a/code/modules/tgui_panel/external.dm
+++ b/code/modules/tgui_panel/external.dm
@@ -17,7 +17,7 @@
nuke_chat()
// Failed to fix
- action = alert(src, "Did that work?", "", "Yes", "No, switch to old ui")
+ action = tgui_alert(src, "Did that work?", "", list("Yes", "No, switch to old ui"))
if (action == "No, switch to old ui")
winset(src, "output", "on-show=&is-disabled=0&is-visible=1")
winset(src, "browseroutput", "is-disabled=1;is-visible=0")
diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm
index eab1c55ca9..6434a694b1 100644
--- a/code/modules/vending/_vending.dm
+++ b/code/modules/vending/_vending.dm
@@ -1141,7 +1141,7 @@ GLOBAL_LIST_EMPTY(vending_products)
var/price = 1
/obj/item/price_tagger/attack_self(mob/user)
- price = max(1, round(input(user,"set price","price") as num|null, 1))
+ price = max(1, round(tgui_input_num(user,"set price","price"), 1))
to_chat(user, " The [src] will now give things a [price] cr tag.")
/obj/item/price_tagger/afterattack(atom/target, mob/user, proximity)
diff --git a/code/modules/vore/eating/living.dm b/code/modules/vore/eating/living.dm
index 6bc44e6489..f65ffd3f82 100644
--- a/code/modules/vore/eating/living.dm
+++ b/code/modules/vore/eating/living.dm
@@ -104,12 +104,12 @@
/mob/living/proc/feed_self_to_grabbed(var/mob/living/user, var/mob/living/pred)
pred.lazy_init_belly()
- var/belly = input("Choose Belly") in pred.vore_organs
+ var/belly = tgui_input_list(user, "Choose Belly", "", pred.vore_organs)
return perform_the_nom(user, user, pred, belly)
/mob/living/proc/feed_grabbed_to_other(var/mob/living/user, var/mob/living/prey, var/mob/living/pred)
pred.lazy_init_belly()
- var/belly = input("Choose Belly") in pred.vore_organs
+ var/belly = tgui_input_list(user, "Choose Belly", "", pred.vore_organs)
return perform_the_nom(user, prey, pred, belly)
//
@@ -226,7 +226,7 @@
//You're in a belly!
if(isbelly(loc))
var/obj/belly/B = loc
- var/confirm = alert(src, "You're in a mob. If you're otherwise unable to escape from a pred AFK for a long time, use this.", "Confirmation", "Okay", "Cancel")
+ var/confirm = tgui_alert(src, "You're in a mob. If you're otherwise unable to escape from a pred AFK for a long time, use this.", "Confirmation", list("Okay", "Cancel"))
if(!confirm == "Okay" || loc != B)
return
//Actual escaping
@@ -246,7 +246,7 @@
else if(istype(loc, /obj/item/dogborg/sleeper))
var/obj/item/dogborg/sleeper/belly = loc //The belly!
- var/confirm = alert(src, "You're in a dogborg sleeper. This is for escaping from preference-breaking or if your predator disconnects/AFKs. You can also resist out naturally too.", "Confirmation", "Okay", "Cancel")
+ var/confirm = tgui_alert(src, "You're in a dogborg sleeper. This is for escaping from preference-breaking or if your predator disconnects/AFKs. You can also resist out naturally too.", "Confirmation", list("Okay", "Cancel"))
if(!confirm == "Okay" || loc != belly)
return
//Actual escaping
diff --git a/code/modules/vore/eating/vorepanel.dm b/code/modules/vore/eating/vorepanel.dm
index 8e8cfc4935..6ea0693df2 100644
--- a/code/modules/vore/eating/vorepanel.dm
+++ b/code/modules/vore/eating/vorepanel.dm
@@ -222,7 +222,7 @@
if(host.vore_organs.len >= BELLIES_MAX)
return FALSE
- var/new_name = html_encode(input(usr,"New belly's name:","New Belly") as text|null)
+ var/new_name = html_encode(tgui_input_text(usr,"New belly's name:","New Belly"))
var/failure_msg
if(length(new_name) > BELLIES_NAME_MAX || length(new_name) < BELLIES_NAME_MIN)
@@ -283,7 +283,7 @@
unsaved_changes = FALSE
return TRUE
if("setflavor")
- var/new_flavor = html_encode(input(usr,"What your character tastes like (400ch limit). This text will be printed to the pred after 'X tastes of...' so just put something like 'strawberries and cream':","Character Flavor",host.vore_taste) as text|null)
+ var/new_flavor = html_encode(tgui_input_message(usr,"What your character tastes like (400ch limit). This text will be printed to the pred after 'X tastes of...' so just put something like 'strawberries and cream':","Character Flavor",host.vore_taste))
if(!new_flavor)
return FALSE
@@ -295,7 +295,7 @@
unsaved_changes = TRUE
return TRUE
if("setsmell")
- var/new_smell = html_encode(input(usr,"What your character smells like (400ch limit). This text will be printed to the pred after 'X smells of...' so just put something like 'strawberries and cream':","Character Smell",host.vore_smell) as text|null)
+ var/new_smell = html_encode(tgui_input_message(usr,"What your character smells like (400ch limit). This text will be printed to the pred after 'X smells of...' so just put something like 'strawberries and cream':","Character Smell",host.vore_smell))
if(!new_smell)
return FALSE
@@ -504,7 +504,7 @@
var/attr = params["attribute"]
switch(attr)
if("b_name")
- var/new_name = html_encode(input(usr,"Belly's new name:","New Name") as text|null)
+ var/new_name = html_encode(tgui_input_text(usr,"Belly's new name:","New Name", host.vore_selected.name))
var/failure_msg
if(length(new_name) > BELLIES_NAME_MAX || length(new_name) < BELLIES_NAME_MIN)
@@ -538,7 +538,7 @@
host.vore_selected.digest_mode = new_mode
. = TRUE
if("b_desc")
- var/new_desc = html_encode(input(usr,"Belly Description ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.desc) as message|null)
+ var/new_desc = html_encode(tgui_input_message(usr,"Belly Description ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.desc))
if(new_desc)
new_desc = readd_quotes(new_desc)
@@ -552,27 +552,27 @@
var/help = " Press enter twice to separate messages. '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. '%count' will be replaced with the number of anything in your belly (will not work for absorbed examine). '%countprey' will be replaced with the number of living prey in your belly (or absorbed prey for absorbed examine)."
switch(params["msgtype"])
if("dmp")
- var/new_message = input(user,"These are sent to prey when they expire. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Digest Message (to prey)",host.vore_selected.get_messages("dmp")) as message
+ var/new_message = tgui_input_message(user,"These are sent to prey when they expire. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Digest Message (to prey)",host.vore_selected.get_messages("dmp"))
if(new_message)
host.vore_selected.set_messages(new_message,"dmp")
if("dmo")
- var/new_message = input(user,"These are sent to you when prey expires in you. Write them in 2nd person ('you feel X'). Avoid using %pred in this type."+help,"Digest Message (to you)",host.vore_selected.get_messages("dmo")) as message
+ var/new_message = tgui_input_message(user,"These are sent to you when prey expires in you. Write them in 2nd person ('you feel X'). Avoid using %pred in this type."+help,"Digest Message (to you)",host.vore_selected.get_messages("dmo"))
if(new_message)
host.vore_selected.set_messages(new_message,"dmo")
if("smo")
- var/new_message = input(user,"These are sent to those nearby when prey struggles. Write them in 3rd person ('X's Y bulges')."+help,"Struggle Message (outside)",host.vore_selected.get_messages("smo")) as message
+ var/new_message = tgui_input_message(user,"These are sent to those nearby when prey struggles. Write them in 3rd person ('X's Y bulges')."+help,"Struggle Message (outside)",host.vore_selected.get_messages("smo"))
if(new_message)
host.vore_selected.set_messages(new_message,"smo")
if("smi")
- var/new_message = input(user,"These are sent to prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Struggle Message (inside)",host.vore_selected.get_messages("smi")) as message
+ var/new_message = tgui_input_message(user,"These are sent to prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Struggle Message (inside)",host.vore_selected.get_messages("smi"))
if(new_message)
host.vore_selected.set_messages(new_message,"smi")
if("em")
- var/new_message = input(user,"These are sent to people who examine you when this belly has contents. Write them in 3rd person ('Their %belly is bulging')."+help,"Examine Message (when full)",host.vore_selected.get_messages("em")) as message
+ var/new_message = tgui_input_message(user,"These are sent to people who examine you when this belly has contents. Write them in 3rd person ('Their %belly is bulging')."+help,"Examine Message (when full)",host.vore_selected.get_messages("em"))
if(new_message)
host.vore_selected.set_messages(new_message,"em")
@@ -587,7 +587,7 @@
host.vore_selected.emote_lists = initial(host.vore_selected.emote_lists)
. = TRUE
if("b_verb")
- var/new_verb = html_encode(input(usr,"New verb when eating (infinitive tense, e.g. nom or swallow):","New Verb") as text|null)
+ var/new_verb = html_encode(tgui_input_text(usr,"New verb when eating (infinitive tense, e.g. nom or swallow):","New Verb", host.vore_selected.vore_verb))
if(length(new_verb) > BELLIES_NAME_MAX || length(new_verb) < BELLIES_NAME_MIN)
tgui_alert_async(usr, "Entered verb length invalid (must be longer than [BELLIES_NAME_MIN], no longer than [BELLIES_NAME_MAX]).","Error")
@@ -626,7 +626,7 @@
host.vore_selected.can_taste = !host.vore_selected.can_taste
. = TRUE
if("b_bulge_size")
- var/new_bulge = input(user, "Choose the required size prey must be to show up on examine, ranging from 25% to 200% Set this to 0 for no text on examine.", "Set Belly Examine Size.") as num|null
+ var/new_bulge = tgui_input_num(user, "Choose the required size prey must be to show up on examine, ranging from 25% to 200% Set this to 0 for no text on examine.", "Set Belly Examine Size.", host.vore_selected.bulge_size)
if(new_bulge == null)
return FALSE
if(new_bulge == 0) //Disable.
@@ -650,17 +650,17 @@
host.vore_selected.escapable = 0
. = TRUE
if("b_escapechance")
- var/escape_chance_input = input(user, "Set prey escape chance on resist (as %)", "Prey Escape Chance") as num|null
+ var/escape_chance_input = tgui_input_num(user, "Set prey escape chance on resist (as %)", "Prey Escape Chance", host.vore_selected.escapechance)
if(!isnull(escape_chance_input)) //These have to be 'null' because both cancel and 0 are valid, separate options
host.vore_selected.escapechance = sanitize_integer(escape_chance_input, 0, 100, initial(host.vore_selected.escapechance))
. = TRUE
if("b_escapetime")
- var/escape_time_input = input(user, "Set number of seconds for prey to escape on resist (1-60)", "Prey Escape Time") as num|null
+ var/escape_time_input = tgui_input_num(user, "Set number of seconds for prey to escape on resist (1-60)", "Prey Escape Time", host.vore_selected.escapetime)
if(!isnull(escape_time_input))
host.vore_selected.escapetime = sanitize_integer(escape_time_input*10, 10, 600, initial(host.vore_selected.escapetime))
. = TRUE
if("b_transferchance")
- var/transfer_chance_input = input(user, "Set belly transfer chance on resist (as %). You must also set the location for this to have any effect.", "Prey Escape Time") as num|null
+ var/transfer_chance_input = tgui_input_num(user, "Set belly transfer chance on resist (as %). You must also set the location for this to have any effect.", "Prey Escape Time", host.vore_selected.transferchance)
if(!isnull(transfer_chance_input))
host.vore_selected.transferchance = sanitize_integer(transfer_chance_input, 0, 100, initial(host.vore_selected.transferchance))
. = TRUE
@@ -675,12 +675,12 @@
host.vore_selected.transferlocation = choice.name
. = TRUE
if("b_absorbchance")
- var/absorb_chance_input = input(user, "Set belly absorb mode chance on resist (as %)", "Prey Absorb Chance") as num|null
+ var/absorb_chance_input = tgui_input_num(user, "Set belly absorb mode chance on resist (as %)", "Prey Absorb Chance", host.vore_selected.absorbchance)
if(!isnull(absorb_chance_input))
host.vore_selected.absorbchance = sanitize_integer(absorb_chance_input, 0, 100, initial(host.vore_selected.absorbchance))
. = TRUE
if("b_digestchance")
- var/digest_chance_input = input(user, "Set belly digest mode chance on resist (as %)", "Prey Digest Chance") as num|null
+ var/digest_chance_input = tgui_input_num(user, "Set belly digest mode chance on resist (as %)", "Prey Digest Chance", host.vore_selected.digestchance)
if(!isnull(digest_chance_input))
host.vore_selected.digestchance = sanitize_integer(digest_chance_input, 0, 100, initial(host.vore_selected.digestchance))
. = TRUE
diff --git a/html/changelog.html b/html/changelog.html
index 2b6407735e..a8b3701bbd 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -50,6 +50,27 @@
-->
+
28 October 2021
+
Hatterhat updated:
+
+
Proto-kinetic gauntlets! Less straight damage, extra damage on backstabs, slows Lavaland fauna on counterhit. tweak: The glaive kit has been renamed to the premium kinetic melee kit, and now has a voucher for either a glaive or gauntlets.
+
NanoTrasen is rolling out a prototype Autoloom, hidden behind Botanical Engineering. It only processes cotton and logs. Despite its visual similarity to the recycler, it is entirely tamperproof.
+
+
Linzolle updated:
+
+
plasmamen now spawn in their proper outfit in the ghostcafe
+
+
Putnam3145 updated:
+
+
Removed minesweeper
+
+
keronshb updated:
+
+
-40 wound bonus for DSword
+
-20 Wound bonus for Hyper Eu
+
Fixes hyper eu's slowdown when it's not wielded
+
+
26 October 2021
WanderingFox95 updated:
@@ -490,12 +511,6 @@
grilles as maintenance loot
sevensune tail from hyperstation
-
-
26 August 2021
-
keronshb updated:
-
-
Adds catwalk floors
-
GoonStation 13 Development Team
diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml
index d4cc657b3d..5e72e5e4de 100644
--- a/html/changelogs/.all_changelog.yml
+++ b/html/changelogs/.all_changelog.yml
@@ -30167,3 +30167,20 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
WanderingFox95:
- rscadd: bone anvils and bone ingots
- imageadd: bone anvil sprites
+2021-10-28:
+ Hatterhat:
+ - rscadd: 'Proto-kinetic gauntlets! Less straight damage, extra damage on backstabs,
+ slows Lavaland fauna on counterhit. tweak: The glaive kit has been renamed to
+ the premium kinetic melee kit, and now has a voucher for either a glaive or
+ gauntlets.'
+ - rscadd: NanoTrasen is rolling out a prototype Autoloom, hidden behind Botanical
+ Engineering. It only processes cotton and logs. Despite its visual similarity
+ to the recycler, it is entirely tamperproof.
+ Linzolle:
+ - bugfix: plasmamen now spawn in their proper outfit in the ghostcafe
+ Putnam3145:
+ - rscdel: Removed minesweeper
+ keronshb:
+ - balance: -40 wound bonus for DSword
+ - balance: -20 Wound bonus for Hyper Eu
+ - bugfix: Fixes hyper eu's slowdown when it's not wielded
diff --git a/icons/mob/inhands/weapons/hammers_lefthand.dmi b/icons/mob/inhands/weapons/hammers_lefthand.dmi
index 988d64fde3..cb3ecd4e99 100644
Binary files a/icons/mob/inhands/weapons/hammers_lefthand.dmi and b/icons/mob/inhands/weapons/hammers_lefthand.dmi differ
diff --git a/icons/mob/inhands/weapons/hammers_righthand.dmi b/icons/mob/inhands/weapons/hammers_righthand.dmi
index 1e0e7c91bf..f3d9ca52b7 100644
Binary files a/icons/mob/inhands/weapons/hammers_righthand.dmi and b/icons/mob/inhands/weapons/hammers_righthand.dmi differ
diff --git a/icons/obj/mining.dmi b/icons/obj/mining.dmi
index f70f110078..e03f6e9b97 100644
Binary files a/icons/obj/mining.dmi and b/icons/obj/mining.dmi differ
diff --git a/icons/obj/stack_objects.dmi b/icons/obj/stack_objects.dmi
index 3136cf34b2..026612b144 100644
Binary files a/icons/obj/stack_objects.dmi and b/icons/obj/stack_objects.dmi differ
diff --git a/interface/interface.dm b/interface/interface.dm
index 2aece7cb6c..fdcc461b6d 100644
--- a/interface/interface.dm
+++ b/interface/interface.dm
@@ -24,7 +24,7 @@
set hidden = 1
var/forumurl = CONFIG_GET(string/forumurl)
if(forumurl)
- if(alert("This will open the forum in your browser. Are you sure?",,"Yes","No")!="Yes")
+ if(tgui_alert(src, "This will open the forum in your browser. Are you sure?",,list("Yes","No"))!="Yes")
return
src << link(forumurl)
else
@@ -37,7 +37,7 @@
set hidden = 1
var/rulesurl = CONFIG_GET(string/rulesurl)
if(rulesurl)
- if(alert("This will open the rules in your browser. Are you sure?",,"Yes","No")!="Yes")
+ if(tgui_alert(src, "This will open the rules in your browser. Are you sure?",,list("Yes","No"))!="Yes")
return
src << link(rulesurl)
else
@@ -50,7 +50,7 @@
set hidden = 1
var/githuburl = CONFIG_GET(string/githuburl)
if(githuburl)
- if(alert("This will open the Github repository in your browser. Are you sure?",,"Yes","No")!="Yes")
+ if(tgui_alert(src, "This will open the Github repository in your browser. Are you sure?",,list("Yes","No"))!="Yes")
return
src << link(githuburl)
else
@@ -67,7 +67,7 @@
if(GLOB.revdata.testmerge.len)
message += " The following experimental changes are active and are probably the cause of any new or sudden issues you may experience. If possible, please try to find a specific thread for your issue instead of posting to the general issue tracker: "
message += GLOB.revdata.GetTestMergeInfo(FALSE)
- if(tgalert(src, message, "Report Issue","Yes","No")!="Yes")
+ if(tgalert(src, message, "Report Issue","Yes","No")!="Yes") //Untouched, issues must be reported at all costs.
return
var/static/issue_template = file2text(".github/ISSUE_TEMPLATE.md")
var/servername = CONFIG_GET(string/servername)
diff --git a/modular_citadel/code/modules/mentor/mentor_memo.dm b/modular_citadel/code/modules/mentor/mentor_memo.dm
index 59ea92febd..24b7ed32d2 100644
--- a/modular_citadel/code/modules/mentor/mentor_memo.dm
+++ b/modular_citadel/code/modules/mentor/mentor_memo.dm
@@ -6,7 +6,7 @@
if(!SSdbcore.IsConnected())
to_chat(src, "Failed to establish database connection.", confidential = TRUE)
return
- var/memotask = input(usr,"Choose task.","Memo") in list("Show","Write","Edit","Remove")
+ var/memotask = tgui_input_list(usr,"Choose task.","Memo", list("Show","Write","Edit","Remove"))
if(!memotask)
return
mentor_memo_output(memotask)
@@ -43,7 +43,7 @@
return
qdel(query_memocheck)
- var/memotext = input(src,"Write your Memo","Memo") as message
+ var/memotext = tgui_input_message(src,"Write your Memo","Memo")
if(!memotext)
return
var/datum/db_query/query_memoadd = SSdbcore.NewQuery({"
@@ -73,7 +73,7 @@
if(!memolist.len)
to_chat(src, "No memos found in database.")
return
- var/target_ckey = input(src, "Select whose memo to edit", "Select memo") as null|anything in memolist
+ var/target_ckey = tgui_input_list(src, "Select whose memo to edit", "Select memo", memolist)
if(!target_ckey)
return
var/datum/db_query/query_memofind = SSdbcore.NewQuery({"
@@ -87,7 +87,7 @@
if(query_memofind.NextRow())
var/old_memo = query_memofind.item[1]
qdel(query_memofind)
- var/new_memo = input("Input new memo", "New Memo", "[old_memo]", null) as message
+ var/new_memo = tgui_input_message(src, "Input new memo", "New Memo", "[old_memo]")
if(!new_memo)
return
var/edit_text = "Edited by [ckey] on [SQLtime()] from [old_memo] to [new_memo]"
@@ -146,7 +146,7 @@
if(!memolist.len)
to_chat(src, "No memos found in database.")
return
- var/target_ckey = input(src, "Select whose mentor memo to delete", "Select mentor memo") as null|anything in memolist
+ var/target_ckey = tgui_input_list(src, "Select whose mentor memo to delete", "Select mentor memo", memolist)
if(!target_ckey)
return
var/datum/db_query/query_memodel = SSdbcore.NewQuery({"
diff --git a/modular_citadel/code/modules/mentor/mentorpm.dm b/modular_citadel/code/modules/mentor/mentorpm.dm
index 3260e96767..b99f1cdde1 100644
--- a/modular_citadel/code/modules/mentor/mentorpm.dm
+++ b/modular_citadel/code/modules/mentor/mentorpm.dm
@@ -10,7 +10,7 @@
targets["[T]"] = T
var/list/sorted = sortList(targets)
- var/target = input(src,"To whom shall we send a message?","Mentor PM",null) in sorted|null
+ var/target = tgui_input_list(src,"To whom shall we send a message?","Mentor PM",sorted)
cmd_mentor_pm(targets[target],null)
SSblackbox.record_feedback("tally", "Mentor_verb", 1, "APM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -36,7 +36,7 @@
//get message text, limit it's length.and clean/escape html
if(!msg)
- msg = input(src,"Message:", "Private message") as text|null
+ msg = tgui_input_text(src,"Message:", "Private message")
if(!msg)
if (is_mentor(whom))
diff --git a/modular_citadel/code/modules/projectiles/guns/ballistic/rifles.dm b/modular_citadel/code/modules/projectiles/guns/ballistic/rifles.dm
index e89bb92b33..eacb7a7038 100644
--- a/modular_citadel/code/modules/projectiles/guns/ballistic/rifles.dm
+++ b/modular_citadel/code/modules/projectiles/guns/ballistic/rifles.dm
@@ -98,7 +98,7 @@
wound_bonus = 15
sharpness = SHARP_EDGED
wound_falloff_tile = 0
-
+
///ammo casings (CASELESS AMMO CASINGS WOOOOOOOO)///
/obj/item/ammo_casing/caseless/flechetteap
@@ -239,7 +239,7 @@
if(user.incapacitated() || !istype(user))
to_chat(user, "You can't do that right now!")
return
- if(alert("Are you sure you want to recolor your gun?", "Confirm Repaint", "Yes", "No") == "Yes")
+ if(tgui_alert(user, "Are you sure you want to recolor your gun?", "Confirm Repaint", list("Yes", "No")) == "Yes")
var/body_color_input = input(usr,"","Choose Shroud Color",body_color) as color|null
if(body_color_input)
body_color = sanitize_hexcolor(body_color_input, desired_format=6, include_crunch=1)
diff --git a/modular_citadel/code/modules/projectiles/guns/energy/energy_gun.dm b/modular_citadel/code/modules/projectiles/guns/energy/energy_gun.dm
index 9a8ee4bab1..5a5f20652f 100644
--- a/modular_citadel/code/modules/projectiles/guns/energy/energy_gun.dm
+++ b/modular_citadel/code/modules/projectiles/guns/energy/energy_gun.dm
@@ -33,7 +33,7 @@
if(user.incapacitated() || !istype(user))
to_chat(user, "You can't do that right now!")
return
- if(alert("Are you sure you want to repaint your gun?", "Confirm Repaint", "Yes", "No") == "Yes")
+ if(tgui_alert(user, "Are you sure you want to repaint your gun?", "Confirm Repaint", list("Yes", "No")) == "Yes")
var/body_color_input = input(usr,"","Choose Body Color",body_color) as color|null
if(body_color_input)
body_color = sanitize_hexcolor(body_color_input, desired_format=6, include_crunch=1)
diff --git a/tgstation.dme b/tgstation.dme
index d79c1d1257..6fe19e9493 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -845,6 +845,7 @@
#include "code\game\machinery\announcement_system.dm"
#include "code\game\machinery\aug_manipulator.dm"
#include "code\game\machinery\autolathe.dm"
+#include "code\game\machinery\autoloom.dm"
#include "code\game\machinery\bank_machine.dm"
#include "code\game\machinery\Beacon.dm"
#include "code\game\machinery\bloodbankgen.dm"
@@ -927,7 +928,6 @@
#include "code\game\machinery\computer\telecrystalconsoles.dm"
#include "code\game\machinery\computer\teleporter.dm"
#include "code\game\machinery\computer\arcade\battle.dm"
-#include "code\game\machinery\computer\arcade\minesweeper.dm"
#include "code\game\machinery\computer\arcade\misc_arcade.dm"
#include "code\game\machinery\computer\arcade\orion_trail.dm"
#include "code\game\machinery\computer\prisoner\_prisoner.dm"
@@ -3611,6 +3611,7 @@
#include "code\modules\tgui\tgui.dm"
#include "code\modules\tgui\tgui_alert.dm"
#include "code\modules\tgui\tgui_input_list.dm"
+#include "code\modules\tgui\tgui_input_text.dm"
#include "code\modules\tgui\tgui_window.dm"
#include "code\modules\tgui\states\admin.dm"
#include "code\modules\tgui\states\always.dm"
diff --git a/tgui/packages/tgui/interfaces/InputModal.js b/tgui/packages/tgui/interfaces/InputModal.js
new file mode 100644
index 0000000000..1818abccda
--- /dev/null
+++ b/tgui/packages/tgui/interfaces/InputModal.js
@@ -0,0 +1,119 @@
+/**
+ * @file
+ * @copyright 2021 Leshana
+ * @license MIT
+ */
+
+import { clamp01 } from 'common/math';
+import { useBackend, useLocalState } from '../backend';
+import { Box, Button, Section, Input, Stack, TextArea } from '../components';
+import { KEY_ESCAPE } from 'common/keycodes';
+import { Window } from '../layouts';
+import { createLogger } from '../logging';
+
+const logger = createLogger('inputmodal');
+
+export const InputModal = (props, context) => {
+ const { act, data } = useBackend(context);
+ const { title, message, initial, input_type, timeout } = data;
+
+ // Current Input Value
+ const [curValue, setCurValue] = useLocalState(context, 'curValue', initial);
+
+ const handleKeyDown = e => {
+ if (e.keyCode === KEY_ESCAPE) {
+ e.preventDefault();
+ act("cancel");
+ return;
+ }
+ };
+
+ let initialHeight, initialWidth, canResize;
+ let modalBody;
+ switch (input_type) {
+ case 'text':
+ case 'num':
+ initialWidth = 325;
+ initialHeight = message ? Math.max(150, message.length) : 110;
+ canResize = false;
+ modalBody = (
+ {
+ setCurValue(val);
+ }}
+ onEnter={(_e, val) => {
+ act('choose', { choice: val });
+ }}
+ />
+ );
+ break;
+ case 'message':
+ initialWidth = 450;
+ initialHeight = 350;
+ canResize = true;
+ modalBody = (
+