Merge branch 'master' into upstream-merge-13122

This commit is contained in:
Nadyr
2022-06-22 22:37:44 -04:00
committed by GitHub
397 changed files with 9458 additions and 7952 deletions

View File

@@ -68,7 +68,7 @@
names += componentsubtypes
names += "---Elements---"
names += sortTim(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
var/result = input(usr, "Choose a component/element to add:", "Add Component/Element", names)
var/result = tgui_input_text(usr, "Choose a component/element to add:", "Add Component/Element", names)
if(!usr || !result || result == "---Components---" || result == "---Elements---")
return
if(QDELETED(src))

View File

@@ -99,7 +99,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
if(href_list["feedback_edit_body"])
// This is deliberately not sanitized here, and is instead checked when hitting the submission button,
// as we want to give the user a chance to fix it without needing to rewrite the whole thing.
feedback_body = input(my_client, "Please write your feedback here.", "Feedback Body", feedback_body) as null|message
feedback_body = tgui_input_text(my_client, "Please write your feedback here.", "Feedback Body", feedback_body, multiline = TRUE)
display() // Refresh the window with new information.
return

View File

@@ -132,29 +132,29 @@
return
if(href_list["filter_id"])
var/id_to_search = input(my_client, "Write feedback ID here.", "Filter by ID", null) as null|num
var/id_to_search = tgui_input_number(my_client, "Write feedback ID here.", "Filter by ID", null)
if(id_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_ID, id_to_search, TRUE)
if(href_list["filter_author"])
var/author_to_search = input(my_client, "Write desired key or hash here. Partial keys/hashes are allowed.", "Filter by Author", null) as null|text
var/author_to_search = tgui_input_text(my_client, "Write desired key or hash here. Partial keys/hashes are allowed.", "Filter by Author", null)
if(author_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_AUTHOR, author_to_search)
if(href_list["filter_topic"])
var/topic_to_search = input(my_client, "Write desired topic here. Partial topics are allowed. \
\nThe current topics in the config are [english_list(config.sqlite_feedback_topics)].", "Filter by Topic", null) as null|text
var/topic_to_search = tgui_input_text(my_client, "Write desired topic here. Partial topics are allowed. \
\nThe current topics in the config are [english_list(config.sqlite_feedback_topics)].", "Filter by Topic", null)
if(topic_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_TOPIC, topic_to_search)
if(href_list["filter_content"])
var/content_to_search = input(my_client, "Write desired content to find here. Partial matches are allowed.", "Filter by Content", null) as null|message
var/content_to_search = tgui_input_text(my_client, "Write desired content to find here. Partial matches are allowed.", "Filter by Content", null, multiline = TRUE)
if(content_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_CONTENT, content_to_search)
if(href_list["filter_datetime"])
var/datetime_to_search = input(my_client, "Write desired datetime. Partial matches are allowed.\n\
Format is 'YYYY-MM-DD HH:MM:SS'.", "Filter by Datetime", null) as null|text
var/datetime_to_search = tgui_input_text(my_client, "Write desired datetime. Partial matches are allowed.\n\
Format is 'YYYY-MM-DD HH:MM:SS'.", "Filter by Datetime", null)
if(datetime_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_DATETIME, datetime_to_search)

View File

@@ -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,11 +180,7 @@
assigned_role = new_role
else if (href_list["memory_edit"])
<<<<<<< HEAD
var/new_memo = sanitize(input("Write new memory", "Memory", memory) as null|message)
=======
var/new_memo = sanitize(tgui_input_text(usr, "Write new memory", "Memory", memory, multiline = TRUE))
>>>>>>> cab11cf3ea... Merge pull request #13122 from ItsSelis/tgui-input-conversions
if (isnull(new_memo)) return
memory = new_memo
@@ -202,11 +188,7 @@
var/datum/mind/mind = locate(href_list["amb_edit"])
if(!mind)
return
<<<<<<< HEAD
var/new_ambition = input("Enter a new ambition", "Memory", mind.ambitions) as null|message
=======
var/new_ambition = tgui_input_text(usr, "Enter a new ambition", "Memory", mind.ambitions, multiline = TRUE)
>>>>>>> cab11cf3ea... Merge pull request #13122 from ItsSelis/tgui-input-conversions
if(isnull(new_ambition))
return
if(mind)
@@ -304,11 +286,7 @@
if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]"))
def_num = objective.target_amount
<<<<<<< HEAD
var/target_number = input("Input target number:", "Objective", def_num) as num|null
=======
var/target_number = tgui_input_number(usr, "Input target number:", "Objective", def_num)
>>>>>>> cab11cf3ea... Merge pull request #13122 from ItsSelis/tgui-input-conversions
if (isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist.
return
@@ -326,11 +304,7 @@
new_objective.target_amount = target_number
if ("custom")
<<<<<<< HEAD
var/expl = sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null)
=======
var/expl = sanitize(tgui_input_text(usr, "Custom objective:", "Objective", objective ? objective.explanation_text : ""))
>>>>>>> cab11cf3ea... Merge pull request #13122 from ItsSelis/tgui-input-conversions
if (!expl) return
new_objective = new /datum/objective
new_objective.owner = src
@@ -426,11 +400,7 @@
// var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink() No longer needed, uses stored in mind
var/crystals
crystals = tcrystals
<<<<<<< HEAD
crystals = input("Amount of telecrystals for [key]", crystals) as null|num
=======
crystals = tgui_input_number(usr, "Amount of telecrystals for [key]", crystals)
>>>>>>> cab11cf3ea... Merge pull request #13122 from ItsSelis/tgui-input-conversions
if (!isnull(crystals))
tcrystals = crystals

View File

@@ -66,17 +66,19 @@
/obj/fiftyspawner/tealcarpet
)
/datum/supply_pack/materials/arcade_carpet
name = "Retro carpets"
/datum/supply_pack/materials/retrocarpet
name = "Retro carpet"
containertype = /obj/structure/closet/crate/grayson
containername = "Retro carpets crate"
containername = "Retro carpet crate"
cost = 15
contains = list(
/obj/fiftyspawner/decocarpet,
/obj/fiftyspawner/retrocarpet
/obj/fiftyspawner/geocarpet,
/obj/fiftyspawner/retrocarpet,
/obj/fiftyspawner/retrocarpet_red,
/obj/fiftyspawner/happycarpet
)
/datum/supply_pack/misc/linoleum
/datum/supply_pack/materials/linoleum
name = "Linoleum"
containertype = /obj/structure/closet/crate/grayson
containername = "Linoleum crate"

View File

@@ -9,18 +9,30 @@
/datum/supply_pack/supply/food
name = "Kitchen supply crate"
contains = list(
/obj/item/weapon/reagent_containers/food/condiment/flour = 6,
/obj/item/weapon/reagent_containers/food/condiment/carton/flour = 6,
/obj/item/weapon/reagent_containers/food/drinks/milk = 3,
/obj/item/weapon/reagent_containers/food/drinks/soymilk = 2,
/obj/item/weapon/storage/fancy/egg_box = 2,
/obj/item/weapon/reagent_containers/food/snacks/tofu = 4,
/obj/item/weapon/reagent_containers/food/snacks/meat = 4,
/obj/item/weapon/reagent_containers/food/condiment/yeast = 3
/obj/item/weapon/reagent_containers/food/condiment/yeast = 3,
/obj/item/weapon/reagent_containers/food/condiment/sprinkles = 1
)
cost = 10
containertype = /obj/structure/closet/crate/freezer/centauri
containername = "Food crate"
/datum/supply_pack/supply/fancyfood
name = "Artisanal food delivery"
contains = list(
/obj/item/weapon/reagent_containers/food/condiment/carton/flour/rustic = 6,
/obj/item/weapon/reagent_containers/food/condiment/carton/sugar/rustic = 6
)
cost = 25
containertype = /obj/structure/closet/crate/freezer/centauri
containername = "Artisanal food crate"
/datum/supply_pack/supply/toner
name = "Toner cartridges"
contains = list(/obj/item/device/toner = 6)

View File

@@ -16,10 +16,10 @@
item_cost = 20
/datum/uplink_item/abstract/announcements/fake_centcom/extra_args(var/mob/user)
var/title = sanitize(input(usr, "Enter your announcement title.", "Announcement Title") as null|text)
var/title = sanitize(tgui_input_text(usr, "Enter your announcement title.", "Announcement Title"))
if(!title)
return
var/message = sanitize(input(usr, "Enter your announcement message.", "Announcement Title") as null|text)
var/message = sanitize(tgui_input_text(usr, "Enter your announcement message.", "Announcement Title"))
if(!message)
return
return list("title" = title, "message" = message)