Merge branch 'master' into editable-fat

This commit is contained in:
Heroman
2022-06-20 06:50:33 +10:00
411 changed files with 3484 additions and 7192 deletions
@@ -261,7 +261,7 @@
if("max")
target_pressure = max_pressure_setting
if("set")
var/new_pressure = input(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure Control",src.target_pressure) as num
var/new_pressure = tgui_input_number(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure Control",src.target_pressure,max_pressure_setting,0)
src.target_pressure = between(0, new_pressure, max_pressure_setting)
if("set_flow_rate")
@@ -272,7 +272,7 @@
if("max")
set_flow_rate = air1.volume
if("set")
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[air1.volume]L/s)","Flow Rate Control",src.set_flow_rate) as num
var/new_flow_rate = tgui_input_number(usr,"Enter new flow rate limit (0-[air1.volume]L/s)","Flow Rate Control",src.set_flow_rate,air1.volume,0)
src.set_flow_rate = between(0, new_flow_rate, air1.volume)
update_icon()
@@ -225,7 +225,7 @@ Thus, the two variables affect pump operation are set in New():
if("max")
target_pressure = max_pressure_setting
if("set")
var/new_pressure = input(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure control",src.target_pressure) as num
var/new_pressure = tgui_input_number(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure control",src.target_pressure,max_pressure_setting,0)
src.target_pressure = between(0, new_pressure, max_pressure_setting)
. = TRUE
@@ -170,7 +170,7 @@
if("set_flow_rate")
if(!configuring || use_power)
return
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate) as num
var/new_flow_rate = tgui_input_number(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate,max_flow_rate,0)
set_flow_rate = between(0, new_flow_rate, max_flow_rate)
. = TRUE
if("switch_mode")
@@ -183,7 +183,7 @@
. = TRUE
if(!configuring || use_power)
return
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate) as num
var/new_flow_rate = tgui_input_number(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate,max_flow_rate,0)
set_flow_rate = between(0, new_flow_rate, max_flow_rate)
if("switch_mode")
. = TRUE
@@ -265,7 +265,7 @@
if(non_locked < 1)
return
var/new_con = (input(usr,"Enter a new concentration (0-[round(remain_con * 100, 0.5)])%","Concentration control", min(remain_con, old_con)*100) as num) / 100
var/new_con = (tgui_input_number(usr,"Enter a new concentration (0-[round(remain_con * 100, 0.5)])%","Concentration control", min(remain_con, old_con)*100, round(remain_con * 100, 0.5), 0)) / 100
//cap it between 0 and the max remaining concentration
new_con = between(0, new_con, remain_con)
+3 -3
View File
@@ -147,7 +147,7 @@ var/global/vs_control/vsc = new
var/newvar = vw
switch(how)
if("Numeric")
newvar = input(user,"Enter a number:","Settings",newvar) as num
newvar = tgui_input_number(user,"Enter a number:","Settings",newvar)
if("Bit Flag")
var/flag = tgui_input_list(user,"Toggle which bit?","Settings", bitflags)
flag = text2num(flag)
@@ -158,9 +158,9 @@ var/global/vs_control/vsc = new
if("Toggle")
newvar = !newvar
if("Text")
newvar = input(user,"Enter a string:","Settings",newvar) as text
newvar = tgui_input_text(user,"Enter a string:","Settings",newvar)
if("Long Text")
newvar = input(user,"Enter text:","Settings",newvar) as message
newvar = tgui_input_text(user,"Enter text:","Settings",newvar, multiline = TRUE)
vw = newvar
if(ch in plc.settings)
plc.vars[ch] = vw
+15
View File
@@ -0,0 +1,15 @@
/*
* Cooldown system based on storing world.time on a variable, plus the cooldown time.
* Better performance over timer cooldowns, lower control. Same functionality.
*/
#define COOLDOWN_DECLARE(cd_index) var/##cd_index = 0
#define COOLDOWN_START(cd_source, cd_index, cd_time) (cd_source.cd_index = world.time + (cd_time))
//Returns true if the cooldown has run its course, false otherwise
#define COOLDOWN_FINISHED(cd_source, cd_index) (cd_source.cd_index < world.time)
#define COOLDOWN_RESET(cd_source, cd_index) cd_source.cd_index = 0
#define COOLDOWN_TIMELEFT(cd_source, cd_index) (max(0, cd_source.cd_index - world.time))
+4
View File
@@ -447,3 +447,7 @@
#define DEATHGASP_NO_MESSAGE "no message"
#define RESIST_COOLDOWN 2 SECONDS
#define VISIBLE_GENDER_FORCE_PLURAL 1 // Used by get_visible_gender to return PLURAL
#define VISIBLE_GENDER_FORCE_IDENTIFYING 2 // Used by get_visible_gender to return the mob's identifying gender
#define VISIBLE_GENDER_FORCE_BIOLOGICAL 3 // Used by get_visible_gender to return the mob's biological gender
+2
View File
@@ -5,6 +5,8 @@
/// Maximum ping timeout allowed to detect zombie windows
#define TGUI_PING_TIMEOUT 4 SECONDS
/// Used for rate-limiting to prevent DoS by excessively refreshing a TGUI window
#define TGUI_REFRESH_FULL_UPDATE_COOLDOWN 5 SECONDS
/// Window does not exist
#define TGUI_WINDOW_CLOSED 0
+30 -10
View File
@@ -476,23 +476,43 @@
#define gender2text(gender) capitalize(gender)
/// 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.
/**
* Used to get a properly sanitized input. Returns null if cancel is pressed.
*
* Arguments
** user - Target of the input prompt.
** message - The text inside of the prompt.
** title - The window title of the prompt.
** max_length - If you intend to impose a length limit - default is 1024.
** no_trim - Prevents the input from being trimmed 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/user_input = input(user, message, title, default) as text|null
if(isnull(user_input)) // User pressed cancel
return
if(no_trim)
return copytext(html_encode(name), 1, max_length)
return copytext(html_encode(user_input), 1, max_length)
else
return trim(html_encode(name), max_length) //trim is "outside" because html_encode can expand single symbols into multiple symbols (such as turning < into &lt;)
return trim(html_encode(user_input), max_length) //trim is "outside" because html_encode can expand single symbols into multiple symbols (such as turning < into &lt;)
// Used to get a properly sanitized multiline input, of max_length
/**
* Used to get a properly sanitized input in a larger box. Works very similarly to stripped_input.
*
* Arguments
** user - Target of the input prompt.
** message - The text inside of the prompt.
** title - The window title of the prompt.
** max_length - If you intend to impose a length limit - default is 1024.
** no_trim - Prevents the input from being trimmed if you intend to parse newlines or whitespace.
*/
/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/user_input = input(user, message, title, default) as message|null
if(isnull(user_input)) // User pressed cancel
return
if(no_trim)
return copytext(html_encode(name), 1, max_length)
return copytext(html_encode(user_input), 1, max_length)
else
return trim(html_encode(name), max_length)
return trim(html_encode(user_input), max_length)
//Adds 'char' ahead of 'text' until there are 'count' characters total
/proc/add_leading(text, count, char = " ")
+2 -2
View File
@@ -344,7 +344,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/newname
for(var/i=1,i<=3,i++) //we get 3 attempts to pick a suitable name.
newname = input(src,"You are \a [role]. Would you like to change your name to something else?", "Name change",oldname) as text
newname = tgui_input_text(src,"You are \a [role]. Would you like to change your name to something else?", "Name change",oldname)
if((world.time-time_passed)>3000)
return //took too long
newname = sanitizeName(newname, ,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters.
@@ -1364,7 +1364,7 @@ var/mob/dview/dview_mob = new
/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(usr, "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)
+2 -2
View File
@@ -114,7 +114,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
@@ -133,7 +133,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
+2 -2
View File
@@ -350,13 +350,13 @@ SUBSYSTEM_DEF(game_master)
choose_game_master(usr)
if(href_list["set_staleness"])
var/amount = input(usr, "How much staleness should there be?", "Game Master") as null|num
var/amount = tgui_input_number(usr, "How much staleness should there be?", "Game Master")
if(!isnull(amount))
staleness = amount
message_admins("GM staleness was set to [amount] by [usr.key].")
if(href_list["set_danger"])
var/amount = input(usr, "How much danger should there be?", "Game Master") as null|num
var/amount = tgui_input_number(usr, "How much danger should there be?", "Game Master")
if(!isnull(amount))
danger = amount
message_admins("GM danger was set to [amount] by [usr.key].")
+6 -6
View File
@@ -74,7 +74,7 @@ SUBSYSTEM_DEF(media_tracks)
return
// Required
var/url = input(C, "REQUIRED: Provide URL for track, or paste JSON if you know what you're doing. See code comments.", "Track URL") as message|null
var/url = tgui_input_text(C, "REQUIRED: Provide URL for track, or paste JSON if you know what you're doing. See code comments.", "Track URL", multiline = TRUE)
if(!url)
return
@@ -112,20 +112,20 @@ SUBSYSTEM_DEF(media_tracks)
sort_tracks()
return
var/title = input(C, "REQUIRED: Provide title for track", "Track Title") as text|null
var/title = tgui_input_text(C, "REQUIRED: Provide title for track", "Track Title")
if(!title)
return
var/duration = input(C, "REQUIRED: Provide duration for track (in deciseconds, aka seconds*10)", "Track Duration") as num|null
var/duration = tgui_input_number(C, "REQUIRED: Provide duration for track (in deciseconds, aka seconds*10)", "Track Duration")
if(!duration)
return
// Optional
var/artist = input(C, "Optional: Provide artist for track", "Track Artist") as text|null
var/artist = tgui_input_text(C, "Optional: Provide artist for track", "Track Artist")
if(isnull(artist)) // Cancel rather than empty string
return
var/genre = input(C, "Optional: Provide genre for track (try to match an existing one)", "Track Genre") as text|null
var/genre = tgui_input_text(C, "Optional: Provide genre for track (try to match an existing one)", "Track Genre")
if(isnull(genre)) // Cancel rather than empty string
return
@@ -160,7 +160,7 @@ SUBSYSTEM_DEF(media_tracks)
if(!check_rights(R_DEBUG|R_FUN))
return
var/track = input(C, "Input track title or URL to remove (must be exact)", "Remove Track") as text|null
var/track = tgui_input_text(C, "Input track title or URL to remove (must be exact)", "Remove Track")
if(!track)
return
+3 -3
View File
@@ -363,15 +363,15 @@ SUBSYSTEM_DEF(supply)
// Will add an item entry to the specified export receipt on the user-side list
/datum/controller/subsystem/supply/proc/add_export_item(var/datum/exported_crate/E, var/mob/user)
var/new_name = input(user, "Name", "Please enter the name of the item.") as null|text
var/new_name = tgui_input_text(user, "Name", "Please enter the name of the item.")
if(!new_name)
return
var/new_quantity = input(user, "Name", "Please enter the quantity of the item.") as null|num
var/new_quantity = tgui_input_number(user, "Name", "Please enter the quantity of the item.")
if(!new_quantity)
return
var/new_value = input(user, "Name", "Please enter the value of the item.") as null|num
var/new_value = tgui_input_number(user, "Name", "Please enter the value of the item.")
if(!new_value)
return
+2 -2
View File
@@ -231,11 +231,11 @@ SUBSYSTEM_DEF(vote)
choices.Add(antag.role_text)
choices.Add("None")
if(VOTE_CUSTOM)
question = sanitizeSafe(input(usr, "What is the vote for?") as text|null)
question = sanitizeSafe(tgui_input_text(usr, "What is the vote for?"))
if(!question)
return 0
for(var/i = 1 to 10)
var/option = capitalize(sanitize(input(usr, "Please enter an option or hit cancel to finish") as text|null))
var/option = capitalize(sanitize(tgui_input_text(usr, "Please enter an option or hit cancel to finish")))
if(!option || mode || !usr.client)
break
choices.Add(option)
+1 -1
View File
@@ -68,7 +68,7 @@
names += componentsubtypes
names += "---Elements---"
names += sortTim(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
var/result = input(usr, "Choose a component/element to add:", "Add Component/Element", names)
var/result = tgui_input_text(usr, "Choose a component/element to add:", "Add Component/Element", names)
if(!usr || !result || result == "---Components---" || result == "---Elements---")
return
if(QDELETED(src))
@@ -99,7 +99,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
if(href_list["feedback_edit_body"])
// This is deliberately not sanitized here, and is instead checked when hitting the submission button,
// as we want to give the user a chance to fix it without needing to rewrite the whole thing.
feedback_body = input(my_client, "Please write your feedback here.", "Feedback Body", feedback_body) as null|message
feedback_body = tgui_input_text(my_client, "Please write your feedback here.", "Feedback Body", feedback_body, multiline = TRUE)
display() // Refresh the window with new information.
return
@@ -132,29 +132,29 @@
return
if(href_list["filter_id"])
var/id_to_search = input(my_client, "Write feedback ID here.", "Filter by ID", null) as null|num
var/id_to_search = tgui_input_number(my_client, "Write feedback ID here.", "Filter by ID", null)
if(id_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_ID, id_to_search, TRUE)
if(href_list["filter_author"])
var/author_to_search = input(my_client, "Write desired key or hash here. Partial keys/hashes are allowed.", "Filter by Author", null) as null|text
var/author_to_search = tgui_input_text(my_client, "Write desired key or hash here. Partial keys/hashes are allowed.", "Filter by Author", null)
if(author_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_AUTHOR, author_to_search)
if(href_list["filter_topic"])
var/topic_to_search = input(my_client, "Write desired topic here. Partial topics are allowed. \
\nThe current topics in the config are [english_list(config.sqlite_feedback_topics)].", "Filter by Topic", null) as null|text
var/topic_to_search = tgui_input_text(my_client, "Write desired topic here. Partial topics are allowed. \
\nThe current topics in the config are [english_list(config.sqlite_feedback_topics)].", "Filter by Topic", null)
if(topic_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_TOPIC, topic_to_search)
if(href_list["filter_content"])
var/content_to_search = input(my_client, "Write desired content to find here. Partial matches are allowed.", "Filter by Content", null) as null|message
var/content_to_search = tgui_input_text(my_client, "Write desired content to find here. Partial matches are allowed.", "Filter by Content", null, multiline = TRUE)
if(content_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_CONTENT, content_to_search)
if(href_list["filter_datetime"])
var/datetime_to_search = input(my_client, "Write desired datetime. Partial matches are allowed.\n\
Format is 'YYYY-MM-DD HH:MM:SS'.", "Filter by Datetime", null) as null|text
var/datetime_to_search = tgui_input_text(my_client, "Write desired datetime. Partial matches are allowed.\n\
Format is 'YYYY-MM-DD HH:MM:SS'.", "Filter by Datetime", null)
if(datetime_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_DATETIME, datetime_to_search)
+5 -5
View File
@@ -190,7 +190,7 @@
assigned_role = new_role
else if (href_list["memory_edit"])
var/new_memo = sanitize(input("Write new memory", "Memory", memory) as null|message)
var/new_memo = sanitize(tgui_input_text(usr, "Write new memory", "Memory", memory, multiline = TRUE))
if (isnull(new_memo)) return
memory = new_memo
@@ -198,7 +198,7 @@
var/datum/mind/mind = locate(href_list["amb_edit"])
if(!mind)
return
var/new_ambition = input("Enter a new ambition", "Memory", mind.ambitions) as null|message
var/new_ambition = tgui_input_text(usr, "Enter a new ambition", "Memory", mind.ambitions, multiline = TRUE)
if(isnull(new_ambition))
return
if(mind)
@@ -296,7 +296,7 @@
if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]"))
def_num = objective.target_amount
var/target_number = input("Input target number:", "Objective", def_num) as num|null
var/target_number = tgui_input_number(usr, "Input target number:", "Objective", def_num)
if (isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist.
return
@@ -314,7 +314,7 @@
new_objective.target_amount = target_number
if ("custom")
var/expl = sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null)
var/expl = sanitize(tgui_input_text(usr, "Custom objective:", "Objective", objective ? objective.explanation_text : ""))
if (!expl) return
new_objective = new /datum/objective
new_objective.owner = src
@@ -410,7 +410,7 @@
// var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink() No longer needed, uses stored in mind
var/crystals
crystals = tcrystals
crystals = input("Amount of telecrystals for [key]", crystals) as null|num
crystals = tgui_input_number(usr, "Amount of telecrystals for [key]", crystals)
if (!isnull(crystals))
tcrystals = crystals
+8 -6
View File
@@ -66,17 +66,19 @@
/obj/fiftyspawner/tealcarpet
)
/datum/supply_pack/materials/arcade_carpet
name = "Retro carpets"
/datum/supply_pack/materials/retrocarpet
name = "Retro carpet"
containertype = /obj/structure/closet/crate/grayson
containername = "Retro carpets crate"
containername = "Retro carpet crate"
cost = 15
contains = list(
/obj/fiftyspawner/decocarpet,
/obj/fiftyspawner/retrocarpet
/obj/fiftyspawner/geocarpet,
/obj/fiftyspawner/retrocarpet,
/obj/fiftyspawner/retrocarpet_red,
/obj/fiftyspawner/happycarpet
)
/datum/supply_pack/misc/linoleum
/datum/supply_pack/materials/linoleum
name = "Linoleum"
containertype = /obj/structure/closet/crate/grayson
containername = "Linoleum crate"
+14 -2
View File
@@ -9,18 +9,30 @@
/datum/supply_pack/supply/food
name = "Kitchen supply crate"
contains = list(
/obj/item/weapon/reagent_containers/food/condiment/flour = 6,
/obj/item/weapon/reagent_containers/food/condiment/carton/flour = 6,
/obj/item/weapon/reagent_containers/food/drinks/milk = 3,
/obj/item/weapon/reagent_containers/food/drinks/soymilk = 2,
/obj/item/weapon/storage/fancy/egg_box = 2,
/obj/item/weapon/reagent_containers/food/snacks/tofu = 4,
/obj/item/weapon/reagent_containers/food/snacks/meat = 4,
/obj/item/weapon/reagent_containers/food/condiment/yeast = 3
/obj/item/weapon/reagent_containers/food/condiment/yeast = 3,
/obj/item/weapon/reagent_containers/food/condiment/sprinkles = 1
)
cost = 10
containertype = /obj/structure/closet/crate/freezer/centauri
containername = "Food crate"
/datum/supply_pack/supply/fancyfood
name = "Artisanal food delivery"
contains = list(
/obj/item/weapon/reagent_containers/food/condiment/carton/flour/rustic = 6,
/obj/item/weapon/reagent_containers/food/condiment/carton/sugar/rustic = 6
)
cost = 25
containertype = /obj/structure/closet/crate/freezer/centauri
containername = "Artisanal food crate"
/datum/supply_pack/supply/toner
name = "Toner cartridges"
contains = list(/obj/item/device/toner = 6)
+2 -2
View File
@@ -16,10 +16,10 @@
item_cost = 20
/datum/uplink_item/abstract/announcements/fake_centcom/extra_args(var/mob/user)
var/title = sanitize(input(usr, "Enter your announcement title.", "Announcement Title") as null|text)
var/title = sanitize(tgui_input_text(usr, "Enter your announcement title.", "Announcement Title"))
if(!title)
return
var/message = sanitize(input(usr, "Enter your announcement message.", "Announcement Title") as null|text)
var/message = sanitize(tgui_input_text(usr, "Enter your announcement message.", "Announcement Title"))
if(!message)
return
return list("title" = title, "message" = message)
+1 -1
View File
@@ -118,7 +118,7 @@
/datum/antagonist/proc/set_antag_name(var/mob/living/player)
// Choose a name, if any.
var/newname = sanitize(input(player, "You are a [role_text]. Would you like to change your name to something else?", "Name change") as null|text, MAX_NAME_LEN)
var/newname = sanitize(tgui_input_text(player, "You are a [role_text]. Would you like to change your name to something else?", "Name change", null, MAX_NAME_LEN), MAX_NAME_LEN)
if (newname)
player.real_name = newname
player.name = player.real_name
@@ -41,9 +41,9 @@
to_chat(src, "<span class='warning'>While you may perhaps have goals, this verb's meant to only be visible \
to antagonists. Please make a bug report!</span>")
return
var/new_ambitions = input(src, "Write a short sentence of what your character hopes to accomplish \
var/new_ambitions = tgui_input_text(src, "Write a short sentence of what your character hopes to accomplish \
today as an antagonist. Remember that this is purely optional. It will be shown at the end of the \
round for everybody else.", "Ambitions", mind.ambitions) as null|message
round for everybody else.", "Ambitions", mind.ambitions, multiline = TRUE)
if(isnull(new_ambitions))
return
new_ambitions = sanitize(new_ambitions)
+1 -1
View File
@@ -97,7 +97,7 @@ var/datum/antagonist/rogue_ai/malf
testing("rogue_ai set_antag_name called on non-silicon mob [player]!")
return
// Choose a name, if any.
var/newname = sanitize(input(player, "You are a [role_text]. Would you like to change your name to something else?", "Name change") as null|text, MAX_NAME_LEN)
var/newname = sanitize(tgui_input_text(player, "You are a [role_text]. Would you like to change your name to something else?", "Name change", null, MAX_NAME_LEN), MAX_NAME_LEN)
if (newname)
player.SetName(newname)
if(player.mind) player.mind.name = player.name
+4 -4
View File
@@ -27,7 +27,7 @@
// Overlays
///Our local copy of (non-priority) overlays without byond magic. Use procs in SSoverlays to manipulate
var/list/our_overlays
var/list/our_overlays
///Overlays that should remain on top and not normally removed when using cut_overlay functions, like c4.
var/list/priority_overlays
///vis overlays managed by SSvis_overlays to automaticaly turn them like other overlays
@@ -35,7 +35,7 @@
///Our local copy of filter data so we can add/remove it
var/list/filter_data
//Detective Work, used for the duplicate data points kept in the scanners
var/list/original_atom
// Track if we are already had initialize() called to prevent double-initialization.
@@ -681,7 +681,7 @@
if(!isnull(.))
datum_flags |= DF_VAR_EDITED
return
. = ..()
/atom/proc/atom_say(message)
@@ -716,7 +716,7 @@
. = ..()
SEND_SIGNAL(src, COMSIG_ATOM_EXITED, AM, new_loc)
/atom/proc/get_visible_gender()
/atom/proc/get_visible_gender(mob/user, force)
return gender
/atom/proc/interact(mob/user)
+1 -1
View File
@@ -19,7 +19,7 @@
if(!holder) return
var/choice = input(usr, "Which Z-level do you wish to set the base turf for?") as num|null
var/choice = tgui_input_number(usr, "Which Z-level do you wish to set the base turf for?")
if(!choice)
return
@@ -22,7 +22,7 @@
to_chat(src, "<span class='notice'>We return our vocal glands to their original location.</span>")
return
var/mimic_voice = sanitize(input(usr, "Enter a name to mimic.", "Mimic Voice", null), MAX_NAME_LEN)
var/mimic_voice = sanitize(tgui_input_text(usr, "Enter a name to mimic.", "Mimic Voice", null, MAX_NAME_LEN), MAX_NAME_LEN)
if(!mimic_voice)
return
+1 -1
View File
@@ -611,7 +611,7 @@ var/list/sacrificed = list()
// returns 0 if the rune is not used. returns 1 if the rune is used.
/obj/effect/rune/proc/communicate()
. = 1 // Default output is 1. If the rune is deleted it will return 1
var/input = input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "")//sanitize() below, say() and whisper() have their own
var/input = tgui_input_text(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "")//sanitize() below, say() and whisper() have their own
if(!input)
if (istype(src))
fizzle()
@@ -214,8 +214,8 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t
Holiday = list()
var/H = input(src,"What holiday is it today?","Set Holiday") as text
var/B = input(src,"Now explain what the holiday is about","Set Holiday") as message
var/H = tgui_input_text(src,"What holiday is it today?","Set Holiday")
var/B = tgui_input_text(src,"Now explain what the holiday is about","Set Holiday", multiline = TRUE)
Holiday[H] = B
+4 -4
View File
@@ -59,23 +59,23 @@ var/global/list/additional_antag_types = list()
var/choice = ""
switch(href_list["set"])
if("shuttle_delay")
choice = input(usr, "Enter a new shuttle delay multiplier") as num
choice = tgui_input_number(usr, "Enter a new shuttle delay multiplier", null, null, 20, 1)
if(!choice || choice < 1 || choice > 20)
return
shuttle_delay = choice
if("antag_scaling")
choice = input(usr, "Enter a new antagonist cap scaling coefficient.") as num
choice = tgui_input_number(usr, "Enter a new antagonist cap scaling coefficient.", null, null, 100, 0)
if(isnull(choice) || choice < 0 || choice > 100)
return
antag_scaling_coeff = choice
if("event_modifier_moderate")
choice = input(usr, "Enter a new moderate event time modifier.") as num
choice = tgui_input_number(usr, "Enter a new moderate event time modifier.", null, null, 100, 0)
if(isnull(choice) || choice < 0 || choice > 100)
return
event_delay_mod_moderate = choice
refresh_event_modifiers()
if("event_modifier_severe")
choice = input(usr, "Enter a new moderate event time modifier.") as num
choice = tgui_input_number(usr, "Enter a new moderate event time modifier.", null, null, 100, 0)
if(isnull(choice) || choice < 0 || choice > 100)
return
event_delay_mod_major = choice
@@ -93,8 +93,8 @@
if(!ability_prechecks(user, price))
return
var/title = input(usr, "Select message title: ")
var/text = input(usr, "Select message text: ")
var/title = tgui_input_text(usr, "Select message title: ")
var/text = tgui_input_text(usr, "Select message text: ")
if(!title || !text || !ability_pay(user, price))
to_chat(user, "Hack Aborted")
return
+3 -3
View File
@@ -124,10 +124,10 @@
if("Location")
mode = 1
var/locationx = input(usr, "Please input the x coordinate to search for.", "Location?" , "") as num
var/locationx = tgui_input_number(usr, "Please input the x coordinate to search for.", "Location?" , "")
if(!locationx || !(usr in view(1,src)))
return
var/locationy = input(usr, "Please input the y coordinate to search for.", "Location?" , "") as num
var/locationy = tgui_input_number(usr, "Please input the y coordinate to search for.", "Location?" , "")
if(!locationy || !(usr in view(1,src)))
return
@@ -160,7 +160,7 @@
to_chat(usr, "You set the pinpointer to locate [targetitem]")
if("DNA")
var/DNAstring = input(usr, "Input DNA string to search for." , "Please Enter String." , "")
var/DNAstring = tgui_input_text(usr, "Input DNA string to search for." , "Please Enter String." , "")
if(!DNAstring)
return
for(var/mob/living/carbon/M in mob_list)
+1 -1
View File
@@ -481,7 +481,7 @@ var/global/list/all_objectives = list()
var/tmp_obj = new custom_target
var/custom_name = tmp_obj:name
qdel(tmp_obj)
custom_name = sanitize(input(usr, "Enter target name:", "Objective target", custom_name) as text|null)
custom_name = sanitize(tgui_input_text(usr, "Enter target name:", "Objective target", custom_name))
if (!custom_name) return
target_name = custom_name
steal_target = custom_target
@@ -49,12 +49,12 @@
if("Cancel")
return
if("Speak")
var/what_to_say = input(user, "What do you want \the [illusion] to say?","Illusion Speak") as null|text
var/what_to_say = tgui_input_text(user, "What do you want \the [illusion] to say?","Illusion Speak")
//what_to_say = sanitize(what_to_say) //Sanitize occurs inside say() already.
if(what_to_say)
illusion.say(what_to_say)
if("Emote")
var/what_to_emote = input(user, "What do you want \the [illusion] to do?","Illusion Emote") as null|text
var/what_to_emote = tgui_input_text(user, "What do you want \the [illusion] to do?","Illusion Emote")
if(what_to_emote)
illusion.emote(what_to_emote)
+3 -3
View File
@@ -38,7 +38,7 @@
/datum/job/chaplain/proc/religion_prompts(mob/living/carbon/human/H, obj/item/weapon/storage/bible/B, obj/item/weapon/card/id/I)
var/religion_name = "Unitarianism"
var/new_religion = sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Unitarianism", "Name change", religion_name), MAX_NAME_LEN)
var/new_religion = sanitize(tgui_input_text(H, "You are the crew services officer. Would you like to change your religion? Default is Unitarianism", "Name change", religion_name, MAX_NAME_LEN), MAX_NAME_LEN)
if(!new_religion)
new_religion = religion_name
@@ -79,12 +79,12 @@
B.name = "The Holy Book of [new_religion]"
var/deity_name = "Hashem"
var/new_deity = sanitize(input(H, "Would you like to change your deity? Default is Hashem", "Name change", deity_name), MAX_NAME_LEN)
var/new_deity = sanitize(tgui_input_text(H, "Would you like to change your deity? Default is Hashem", "Name change", deity_name, MAX_NAME_LEN), MAX_NAME_LEN)
if((length(new_deity) == 0) || (new_deity == "Hashem"))
new_deity = deity_name
var/new_title = sanitize(input(H, "Would you like to change your title?", "Title Change", I.assignment), MAX_NAME_LEN)
var/new_title = sanitize(tgui_input_text(H, "Would you like to change your title?", "Title Change", I.assignment, MAX_NAME_LEN), MAX_NAME_LEN)
var/list/all_jobs = get_job_datums()
+2 -2
View File
@@ -675,7 +675,7 @@
var/list/selected = TLV["temperature"]
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
var/min_temperature = max(selected[2] - T0C, MIN_TEMPERATURE)
var/input_temperature = input(usr, "What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C) as num|null
var/input_temperature = tgui_input_number(usr, "What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C, max_temperature, min_temperature)
if(isnum(input_temperature))
if(input_temperature > max_temperature || input_temperature < min_temperature)
to_chat(usr, "Temperature must be between [min_temperature]C and [max_temperature]C")
@@ -729,7 +729,7 @@
var/env = params["env"]
var/name = params["var"]
var/value = input(usr, "New [name] for [env]:", name, TLV[env][name]) as num|null
var/value = tgui_input_number(usr, "New [name] for [env]:", name, TLV[env][name])
if(!isnull(value) && !..())
if(value < 0)
TLV[env][name] = -1
+1 -1
View File
@@ -47,7 +47,7 @@
turn_off()
return
if(istype(I, /obj/item/device/multitool))
var/new_temp = input(usr, "Input a new target temperature, in degrees C.","Target Temperature", 20) as num
var/new_temp = tgui_input_number(usr, "Input a new target temperature, in degrees C.","Target Temperature", 20)
if(!Adjacent(user) || user.incapacitated())
return
new_temp = convert_c2k(new_temp)
+1 -1
View File
@@ -332,7 +332,7 @@ update_flag
pressure = 10*ONE_ATMOSPHERE
. = TRUE
else if(pressure == "input")
pressure = input(usr, "New release pressure ([ONE_ATMOSPHERE/10]-[10*ONE_ATMOSPHERE] kPa):", name, release_pressure) as num|null
pressure = tgui_input_number(usr, "New release pressure ([ONE_ATMOSPHERE/10]-[10*ONE_ATMOSPHERE] kPa):", name, release_pressure, 10*ONE_ATMOSPHERE, ONE_ATMOSPHERE/10)
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
+1 -1
View File
@@ -176,7 +176,7 @@
if(!isnull(materials.get_material_amount(material)) && materials.get_material_amount(material) < round(making.resources[material] * coeff))
max_sheets = 0
//Build list of multipliers for sheets.
multiplier = input(usr, "How many do you want to print? (0-[max_sheets])") as num|null
multiplier = tgui_input_number(usr, "How many do you want to print? (0-[max_sheets])", null, null, max_sheets, 0)
if(!multiplier || multiplier <= 0 || multiplier > max_sheets || tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
@@ -80,7 +80,7 @@
if(W.is_screwdriver())
playsound(src, W.usesound, 50, 1)
var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: "+using_map.station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_DEFAULT))
var/input = sanitize(tgui_input_text(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: "+using_map.station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_DEFAULT))
if(!input)
to_chat(usr, "No input found please hang up and try your call again.")
return
@@ -92,7 +92,7 @@
var/area/camera_area = get_area(src)
var/temptag = "[sanitize(camera_area.name)] ([rand(1, 999)])"
input = sanitizeSafe(input(usr, "How would you like to name the camera?", "Set Camera Name", camera_name ? camera_name : temptag), MAX_NAME_LEN)
input = sanitizeSafe(tgui_input_text(usr, "How would you like to name the camera?", "Set Camera Name", camera_name ? camera_name : temptag), MAX_NAME_LEN)
state = 4
var/obj/machinery/camera/C = new(src.loc)
+1 -1
View File
@@ -1182,7 +1182,7 @@
// Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is
// empty at high security levels
if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
var/attempt_pin = input(usr, "Enter pin code", "Vendor transaction") as num
var/attempt_pin = tgui_input_number(usr, "Enter pin code", "Vendor transaction")
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
if(!customer_account)
+1 -1
View File
@@ -205,7 +205,7 @@
if(is_authenticated() && modify)
var/t1 = params["assign_target"]
if(t1 == "Custom")
var/temp_t = sanitize(input(usr, "Enter a custom job assignment.","Assignment"), 45)
var/temp_t = sanitize(tgui_input_text(usr, "Enter a custom job assignment.","Assignment"), 45)
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && modify)
modify.assignment = temp_t
+3 -3
View File
@@ -170,15 +170,15 @@
mode = params["mode"]
if("giv_name")
var/nam = sanitizeName(input(usr, "Person pass is issued to", "Name", giv_name) as text|null)
var/nam = sanitizeName(tgui_input_text(usr, "Person pass is issued to", "Name", giv_name))
if(nam)
giv_name = nam
if("reason")
var/reas = sanitize(input(usr, "Reason why pass is issued", "Reason", reason) as text|null)
var/reas = sanitize(tgui_input_text(usr, "Reason why pass is issued", "Reason", reason))
if(reas)
reason = reas
if("duration")
var/dur = input(usr, "Duration (in minutes) during which pass is valid (up to 360 minutes).", "Duration") as num|null //VOREStation Edit
var/dur = tgui_input_number(usr, "Duration (in minutes) during which pass is valid (up to 360 minutes).", "Duration", null, 360, 0)
if(dur)
if(dur > 0 && dur <= 360) //VOREStation Edit
duration = dur
+3 -3
View File
@@ -243,10 +243,10 @@
. = TRUE
//Change the password - KEY REQUIRED
if("pass")
var/dkey = trim(input(usr, "Please enter the current decryption key.") as text|null)
var/dkey = trim(tgui_input_text(usr, "Please enter the current decryption key."))
if(dkey && dkey != "")
if(linkedServer.decryptkey == dkey)
var/newkey = trim(input(usr,"Please enter the new key (3 - 16 characters max):"))
var/newkey = trim(tgui_input_text(usr,"Please enter the new key (3 - 16 characters max):",null,null,16))
if(length(newkey) <= 3)
set_temp("NOTICE: Decryption key too short!", "average")
else if(length(newkey) > 16)
@@ -325,7 +325,7 @@
. = TRUE
if("addtoken")
linkedServer.spamfilter += input(usr,"Enter text you want to be filtered out","Token creation") as text|null
linkedServer.spamfilter += tgui_input_text(usr,"Enter text you want to be filtered out","Token creation")
. = TRUE
if("deltoken")
+1 -1
View File
@@ -82,7 +82,7 @@
to_chat(usr, "Unauthorized Access.")
. = TRUE
if("warn")
var/warning = sanitize(input(usr, "Message:", "Enter your message here!", ""))
var/warning = sanitize(tgui_input_text(usr, "Message:", "Enter your message here!", ""))
if(!warning)
return
var/obj/item/weapon/implant/I = locate(params["imp"])
+6 -6
View File
@@ -221,12 +221,12 @@
visible_message("<span class='warning'>[src]'s monitor flashes, \"[reqtime - world.time] seconds remaining until another requisition form may be printed.\"</span>")
return FALSE
var/amount = clamp(input(usr, "How many crates? (0 to 20)") as num|null, 0, 20)
var/amount = clamp(tgui_input_number(usr, "How many crates? (0 to 20)", null, null, 20, 0), 0, 20)
if(!amount)
return FALSE
var/timeout = world.time + 600
var/reason = sanitize(input(usr, "Reason:","Why do you require this item?","") as null|text)
var/reason = sanitize(tgui_input_text(usr, "Reason:","Why do you require this item?",""))
if(world.time > timeout)
to_chat(usr, "<span class='warning'>Error. Request timed out.</span>")
return FALSE
@@ -280,7 +280,7 @@
return FALSE
var/timeout = world.time + 600
var/reason = sanitize(input(usr, "Reason:","Why do you require this item?","") as null|text)
var/reason = sanitize(tgui_input_text(usr, "Reason:","Why do you require this item?",""))
if(world.time > timeout)
to_chat(usr, "<span class='warning'>Error. Request timed out.</span>")
return FALSE
@@ -323,7 +323,7 @@
return FALSE
if(!(authorization & SUP_ACCEPT_ORDERS))
return FALSE
var/new_val = sanitize(input(usr, params["edit"], "Enter the new value for this field:", params["default"]) as null|text)
var/new_val = sanitize(tgui_input_text(usr, params["edit"], "Enter the new value for this field:", params["default"]))
if(!new_val)
return FALSE
@@ -396,7 +396,7 @@
var/list/L = E.contents[params["index"]]
var/field = tgui_alert(usr, "Select which field to edit", "Field Choice", list("Name", "Quantity", "Value"))
var/new_val = sanitize(input(usr, field, "Enter the new value for this field:", L[lowertext(field)]) as null|text)
var/new_val = sanitize(tgui_input_text(usr, field, "Enter the new value for this field:", L[lowertext(field)]))
if(!new_val)
return
@@ -439,7 +439,7 @@
return FALSE
if(!(authorization & SUP_ACCEPT_ORDERS))
return FALSE
var/new_val = sanitize(input(usr, params["edit"], "Enter the new value for this field:", params["default"]) as null|text)
var/new_val = sanitize(tgui_input_text(usr, params["edit"], "Enter the new value for this field:", params["default"]))
if(!new_val)
return
@@ -305,7 +305,7 @@
if(auth)
var/t1 = href_list["assign"]
if(t1 == "Custom")
var/temp_t = sanitize(input(usr, "Enter a custom job assignment.","Assignment"))
var/temp_t = sanitize(tgui_input_text(usr, "Enter a custom job assignment.","Assignment"))
if(temp_t)
t1 = temp_t
set_default_access(t1)
+1 -1
View File
@@ -129,7 +129,7 @@
if(default_deconstruction_screwdriver(user, W))
return
else if(panel_open && istype(W, /obj/item/weapon/pen))
var/t = sanitizeSafe(input(user, "Enter the name for \the [src].", src.name, initial(src.name)), MAX_NAME_LEN)
var/t = sanitizeSafe(tgui_input_text(user, "Enter the name for \the [src].", src.name, initial(src.name), MAX_NAME_LEN), MAX_NAME_LEN)
if(t && in_range(src, user))
name = t
else if(panel_open && istype(W, /obj/item/device/multitool))
+1 -1
View File
@@ -693,7 +693,7 @@ var/list/dispenser_presets = list()
* "gearlist" = array of types (yes the types are not valid json, byond parses them into real types.)
* "req_one_access" = array of numbers (accesses)
*/
var/input = input(usr, "Paste new gear pack JSON below. See example/code comments.", "Admin-load Dispenser", example) as null|message
var/input = tgui_input_text(usr, "Paste new gear pack JSON below. See example/code comments.", "Admin-load Dispenser", example, multiline = TRUE)
if(!input)
return
+5 -5
View File
@@ -401,20 +401,20 @@
return
// Required
var/url = input(C, "REQUIRED: Provide URL for track", "Track URL") as text|null
var/url = tgui_input_text(C, "REQUIRED: Provide URL for track", "Track URL")
if(!url)
return
var/title = input(C, "REQUIRED: Provide title for track", "Track Title") as text|null
var/title = tgui_input_text(C, "REQUIRED: Provide title for track", "Track Title")
if(!title)
return
var/duration = input(C, "REQUIRED: Provide duration for track (in deciseconds, aka seconds*10)", "Track Duration") as num|null
var/duration = tgui_input_number(C, "REQUIRED: Provide duration for track (in deciseconds, aka seconds*10)", "Track Duration")
if(!duration)
return
// Optional
var/artist = input(C, "Optional: Provide artist for track", "Track Artist") as text|null
var/artist = tgui_input_text(C, "Optional: Provide artist for track", "Track Artist")
if(isnull(artist)) // Cancel rather than empty string
return
@@ -428,7 +428,7 @@
if(!check_rights(R_FUN|R_ADMIN))
return
var/track = input(C, "Input track title or URL to remove (must be exact)", "Remove Track") as text|null
var/track = tgui_input_text(C, "Input track title or URL to remove (must be exact)", "Remove Track")
if(!track)
return
+1 -1
View File
@@ -314,7 +314,7 @@
if(speed <= 0)
speed = 1
if("setpath")
var/newpath = sanitize(input(usr, "Please define a new path!",,path) as text|null)
var/newpath = sanitize(tgui_input_text(usr, "Please define a new path!",,path))
if(newpath && newpath != "")
moving = 0 // stop moving
path = newpath
+1 -1
View File
@@ -28,7 +28,7 @@
if(istype(I, /obj/item/device/multitool))
if(panel_open)
var/input = sanitize(input(usr, "What id would you like to give this conveyor?", "Multitool-Conveyor interface", id))
var/input = sanitize(tgui_input_text(usr, "What id would you like to give this conveyor?", "Multitool-Conveyor interface", id))
if(!input)
to_chat(usr, "No input found please hang up and try your call again.")
return
+5 -5
View File
@@ -150,7 +150,7 @@ Transponder Codes:<UL>"}
usr.set_machine(src)
if(href_list["locedit"])
var/newloc = sanitize(input(usr, "Enter New Location", "Navigation Beacon", location) as text|null)
var/newloc = sanitize(tgui_input_text(usr, "Enter New Location", "Navigation Beacon", location))
if(newloc)
location = newloc
updateDialog()
@@ -158,12 +158,12 @@ Transponder Codes:<UL>"}
else if(href_list["edit"])
var/codekey = href_list["code"]
var/newkey = input(usr, "Enter Transponder Code Key", "Navigation Beacon", codekey) as text|null
var/newkey = tgui_input_text(usr, "Enter Transponder Code Key", "Navigation Beacon", codekey)
if(!newkey)
return
var/codeval = codes[codekey]
var/newval = input(usr, "Enter Transponder Code Value", "Navigation Beacon", codeval) as text|null
var/newval = tgui_input_text(usr, "Enter Transponder Code Value", "Navigation Beacon", codeval)
if(!newval)
newval = codekey
return
@@ -180,11 +180,11 @@ Transponder Codes:<UL>"}
else if(href_list["add"])
var/newkey = input(usr, "Enter New Transponder Code Key", "Navigation Beacon") as text|null
var/newkey = tgui_input_text(usr, "Enter New Transponder Code Key", "Navigation Beacon")
if(!newkey)
return
var/newval = input(usr, "Enter New Transponder Code Value", "Navigation Beacon") as text|null
var/newval = tgui_input_text(usr, "Enter New Transponder Code Value", "Navigation Beacon")
if(!newval)
newval = "1"
return
+1 -1
View File
@@ -447,7 +447,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster)
return TRUE
if("set_new_message")
msg = sanitize(tgui_input_message(usr, "Write your Feed story", "Network Channel Handler"))
msg = sanitize(tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", multiline = TRUE))
return TRUE
if("set_new_title")
+2 -2
View File
@@ -94,7 +94,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
/obj/machinery/pointdefense_control/attackby(var/obj/item/W, var/mob/user)
if(W?.is_multitool())
var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text
var/new_ident = tgui_input_text(user, "Enter a new ident tag.", "[src]", id_tag)
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, GLOB.tgui_physical_state))
// Check for duplicate controllers with this ID
for(var/obj/machinery/pointdefense_control/PC as anything in pointdefense_controllers)
@@ -211,7 +211,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
/obj/machinery/power/pointdefense/attackby(var/obj/item/W, var/mob/user)
if(W?.is_multitool())
var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text
var/new_ident = tgui_input_text(user, "Enter a new ident tag.", "[src]", id_tag)
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, GLOB.tgui_physical_state))
to_chat(user, "<span class='notice'>You register [src] with the [new_ident] network.</span>")
id_tag = new_ident
+1 -1
View File
@@ -1092,7 +1092,7 @@
return
if(istype(I, /obj/item/weapon/pen)) //you can rename turrets like bots!
var/t = sanitizeSafe(input(user, "Enter new turret name", name, finish_name) as text, MAX_NAME_LEN)
var/t = sanitizeSafe(tgui_input_text(user, "Enter new turret name", name, finish_name, MAX_NAME_LEN), MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && loc != usr)
+3 -3
View File
@@ -153,7 +153,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(reject_bad_text(params["write"]))
recipient = params["write"] //write contains the string of the receiving department's name
var/new_message = sanitize(input(usr, "Write your message:", "Awaiting Input", ""))
var/new_message = sanitize(tgui_input_text(usr, "Write your message:", "Awaiting Input", ""))
if(new_message)
message = new_message
screen = RCS_MESSAUTH
@@ -169,7 +169,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
. = TRUE
if("writeAnnouncement")
var/new_message = sanitize(input(usr, "Write your message:", "Awaiting Input", ""))
var/new_message = sanitize(tgui_input_text(usr, "Write your message:", "Awaiting Input", ""))
if(new_message)
message = new_message
else
@@ -238,7 +238,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(computer_deconstruction_screwdriver(user, O))
return
if(istype(O, /obj/item/device/multitool))
var/input = sanitize(input(usr, "What Department ID would you like to give this request console?", "Multitool-Request Console Interface", department))
var/input = sanitize(tgui_input_text(usr, "What Department ID would you like to give this request console?", "Multitool-Request Console Interface", department))
if(!input)
to_chat(usr, "No input found. Please hang up and try your call again.")
return
+1 -1
View File
@@ -128,7 +128,7 @@
. = TRUE
if("network")
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
var/newnet = tgui_input_text(usr, "Which network do you want to view?", "Comm Monitor", network)
if(newnet && ((usr in range(1, src) || issilicon(usr))))
if(length(newnet) > 15)
@@ -288,14 +288,14 @@
. = TRUE
if("id")
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID for this machine", src, id) as null|text),1,MAX_MESSAGE_LEN)
var/newid = copytext(reject_bad_text(tgui_input_text(usr, "Specify the new ID for this machine", src, id)),1,MAX_MESSAGE_LEN)
if(newid && canAccess(usr))
id = newid
set_temp("-% New ID assigned: \"[id]\" %-", "average")
. = TRUE
if("network")
var/newnet = input(usr, "Specify the new network for this machine. This will break all current links.", src, network) as null|text
var/newnet = tgui_input_text(usr, "Specify the new network for this machine. This will break all current links.", src, network)
if(newnet && canAccess(usr))
if(length(newnet) > 15)
+4 -4
View File
@@ -26,13 +26,13 @@
data["network"] = network
data["temp"] = temp
var/list/machinelistData = list()
var/list/machinelistData = list()
for(var/obj/machinery/telecomms/T in machinelist)
machinelistData.Add(list(list(
machinelistData.Add(list(list(
"id" = T.id,
"name" = T.name,
)))
data["machinelist"] = machinelistData
data["machinelist"] = machinelistData
data["selectedMachine"] = null
if(SelectedMachine)
@@ -100,7 +100,7 @@
. = TRUE
if("network")
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
var/newnet = tgui_input_text(usr, "Which network do you want to view?", "Comm Monitor", network)
if(newnet && ((usr in range(1, src) || issilicon(usr))))
if(length(newnet) > 15)
set_temp("FAILED: NETWORK TAG STRING TOO LENGTHY", "bad")
@@ -192,7 +192,7 @@
if(href_list["network"])
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
var/newnet = tgui_input_text(usr, "Which network do you want to view?", "Comm Monitor", network)
if(newnet && ((usr in range(1, src) || issilicon(usr))))
if(length(newnet) > 15)
@@ -103,7 +103,7 @@
occupant.enter_vr(avatar)
var/newname = sanitize(input(avatar, "Your mind feels foggy. You're certain your name is [occupant.real_name], but it could also be [avatar.name]. Would you like to change it to something else?", "Name change") as null|text, MAX_NAME_LEN)
var/newname = sanitize(tgui_input_text(avatar, "Your mind feels foggy. You're certain your name is [occupant.real_name], but it could also be [avatar.name]. Would you like to change it to something else?", "Name change", null, MAX_NAME_LEN), MAX_NAME_LEN)
if (newname)
avatar.real_name = newname
@@ -113,7 +113,7 @@
else
// There's only one body per one of these pods, so let's be kind.
var/newname = sanitize(input(avatar, "Your mind feels foggy. You're certain your name is [occupant.real_name], but it feels like it is [avatar.name]. Would you like to change it to something else?", "Name change") as null|text, MAX_NAME_LEN)
var/newname = sanitize(tgui_input_text(avatar, "Your mind feels foggy. You're certain your name is [occupant.real_name], but it feels like it is [avatar.name]. Would you like to change it to something else?", "Name change", null, MAX_NAME_LEN), MAX_NAME_LEN)
if(newname)
avatar.real_name = newname
@@ -250,7 +250,7 @@
occupant.enter_vr(avatar)
// Prompt for username after they've enterred the body.
var/newname = sanitize(input(avatar, "You are entering virtual reality. Your username is currently [src.name]. Would you like to change it to something else?", "Name change") as null|text, MAX_NAME_LEN)
var/newname = sanitize(tgui_input_text(avatar, "You are entering virtual reality. Your username is currently [src.name]. Would you like to change it to something else?", "Name change", null, MAX_NAME_LEN), MAX_NAME_LEN)
if (newname)
avatar.real_name = newname
+1 -1
View File
@@ -40,7 +40,7 @@ var/global/datum/book_manager/book_mgr = new()
to_chat(src, "Only administrators may use this command.")
return
var/isbn = input(usr, "ISBN number?", "Delete Book") as num | null
var/isbn = tgui_input_number(usr, "ISBN number?", "Delete Book")
if(!isbn)
return
+2 -2
View File
@@ -2551,7 +2551,7 @@
return
if (href_list["change_name"])
if(usr != src.occupant) return
var/newname = sanitizeSafe(input(occupant,"Choose new exosuit name","Rename exosuit",initial(name)) as text, MAX_NAME_LEN)
var/newname = sanitizeSafe(tgui_input_text(occupant,"Choose new exosuit name","Rename exosuit",initial(name), MAX_NAME_LEN), MAX_NAME_LEN)
if(newname)
name = newname
else
@@ -2590,7 +2590,7 @@
if(!in_range(src, usr)) return
var/mob/user = top_filter.getMob("user")
if(user)
var/new_pressure = input(user,"Input new output pressure","Pressure setting",internal_tank_valve) as num
var/new_pressure = tgui_input_number(user,"Input new output pressure","Pressure setting",internal_tank_valve)
if(new_pressure)
internal_tank_valve = new_pressure
to_chat(user, "The internal pressure valve has been set to [internal_tank_valve]kPa.")
+1 -1
View File
@@ -48,7 +48,7 @@
if("send_message")
var/obj/item/mecha_parts/mecha_tracking/MT = locate(params["mt"])
if(istype(MT))
var/message = sanitize(input(usr, "Input message", "Transmit message") as text)
var/message = sanitize(tgui_input_text(usr, "Input message", "Transmit message"))
var/obj/mecha/M = MT.in_mecha()
if(message && M)
M.occupant_message(message)
@@ -7,13 +7,13 @@
var/obj/effect/spawner/newbomb/proto = /obj/effect/spawner/newbomb/radio/custom
var/p = input(usr, "Enter phoron amount (mol):","Phoron", initial(proto.phoron_amt)) as num|null
var/p = tgui_input_number(usr, "Enter phoron amount (mol):","Phoron", initial(proto.phoron_amt))
if(p == null) return
var/o = input(usr, "Enter oxygen amount (mol):","Oxygen", initial(proto.oxygen_amt)) as num|null
var/o = tgui_input_number(usr, "Enter oxygen amount (mol):","Oxygen", initial(proto.oxygen_amt))
if(o == null) return
var/c = input(usr, "Enter carbon dioxide amount (mol):","Carbon Dioxide", initial(proto.carbon_amt)) as num|null
var/c = tgui_input_number(usr, "Enter carbon dioxide amount (mol):","Carbon Dioxide", initial(proto.carbon_amt))
if(c == null) return
new /obj/effect/spawner/newbomb/radio/custom(get_turf(mob), p, o, c)
+1 -1
View File
@@ -1,5 +1,5 @@
/client/proc/kaboom()
var/power = input(src, "power?", "power?") as num
var/power = tgui_input_number(src, "power?", "power?")
var/turf/T = get_turf(src.mob)
explosion_rec(T, power)
+2 -2
View File
@@ -141,7 +141,7 @@
to_chat(usr, "<span class='warning'>Error! Please notify administration!</span>")
return
var/list/turf/turfs = res
var/str = sanitizeSafe(input(usr, "New area name:","Blueprint Editing", ""), MAX_NAME_LEN)
var/str = sanitizeSafe(tgui_input_text(usr, "New area name:","Blueprint Editing", "", MAX_NAME_LEN), MAX_NAME_LEN)
if(!str || !length(str)) //cancel
return
if(length(str) > 50)
@@ -200,7 +200,7 @@
/obj/item/blueprints/proc/edit_area()
var/area/A = get_area()
var/prevname = "[A.name]"
var/str = sanitizeSafe(input(usr, "New area name:","Blueprint Editing", prevname), MAX_NAME_LEN)
var/str = sanitizeSafe(tgui_input_text(usr, "New area name:","Blueprint Editing", prevname, MAX_NAME_LEN), MAX_NAME_LEN)
if(!str || !length(str) || str==prevname) //cancel
return
if(length(str) > 50)
+1 -1
View File
@@ -33,7 +33,7 @@
/obj/structure/closet/body_bag/attackby(var/obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null)
if (user.get_active_hand() != W)
return
if (!in_range(src, user) && src.loc != user)
@@ -322,7 +322,7 @@
. = TRUE
switch(action)
if("rename")
var/new_name = sanitizeSafe(input(usr,"Please enter your name.","Communicator",usr.name) )
var/new_name = sanitizeSafe(tgui_input_text(usr,"Please enter your name.","Communicator",usr.name) )
if(new_name)
register_device(new_name)
@@ -376,7 +376,7 @@
to_chat(usr, "<span class='danger'>Error: Cannot connect to Exonet node.</span>")
return FALSE
var/their_address = params["message"]
var/text = sanitizeSafe(input(usr,"Enter your message.","Text Message"))
var/text = sanitizeSafe(tgui_input_text(usr,"Enter your message.","Text Message"))
if(text)
exonet.send_message(their_address, "text", text)
im_list += list(list("address" = exonet.address, "to_address" = their_address, "im" = text))
@@ -424,7 +424,7 @@
selected_tab = params["switch_tab"]
if("edit")
var/n = input(usr, "Please enter message", name, notehtml) as message|null
var/n = tgui_input_text(usr, "Please enter message", name, notehtml, multiline = TRUE)
n = sanitizeSafe(n, extra = 0)
if(n)
note = html_decode(n)
@@ -102,7 +102,7 @@
switch(href_list["action"])
if("Reply")
var/obj/item/device/communicator/comm = locate(href_list["target"])
var/message = input(usr, "Enter your message below.", "Reply")
var/message = tgui_input_text(usr, "Enter your message below.", "Reply")
if(message)
exonet.send_message(comm.exonet.address, "text", message)
@@ -153,7 +153,7 @@
if(choice)
var/obj/item/device/communicator/chosen_communicator = choice
var/mob/observer/dead/O = src
var/text_message = sanitize(input(src, "What do you want the message to say?") as message)
var/text_message = sanitize(tgui_input_text(src, "What do you want the message to say?", multiline = TRUE))
if(text_message && O.exonet)
O.exonet.send_message(chosen_communicator.exonet.address, "text", text_message)
+1 -1
View File
@@ -323,7 +323,7 @@ var/list/GPS_list = list()
. = TRUE
if(href_list["tag"])
var/a = input(usr, "Please enter desired tag.", name, gps_tag) as text
var/a = tgui_input_text(usr, "Please enter desired tag.", name, gps_tag)
a = uppertext(copytext(sanitize(a), 1, 11))
if(in_range(src, usr))
gps_tag = a
+1 -1
View File
@@ -40,7 +40,7 @@
user.audible_message("<B>[user.GetVoice()]</B>[user.GetAltName()] broadcasts, <FONT size=3>\"[message]\"</FONT>", runemessage = message)
/obj/item/device/megaphone/attack_self(var/mob/living/user)
var/message = sanitize(input(user, "Shout a message?", "Megaphone", null) as text)
var/message = sanitize(tgui_input_text(user, "Shout a message?", "Megaphone", null))
if(!message)
return
message = capitalize(message)
+7 -4
View File
@@ -17,6 +17,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
var/image/screen_layer
var/screen_color = "#00ff0d"
var/last_notify = 0
var/screen_msg
/obj/item/device/paicard/relaymove(var/mob/user, var/direction)
if(user.stat || user.stunned)
@@ -49,7 +50,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
var/actual_pai_name
var/turf/location = get_turf(src)
if(choice == "No")
var/pai_name = input(user, "Choose your character's name", "Character Name") as text
var/pai_name = tgui_input_text(user, "Choose your character's name", "Character Name")
actual_pai_name = sanitize_name(pai_name, ,1)
if(isnull(actual_pai_name))
return ..()
@@ -73,7 +74,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
new_pai.key = user.key
card.setPersonality(new_pai)
if(!new_pai.savefile_load(new_pai))
var/pai_name = input(new_pai, "Choose your character's name", "Character Name") as text
var/pai_name = tgui_input_text(new_pai, "Choose your character's name", "Character Name")
actual_pai_name = sanitize_name(pai_name, ,1)
if(isnull(actual_pai_name))
return ..()
@@ -83,7 +84,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
new_pai.key = user.key
card.setPersonality(new_pai)
if(!new_pai.savefile_load(new_pai))
var/pai_name = input(new_pai, "Choose your character's name", "Character Name") as text
var/pai_name = tgui_input_text(new_pai, "Choose your character's name", "Character Name")
actual_pai_name = sanitize_name(pai_name, ,1)
if(isnull(actual_pai_name))
return ..()
@@ -259,6 +260,8 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
</table>
"}
*/
if(screen_msg)
dat += "<b>Message from [pai.name]</b><br>[screen_msg]"
else
if(looking_for_personality)
dat += {"
@@ -328,7 +331,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
if(2)
radio.ToggleReception()
if(href_list["setlaws"])
var/newlaws = sanitize(input(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message)
var/newlaws = sanitize(tgui_input_text(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws, multiline = TRUE))
if(newlaws)
pai.pai_laws = newlaws
to_chat(pai, "Your supplemental directives have been updated. Your new directives are:")
@@ -417,7 +417,7 @@
return
else if(istype(I, /obj/item/weapon/pen))
if(loc == user && !user.incapacitated())
var/new_name = input(user, "What would you like to label the tape?", "Tape labeling") as null|text
var/new_name = tgui_input_text(user, "What would you like to label the tape?", "Tape labeling")
if(isnull(new_name)) return
new_name = sanitizeSafe(new_name)
if(new_name)
@@ -22,7 +22,7 @@
named = 1
*/
var/message = sanitize(input(user,"Choose a message to relay to those around you.") as text|null)
var/message = sanitize(tgui_input_text(user,"Choose a message to relay to those around you."))
if(message)
audible_message("[bicon(src)] \The [src.name] states, \"[message]\"", runemessage = "synthesized speech")
if(ismob(loc))
@@ -135,7 +135,7 @@ This device records all warnings given and teleport events for admin review in c
to_chat(user, "<span class='warning'>The translocator can't support any more beacons!</span>")
return
var/new_name = html_encode(input(user,"New beacon's name (2-20 char):","[src]") as text|null)
var/new_name = html_encode(tgui_input_text(user,"New beacon's name (2-20 char):","[src]",null,20))
if(!check_menu(user))
return
+1 -1
View File
@@ -65,7 +65,7 @@
if(..())
return 1
if(href_list["channel"])
var/nc = input(usr, "Channel name", "Select new channel name", channel) as text|null
var/nc = tgui_input_text(usr, "Channel name", "Select new channel name", channel)
if(nc)
channel = nc
camera.c_tag = channel
+1 -1
View File
@@ -19,7 +19,7 @@
to_chat(usr, "The hailer is fried. The tiny input screen just shows a waving ASCII penis.")
return
var/new_message = input(usr, "Please enter new message (leave blank to reset).") as text
var/new_message = tgui_input_text(usr, "Please enter new message (leave blank to reset).")
if(!new_message || new_message == "")
use_message = "Halt! Security!"
else
+1 -1
View File
@@ -229,7 +229,7 @@
to_chat(user, "<span class='warning'>The MMI must go in after everything else!</span>")
if (istype(W, /obj/item/weapon/pen))
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
@@ -40,7 +40,7 @@
var/heldname = "default name"
/obj/item/borg/upgrade/rename/attack_self(mob/user as mob)
heldname = sanitizeSafe(input(user, "Enter new robot name", "Robot Reclassification", heldname), MAX_NAME_LEN)
heldname = sanitizeSafe(tgui_input_text(user, "Enter new robot name", "Robot Reclassification", heldname, MAX_NAME_LEN), MAX_NAME_LEN)
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
if(..()) return 0
+1 -1
View File
@@ -399,7 +399,7 @@
/obj/item/stack/attack_hand(mob/user as mob)
if (user.get_inactive_hand() == src)
var/N = input(usr, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1) as num|null
var/N = tgui_input_number(usr, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1, amount, 1)
if(N)
var/obj/item/stack/F = src.split(N)
if (F)
@@ -20,14 +20,22 @@
name = "stack of teal carpet"
type_to_spawn = /obj/item/stack/tile/carpet/teal
/obj/fiftyspawner/decocarpet
name = "stack of deco carpet"
type_to_spawn = /obj/item/stack/tile/carpet/deco
/obj/fiftyspawner/geocarpet
name = "stack of geometric carpet"
type_to_spawn = /obj/item/stack/tile/carpet/geo
/obj/fiftyspawner/retrocarpet
name = "stack of retro carpet"
name = "stack of blue retro carpet"
type_to_spawn = /obj/item/stack/tile/carpet/retro
/obj/fiftyspawner/retrocarpet_red
name = "stack of red retro carpet"
type_to_spawn = /obj/item/stack/tile/carpet/retro_red
/obj/fiftyspawner/happycarpet
name = "stack of happy carpet"
type_to_spawn = /obj/item/stack/tile/carpet/happy
/obj/fiftyspawner/floor
name = "stack of floor tiles"
type_to_spawn = /obj/item/stack/tile/floor
@@ -65,6 +65,26 @@
desc = "An easy to fit wooden floor tile. It's blue!"
icon_state = "tile-sifwood"
/obj/item/stack/tile/wood/alt
name = "wood floor tile"
singular_name = "wood floor tile"
icon_state = "tile-wood_tile"
/obj/item/stack/tile/wood/parquet
name = "parquet wood floor tile"
singular_name = "parquet wood floor tile"
icon_state = "tile-wood_parquet"
/obj/item/stack/tile/wood/panel
name = "large wood floor tile"
singular_name = "large wood floor tile"
icon_state = "tile-wood_large"
/obj/item/stack/tile/wood/tile
name = "tiled wood floor tile"
singular_name = "tiled wood floor tile"
icon_state = "tile-wood_tile"
/obj/item/stack/tile/wood/cyborg
name = "wood floor tile synthesizer"
desc = "A device that makes wood floor tiles."
@@ -73,6 +93,8 @@
stacktype = /obj/item/stack/tile/wood
build_type = /obj/item/stack/tile/wood
/*
* Carpets
*/
@@ -97,6 +119,23 @@
icon_state = "tile-tealcarpet"
no_variants = FALSE
/obj/item/stack/tile/carpet/geo
icon_state = "tile-carpet-deco"
desc = "A piece of carpet with a gnarly geometric design. It is the same size as a normal floor tile!"
/obj/item/stack/tile/carpet/retro
icon_state = "tile-carpet-retro"
desc = "A piece of carpet with totally wicked blue space patterns. It is the same size as a normal floor tile!"
/obj/item/stack/tile/carpet/retro_red
icon_state = "tile-carpet-retro-red"
desc = "A piece of carpet with red-ical space patterns. It is the same size as a normal floor tile!"
/obj/item/stack/tile/carpet/happy
icon_state = "tile-carpet-happy"
desc = "A piece of carpet with happy patterns. It is the same size as a normal floor tile!"
// TODO - Add descriptions to these
/obj/item/stack/tile/carpet/bcarpet
icon_state = "tile-carpet"
/obj/item/stack/tile/carpet/blucarpet
@@ -111,10 +150,6 @@
icon_state = "tile-carpet"
/obj/item/stack/tile/carpet/oracarpet
icon_state = "tile-carpet"
/obj/item/stack/tile/carpet/deco
icon_state = "tile-carpet-deco"
/obj/item/stack/tile/carpet/retro
icon_state = "tile-carpet-retro"
/obj/item/stack/tile/floor
name = "floor tile"
+1 -1
View File
@@ -123,7 +123,7 @@
var/mob/M = usr
if(!M.mind) return 0
var/input = sanitizeSafe(input(usr, "What do you want to name the icon?", ,""), MAX_NAME_LEN)
var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name the icon?", ,"", null, MAX_NAME_LEN), MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = "icon of " + input
+1 -1
View File
@@ -843,7 +843,7 @@
if(!M.mind)
return 0
var/input = sanitizeSafe(input(usr, "What do you want to name the plushie?", ,""), MAX_NAME_LEN)
var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name the plushie?", ,""), MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = input
+1 -1
View File
@@ -136,7 +136,7 @@
cell = I
else if(istype(I, /obj/item/weapon/pen) || istype(I, /obj/item/device/flashlight/pen))
var/tmp_label = sanitizeSafe(input(user, "Enter a nickname for [src]", "Nickname", nickname), MAX_NAME_LEN)
var/tmp_label = sanitizeSafe(tgui_input_text(user, "Enter a nickname for [src]", "Nickname", nickname, MAX_NAME_LEN), MAX_NAME_LEN)
if(length(tmp_label) > 50 || length(tmp_label) < 3)
to_chat(user, "<span class='notice'>The nickname must be between 3 and 50 characters.</span>")
else
@@ -133,7 +133,7 @@ AI MODULES
/obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
var/targName = sanitize(input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
var/targName = sanitize(tgui_input_text(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
targetName = targName
desc = text("A 'safeguard' AI module: 'Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.'", targetName, targetName)
@@ -159,7 +159,7 @@ AI MODULES
/obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob)
..()
var/targName = sanitize(input(usr, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
var/targName = sanitize(tgui_input_text(usr, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
targetName = targName
desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName)
@@ -240,11 +240,11 @@ AI MODULES
/obj/item/weapon/aiModule/freeform/attack_self(var/mob/user as mob)
..()
var/new_lawpos = input(usr, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
var/new_lawpos = tgui_input_number(usr, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos)
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
var/newlaw = ""
var/targName = sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
var/targName = sanitize(tgui_input_text(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
@@ -357,7 +357,7 @@ AI MODULES
/obj/item/weapon/aiModule/freeformcore/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = sanitize(input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
var/targName = sanitize(tgui_input_text(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
@@ -381,7 +381,7 @@ AI MODULES
/obj/item/weapon/aiModule/syndicate/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
var/targName = sanitize(tgui_input_text(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A hacked AI law module: '[newFreeFormLaw]'"
@@ -74,7 +74,7 @@
to_chat(user, "<span class='warning'>Circuit controls are locked.</span>")
return
var/existing_networks = jointext(network,",")
var/input = sanitize(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
var/input = sanitize(tgui_input_text(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
if(!input)
to_chat(usr, "No input found please hang up and try your call again.")
return
@@ -39,7 +39,7 @@
..()
/obj/item/weapon/plastique/attack_self(mob/user as mob)
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
var/newtime = tgui_input_number(usr, "Please set the timer.", "Timer", 10, 60000, 10)
if(user.get_active_hand() == src)
newtime = CLAMP(newtime, 10, 60000)
timer = newtime
@@ -288,7 +288,7 @@ Implant Specifics:<BR>"}
/obj/item/weapon/implant/explosive/post_implant(mob/source as mob)
elevel = tgui_alert(usr, "What sort of explosion would you prefer?", "Implant Intent", list("Localized Limb", "Destroy Body", "Full Explosion"))
phrase = input(usr, "Choose activation phrase:") as text
phrase = tgui_input_text(usr, "Choose activation phrase:")
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
phrase = replace_characters(phrase, replacechars)
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.", 0, 0)
@@ -21,7 +21,7 @@
/obj/item/weapon/implantcase/attackby(obj/item/weapon/I as obj, mob/user as mob)
..()
if (istype(I, /obj/item/weapon/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null)
if (user.get_active_hand() != I)
return
if((!in_range(src, usr) && src.loc != user))
@@ -13,14 +13,14 @@
/obj/item/weapon/material/gravemarker/attackby(obj/item/weapon/W, mob/user as mob)
if(W.is_screwdriver())
var/carving_1 = sanitizeSafe(input(user, "Who is \the [src.name] for?", "Gravestone Naming", null) as text, MAX_NAME_LEN)
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN), MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
grave_name += carving_1
update_icon()
var/carving_2 = sanitizeSafe(input(user, "What message should \the [src.name] have?", "Epitaph Carving", null) as text, MAX_NAME_LEN)
var/carving_2 = sanitizeSafe(tgui_input_text(user, "What message should \the [src.name] have?", "Epitaph Carving", null, MAX_NAME_LEN), MAX_NAME_LEN)
if(carving_2)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
@@ -208,7 +208,7 @@
/obj/item/weapon/storage/pill_bottle/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/device/flashlight/pen))
var/tmp_label = sanitizeSafe(input(user, "Enter a label for [name]", "Label", label_text), MAX_NAME_LEN)
var/tmp_label = sanitizeSafe(tgui_input_text(user, "Enter a label for [name]", "Label", label_text, MAX_NAME_LEN), MAX_NAME_LEN)
if(length(tmp_label) > 50)
to_chat(user, "<span class='notice'>The label can be at most 50 characters long.</span>")
else if(length(tmp_label) > 10)
@@ -3,8 +3,10 @@
req_access = list(access_kitchen)
starts_with = list(
/obj/item/weapon/reagent_containers/food/condiment/flour = 7,
/obj/item/weapon/reagent_containers/food/condiment/sugar = 2,
/obj/item/weapon/reagent_containers/food/condiment/carton/flour = 6,
/obj/item/weapon/reagent_containers/food/condiment/carton/sugar = 1,
/obj/item/weapon/reagent_containers/food/condiment/carton/flour/rustic = 1,
/obj/item/weapon/reagent_containers/food/condiment/carton/sugar/rustic = 1,
/obj/item/weapon/reagent_containers/food/condiment/spacespice = 2
)
@@ -155,7 +155,7 @@
bound_height = width * world.icon_size
/obj/structure/door_assembly/proc/rename_door(mob/living/user)
var/t = sanitizeSafe(input(user, "Enter the name for the windoor.", src.name, src.created_name), MAX_NAME_LEN)
var/t = sanitizeSafe(tgui_input_text(user, "Enter the name for the windoor.", src.name, src.created_name, MAX_NAME_LEN), MAX_NAME_LEN)
if(!in_range(src, user) && src.loc != user) return
created_name = t
update_state()
@@ -102,7 +102,7 @@
E.description_antag = "This is a 'disguised' emag, to make your escape from wherever you happen to be trapped."
H.equip_to_appropriate_slot(E)
var/newname = sanitize(input(H, "Your mind feels foggy, and you recall your name might be [H.real_name]. Would you like to change your name?", "Name change") as null|text, MAX_NAME_LEN)
var/newname = sanitize(tgui_input_text(H, "Your mind feels foggy, and you recall your name might be [H.real_name]. Would you like to change your name?", "Name change", null, MAX_NAME_LEN), MAX_NAME_LEN)
if (newname)
H.real_name = newname
@@ -224,7 +224,7 @@
var/obj/item/C = new newpath(H)
H.equip_to_appropriate_slot(C)
var/newname = sanitize(input(H, "Your mind feels foggy, and you recall your name might be [H.real_name]. Would you like to change your name?", "Name change") as null|text, MAX_NAME_LEN)
var/newname = sanitize(tgui_input_text(H, "Your mind feels foggy, and you recall your name might be [H.real_name]. Would you like to change your name?", "Name change", null, MAX_NAME_LEN), MAX_NAME_LEN)
if (newname)
H.real_name = newname
+2 -2
View File
@@ -52,14 +52,14 @@
/obj/structure/gravemarker/attackby(obj/item/weapon/W, mob/user as mob)
if(W.is_screwdriver())
var/carving_1 = sanitizeSafe(input(user, "Who is \the [src.name] for?", "Gravestone Naming", null) as text, MAX_NAME_LEN)
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN), MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
grave_name += carving_1
update_icon()
var/carving_2 = sanitizeSafe(input(user, "What message should \the [src.name] have?", "Epitaph Carving", null) as text, MAX_NAME_LEN)
var/carving_2 = sanitizeSafe(tgui_input_text(user, "What message should \the [src.name] have?", "Epitaph Carving", null, MAX_NAME_LEN), MAX_NAME_LEN)
if(carving_2)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))

Some files were not shown because too many files have changed in this diff Show More