diff --git a/code/_helpers/logging.dm b/code/_helpers/logging.dm index 793d605b3d..0cb6c7ee27 100644 --- a/code/_helpers/logging.dm +++ b/code/_helpers/logging.dm @@ -351,7 +351,7 @@ . += "" if(C && C.holder && C.holder.fakekey) - . += "Administrator" + . += C.holder.rank // CHOMPEdit: Stealth mode displays staff rank in PM Messages else . += key diff --git a/code/_helpers/text.dm b/code/_helpers/text.dm index 6bf02bf77f..333f2edc15 100644 --- a/code/_helpers/text.dm +++ b/code/_helpers/text.dm @@ -481,20 +481,23 @@ /// 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/user_input = input(user, message, title, default) as text|null + if(isnull(user_input)) + 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 <) + 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 <) // 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/user_input = input(user, message, title, default) as message|null + if(isnull(user_input)) + 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 = " ") diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 34b4105e86..e5e60cd950 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1,32 +1,22 @@ /* Note from Carnie: The way datum/mind stuff works has been changed a lot. Minds now represent IC characters rather than following a client around constantly. - Guidelines for using minds properly: - - Never mind.transfer_to(ghost). The var/current and var/original of a mind must always be of type mob/living! ghost.mind is however used as a reference to the ghost's corpse - - When creating a new mob for an existing IC character (e.g. cloning a dead guy or borging a brain of a human) the existing mind of the old mob should be transfered to the new mob like so: - mind.transfer_to(new_mob) - - You must not assign key= or ckey= after transfer_to() since the transfer_to transfers the client for you. By setting key or ckey explicitly after transfering the mind with transfer_to you will cause bugs like DCing the player. - - IMPORTANT NOTE 2, if you want a player to become a ghost, use mob.ghostize() It does all the hard work for you. - - When creating a new mob which will be a new IC character (e.g. putting a shade in a construct or randomly selecting a ghost to become a xeno during an event). Simply assign the key or ckey like you've always done. - new_mob.key = key - The Login proc will handle making a new mob for that mobtype (including setting up stuff like mind.name). Simple! However if you want that mind to have any special properties like being a traitor etc you will have to do that yourself. - */ /datum/mind @@ -190,7 +180,7 @@ assigned_role = new_role else if (href_list["memory_edit"]) - var/new_memo = sanitize(tgui_input_text("Write new memory", "Memory", memory, multiline = TRUE)) + 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 +188,7 @@ var/datum/mind/mind = locate(href_list["amb_edit"]) if(!mind) return - var/new_ambition = tgui_input_text("Enter a new ambition", "Memory", mind.ambitions, multiline = TRUE) + 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 +286,7 @@ if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]")) def_num = objective.target_amount - var/target_number = tgui_input_number("Input target number:", "Objective", def_num) + 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 +304,7 @@ new_objective.target_amount = target_number if ("custom") - var/expl = sanitize(tgui_input_text("Custom objective:", "Objective", objective ? objective.explanation_text : "")) + 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 +400,7 @@ // var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink() No longer needed, uses stored in mind var/crystals crystals = tcrystals - crystals = tgui_input_number("Amount of telecrystals for [key]", crystals) + crystals = tgui_input_number(usr, "Amount of telecrystals for [key]", crystals) if (!isnull(crystals)) tcrystals = crystals diff --git a/code/game/antagonist/antagonist_create.dm b/code/game/antagonist/antagonist_create.dm index 84c5b2317e..3dd683377f 100644 --- a/code/game/antagonist/antagonist_create.dm +++ b/code/game/antagonist/antagonist_create.dm @@ -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 diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm index e1b73b064b..fd3ee867f9 100644 --- a/code/game/antagonist/station/rogue_ai.dm +++ b/code/game/antagonist/station/rogue_ai.dm @@ -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 diff --git a/code/game/gamemodes/changeling/powers/mimic_voice.dm b/code/game/gamemodes/changeling/powers/mimic_voice.dm index 6b84c577ff..be4a055dc1 100644 --- a/code/game/gamemodes/changeling/powers/mimic_voice.dm +++ b/code/game/gamemodes/changeling/powers/mimic_voice.dm @@ -22,7 +22,7 @@ to_chat(src, "We return our vocal glands to their original location.") 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 diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 31fdb1ea5b..16a40583be 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -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() diff --git a/code/game/jobs/job/civilian_chaplain.dm b/code/game/jobs/job/civilian_chaplain.dm index f811abf957..1d7cfd7f5e 100644 --- a/code/game/jobs/job/civilian_chaplain.dm +++ b/code/game/jobs/job/civilian_chaplain.dm @@ -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() diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index ec5a1f5fcd..27009d097b 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -246,7 +246,7 @@ 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) diff --git a/code/game/machinery/doorbell_vr.dm b/code/game/machinery/doorbell_vr.dm index d90a46000f..906c41ea6d 100644 --- a/code/game/machinery/doorbell_vr.dm +++ b/code/game/machinery/doorbell_vr.dm @@ -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)) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index c727c2a290..eaad936be4 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -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) diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 51af9f85e1..5bc216dac6 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -288,7 +288,7 @@ . = 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") diff --git a/code/game/machinery/virtual_reality/ar_console.dm b/code/game/machinery/virtual_reality/ar_console.dm index 6cf182e106..904c439596 100644 --- a/code/game/machinery/virtual_reality/ar_console.dm +++ b/code/game/machinery/virtual_reality/ar_console.dm @@ -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 diff --git a/code/game/machinery/virtual_reality/vr_console.dm b/code/game/machinery/virtual_reality/vr_console.dm index 4a83de34d3..9d165cc7e3 100644 --- a/code/game/machinery/virtual_reality/vr_console.dm +++ b/code/game/machinery/virtual_reality/vr_console.dm @@ -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 diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index be8f67e2ba..62736a48fb 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -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.") diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 19fb0fa04d..31039c7fbc 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -148,7 +148,7 @@ to_chat(usr, "Error! Please notify administration!") 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) @@ -207,7 +207,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) diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 1e0183499b..9d6ef54751 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -1,3 +1,20 @@ +var/global/list/radio_channels_by_freq = list( + num2text(PUB_FREQ) = "Common", + num2text(AI_FREQ) = "AI Private", + num2text(ENT_FREQ) = "Entertainment", + num2text(ERT_FREQ) = "Response Team", + num2text(COMM_FREQ)= "Command", + num2text(ENG_FREQ) = "Engineering", + num2text(MED_FREQ) = "Medical", + num2text(MED_I_FREQ)="Medical(I)", + num2text(SEC_FREQ) = "Security", + num2text(SEC_I_FREQ)="Security(I)", + num2text(SCI_FREQ) = "Science", + num2text(SUP_FREQ) = "Supply", + num2text(SRV_FREQ) = "Service", + num2text(EXP_FREQ) = "Explorer" + ) + GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard) /obj/item/device/paicard @@ -11,12 +28,13 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard) show_messages = 0 preserve_item = 1 - var/obj/item/device/radio/radio + var/obj/item/device/radio/borg/pai/radio var/looking_for_personality = 0 var/mob/living/silicon/pai/pai 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) @@ -41,10 +59,16 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard) if(pai != null) //Have a person in them already? return ..() - var/choice = tgui_alert(user, "You sure you want to inhabit this PAI?", "Confirmation", list("Yes", "No")) - if(choice == "No") - return ..() + if(jobban_isbanned(usr, "pAI")) + to_chat(usr,"You cannot join a pAI card when you are banned from playing as a pAI.") + return + var/choice = tgui_alert(user, "You sure you want to inhabit this PAI, or submit yourself to being recruited?", "Confirmation", list("Inhabit", "Recruit", "Cancel")) + if(choice == "Cancel") + return ..() + if(choice == "Recruit") + paiController.recruitWindow(user) + return ..() choice = tgui_alert(user, "Do you want to load your pAI data?", "Load", list("Yes", "No")) var/actual_pai_name var/turf/location = get_turf(src) @@ -259,6 +283,8 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard) "} */ + if(screen_msg) + dat += "Message from [pai.name]
[screen_msg]" else if(looking_for_personality) dat += {" @@ -444,6 +470,34 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard) if(user) to_chat(user, span_notice("You eject the card from \the [initial(src.name)].")) +/////////////////////////////// +//////////pAI Radios////////// +/////////////////////////////// +//Thanks heroman! + +/obj/item/device/radio/borg/pai + name = "integrated radio" + icon = 'icons/obj/robot_component.dmi' // Cyborgs radio icons should look like the component. + icon_state = "radio" + loudspeaker = FALSE + +/obj/item/device/radio/borg/pai/attackby(obj/item/weapon/W as obj, mob/user as mob) + return + +/obj/item/device/radio/borg/pai/recalculateChannels() + if(!istype(loc,/obj/item/device/paicard)) + return + var/obj/item/device/paicard/card = loc + secure_radio_connections = list() + channels = list() + + for(var/internal_chan in internal_channels) + var/ch_name = radio_channels_by_freq[internal_chan] + if(has_channel_access(card.pai, internal_chan)) + channels += ch_name + channels[ch_name] = 1 + secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT) + /obj/item/device/paicard/typeb name = "personal AI device" icon = 'icons/obj/paicard.dmi' diff --git a/code/game/objects/items/devices/translocator_vr.dm b/code/game/objects/items/devices/translocator_vr.dm index c7cf0e7875..8333f2228b 100644 --- a/code/game/objects/items/devices/translocator_vr.dm +++ b/code/game/objects/items/devices/translocator_vr.dm @@ -135,7 +135,7 @@ This device records all warnings given and teleport events for admin review in c to_chat(user, "The translocator can't support any more beacons!") 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 diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 3938f3c17b..ac184ea558 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -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 diff --git a/code/game/objects/items/toys/godfigures.dm b/code/game/objects/items/toys/godfigures.dm index 027544a0eb..9801640d54 100644 --- a/code/game/objects/items/toys/godfigures.dm +++ b/code/game/objects/items/toys/godfigures.dm @@ -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 diff --git a/code/game/objects/items/uav.dm b/code/game/objects/items/uav.dm index b1ff2723a8..f534ff9a42 100644 --- a/code/game/objects/items/uav.dm +++ b/code/game/objects/items/uav.dm @@ -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, "The nickname must be between 3 and 50 characters.") else diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 2eec58b136..0c318fc8dd 100644 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -240,7 +240,7 @@ 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 = "" diff --git a/code/game/objects/items/weapons/material/gravemarker.dm b/code/game/objects/items/weapons/material/gravemarker.dm index d3c615e8fd..83d65a6c3b 100644 --- a/code/game/objects/items/weapons/material/gravemarker.dm +++ b/code/game/objects/items/weapons/material/gravemarker.dm @@ -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)) diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index 84c1637a3e..2d19634aaf 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -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, "The label can be at most 50 characters long.") else if(length(tmp_label) > 10) diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 108e824616..6846b52066 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -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() diff --git a/code/game/objects/structures/ghost_pods/human.dm b/code/game/objects/structures/ghost_pods/human.dm index f2b3291597..13ae71ef92 100644 --- a/code/game/objects/structures/ghost_pods/human.dm +++ b/code/game/objects/structures/ghost_pods/human.dm @@ -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 diff --git a/code/game/objects/structures/gravemarker.dm b/code/game/objects/structures/gravemarker.dm index e53fcdeb20..381401b352 100644 --- a/code/game/objects/structures/gravemarker.dm +++ b/code/game/objects/structures/gravemarker.dm @@ -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)) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 4fc64a5c52..8cb6749823 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -133,7 +133,7 @@ if(user.mind) user.mind.transfer_to(vox) spawn(1) - var/newname = sanitizeSafe(input(vox,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN) + var/newname = sanitizeSafe(tgui_input_text(vox,"Enter a name, or leave blank for the default name.", "Name change","", MAX_NAME_LEN), MAX_NAME_LEN) if(!newname || newname == "") var/datum/language/L = GLOB.all_languages[vox.species.default_language] newname = L.get_random_name() diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 47f4aa26cf..bf30bc0d3d 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -121,7 +121,7 @@ /obj/structure/morgue/attackby(P as obj, mob/user as mob) if (istype(P, /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() != P) return if ((!in_range(src, usr) && src.loc != user)) @@ -249,7 +249,7 @@ GLOBAL_LIST_BOILERPLATE(all_crematoriums, /obj/structure/morgue/crematorium) /obj/structure/morgue/crematorium/attackby(P as obj, mob/user as mob) if (istype(P, /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() != P) return if ((!in_range(src, usr) > 1 && src.loc != user)) diff --git a/code/game/objects/structures/props/beam_prism.dm b/code/game/objects/structures/props/beam_prism.dm index a8d22fad50..96c6dc57b9 100644 --- a/code/game/objects/structures/props/beam_prism.dm +++ b/code/game/objects/structures/props/beam_prism.dm @@ -59,7 +59,7 @@ var/new_bearing if(free_rotate) - new_bearing = input(usr, "What bearing do you want to rotate \the [src] to?", "[name]") as num + new_bearing = tgui_input_number(usr, "What bearing do you want to rotate \the [src] to?", "[name]") new_bearing = round(new_bearing) if(new_bearing <= -1 || new_bearing > 360) to_chat(user, "Rotating \the [src] [new_bearing] degrees would be a waste of time.") @@ -176,7 +176,7 @@ var/new_bearing if(free_rotate) - new_bearing = input(usr, "What bearing do you want to rotate \the [src] to?", "[name]") as num + new_bearing = tgui_input_number(usr, "What bearing do you want to rotate \the [src] to?", "[name]") new_bearing = round(new_bearing) if(new_bearing <= -1 || new_bearing > 360) to_chat(user, "Rotating \the [src] [new_bearing] degrees would be a waste of time.") diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 28e54a4062..0ea141ce2a 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -70,7 +70,7 @@ return TRUE /obj/structure/windoor_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() diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 098861595b..fa9d9dc2a0 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -612,7 +612,7 @@ to_chat(user, "\The [src] is linked to \the [buffered_button].") return TRUE // Otherwise fall back to asking them - var/t = sanitizeSafe(input(user, "Enter the ID for the window.", src.name, null), MAX_NAME_LEN) + var/t = sanitizeSafe(tgui_input_text(user, "Enter the ID for the window.", src.name, null, MAX_NAME_LEN), MAX_NAME_LEN) if (!t && user.get_active_hand() != W && in_range(src, user)) src.id = t to_chat(user, "The new ID of \the [src] is [id]") @@ -667,7 +667,7 @@ var/obj/item/device/multitool/MT = W if(!id) // If no ID is set yet (newly built button?) let them select an ID for first-time use! - var/t = sanitizeSafe(input(user, "Enter an ID for \the [src].", src.name, null), MAX_NAME_LEN) + var/t = sanitizeSafe(tgui_input_text(user, "Enter an ID for \the [src].", src.name, null, MAX_NAME_LEN), MAX_NAME_LEN) if (t && user.get_active_hand() != W && in_range(src, user)) src.id = t to_chat(user, "The new ID of \the [src] is [id]") diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 154c42bc4c..15a8dd0c32 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -331,7 +331,7 @@ to_chat(vandal, "There's too much graffiti here to add more.") return FALSE - var/message = sanitize(input(usr, "Enter a message to engrave.", "Graffiti") as null|text, trim = TRUE) + var/message = sanitize(tgui_input_text(usr, "Enter a message to engrave.", "Graffiti"), trim = TRUE) if(!message) return FALSE diff --git a/code/modules/admin/verbs/custom_event.dm b/code/modules/admin/verbs/custom_event.dm index 6b92e9932e..a2550c6afe 100644 --- a/code/modules/admin/verbs/custom_event.dm +++ b/code/modules/admin/verbs/custom_event.dm @@ -7,7 +7,7 @@ to_chat(src, "Only administrators may use this command.") return - var/input = sanitize(input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg) as message|null, MAX_PAPER_MESSAGE_LEN, extra = 0) + var/input = sanitize(tgui_input_text(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg, MAX_PAPER_MESSAGE_LEN, TRUE), MAX_PAPER_MESSAGE_LEN, extra = 0) if(!input || input == "") custom_event_msg = null log_admin("[usr.key] has cleared the custom event text.") diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm index a014544090..5080b5cdd4 100644 --- a/code/modules/admin/view_variables/topic.dm +++ b/code/modules/admin/view_variables/topic.dm @@ -21,7 +21,7 @@ to_chat(usr, "This can only be used on instances of type /mob") return - var/new_name = sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null, MAX_NAME_LEN) + var/new_name = sanitize(tgui_input_text(usr,"What would you like to name this mob?","Input a name",M.real_name,MAX_NAME_LEN), MAX_NAME_LEN) if( !new_name || !M ) return message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].") diff --git a/code/modules/casino/casino.dm b/code/modules/casino/casino.dm index 224e457ee9..569607bc0f 100644 --- a/code/modules/casino/casino.dm +++ b/code/modules/casino/casino.dm @@ -478,7 +478,7 @@ if(usr.incapacitated()) return if(ishuman(usr) || istype(usr, /mob/living/silicon/robot)) - casinoslave_price = tgui_input_number("Select the desired price (1-1000)", "Set Price", null, null, 1000, 1) + casinoslave_price = tgui_input_number(usr, "Select the desired price (1-1000)", "Set Price", null, null, 1000, 1) if(casinoslave_price>1000 || casinoslave_price<1) to_chat(user,"Invalid price. ") return diff --git a/code/modules/client/preference_setup/antagonism/01_basic.dm b/code/modules/client/preference_setup/antagonism/01_basic.dm index 100595aaba..feeff7172d 100644 --- a/code/modules/client/preference_setup/antagonism/01_basic.dm +++ b/code/modules/client/preference_setup/antagonism/01_basic.dm @@ -44,7 +44,7 @@ var/global/list/uplink_locations = list("PDA", "Headset", "None") return TOPIC_REFRESH if(href_list["exploitable_record"]) - var/exploitmsg = sanitize(input(user,"Set exploitable information about you here.","Exploitable Information", html_decode(pref.exploit_record)) as message|null, MAX_RECORD_LENGTH, extra = 0) + var/exploitmsg = sanitize(tgui_input_text(user,"Set exploitable information about you here.","Exploitable Information", html_decode(pref.exploit_record), MAX_RECORD_LENGTH, TRUE), MAX_RECORD_LENGTH, extra = 0) if(!isnull(exploitmsg) && !jobban_isbanned(user, "Records") && CanUseTopic(user)) pref.exploit_record = exploitmsg return TOPIC_REFRESH @@ -54,7 +54,7 @@ var/global/list/uplink_locations = list("PDA", "Headset", "None") if(!choice || !CanUseTopic(user)) return TOPIC_NOACTION if(choice == "Other") - var/raw_choice = sanitize(input(user, "Please enter a faction.", "Character Preference") as text|null, MAX_NAME_LEN) + var/raw_choice = sanitize(tgui_input_text(user, "Please enter a faction.", "Character Preference", null, MAX_NAME_LEN), MAX_NAME_LEN) if(raw_choice) pref.antag_faction = raw_choice else diff --git a/code/modules/client/preference_setup/general/05_background.dm b/code/modules/client/preference_setup/general/05_background.dm index 50d1b362df..6593c9c2d3 100644 --- a/code/modules/client/preference_setup/general/05_background.dm +++ b/code/modules/client/preference_setup/general/05_background.dm @@ -71,7 +71,7 @@ if(!choice || !CanUseTopic(user)) return TOPIC_NOACTION if(choice == "Other") - var/raw_choice = sanitize(input(user, "Please enter a home system.", "Character Preference") as text|null, MAX_NAME_LEN) + var/raw_choice = sanitize(tgui_input_text(user, "Please enter a home system.", "Character Preference", null, MAX_NAME_LEN), MAX_NAME_LEN) if(raw_choice && CanUseTopic(user)) pref.home_system = raw_choice else @@ -83,7 +83,7 @@ if(!choice || !CanUseTopic(user)) return TOPIC_NOACTION if(choice == "Other") - var/raw_choice = sanitize(input(user, "Please enter your current citizenship.", "Character Preference") as text|null, MAX_NAME_LEN) + var/raw_choice = sanitize(tgui_input_text(user, "Please enter your current citizenship.", "Character Preference", null, MAX_NAME_LEN), MAX_NAME_LEN) if(raw_choice && CanUseTopic(user)) pref.citizenship = raw_choice else @@ -95,7 +95,7 @@ if(!choice || !CanUseTopic(user)) return TOPIC_NOACTION if(choice == "Other") - var/raw_choice = sanitize(input(user, "Please enter a faction.", "Character Preference") as text|null, MAX_NAME_LEN) + var/raw_choice = sanitize(tgui_input_text(user, "Please enter a faction.", "Character Preference", null, MAX_NAME_LEN), MAX_NAME_LEN) if(raw_choice) pref.faction = raw_choice else @@ -107,7 +107,7 @@ if(!choice || !CanUseTopic(user)) return TOPIC_NOACTION if(choice == "Other") - var/raw_choice = sanitize(input(user, "Please enter a religon.", "Character Preference") as text|null, MAX_NAME_LEN) + var/raw_choice = sanitize(tgui_input_text(user, "Please enter a religon.", "Character Preference", null, MAX_NAME_LEN), MAX_NAME_LEN) if(raw_choice) pref.religion = sanitize(raw_choice) else @@ -115,19 +115,19 @@ return TOPIC_REFRESH else if(href_list["set_medical_records"]) - var/new_medical = sanitize(input(user,"Enter medical information here.","Character Preference", html_decode(pref.med_record)) as message|null, MAX_RECORD_LENGTH, extra = 0) + var/new_medical = sanitize(tgui_input_text(user,"Enter medical information here.","Character Preference", html_decode(pref.med_record), MAX_RECORD_LENGTH, TRUE), MAX_RECORD_LENGTH, extra = 0) if(!isnull(new_medical) && !jobban_isbanned(user, "Records") && CanUseTopic(user)) pref.med_record = new_medical return TOPIC_REFRESH else if(href_list["set_general_records"]) - var/new_general = sanitize(input(user,"Enter employment information here.","Character Preference", html_decode(pref.gen_record)) as message|null, MAX_RECORD_LENGTH, extra = 0) + var/new_general = sanitize(tgui_input_text(user,"Enter employment information here.","Character Preference", html_decode(pref.gen_record), MAX_RECORD_LENGTH, TRUE), MAX_RECORD_LENGTH, extra = 0) if(!isnull(new_general) && !jobban_isbanned(user, "Records") && CanUseTopic(user)) pref.gen_record = new_general return TOPIC_REFRESH else if(href_list["set_security_records"]) - var/sec_medical = sanitize(input(user,"Enter security information here.","Character Preference", html_decode(pref.sec_record)) as message|null, MAX_RECORD_LENGTH, extra = 0) + var/sec_medical = sanitize(tgui_input_text(user,"Enter security information here.","Character Preference", html_decode(pref.sec_record), MAX_RECORD_LENGTH, TRUE), MAX_RECORD_LENGTH, extra = 0) if(!isnull(sec_medical) && !jobban_isbanned(user, "Records") && CanUseTopic(user)) pref.sec_record = sec_medical return TOPIC_REFRESH diff --git a/code/modules/client/preference_setup/global/01_ui.dm b/code/modules/client/preference_setup/global/01_ui.dm index fbe54b00cd..5d04b83e73 100644 --- a/code/modules/client/preference_setup/global/01_ui.dm +++ b/code/modules/client/preference_setup/global/01_ui.dm @@ -100,7 +100,7 @@ return TOPIC_REFRESH else if(href_list["select_client_fps"]) - var/fps_new = tgui_input_number(user, "Input Client FPS (1-200, 0 uses server FPS)", "Global Preference", pref.client_fps, 200, 1) + var/fps_new = tgui_input_number(user, "Input Client FPS (1-200, 0 uses server FPS)", "Global Preference", pref.client_fps, 200, 0) if(isnull(fps_new) || !CanUseTopic(user)) return TOPIC_NOACTION if(fps_new < 0 || fps_new > MAX_CLIENT_FPS) return TOPIC_NOACTION pref.client_fps = fps_new @@ -155,4 +155,4 @@ return ..() /datum/category_item/player_setup_item/player_global/ui/proc/can_select_ooc_color(var/mob/user) - return config.allow_admin_ooccolor && check_rights(R_ADMIN|R_EVENT|R_FUN, 0, user) + return config.allow_admin_ooccolor && check_rights(R_ADMIN|R_EVENT|R_FUN, 0, user) \ No newline at end of file diff --git a/code/modules/client/preference_setup/global/03_pai.dm b/code/modules/client/preference_setup/global/03_pai.dm index 6993e0dc6d..0fdbf3dc58 100644 --- a/code/modules/client/preference_setup/global/03_pai.dm +++ b/code/modules/client/preference_setup/global/03_pai.dm @@ -42,7 +42,7 @@ var/t switch(href_list["option"]) if("name") - t = sanitizeName(input(user, "Enter a name for your pAI", "Global Preference", candidate.name) as text|null, MAX_NAME_LEN, 1) + t = sanitizeName(tgui_input_text(user, "Enter a name for your pAI", "Global Preference", candidate.name, MAX_NAME_LEN), MAX_NAME_LEN, 1) if(t && CanUseTopic(user)) candidate.name = t if("desc") diff --git a/code/modules/client/preference_setup/loadout/gear_tweaks.dm b/code/modules/client/preference_setup/loadout/gear_tweaks.dm index 11e0f1f777..b7cd2b5366 100644 --- a/code/modules/client/preference_setup/loadout/gear_tweaks.dm +++ b/code/modules/client/preference_setup/loadout/gear_tweaks.dm @@ -172,7 +172,7 @@ var/datum/gear_tweak/custom_name/gear_tweak_free_name = new() return if(valid_custom_names) return tgui_input_list(user, "Choose an item name.", "Character Preference", valid_custom_names, metadata) - var/san_input = sanitize(input(user, "Choose the item's name. Leave it blank to use the default name.", "Item Name", metadata) as text|null, MAX_LNAME_LEN, extra = 0) + var/san_input = sanitize(tgui_input_text(user, "Choose the item's name. Leave it blank to use the default name.", "Item Name", metadata, MAX_LNAME_LEN), MAX_LNAME_LEN, extra = 0) return san_input ? san_input : get_default() /datum/gear_tweak/custom_name/tweak_item(var/obj/item/I, var/metadata) @@ -204,7 +204,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new() return if(valid_custom_desc) return tgui_input_list(user, "Choose an item description.", "Character Preference",valid_custom_desc, metadata) - var/san_input = sanitize(input(user, "Choose the item's description. Leave it blank to use the default description.", "Item Description", metadata) as message|null, extra = 0) + var/san_input = sanitize(tgui_input_text(user, "Choose the item's description. Leave it blank to use the default description.", "Item Description", metadata, multiline = TRUE), extra = 0) return san_input ? san_input : get_default() /datum/gear_tweak/custom_desc/tweak_item(var/obj/item/I, var/metadata) diff --git a/code/modules/client/preference_setup/loadout/gear_tweaks_vr.dm b/code/modules/client/preference_setup/loadout/gear_tweaks_vr.dm index 488a62fbc9..4de3362d6f 100644 --- a/code/modules/client/preference_setup/loadout/gear_tweaks_vr.dm +++ b/code/modules/client/preference_setup/loadout/gear_tweaks_vr.dm @@ -5,7 +5,7 @@ return "" /datum/gear_tweak/collar_tag/get_metadata(var/user, var/metadata) - return sanitize( input(user, "Choose the tag text", "Character Preference", metadata) as text , MAX_NAME_LEN ) + return sanitize( tgui_input_text(user, "Choose the tag text", "Character Preference", metadata, MAX_NAME_LEN), MAX_NAME_LEN ) /datum/gear_tweak/collar_tag/tweak_item(var/obj/item/clothing/accessory/collar/C, var/metadata) if(metadata == "") diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index d97d2aa9ef..62b8cefe4b 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -223,8 +223,8 @@ return TOPIC_NOACTION else if(href_list["custom_species"]) - var/raw_choice = sanitize(input(user, "Input your custom species name:", - "Character Preference", pref.custom_species) as null|text, MAX_NAME_LEN) + var/raw_choice = sanitize(tgui_input_text(user, "Input your custom species name:", + "Character Preference", pref.custom_species, MAX_NAME_LEN), MAX_NAME_LEN) if (CanUseTopic(user)) pref.custom_species = raw_choice return TOPIC_REFRESH @@ -275,25 +275,25 @@ return TOPIC_REFRESH else if(href_list["custom_say"]) - var/say_choice = sanitize(input(usr, "This word or phrase will appear instead of 'says': [pref.real_name] says, \"Hi.\"", "Custom Say", pref.custom_say) as null|text, 12) + var/say_choice = sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'says': [pref.real_name] says, \"Hi.\"", "Custom Say", pref.custom_say, 12), 12) if(say_choice) pref.custom_say = say_choice return TOPIC_REFRESH else if(href_list["custom_whisper"]) - var/whisper_choice = sanitize(input(usr, "This word or phrase will appear instead of 'whispers': [pref.real_name] whispers, \"Hi...\"", "Custom Whisper", pref.custom_whisper) as null|text, 12) + var/whisper_choice = sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'whispers': [pref.real_name] whispers, \"Hi...\"", "Custom Whisper", pref.custom_whisper, 12), 12) if(whisper_choice) pref.custom_whisper = whisper_choice return TOPIC_REFRESH else if(href_list["custom_ask"]) - var/ask_choice = sanitize(input(usr, "This word or phrase will appear instead of 'asks': [pref.real_name] asks, \"Hi?\"", "Custom Ask", pref.custom_ask) as null|text, 12) + var/ask_choice = sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'asks': [pref.real_name] asks, \"Hi?\"", "Custom Ask", pref.custom_ask, 12), 12) if(ask_choice) pref.custom_ask = ask_choice return TOPIC_REFRESH else if(href_list["custom_exclaim"]) - var/exclaim_choice = sanitize(input(usr, "This word or phrase will appear instead of 'exclaims', 'shouts' or 'yells': [pref.real_name] exclaims, \"Hi!\"", "Custom Exclaim", pref.custom_exclaim) as null|text, 12) + var/exclaim_choice = sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'exclaims', 'shouts' or 'yells': [pref.real_name] exclaims, \"Hi!\"", "Custom Exclaim", pref.custom_exclaim, 12), 12) if(exclaim_choice) pref.custom_exclaim = exclaim_choice return TOPIC_REFRESH diff --git a/code/modules/client/verbs/character_directory.dm b/code/modules/client/verbs/character_directory.dm index 377a679b2a..c569be0523 100644 --- a/code/modules/client/verbs/character_directory.dm +++ b/code/modules/client/verbs/character_directory.dm @@ -151,7 +151,7 @@ GLOBAL_DATUM(character_directory, /datum/character_directory) return var/current_ad = usr.client.prefs.directory_ad - var/new_ad = sanitize(input(usr, "Change your character ad", "Character Ad", current_ad) as message|null, extra = 0) + var/new_ad = sanitize(tgui_input_text(usr, "Change your character ad", "Character Ad", current_ad, multiline = TRUE), extra = 0) if(isnull(new_ad)) return usr.client.prefs.directory_ad = new_ad diff --git a/code/modules/clothing/under/accessories/accessory_vr.dm b/code/modules/clothing/under/accessories/accessory_vr.dm index afcccabe3e..06ae598fc7 100644 --- a/code/modules/clothing/under/accessories/accessory_vr.dm +++ b/code/modules/clothing/under/accessories/accessory_vr.dm @@ -187,7 +187,7 @@ var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"])) set_frequency(new_frequency) if(href_list["tag"]) - var/str = copytext(reject_bad_text(input(usr,"Tag text?","Set tag","")),1,MAX_NAME_LEN) + var/str = copytext(reject_bad_text(tgui_input_text(usr,"Tag text?","Set tag","",MAX_NAME_LEN)),1,MAX_NAME_LEN) if(!str || !length(str)) to_chat(usr,"[name]'s tag set to be blank.") name = initial(name) @@ -319,7 +319,7 @@ return to_chat(user,"You adjust the [name]'s tag.") - var/str = copytext(reject_bad_text(input(user,"Tag text?","Set tag","")),1,MAX_NAME_LEN) + var/str = copytext(reject_bad_text(tgui_input_text(user,"Tag text?","Set tag","",MAX_NAME_LEN)),1,MAX_NAME_LEN) if(!str || !length(str)) to_chat(user,"[name]'s tag set to be blank.") @@ -356,7 +356,7 @@ if(!(istype(user.get_active_hand(),I)) || !(istype(user.get_inactive_hand(),src)) || (user.stat)) return - var/str = copytext(reject_bad_text(input(user,"Tag text?","Set tag","")),1,MAX_NAME_LEN) + var/str = copytext(reject_bad_text(tgui_input_text(user,"Tag text?","Set tag","",MAX_NAME_LEN)),1,MAX_NAME_LEN) if(!str || !length(str)) if(!writtenon) diff --git a/code/modules/emotes/emote_mob.dm b/code/modules/emotes/emote_mob.dm index 780c3b97c6..03e30b0189 100644 --- a/code/modules/emotes/emote_mob.dm +++ b/code/modules/emotes/emote_mob.dm @@ -54,7 +54,7 @@ if(act == "custom") if(!message) - message = sanitize_or_reflect(input(src,"Choose an emote to display.") as text|null, src) //VOREStation Edit - Reflect too long messages, within reason + message = sanitize_or_reflect(tgui_input_text(src,"Choose an emote to display."), src) //VOREStation Edit - Reflect too long messages, within reason if(!message) return if (!m_type) @@ -165,7 +165,7 @@ var/input if(!message) - input = sanitize(input(src,"Choose an emote to display.") as text|null) + input = sanitize(tgui_input_text(src,"Choose an emote to display.")) else input = message diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index bb8a707010..52ad80641a 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -188,7 +188,7 @@ if(P.name != "Blank Card") to_chat(user,"You cannot write on that card.") return - var/cardtext = sanitize(input(user, "What do you wish to write on the card?", "Card Editing") as text|null, MAX_PAPER_MESSAGE_LEN) + var/cardtext = sanitize(tgui_input_text(user, "What do you wish to write on the card?", "Card Editing", null, MAX_PAPER_MESSAGE_LEN), MAX_PAPER_MESSAGE_LEN) if(!cardtext) return P.name = cardtext diff --git a/code/modules/ghosttrap/trap.dm b/code/modules/ghosttrap/trap.dm index 594d6f2e45..4e68683542 100644 --- a/code/modules/ghosttrap/trap.dm +++ b/code/modules/ghosttrap/trap.dm @@ -93,7 +93,7 @@ var/list/ghost_traps // Allows people to set their own name. May or may not need to be removed for posibrains if people are dumbasses. /datum/ghosttrap/proc/set_new_name(var/mob/target) - var/newname = sanitizeSafe(input(target,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN) + var/newname = sanitizeSafe(tgui_input_text(target,"Enter a name, or leave blank for the default name.", "Name change","", MAX_NAME_LEN), MAX_NAME_LEN) if (newname != "") target.real_name = newname target.name = target.real_name diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index 11f4a53a0d..1f08f1dec5 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -176,7 +176,7 @@ if(!check_interactivity(M)) return - var/input = sanitizeSafe(input(usr, "What do you want to name this?", "Rename", src.name) as null|text, MAX_NAME_LEN) + var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name this?", "Rename", src.name, MAX_NAME_LEN), MAX_NAME_LEN) if(src && input) to_chat(M, "The machine now has a label reading '[input]'.") name = input diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/code/modules/integrated_electronics/core/integrated_circuit.dm index 89cbf4fdd1..209b59d37a 100644 --- a/code/modules/integrated_electronics/core/integrated_circuit.dm +++ b/code/modules/integrated_electronics/core/integrated_circuit.dm @@ -68,7 +68,7 @@ a creative player the means to solve many problems. Circuits are held inside an if(!check_interactivity(M)) return - var/input = sanitizeSafe(input(usr, "What do you want to name the circuit?", "Rename", src.name) as null|text, MAX_NAME_LEN) + var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name the circuit?", "Rename", src.name, MAX_NAME_LEN), MAX_NAME_LEN) if(src && input && assembly.check_interactivity(M)) to_chat(M, "The circuit '[src.name]' is now labeled '[input]'.") displayed_name = input diff --git a/code/modules/integrated_electronics/core/pins.dm b/code/modules/integrated_electronics/core/pins.dm index a52e626dcc..c402cf022d 100644 --- a/code/modules/integrated_electronics/core/pins.dm +++ b/code/modules/integrated_electronics/core/pins.dm @@ -159,7 +159,7 @@ list[]( to_chat(user, "You input [new_data] into the pin.") return new_data if("number") - new_data = input(usr, "Now type in a number.","[src] number writing", isnum(default) ? default : null) as null|num + new_data = tgui_input_number(usr, "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/special_pins/char_pin.dm b/code/modules/integrated_electronics/core/special_pins/char_pin.dm index 0449b70549..734d4515be 100644 --- a/code/modules/integrated_electronics/core/special_pins/char_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/char_pin.dm @@ -3,7 +3,7 @@ name = "char pin" /datum/integrated_io/char/ask_for_pin_data(mob/user) - var/new_data = input(usr, "Please type in one character.","[src] char writing") as null|text + var/new_data = tgui_input_text(usr, "Please type in one character.","[src] char writing") if(holder.check_interactivity(user) ) to_chat(user, "You input [new_data ? "new_data" : "NULL"] into the pin.") write_data_to_pin(new_data) 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 4b523f9114..368eb27b93 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(usr, "Please type in a valid dir number. \ + var/new_data = tgui_input_number(usr, "Please type in a valid dir number. \ Valid dirs are;\n\ North/Fore = [NORTH],\n\ South/Aft = [SOUTH],\n\ @@ -14,7 +14,7 @@ Southeast = [SOUTHEAST],\n\ Southwest = [SOUTHWEST],\n\ Up = [UP],\n\ - Down = [DOWN]","[src] dir writing") as null|num + Down = [DOWN]","[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/number_pin.dm b/code/modules/integrated_electronics/core/special_pins/number_pin.dm index 92b07638bd..07fe8f089a 100644 --- a/code/modules/integrated_electronics/core/special_pins/number_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/number_pin.dm @@ -4,7 +4,7 @@ // data = 0 /datum/integrated_io/number/ask_for_pin_data(mob/user) - var/new_data = input(usr, "Please type in a number.","[src] number writing") as null|num + var/new_data = tgui_input_number(usr, "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/core/tools.dm b/code/modules/integrated_electronics/core/tools.dm index 43cc7eac9a..4041363326 100644 --- a/code/modules/integrated_electronics/core/tools.dm +++ b/code/modules/integrated_electronics/core/tools.dm @@ -129,7 +129,7 @@ to_chat(user, "You set \the [src]'s memory to \"[new_data]\".") if("number") accepting_refs = 0 - new_data = input(usr, "Now type in a number.","[src] number writing") as null|num + new_data = tgui_input_number(usr, "Now type in a number.","[src] number writing") if(isnum(new_data) && CanInteract(user, GLOB.tgui_physical_state)) data_to_write = new_data to_chat(user, "You set \the [src]'s memory to [new_data].") diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm index 2d275e2386..4b9f5a9152 100644 --- a/code/modules/integrated_electronics/subtypes/input.dm +++ b/code/modules/integrated_electronics/subtypes/input.dm @@ -53,7 +53,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.","Number pad", get_pin_data(IC_OUTPUT, 1)) as null|num + var/new_input = tgui_input_number(user, "Enter a number, please.","Number pad", get_pin_data(IC_OUTPUT, 1)) if(isnum(new_input) && CanInteract(user, GLOB.tgui_physical_state)) set_pin_data(IC_OUTPUT, 1, new_input) push_data() diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 421110c391..62b5222552 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -33,7 +33,7 @@ O.loc = src update_icon() else if(istype(O, /obj/item/weapon/pen)) - var/newname = sanitizeSafe(input(usr, "What would you like to title this bookshelf?"), MAX_NAME_LEN) + var/newname = sanitizeSafe(tgui_input_text(usr, "What would you like to title this bookshelf?", null, null, MAX_NAME_LEN), MAX_NAME_LEN) if(!newname) return else diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index f030c5f5f9..ad915f7f9d 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -371,7 +371,7 @@ if(href_list["editbook"]) buffer_book = sanitizeSafe(tgui_input_text(usr, "Enter the book's title:")) if(href_list["editmob"]) - buffer_mob = sanitize(input(usr, "Enter the recipient's name:") as text|null, MAX_NAME_LEN) + buffer_mob = sanitize(tgui_input_text(usr, "Enter the recipient's name:", null, null, MAX_NAME_LEN), MAX_NAME_LEN) if(href_list["checkout"]) var/datum/borrowbook/b = new /datum/borrowbook b.bookname = sanitizeSafe(buffer_book) @@ -386,7 +386,7 @@ var/obj/item/weapon/book/b = locate(href_list["delbook"]) inventory.Remove(b) if(href_list["setauthor"]) - var/newauthor = sanitize(input(usr, "Enter the author's name: ") as text|null) + var/newauthor = sanitize(tgui_input_text(usr, "Enter the author's name: ")) if(newauthor) scanner.cache.author = newauthor if(href_list["setcategory"]) @@ -458,7 +458,7 @@ qdel(query) //CHOMPEdit TGSQL if(href_list["orderbyid"]) - var/orderid = input(usr, "Enter your order:") as num|null + var/orderid = tgui_input_number(usr, "Enter your order:") if(orderid) if(isnum(orderid)) var/nhref = "src=\ref[src];targetid=[orderid]" diff --git a/code/modules/materials/sheets/organic/animal_products.dm b/code/modules/materials/sheets/organic/animal_products.dm index 62b253c306..0d3b56df17 100644 --- a/code/modules/materials/sheets/organic/animal_products.dm +++ b/code/modules/materials/sheets/organic/animal_products.dm @@ -163,4 +163,4 @@ desc = "A handmade blindfold that covers the eyes, preventing sight." /obj/item/clothing/accessory/collar/craftable/attack_self(mob/living/user as mob) - given_name = sanitizeSafe(input(usr, "What would you like to label the collar?", "Collar Labelling", null) as text, MAX_NAME_LEN) + given_name = sanitizeSafe(tgui_input_text(usr, "What would you like to label the collar?", "Collar Labelling", null, MAX_NAME_LEN), MAX_NAME_LEN) diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index 868056afd8..0baa14a790 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -173,7 +173,7 @@ /obj/machinery/mining/drill/attackby(obj/item/O as obj, mob/user as mob) if(!active) if(istype(O, /obj/item/device/multitool)) - var/newtag = text2num(sanitizeSafe(input(user, "Enter new ID number or leave empty to cancel.", "Assign ID number") as text, 4)) + var/newtag = text2num(sanitizeSafe(tgui_input_text(user, "Enter new ID number or leave empty to cancel.", "Assign ID number", null, 4), 4)) if(newtag) name = "[initial(name)] #[newtag]" to_chat(user, "You changed the drill ID to: [newtag]") diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 193aa62d58..a765269858 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -763,7 +763,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/max_length = 50 - var/message = sanitize(input(usr, "Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")) + var/message = sanitize(tgui_input_text(usr, "Write a message. It cannot be longer than [max_length] characters.","Blood writing", "", max_length)) if (message) @@ -977,8 +977,15 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set category = "Ghost" set name = "Blank pAI alert" set desc = "Flash an indicator light on available blank pAI devices for a smidgen of hope." + + if(jobban_isbanned(usr, "pAI")) + to_chat(usr,"You cannot alert pAI cards when you are banned from playing as a pAI.") + return if(usr.client.prefs?.be_special & BE_PAI) + var/choice = tgui_alert(usr, "Would you like to submit yourself to the recruitment list too?", "Confirmation", list("No", "Yes")) + if(choice == "Yes") + paiController.recruitWindow(usr) var/count = 0 for(var/obj/item/device/paicard/p in GLOB.all_pai_cards) var/obj/item/device/paicard/PP = p diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index f59ebf612c..48cdfa3ebd 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -23,7 +23,7 @@ var/input if(!message) - input = sanitize_or_reflect(input(src, "Choose an emote to display.") as text|null, src) //VOREStation Edit - Reflect too long messages, within reason + input = sanitize_or_reflect(tgui_input_text(src, "Choose an emote to display."), src) //VOREStation Edit - Reflect too long messages, within reason else input = message diff --git a/code/modules/mob/living/bot/SLed209bot.dm b/code/modules/mob/living/bot/SLed209bot.dm index 82f3c43cc2..f016bc55f2 100644 --- a/code/modules/mob/living/bot/SLed209bot.dm +++ b/code/modules/mob/living/bot/SLed209bot.dm @@ -67,7 +67,7 @@ /obj/item/weapon/secbot_assembly/ed209_assembly/slime/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) // Here in the event it's added into a PoI or some such. Standard construction relies on the standard ED up until taser. if(istype(W, /obj/item/weapon/pen)) - var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN) + var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return if(!in_range(src, usr) && src.loc != usr) diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index 21dac0893b..bd210756d6 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -264,7 +264,7 @@ qdel(src) else if(istype(W, /obj/item/weapon/pen)) - var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN) + var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return if(!in_range(src, usr) && src.loc != usr) diff --git a/code/modules/mob/living/bot/ed209bot.dm b/code/modules/mob/living/bot/ed209bot.dm index 8700988e59..f699191a66 100644 --- a/code/modules/mob/living/bot/ed209bot.dm +++ b/code/modules/mob/living/bot/ed209bot.dm @@ -87,7 +87,7 @@ ..() if(istype(W, /obj/item/weapon/pen)) - var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN) + var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return if(!in_range(src, usr) && src.loc != usr) diff --git a/code/modules/mob/living/bot/edCLNbot.dm b/code/modules/mob/living/bot/edCLNbot.dm index 5ef7cdf9c9..ffdcdb1f44 100644 --- a/code/modules/mob/living/bot/edCLNbot.dm +++ b/code/modules/mob/living/bot/edCLNbot.dm @@ -121,7 +121,7 @@ ..() if(istype(W, /obj/item/weapon/pen)) - var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN) + var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return if(!in_range(src, usr) && src.loc != usr) diff --git a/code/modules/mob/living/bot/farmbot.dm b/code/modules/mob/living/bot/farmbot.dm index 969bfc1c83..938ed1d8e0 100644 --- a/code/modules/mob/living/bot/farmbot.dm +++ b/code/modules/mob/living/bot/farmbot.dm @@ -409,7 +409,7 @@ qdel(src) else if(istype(W, /obj/item/weapon/pen)) - var/t = input(user, "Enter new robot name", name, created_name) as text + var/t = tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN) t = sanitize(t, MAX_NAME_LEN) if(!t) return diff --git a/code/modules/mob/living/bot/floorbot.dm b/code/modules/mob/living/bot/floorbot.dm index a7a7def771..22584ae359 100644 --- a/code/modules/mob/living/bot/floorbot.dm +++ b/code/modules/mob/living/bot/floorbot.dm @@ -382,7 +382,7 @@ user.drop_from_inventory(src) qdel(src) else if (istype(W, /obj/item/weapon/pen)) - var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN) + var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return if(!in_range(src, user) && loc != user) @@ -412,7 +412,7 @@ user.drop_from_inventory(src) qdel(src) else if(istype(W, /obj/item/weapon/pen)) - var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN) + var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return if(!in_range(src, user) && loc != user) diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm index 6477c8be92..1b4b7c9d10 100644 --- a/code/modules/mob/living/bot/medbot.dm +++ b/code/modules/mob/living/bot/medbot.dm @@ -536,7 +536,7 @@ /obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() if(istype(W, /obj/item/weapon/pen)) - var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN) + var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return if(!in_range(src, usr) && loc != usr) diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm index 558a36c239..8ca61e50c8 100644 --- a/code/modules/mob/living/bot/secbot.dm +++ b/code/modules/mob/living/bot/secbot.dm @@ -473,7 +473,7 @@ qdel(src) else if(istype(W, /obj/item/weapon/pen)) - var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN) + var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return if(!in_range(src, user) && loc != user) diff --git a/code/modules/mob/living/carbon/alien/progression.dm b/code/modules/mob/living/carbon/alien/progression.dm index 1c4c37b083..0dd4ba7e13 100644 --- a/code/modules/mob/living/carbon/alien/progression.dm +++ b/code/modules/mob/living/carbon/alien/progression.dm @@ -36,7 +36,7 @@ if(mind) mind.transfer_to(adult) if (can_namepick_as_adult) - var/newname = sanitize(input(adult, "You have become an adult. Choose a name for yourself.", "Adult Name") as null|text, MAX_NAME_LEN) + var/newname = sanitize(tgui_input_text(adult, "You have become an adult. Choose a name for yourself.", "Adult Name", null, MAX_NAME_LEN), MAX_NAME_LEN) if(!newname) adult.fully_replace_character_name(name, "[src.adult_name] ([instance_num])") diff --git a/code/modules/mob/living/living_powers.dm b/code/modules/mob/living/living_powers.dm index 787dd31361..ac24abfbc5 100644 --- a/code/modules/mob/living/living_powers.dm +++ b/code/modules/mob/living/living_powers.dm @@ -14,7 +14,7 @@ return if(status_flags & HIDING) - reveal("You have stopped hiding.") + reveal(FALSE, "You have stopped hiding.") else status_flags |= HIDING layer = HIDING_LAYER //Just above cables with their 2.44 diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 9e992f7414..0267fdbff3 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -22,7 +22,7 @@ var/list/software = list() var/userDNA // The DNA string of our assigned user var/obj/item/device/paicard/card // The card we inhabit - var/obj/item/device/radio/radio // Our primary radio + var/obj/item/device/radio/borg/pai/radio // Our primary radio var/obj/item/device/communicator/integrated/communicator // Our integrated communicator. var/chassis = "pai-repairbot" // A record of your chosen chassis. @@ -111,7 +111,7 @@ communicator = new(src) if(card) if(!card.radio) - card.radio = new /obj/item/device/radio(src.card) + card.radio = new /obj/item/device/radio/borg/pai(src.card) radio = card.radio //Default languages without universal translator software @@ -134,7 +134,7 @@ var/datum/data/pda/app/messenger/M = pda.find_program(/datum/data/pda/app/messenger) if(M) - M.toff = TRUE + M.toff = FALSE ..() /mob/living/silicon/pai/Login() @@ -143,7 +143,6 @@ if (client.prefs) ooc_notes = client.prefs.metadata - // this function shows the information about being silenced as a pAI in the Status panel /mob/living/silicon/pai/proc/show_silenced() if(src.silence_time) @@ -402,12 +401,14 @@ M.drop_from_inventory(H) H.loc = get_turf(src) src.loc = get_turf(H) - - // Move us into the card and move the card to the ground. - src.loc = card - card.loc = get_turf(card) - src.forceMove(card) - card.forceMove(card.loc) + + if(isbelly(loc)) //If in tumby, when fold up, card go into tumby + var/obj/belly/B = loc + src.forceMove(card) + card.forceMove(B) + else //Otherwise go on floor + src.forceMove(card) + card.forceMove(get_turf(card)) canmove = 1 resting = 0 icon_state = "[chassis]" @@ -440,11 +441,15 @@ idcard.access |= ID.access to_chat(user, "You add the access from the [W] to [src].") to_chat(src, "\The [user] swipes the [W] over you. You copy the access codes.") + if(radio) + radio.recalculateChannels() return if("Remove Access") idcard.access = list() to_chat(user, "You remove the access from [src].") to_chat(src, "\The [user] swipes the [W] over you, removing access codes from you.") + if(radio) + radio.recalculateChannels() return if("Cancel") return diff --git a/code/modules/mob/living/silicon/pai/pai_vr.dm b/code/modules/mob/living/silicon/pai/pai_vr.dm index 12dd50682d..0a2f421d07 100644 --- a/code/modules/mob/living/silicon/pai/pai_vr.dm +++ b/code/modules/mob/living/silicon/pai/pai_vr.dm @@ -3,6 +3,7 @@ icon = 'icons/mob/pai_vr.dmi' softfall = TRUE var/eye_glow = TRUE + var/hide_glow = FALSE var/image/eye_layer = null // Holds the eye overlay. var/eye_color = "#00ff0d" var/global/list/wide_chassis = list( @@ -54,7 +55,6 @@ /mob/living/silicon/pai/Initialize() . = ..() - verbs |= /mob/living/proc/hide verbs |= /mob/proc/dominate_predator verbs |= /mob/living/proc/dominate_prey verbs |= /mob/living/proc/set_size @@ -155,10 +155,11 @@ set category = "pAI Commands" set name = "Toggle Eye Glow" if(chassis in allows_eye_color) - if(eye_glow) + if(eye_glow && !hide_glow) eye_glow = FALSE else eye_glow = TRUE + hide_glow = FALSE update_icon() else to_chat(src, "Your selected chassis cannot modify its eye glow!") @@ -190,7 +191,7 @@ eye_layer = image(icon, "[icon_state]-eyes") eye_layer.appearance_flags = appearance_flags eye_layer.color = eye_color - if(eye_glow) + if(eye_glow && !hide_glow) eye_layer.plane = PLANE_LIGHTING_ABOVE add_overlay(eye_layer) @@ -370,9 +371,6 @@ if(!new_gender_identity) return 0 gender = new_gender_identity -<<<<<<< HEAD - return 1 -======= return 1 /mob/living/silicon/pai/verb/pai_hide() @@ -546,5 +544,4 @@ touch_window("Door Jack") /mob/living/silicon/pai/proc/ar_hud() - touch_window("AR HUD") ->>>>>>> 950b23cc87... Merge pull request #13142 from Very-Soft/morepaiinterface + touch_window("AR HUD") \ No newline at end of file diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index f62b5134cd..e738829570 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -69,7 +69,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates switch(option) if("name") - t = sanitizeSafe(input(usr, "Enter a name for your pAI", "pAI Name", candidate.name) as text, MAX_NAME_LEN) + t = sanitizeSafe(tgui_input_text(usr, "Enter a name for your pAI", "pAI Name", candidate.name, MAX_NAME_LEN), MAX_NAME_LEN) if(t) candidate.name = t if("desc") diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 4ddfdd608f..eabc175c0f 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -358,7 +358,7 @@ spawn(0) var/newname - newname = sanitizeSafe(input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN) + newname = sanitizeSafe(tgui_input_text(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","", MAX_NAME_LEN), MAX_NAME_LEN) if (newname) custom_name = newname sprite_name = newname diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index 9636f2da51..1249a2da57 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -300,7 +300,7 @@ /obj/item/weapon/pen/robopen/proc/RenamePaper(mob/user, obj/item/weapon/paper/paper) if ( !user || !paper ) return - var/n_name = sanitizeSafe(input(user, "What would you like to label the paper?", "Paper Labelling", null) as text, 32) + var/n_name = sanitizeSafe(tgui_input_text(user, "What would you like to label the paper?", "Paper Labelling", null, 32), 32) if ( !user || !paper ) return diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/pets/cat.dm b/code/modules/mob/living/simple_mob/subtypes/animal/pets/cat.dm index ea41d429f8..c29ce4d137 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/pets/cat.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/pets/cat.dm @@ -257,7 +257,7 @@ var/list/_cat_default_emotes = list( if(named) to_chat(user, "\The [name] already has a name!") else - var/tmp_name = sanitizeSafe(input(user, "Give \the [name] a name", "Name"), MAX_NAME_LEN) + var/tmp_name = sanitizeSafe(tgui_input_text(user, "Give \the [name] a name", "Name", null, MAX_NAME_LEN), MAX_NAME_LEN) if(length(tmp_name) > 50) to_chat(user, "The name can be at most 50 characters long.") else diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm b/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm index b15a7e0e18..4dc8c04caa 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm @@ -19,7 +19,7 @@ to_chat(src, "You've already set your name. Ask an admin to toggle \"nameset\" to 0 if you really must.") return var/newname - newname = sanitizeSafe(input(src,"Set your name. You only get to do this once. Max 52 chars.", "Name set","") as text, MAX_NAME_LEN) + newname = sanitizeSafe(tgui_input_text(src,"Set your name. You only get to do this once. Max 52 chars.", "Name set","", MAX_NAME_LEN), MAX_NAME_LEN) if (newname) name = newname voice_name = newname @@ -30,7 +30,7 @@ set desc = "Set your description." set category = "Abilities" var/newdesc - newdesc = sanitizeSafe(input(src,"Set your description. Max 4096 chars.", "Description set","") as text, MAX_MESSAGE_LEN) + newdesc = sanitizeSafe(tgui_input_text(src,"Set your description. Max 4096 chars.", "Description set",""), MAX_MESSAGE_LEN) if(newdesc) desc = newdesc diff --git a/code/modules/mob/living/voice/voice.dm b/code/modules/mob/living/voice/voice.dm index 9caa58cb33..0e9e805dc9 100644 --- a/code/modules/mob/living/voice/voice.dm +++ b/code/modules/mob/living/voice/voice.dm @@ -80,7 +80,7 @@ set desc = "Changes your name." set src = usr - var/new_name = sanitizeSafe(input(src, "Who would you like to be now?", "Communicator", src.client.prefs.real_name) as text, MAX_NAME_LEN) + var/new_name = sanitizeSafe(tgui_input_text(src, "Who would you like to be now?", "Communicator", src.client.prefs.real_name, MAX_NAME_LEN), MAX_NAME_LEN) if(new_name) if(comm) comm.visible_message("[bicon(comm)] [src.name] has left, and now you see [new_name].") diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 9e0a087a03..392a8bf980 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -293,7 +293,7 @@ set src in usr if(usr != src) to_chat(usr, "No.") - var/msg = sanitize(input(usr,"Set the flavor text in your 'examine' verb.","Flavor Text",html_decode(flavor_text)) as message|null, extra = 0) //VOREStation Edit: separating out OOC notes + var/msg = sanitize(tgui_input_text(usr,"Set the flavor text in your 'examine' verb.","Flavor Text",html_decode(flavor_text), multiline = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes if(msg != null) flavor_text = msg diff --git a/code/modules/mob/new_player/sprite_accessories_extra_ch.dm b/code/modules/mob/new_player/sprite_accessories_extra_ch.dm index c3f6f79377..1a7c779bf6 100644 --- a/code/modules/mob/new_player/sprite_accessories_extra_ch.dm +++ b/code/modules/mob/new_player/sprite_accessories_extra_ch.dm @@ -142,6 +142,12 @@ color_blend_mode = ICON_MULTIPLY body_parts = list(BP_R_ARM,BP_L_ARM,BP_R_HAND,BP_L_HAND,BP_R_LEG,BP_L_LEG,BP_R_FOOT,BP_L_FOOT) +/datum/sprite_accessory/marking/ch/sylveonheadribbons1 + name = "Sylveon Head Ribbons" + icon_state = "sylveon-bowribbons1" + color_blend_mode = ICON_MULTIPLY + body_parts = list(BP_HEAD) + guilmonhead name = "Guilmon head" icon_state = "guilmon_head" diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm index 08547e3146..bdd5865a9b 100644 --- a/code/modules/mob/typing_indicator.dm +++ b/code/modules/mob/typing_indicator.dm @@ -41,7 +41,6 @@ set_typing_indicator(TRUE) var/message = tgui_input_text(usr, "Type your message:", "Say") - message = readd_quotes(message) set_typing_indicator(FALSE) if(message) @@ -53,7 +52,6 @@ set_typing_indicator(TRUE) var/message = tgui_input_text(usr, "Type your message:", "Emote", multiline = TRUE) - message = readd_quotes(message) set_typing_indicator(FALSE) if(message) @@ -65,7 +63,6 @@ set hidden = 1 var/message = tgui_input_text(usr, "Type your message:", "Whisper") - message = readd_quotes(message) if(message) whisper(message) @@ -75,7 +72,5 @@ set hidden = 1 var/message = tgui_input_text(usr, "Type your message:", "Subtle", multiline = TRUE) - message = readd_quotes(message) - if(message) - me_verb_subtle(message) \ No newline at end of file + me_verb_subtle(message) diff --git a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm index e37e994f43..17fd005f9a 100644 --- a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm +++ b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm @@ -63,7 +63,7 @@ var/oldtext = html_decode(F.stored_data) oldtext = replacetext(oldtext, "\[br\]", "\n") - var/newtext = sanitize(replacetext(input(usr, "Editing file [open_file]. You may use most tags used in paper formatting:", "Text Editor", oldtext) as message|null, "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) + var/newtext = sanitize(replacetext(tgui_input_text(usr, "Editing file [open_file]. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE), "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) if(!newtext) return diff --git a/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm b/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm index 44c5a821ae..1acc0e7157 100644 --- a/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm +++ b/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm @@ -166,7 +166,7 @@ var/oldtext = html_decode(loaded_data) oldtext = replacetext(oldtext, "\[br\]", "\n") - var/newtext = sanitize(replacetext(input(usr, "Editing file '[open_file]'. You may use most tags used in paper formatting:", "Text Editor", oldtext) as message|null, "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) + var/newtext = sanitize(replacetext(tgui_input_text(usr, "Editing file '[open_file]'. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE), "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) if(!newtext) return loaded_data = newtext diff --git a/code/modules/modular_computers/file_system/programs/research/email_administration.dm b/code/modules/modular_computers/file_system/programs/research/email_administration.dm index 0ad80422cb..8b5eddc699 100644 --- a/code/modules/modular_computers/file_system/programs/research/email_administration.dm +++ b/code/modules/modular_computers/file_system/programs/research/email_administration.dm @@ -92,7 +92,7 @@ if(!current_account) return TRUE - var/newpass = sanitize(input(usr,"Enter new password for account [current_account.login]", "Password"), 100) + var/newpass = sanitize(tgui_input_text(usr,"Enter new password for account [current_account.login]", "Password", null, 100), 100) if(!newpass) return TRUE current_account.password = newpass @@ -120,7 +120,7 @@ var/newdomain = sanitize(tgui_input_list(usr,"Pick domain:", "Domain name", using_map.usable_email_tlds)) if(!newdomain) return TRUE - var/newlogin = sanitize(input(usr,"Pick account name (@[newdomain]):", "Account name"), 100) + var/newlogin = sanitize(tgui_input_text(usr,"Pick account name (@[newdomain]):", "Account name", null, 100), 100) if(!newlogin) return TRUE diff --git a/code/modules/multiz/ladder_assembly_vr.dm b/code/modules/multiz/ladder_assembly_vr.dm index 3512a3b07f..b6e5bddf7e 100644 --- a/code/modules/multiz/ladder_assembly_vr.dm +++ b/code/modules/multiz/ladder_assembly_vr.dm @@ -16,7 +16,7 @@ /obj/structure/ladder_assembly/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/weapon/pen)) - var/t = sanitizeSafe(input(user, "Enter the name for the ladder.", "Ladder Name", src.created_name), MAX_NAME_LEN) + var/t = sanitizeSafe(tgui_input_text(user, "Enter the name for the ladder.", "Ladder Name", src.created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(in_range(src, user)) created_name = t return diff --git a/code/modules/nifsoft/nif.dm b/code/modules/nifsoft/nif.dm index f422be8cfc..e42439201c 100644 --- a/code/modules/nifsoft/nif.dm +++ b/code/modules/nifsoft/nif.dm @@ -671,7 +671,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable to_chat(src,"You don't have a NIF, not sure why this was here.") return - var/new_flavor = sanitize(input(src,"Describe how your NIF alters your appearance, like glowy eyes or metal plate on your head, etc. Be sensible. Clear this for no examine text. 128ch max.","Describe NIF", nif.examine_msg) as null|text, max_length = 128) + var/new_flavor = sanitize(tgui_input_text(src,"Describe how your NIF alters your appearance, like glowy eyes or metal plate on your head, etc. Be sensible. Clear this for no examine text. 128ch max.","Describe NIF", nif.examine_msg, 128), max_length = 128) //They clicked cancel or meanwhile lost their NIF if(!nif || isnull(new_flavor)) return //No changes diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index a2da8ecdea..21b1c20aec 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -125,10 +125,10 @@ switch(choice) if("Design Inside") - var/new_flavor = input(nif.human, "Type what the prey sees after being 'caught'. This will be \ + var/new_flavor = tgui_input_text(nif.human, "Type what the prey sees after being 'caught'. This will be \ printed after an intro ending with: \"Around you, you see...\" to the prey. If you already \ have prey, this will be printed to them after \"Your surroundings change to...\". Limit 2048 char.", \ - "VR Environment", html_decode(inside_flavor)) as message + "VR Environment", html_decode(inside_flavor), MAX_MESSAGE_LEN*2, TRUE) new_flavor = sanitize(new_flavor, MAX_MESSAGE_LEN*2) inside_flavor = new_flavor nif.notify("Updating VR environment...") diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 1d2030c7dd..ba3dd52597 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -69,7 +69,7 @@ to_chat(user, "You put the [W] into \the [src].") update_icon() else if(istype(W, /obj/item/weapon/pen)) - var/n_name = sanitizeSafe(input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text, MAX_NAME_LEN) + var/n_name = sanitizeSafe(tgui_input_text(usr, "What would you like to label the folder?", "Folder Labelling", null, MAX_NAME_LEN), MAX_NAME_LEN) if((loc == usr && usr.stat == 0)) name = "folder[(n_name ? text("- '[n_name]'") : null)]" return diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm index 1b2624c125..5666b97d5e 100644 --- a/code/modules/paperwork/handlabeler.dm +++ b/code/modules/paperwork/handlabeler.dm @@ -73,7 +73,7 @@ if(mode) to_chat(user, SPAN_NOTICE("You turn on \the [src].")) //Now let them chose the text. - var/str = sanitizeSafe(input(user,"Label text?","Set label",""), MAX_NAME_LEN) + var/str = sanitizeSafe(tgui_input_text(user,"Label text?","Set label","",MAX_NAME_LEN), MAX_NAME_LEN) if(!str || !length(str)) to_chat(user, SPAN_WARNING("Invalid text.")) return diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index eb671fe870..95e4c08c76 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -179,7 +179,7 @@ if((CLUMSY in usr.mutations) && prob(50)) to_chat(usr, "You cut yourself on the paper.") return - var/n_name = sanitizeSafe(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text, MAX_NAME_LEN) + var/n_name = sanitizeSafe(tgui_input_text(usr, "What would you like to label the paper?", "Paper Labelling", null, MAX_NAME_LEN), MAX_NAME_LEN) // We check loc one level up, so we can rename in clipboards and such. See also: /obj/item/weapon/photo/rename() if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == 0 && n_name) @@ -448,7 +448,7 @@ to_chat(usr, "There isn't enough space left on \the [src] to write anything.") return - var/raw = input(usr, "Enter what you want to write:", "Write") as null|message + var/raw = tgui_input_text(usr, "Enter what you want to write:", "Write", multiline = TRUE) if(!raw) return diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 24aeae6c71..287927a6d3 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -192,7 +192,7 @@ set category = "Object" set src in usr - var/n_name = sanitizeSafe(input(usr, "What would you like to label the bundle?", "Bundle Labelling", null) as text, MAX_NAME_LEN) + var/n_name = sanitizeSafe(tgui_input_text(usr, "What would you like to label the bundle?", "Bundle Labelling", null, MAX_NAME_LEN), MAX_NAME_LEN) if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == 0) name = "[(n_name ? text("[n_name]") : "paper")]" add_fingerprint(usr) diff --git a/code/modules/paperwork/paper_sticky.dm b/code/modules/paperwork/paper_sticky.dm index 04f4249cfb..ba2a9195b3 100644 --- a/code/modules/paperwork/paper_sticky.dm +++ b/code/modules/paperwork/paper_sticky.dm @@ -34,7 +34,7 @@ if(writing_space <= 0) to_chat(user, SPAN_WARNING("There is no room left on \the [src].")) return - var/text = sanitizeSafe(input(usr, "What would you like to write?") as text, writing_space) + var/text = sanitizeSafe(tgui_input_text(usr, "What would you like to write?", null, null, writing_space), writing_space) if(!text || thing.loc != user || (!Adjacent(user) && loc != user) || user.incapacitated()) return user.visible_message("\The [user] jots a note down on \the [src].") diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index cc4d8103e1..4a79eb64a8 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -47,7 +47,7 @@ var/global/photo_count = 0 /obj/item/weapon/photo/attackby(obj/item/weapon/P as obj, mob/user as mob) if(istype(P, /obj/item/weapon/pen)) - var/txt = sanitize(input(user, "What would you like to write on the back?", "Photo Writing", null) as text, 128) + var/txt = sanitize(tgui_input_text(user, "What would you like to write on the back?", "Photo Writing", null, 128), 128) if(loc == user && user.stat == 0) scribble = txt ..() @@ -75,7 +75,7 @@ var/global/photo_count = 0 set category = "Object" set src in usr - var/n_name = sanitizeSafe(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text, MAX_NAME_LEN) + var/n_name = sanitizeSafe(tgui_input_text(usr, "What would you like to label the photo?", "Photo Labelling", null, MAX_NAME_LEN), MAX_NAME_LEN) //loc.loc check is for making possible renaming photos in clipboards if(( (loc == usr || (loc.loc && loc.loc == usr)) && usr.stat == 0)) name = "[(n_name ? text("[n_name]") : "photo")]" diff --git a/code/modules/persistence/graffiti.dm b/code/modules/persistence/graffiti.dm index cbd2fe01a9..e9a031bc8e 100644 --- a/code/modules/persistence/graffiti.dm +++ b/code/modules/persistence/graffiti.dm @@ -55,7 +55,7 @@ to_chat(user, SPAN_WARNING("You are banned from leaving persistent information across rounds.")) return - var/_message = sanitize(input(usr, "Enter an additional message to engrave.", "Graffiti") as null|text, trim = TRUE) + var/_message = sanitize(tgui_input_text(usr, "Enter an additional message to engrave.", "Graffiti"), trim = TRUE) if(_message && loc && user && !user.incapacitated() && user.Adjacent(loc) && thing.loc == user) user.visible_message("\The [user] begins carving something into \the [loc].") if(do_after(user, max(20, length(_message)), src) && loc) diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 46736474b7..b600bb8ce0 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -37,7 +37,7 @@ return var/tmp_label = "" - var/label_text = sanitizeSafe(input(user, "Inscribe some text into \the [initial(BB.name)]","Inscription",tmp_label), MAX_NAME_LEN) + var/label_text = sanitizeSafe(tgui_input_text(user, "Inscribe some text into \the [initial(BB.name)]","Inscription",tmp_label,MAX_NAME_LEN), MAX_NAME_LEN) if(length(label_text) > 20) to_chat(user, "The inscription can be at most 20 characters long.") else if(!label_text) diff --git a/code/modules/reagents/reagent_containers/blood_pack.dm b/code/modules/reagents/reagent_containers/blood_pack.dm index 693330fef7..e5158def75 100644 --- a/code/modules/reagents/reagent_containers/blood_pack.dm +++ b/code/modules/reagents/reagent_containers/blood_pack.dm @@ -56,7 +56,7 @@ /obj/item/weapon/reagent_containers/blood/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, "The label can be at most 50 characters long.") else if(length(tmp_label) > 10) diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 10c682a90f..8548fdd36d 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -124,7 +124,7 @@ /obj/item/weapon/reagent_containers/glass/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, "The label can be at most 50 characters long.") else if(length(tmp_label) > 10) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 4d77ad473e..94d2232c26 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -42,7 +42,7 @@ else if(istype(W, /obj/item/weapon/pen)) switch(tgui_alert(usr, "What would you like to alter?","Select Alteration",list("Title","Description","Cancel"))) if("Title") - var/str = sanitizeSafe(input(usr,"Label text?","Set label",""), MAX_NAME_LEN) + var/str = sanitizeSafe(tgui_input_text(usr,"Label text?","Set label","", MAX_NAME_LEN), MAX_NAME_LEN) if(!str || !length(str)) to_chat(user, " Invalid text.") return @@ -153,7 +153,7 @@ else if(istype(W, /obj/item/weapon/pen)) switch(tgui_alert(usr, "What would you like to alter?","Select Alteration",list("Title","Description","Cancel"))) if("Title") - var/str = sanitizeSafe(input(usr,"Label text?","Set label",""), MAX_NAME_LEN) + var/str = sanitizeSafe(tgui_input_text(usr,"Label text?","Set label","", MAX_NAME_LEN), MAX_NAME_LEN) if(!str || !length(str)) to_chat(user, " Invalid text.") return diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index b424852ad9..4f5d451bf8 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -152,13 +152,17 @@ max_duration = 60 /datum/surgery_step/robotics/repair_brute/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - if(..()) - var/obj/item/organ/external/affected = target.get_organ(target_zone) - if(istype(tool, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/welder = tool - if(!welder.isOn() || !welder.remove_fuel(1,user)) - return 0 - return affected && affected.open == 3 && (affected.disfigured || affected.brute_dam > 0) && target_zone != O_MOUTH + if(..()) //CHOMPEdit begin. Added damage check. + var/obj/item/organ/external/affected = target.get_organ(target_zone) + if(istype(tool, /obj/item/weapon/weldingtool)) + var/obj/item/weapon/weldingtool/welder = tool + if(affected.brute_dam == 0) + to_chat(user, "There is no damage to the internal structure here!") + return SURGERY_FAILURE + else + if(!welder.isOn() || !welder.remove_fuel(1,user)) + return 0 + return affected && affected.open == 3 && (affected.disfigured || affected.brute_dam > 0) && target_zone != O_MOUTH // CHOMPEdit End. /datum/surgery_step/robotics/repair_brute/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) diff --git a/code/modules/tgui/modules/agentcard.dm b/code/modules/tgui/modules/agentcard.dm index 012438dda6..0bdbd967ce 100644 --- a/code/modules/tgui/modules/agentcard.dm +++ b/code/modules/tgui/modules/agentcard.dm @@ -45,7 +45,7 @@ to_chat(usr, "Electronic warfare [S.electronic_warfare ? "enabled" : "disabled"].") . = TRUE if("age") - var/new_age = input(usr,"What age would you like to put on this card?","Agent Card Age", S.age) as null|num + var/new_age = tgui_input_number(usr,"What age would you like to put on this card?","Agent Card Age", S.age) if(!isnull(new_age) && tgui_status(usr, state) == STATUS_INTERACTIVE) if(new_age < 0) S.age = initial(S.age) @@ -63,7 +63,7 @@ to_chat(usr, "Appearance changed to [choice].") . = TRUE if("assignment") - var/new_job = sanitize(input(usr,"What assignment would you like to put on this card?\nChanging assignment will not grant or remove any access levels.","Agent Card Assignment", S.assignment) as null|text) + var/new_job = sanitize(tgui_input_text(usr,"What assignment would you like to put on this card?\nChanging assignment will not grant or remove any access levels.","Agent Card Assignment", S.assignment)) if(!isnull(new_job) && tgui_status(usr, state) == STATUS_INTERACTIVE) S.assignment = new_job to_chat(usr, "Occupation changed to '[new_job]'.") @@ -97,7 +97,7 @@ var/mob/living/carbon/human/H = usr if(H.dna) default = md5(H.dna.uni_identity) - var/new_fingerprint_hash = sanitize(input(usr,"What fingerprint hash would you like to be written on this card?","Agent Card Fingerprint Hash",default) as null|text) + var/new_fingerprint_hash = sanitize(tgui_input_text(usr,"What fingerprint hash would you like to be written on this card?","Agent Card Fingerprint Hash",default)) if(!isnull(new_fingerprint_hash) && tgui_status(usr, state) == STATUS_INTERACTIVE) S.fingerprint_hash = new_fingerprint_hash to_chat(usr, "Fingerprint hash changed to '[new_fingerprint_hash]'.") diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index 37a7231b97..d6d7e5f386 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -93,8 +93,8 @@ if(can_change(APPEARANCE_RACE) && (params["race"] in valid_species)) if(target.change_species(params["race"])) if(params["race"] == "Custom Species") - target.custom_species = sanitize(input(usr, "Input custom species name:", - "Custom Species Name") as null|text, MAX_NAME_LEN) + target.custom_species = sanitize(tgui_input_text(usr, "Input custom species name:", + "Custom Species Name", null, MAX_NAME_LEN), MAX_NAME_LEN) cut_data() generate_data(usr) changed_hook(APPEARANCECHANGER_CHANGED_RACE) @@ -113,7 +113,7 @@ return 1 if("skin_tone") if(can_change_skin_tone()) - var/new_s_tone = input(usr, "Choose your character's skin-tone:\n(Light 1 - 220 Dark)", "Skin Tone", -target.s_tone + 35) as num|null + var/new_s_tone = tgui_input_number(usr, "Choose your character's skin-tone:\n(Light 1 - 220 Dark)", "Skin Tone", -target.s_tone + 35, 220, 1) if(isnum(new_s_tone) && can_still_topic(usr, state)) new_s_tone = 35 - max(min( round(new_s_tone), 220),1) changed_hook(APPEARANCECHANGER_CHANGED_SKINTONE) diff --git a/code/modules/tgui/modules/communications.dm b/code/modules/tgui/modules/communications.dm index 37f6ca047b..b28686c9f5 100644 --- a/code/modules/tgui/modules/communications.dm +++ b/code/modules/tgui/modules/communications.dm @@ -324,11 +324,11 @@ post_status(src, params["statdisp"], user = usr) if("setmsg1") - stat_msg1 = reject_bad_text(sanitize(input(usr, "Line 1", "Enter Message Text", stat_msg1) as text|null, 40), 40) + stat_msg1 = reject_bad_text(sanitize(tgui_input_text(usr, "Line 1", "Enter Message Text", stat_msg1, 40), 40), 40) setMenuState(usr, COMM_SCREEN_STAT) if("setmsg2") - stat_msg2 = reject_bad_text(sanitize(input(usr, "Line 2", "Enter Message Text", stat_msg2) as text|null, 40), 40) + stat_msg2 = reject_bad_text(sanitize(tgui_input_text(usr, "Line 2", "Enter Message Text", stat_msg2, 40), 40), 40) setMenuState(usr, COMM_SCREEN_STAT) // OMG CENTCOMM LETTERHEAD diff --git a/code/modules/tgui/modules/law_manager.dm b/code/modules/tgui/modules/law_manager.dm index 3a9ca9cf88..847281a554 100644 --- a/code/modules/tgui/modules/law_manager.dm +++ b/code/modules/tgui/modules/law_manager.dm @@ -89,7 +89,7 @@ return TRUE if("change_supplied_law_position") - var/new_position = input(usr, "Enter new supplied law position between 1 and [MAX_SUPPLIED_LAW_NUMBER], inclusive. Inherent laws at the same index as a supplied law will not be stated.", "Law Position", supplied_law_position) as num|null + var/new_position = tgui_input_number(usr, "Enter new supplied law position between 1 and [MAX_SUPPLIED_LAW_NUMBER], inclusive. Inherent laws at the same index as a supplied law will not be stated.", "Law Position", supplied_law_position) if(isnum(new_position) && can_still_topic(usr, state)) supplied_law_position = CLAMP(new_position, 1, MAX_SUPPLIED_LAW_NUMBER) return TRUE @@ -98,7 +98,7 @@ if(is_malf(usr)) var/datum/ai_law/AL = locate(params["edit_law"]) in owner.laws.all_laws() if(AL) - var/new_law = sanitize(input(usr, "Enter new law. Leaving the field blank will cancel the edit.", "Edit Law", AL.law)) + var/new_law = sanitize(tgui_input_text(usr, "Enter new law. Leaving the field blank will cancel the edit.", "Edit Law", AL.law)) if(new_law && new_law != AL.law && is_malf(usr) && can_still_topic(usr, state)) log_and_message_admins("has changed a law of [owner] from '[AL.law]' to '[new_law]'") AL.law = new_law diff --git a/code/modules/tgui/modules/ntos-only/cardmod.dm b/code/modules/tgui/modules/ntos-only/cardmod.dm index 8a8ace688f..b6e4a8063b 100644 --- a/code/modules/tgui/modules/ntos-only/cardmod.dm +++ b/code/modules/tgui/modules/ntos-only/cardmod.dm @@ -192,7 +192,7 @@ if(computer && program.can_run(usr, 1) && id_card) var/t1 = params["assign_target"] if(t1 == "Custom") - var/temp_t = sanitize(input(usr, "Enter a custom job assignment.","Assignment", id_card.assignment), 45) + var/temp_t = sanitize(tgui_input_text(usr, "Enter a custom job assignment.","Assignment", id_card.assignment, 45), 45) //let custom jobs function as an impromptu alt title, mainly for sechuds if(temp_t) id_card.assignment = temp_t diff --git a/code/modules/tgui/modules/ntos-only/email.dm b/code/modules/tgui/modules/ntos-only/email.dm index 746582ae7f..af10b738ef 100644 --- a/code/modules/tgui/modules/ntos-only/email.dm +++ b/code/modules/tgui/modules/ntos-only/email.dm @@ -279,7 +279,7 @@ var/oldtext = html_decode(msg_body) oldtext = replacetext(oldtext, "\[editorbr\]", "\n") - var/newtext = sanitize(replacetext(input(usr, "Enter your message. You may use most tags from paper formatting", "Message Editor", oldtext) as message|null, "\n", "\[editorbr\]"), 20000) + var/newtext = sanitize(replacetext(tgui_input_text(usr, "Enter your message. You may use most tags from paper formatting", "Message Editor", oldtext, 20000, TRUE), "\n", "\[editorbr\]"), 20000) if(newtext) msg_body = newtext return 1 @@ -362,13 +362,13 @@ return 1 if("changepassword") - var/oldpassword = sanitize(input(user,"Please enter your old password:", "Password Change"), 100) + var/oldpassword = sanitize(tgui_input_text(user,"Please enter your old password:", "Password Change", null, 100), 100) if(!oldpassword) return 1 - var/newpassword1 = sanitize(input(user,"Please enter your new password:", "Password Change"), 100) + var/newpassword1 = sanitize(tgui_input_text(user,"Please enter your new password:", "Password Change", null, 100), 100) if(!newpassword1) return 1 - var/newpassword2 = sanitize(input(user,"Please re-enter your new password:", "Password Change"), 100) + var/newpassword2 = sanitize(tgui_input_text(user,"Please re-enter your new password:", "Password Change", null, 100), 100) if(!newpassword2) return 1 @@ -399,7 +399,7 @@ error = "Error exporting file. Are you using a functional and NTOS-compliant device?" return 1 - var/filename = sanitize(input(user,"Please specify file name:", "Message export"), 100) + var/filename = sanitize(tgui_input_text(user,"Please specify file name:", "Message export", null, 100), 100) if(!filename) return 1 diff --git a/code/modules/tgui_input/list.dm b/code/modules/tgui_input/list.dm index 76ebe411e4..fc0fdc9c1e 100644 --- a/code/modules/tgui_input/list.dm +++ b/code/modules/tgui_input/list.dm @@ -9,8 +9,9 @@ * * items - The options that can be chosen by the user, each string is assigned a button on the UI. * * default - The option with this value will be selected on first paint of the TGUI window. * * timeout - The timeout of the input box, after which the input box will close and qdel itself. Set to zero for no timeout. + * * strict_modern - Disabled the preference check of the input box, only allowing the TGUI window to show. */ -/proc/tgui_input_list(mob/user, message, title = "Select", list/items, default, timeout = 0) +/proc/tgui_input_list(mob/user, message, title = "Select", list/items, default, timeout = 0, strict_modern = FALSE) if (istext(user)) stack_trace("tgui_alert() received text for user instead of mob") return @@ -25,7 +26,7 @@ else return /// Client does NOT have tgui_input on: Returns regular input - if(!usr.client.prefs.tgui_input_mode) + if(!usr.client.prefs.tgui_input_mode && !strict_modern) return input(user, message, title, default) as null|anything in items var/datum/tgui_list_input/input = new(user, message, title, items, default, timeout) input.tgui_interact(user) diff --git a/code/modules/tgui_input/text.dm b/code/modules/tgui_input/text.dm index 474f8e7c3e..42c50d377a 100644 --- a/code/modules/tgui_input/text.dm +++ b/code/modules/tgui_input/text.dm @@ -150,6 +150,7 @@ /datum/tgui_input_text/proc/set_entry(entry) if(!isnull(entry)) var/converted_entry = encode ? html_encode(entry) : entry + converted_entry = readd_quotes(converted_entry) src.entry = trim(converted_entry, max_length) /** diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 238f714ab6..7e1301a78d 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -784,9 +784,16 @@ else if(istype(I,/obj/item/weapon/bikehorn/tinytether)) to_chat(src, "You feel a rush of power swallowing such a large, err, tiny structure.") visible_message("[src] demonstrates their voracious capabilities by swallowing [I] whole!") - else if(istype(I,/obj/item/device/paicard) || istype(I,/obj/item/device/mmi/digital/posibrain) || istype(I,/obj/item/device/aicard)) + else if(istype(I,/obj/item/device/mmi/digital/posibrain) || istype(I,/obj/item/device/aicard)) visible_message("[src] demonstrates their voracious capabilities by swallowing [I] whole!") to_chat(src, "You can taste the sweet flavor of digital friendship. Or maybe it is something else.") + else if(istype(I,/obj/item/device/paicard)) + visible_message("[src] demonstrates their voracious capabilities by swallowing [I] whole!") + to_chat(src, "You can taste the sweet flavor of digital friendship.") + var/obj/item/device/paicard/ourcard = I + if(ourcard.pai && ourcard.pai.client && isbelly(ourcard.loc)) + var/obj/belly/B = ourcard.loc + to_chat(ourcard.pai, "[B.desc]") else if(istype(I,/obj/item/weapon/reagent_containers/food)) var/obj/item/weapon/reagent_containers/food/F = I if(!F.reagents.total_volume) diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index 52d2e81747..759fe3046f 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -130,7 +130,6 @@ * Ace was here! Redid this a little so we'd use math for shrinking characters. This is the old code. */ - /mob/living/proc/set_size() set name = "Adjust Mass" set category = "Abilities" //Seeing as prometheans have an IC reason to be changing mass. @@ -140,7 +139,8 @@ return var/nagmessage = "Adjust your mass to be a size between 25 to 200% (or 1% to 600% in dormitories). (DO NOT ABUSE)" - var/new_size = tgui_input_number(nagmessage, "Pick a Size") + var/default = size_multiplier * 100 + var/new_size = tgui_input_number(usr, nagmessage, "Pick a Size", default) if(size_range_check(new_size)) resize(new_size/100, uncapped = has_large_resize_bounds(), ignore_prefs = TRUE) if(temporary_form) //CHOMPEdit - resizing both our forms diff --git a/code/modules/xenobio/items/slime_objects.dm b/code/modules/xenobio/items/slime_objects.dm index 72cc0e01e3..90012d7548 100644 --- a/code/modules/xenobio/items/slime_objects.dm +++ b/code/modules/xenobio/items/slime_objects.dm @@ -57,7 +57,7 @@ S.set_species("Promethean") S.shapeshifter_set_colour("#2398FF") visible_message("The monkey cube suddenly takes the shape of a humanoid!") - var/newname = sanitize(input(S, "You are a Promethean. Would you like to change your name to something else?", "Name change") as null|text, MAX_NAME_LEN) + var/newname = sanitize(tgui_input_text(S, "You are a Promethean. Would you like to change your name to something else?", "Name change", null, MAX_NAME_LEN), MAX_NAME_LEN) if(newname) S.real_name = newname S.name = S.real_name diff --git a/code/modules/xenobio/items/slimepotions.dm b/code/modules/xenobio/items/slimepotions.dm index 11d2d07571..fa1484e0d9 100644 --- a/code/modules/xenobio/items/slimepotions.dm +++ b/code/modules/xenobio/items/slimepotions.dm @@ -110,7 +110,7 @@ playsound(src, 'sound/effects/bubbles.ogg', 50, 1) AI.remove_target() // So hostile things stop attacking people even if not hostile anymore. - var/newname = copytext(sanitize(input(user, "Would you like to give \the [M] a name?", "Name your new pet", M.name) as null|text),1,MAX_NAME_LEN) + var/newname = copytext(sanitize(tgui_input_text(user, "Would you like to give \the [M] a name?", "Name your new pet", M.name, MAX_NAME_LEN)),1,MAX_NAME_LEN) if(newname) M.name = newname diff --git a/icons/_nanomaps/southern_cross_nanomap_z10.png b/icons/_nanomaps/southern_cross_nanomap_z10.png index afda058bbe..ee4a75e5ae 100644 Binary files a/icons/_nanomaps/southern_cross_nanomap_z10.png and b/icons/_nanomaps/southern_cross_nanomap_z10.png differ diff --git a/icons/_nanomaps/southern_cross_nanomap_z3.png b/icons/_nanomaps/southern_cross_nanomap_z3.png index f8d1746460..047f9b3cde 100644 Binary files a/icons/_nanomaps/southern_cross_nanomap_z3.png and b/icons/_nanomaps/southern_cross_nanomap_z3.png differ diff --git a/icons/_nanomaps/southern_cross_nanomap_z8.png b/icons/_nanomaps/southern_cross_nanomap_z8.png index 59ec47ea39..3d660ba999 100644 Binary files a/icons/_nanomaps/southern_cross_nanomap_z8.png and b/icons/_nanomaps/southern_cross_nanomap_z8.png differ diff --git a/icons/mob/human_races/markings_ch.dmi b/icons/mob/human_races/markings_ch.dmi index 696c45777e..06017c48ec 100644 Binary files a/icons/mob/human_races/markings_ch.dmi and b/icons/mob/human_races/markings_ch.dmi differ diff --git a/maps/virgo_minitest/virgo_minitest_defines.dm b/maps/virgo_minitest/virgo_minitest_defines.dm index 716815b7b3..ec26a64351 100644 --- a/maps/virgo_minitest/virgo_minitest_defines.dm +++ b/maps/virgo_minitest/virgo_minitest_defines.dm @@ -7,7 +7,9 @@ path = "virgo_minitest" lobby_icon = 'icons/misc/title_vr.dmi' - lobby_screens = list("tether2_night") + lobby_screens = list("logo2") + + id_hud_icons = 'icons/mob/hud_jobs_vr.dmi' accessible_z_levels = list("1" = 100) base_turf_by_z = list("1" = /turf/space) diff --git a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm index 87d9c42f08..bdeab06abc 100644 --- a/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm +++ b/modular_chomp/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm @@ -223,7 +223,7 @@ to_chat(src,"You can't process [substance]!") return //Only a few things matter, the rest are best not cluttering the lists. - var/howmuch = input(src,"How much do you want to store? (0-[matstack.get_amount()])","Select amount") as null|num + var/howmuch = tgui_input_number(src,"How much do you want to store? (0-[matstack.get_amount()])","Select amount",null,matstack.get_amount(),0) if(!howmuch || matstack != get_active_hand() || howmuch > matstack.get_amount()) return //Quietly fail