From a4810b6666087f4903ac56fdf0e0069003d8ae5c Mon Sep 17 00:00:00 2001 From: Poojawa Date: Wed, 26 Sep 2018 04:25:19 -0500 Subject: [PATCH] some code before I ran out of time at work --- code/modules/clothing/shoes/_shoes.dm | 9 +++++++++ code/modules/mob/living/carbon/human/update_icons.dm | 7 +++++++ code/modules/surgery/bodyparts/helpers.dm | 9 +++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index b03d71221d..daaf0836e7 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -15,6 +15,10 @@ var/offset = 0 var/equipped_before_drop = FALSE + //CITADEL EDIT Enables digitigrade shoe styles + adjusted = NORMAL_STYLE + alternate_worn_icon = 'modular_citadel/icons/mob/digishoes.dmi' + /obj/item/clothing/shoes/ComponentInitialize() . = ..() AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, .proc/clean_blood))) @@ -59,6 +63,11 @@ worn_y_dimension -= (offset * 2) user.update_inv_shoes() equipped_before_drop = TRUE + if(mutantrace_variation && ishuman(user)) + var/mob/living/carbon/human/H = user + if(DIGITIGRADE in H.dna.species.species_traits) + adjusted = DIGITIGRADE_STYLE + H.update_inv_shoes() /obj/item/clothing/shoes/proc/restore_offsets(mob/user) equipped_before_drop = FALSE diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 6572cf4e27..79705764de 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -268,6 +268,7 @@ There are several things that need to be remembered: inv.update_icon() if(shoes) + var/obj/item/clothing/shoes/S = shoes shoes.screen_loc = ui_shoes //move the item to the appropriate screen loc if(client && hud_used && hud_used.hud_shown) if(hud_used.inventory_shown) //if the inventory is open @@ -281,6 +282,12 @@ There are several things that need to be remembered: overlays_standing[SHOES_LAYER] = shoes_overlay apply_overlay(SHOES_LAYER) +var/obj/item/clothing/shoes/S = H.shoes + if(swap_back) + S.adjusted = NORMAL_STYLE + else + S.adjusted = DIGITIGRADE_STYLE + H.update_inv_w_uniform() /mob/living/carbon/human/update_inv_s_store() remove_overlay(SUIT_STORE_LAYER) diff --git a/code/modules/surgery/bodyparts/helpers.dm b/code/modules/surgery/bodyparts/helpers.dm index 1921f68165..e884895c1b 100644 --- a/code/modules/surgery/bodyparts/helpers.dm +++ b/code/modules/surgery/bodyparts/helpers.dm @@ -298,5 +298,10 @@ else U.adjusted = DIGITIGRADE_STYLE H.update_inv_w_uniform() - if(H.shoes && !swap_back) - H.dropItemToGround(H.shoes) + if(H.shoes) + var/obj/item/clothing/shoes/S = H.shoes + if(swap_back) + S.adjusted = NORMAL_STYLE + else + S.adjusted = DIGITIGRADE_STYLE + H.update_inv_w_uniform()