From 7049d7899d97ebbb0e94b42d2e272be3cc01a39e Mon Sep 17 00:00:00 2001 From: Killian <49700375+KillianKirilenko@users.noreply.github.com> Date: Fri, 24 Feb 2023 20:25:03 +0000 Subject: [PATCH] editable species on agentcard --- code/modules/tgui/modules/agentcard.dm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/modules/tgui/modules/agentcard.dm b/code/modules/tgui/modules/agentcard.dm index 0bdbd967ce6..fd84c98760f 100644 --- a/code/modules/tgui/modules/agentcard.dm +++ b/code/modules/tgui/modules/agentcard.dm @@ -19,6 +19,7 @@ entries += list(list("name" = "Name", "value" = S.registered_name)) entries += list(list("name" = "Photo", "value" = "Update")) entries += list(list("name" = "Sex", "value" = S.sex)) + entries += list(list("name" = "Species", "value" = S.species)) entries += list(list("name" = "Factory Reset", "value" = "Use With Care")) data["entries"] = entries @@ -119,6 +120,12 @@ S.sex = new_sex to_chat(usr, "Sex changed to '[new_sex]'.") . = TRUE + if("species") + var/new_species = sanitize(tgui_input_text(usr,"What species would you like to put on this card?","Agent Card Species", S.species)) + if(!isnull(new_species) && tgui_status(usr, state) == STATUS_INTERACTIVE) + S.species = new_species + to_chat(usr, "Species changed to '[new_species]'.") + . = TRUE if("factoryreset") if(tgui_alert(usr, "This will factory reset the card, including access and owner. Continue?", "Factory Reset", list("No", "Yes")) == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE) S.age = initial(S.age) @@ -136,6 +143,7 @@ S.registered_name = initial(S.registered_name) S.unset_registered_user() S.sex = initial(S.sex) + S.species = initial(S.species) S.update_icon() to_chat(usr, "All information has been deleted from \the [src].") . = TRUE