From 75a8188291199c0d6f57f37771454e1ebfab8044 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Wed, 19 Jul 2023 20:48:39 +0100 Subject: [PATCH] pAI clothing adjustments (#5727) ## About The Pull Request 1. clothing name now has (pAI) appended to it because i really don't want someone to name their pAI after an item of clothing and be indistinguishable, that's not okay 2. when you use clothing on a pAI, it notifies the person who did so if it was successful, the pAI gets a similar message 3. copied clothing now copies the colour of the item as well ## Why It's Good For The Game 2/3 are some good qol stuff, 1 is because we have a clear rule of "don't be a creep", it's a ghost role, and is easily open for abuse which i would rather not happen ## Changelog :cl: tweak: pAI clothing has (pAI) appended to its name, copies colour when copying other clothing items, and notifies the pAI and user when you scan a piece of clothing on a pAI /:cl: --- .../modules/mob/living/silicon/pai/defense.dm | 30 ++++++++++++------- code/modules/mob/living/silicon/pai/pai.dm | 3 +- code/modules/mob/living/silicon/pai/verbs.dm | 3 +- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/code/modules/mob/living/silicon/pai/defense.dm b/code/modules/mob/living/silicon/pai/defense.dm index cc1cf21f2a4c..d1472a204b43 100644 --- a/code/modules/mob/living/silicon/pai/defense.dm +++ b/code/modules/mob/living/silicon/pai/defense.dm @@ -18,25 +18,33 @@ return else if(istype(W, /obj/item/clothing)) var/obj/item/clothing/C = W + var/new_base_uploaded_path if(C.slot_flags & SLOT_HEAD) - base_uploaded_path = /obj/item/clothing/head + new_base_uploaded_path = /obj/item/clothing/head if(C.slot_flags & SLOT_ICLOTHING) - base_uploaded_path = /obj/item/clothing/under + new_base_uploaded_path = /obj/item/clothing/under if(C.slot_flags & SLOT_EYES) - base_uploaded_path = /obj/item/clothing/glasses + new_base_uploaded_path = /obj/item/clothing/glasses if(C.slot_flags & SLOT_GLOVES) - base_uploaded_path = /obj/item/clothing/gloves + new_base_uploaded_path = /obj/item/clothing/gloves if(C.slot_flags & SLOT_MASK) - base_uploaded_path = /obj/item/clothing/mask + new_base_uploaded_path = /obj/item/clothing/mask if(C.slot_flags & SLOT_FEET) - base_uploaded_path = /obj/item/clothing/shoes + new_base_uploaded_path = /obj/item/clothing/shoes if(C.slot_flags & SLOT_OCLOTHING) - base_uploaded_path = /obj/item/clothing/suit - last_uploaded_path = W.type + new_base_uploaded_path = /obj/item/clothing/suit - var/obj/item/clothing/under/U = C - if(istype(U)) - uploaded_snowflake_worn_state = U.snowflake_worn_state + if(new_base_uploaded_path != null) + base_uploaded_path = new_base_uploaded_path + last_uploaded_path = W.type + + var/obj/item/clothing/under/U = C + if(istype(U)) + uploaded_snowflake_worn_state = U.snowflake_worn_state + uploaded_color = W.get_atom_colour() + + to_chat(user, "You successfully upload the [W.name] to [src].") + to_chat(src, "[user] has successfully uploaded the [W.name] to you.") return else diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index e55e796609f7..a0cf368c6092 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -84,6 +84,7 @@ var/obj/item/clothing/last_uploaded_path var/obj/item/clothing/base_uploaded_path var/uploaded_snowflake_worn_state + var/uploaded_color /// The cable we produce and use when door or camera jacking. var/obj/item/pai_cable/cable @@ -252,7 +253,7 @@ last_special = world.time + 20 var/obj/item/new_object = new object_path - new_object.name = src.name + new_object.name = "[src.name] (pAI)" new_object.desc = src.desc new_object.forceMove(src.loc) switch_shell(new_object) diff --git a/code/modules/mob/living/silicon/pai/verbs.dm b/code/modules/mob/living/silicon/pai/verbs.dm index 1ed4938ef148..85282fe43eba 100644 --- a/code/modules/mob/living/silicon/pai/verbs.dm +++ b/code/modules/mob/living/silicon/pai/verbs.dm @@ -135,10 +135,11 @@ var/icon = initial(last_uploaded_path.icon) var/obj/item/clothing/new_clothing = new base_uploaded_path new_clothing.forceMove(src.loc) - new_clothing.name = src.name + new_clothing.name = "[src.name] (pAI)" new_clothing.desc = src.desc new_clothing.icon = icon new_clothing.icon_state = state + new_clothing.add_atom_colour(uploaded_color, FIXED_COLOUR_PRIORITY) var/obj/item/clothing/under/U = new_clothing if(istype(U))