diff --git a/modular_nova/master_files/code/modules/client/preferences/footstep_sound.dm b/modular_nova/master_files/code/modules/client/preferences/footstep_sound.dm index 84eeefd6606..a94f9acd440 100644 --- a/modular_nova/master_files/code/modules/client/preferences/footstep_sound.dm +++ b/modular_nova/master_files/code/modules/client/preferences/footstep_sound.dm @@ -13,12 +13,15 @@ if(value == "Default") return - var/list/value_to_define = list( + var/static/list/value_to_define = list( "Shoes" = FOOTSTEP_MOB_SHOE, "Claws" = FOOTSTEP_MOB_CLAW, ) + var/footstep_type = value_to_define[value] + var/obj/item/bodypart/leg/left_leg = target.get_bodypart(BODY_ZONE_L_LEG) var/obj/item/bodypart/leg/right_leg = target.get_bodypart(BODY_ZONE_R_LEG) - var/footstep_type = value_to_define[value] left_leg.footstep_type = footstep_type right_leg.footstep_type = footstep_type + + target.footstep_type = footstep_type // We are most likely going to have our legs get replaced during char creation immediately, so this is necessary to apply to any subsequent legs that get added. diff --git a/modular_nova/master_files/code/modules/mob/living/carbon/human/human.dm b/modular_nova/master_files/code/modules/mob/living/carbon/human/human.dm index 9bce5aff193..696952377b9 100644 --- a/modular_nova/master_files/code/modules/mob/living/carbon/human/human.dm +++ b/modular_nova/master_files/code/modules/mob/living/carbon/human/human.dm @@ -1,3 +1,7 @@ +/mob/living/carbon/human + /// Used for footstep type pref, to apply to any new legs that get added to this mob. Uses a var instead of checking prefs because there are a lot of clientless mob situations. + var/footstep_type + /mob/living/carbon/human/Initialize(mapload) . = ..() mob_examine_panel = new(src) //create the datum diff --git a/modular_nova/modules/bodyparts/code/_mutant_bodyparts.dm b/modular_nova/modules/bodyparts/code/_mutant_bodyparts.dm index a26d0d77ba0..a2b90f77b4b 100644 --- a/modular_nova/modules/bodyparts/code/_mutant_bodyparts.dm +++ b/modular_nova/modules/bodyparts/code/_mutant_bodyparts.dm @@ -19,6 +19,12 @@ /// This is used in digitigrade legs, when this leg is swapped out with the digitigrade version. var/digitigrade_type = /obj/item/bodypart/leg/left/digitigrade +// Just blanket apply the footstep pref on limb addition, it gets far too complicated otherwise as limbs are getting replaced more often than you'd think +/obj/item/bodypart/leg/on_adding(mob/living/carbon/new_owner) + . = ..() + var/mob/living/carbon/human/human_owner = new_owner + if(istype(human_owner) && human_owner.footstep_type) + footstep_type = human_owner.footstep_type /// General mutant bodyparts. Used in most mutant species. /obj/item/bodypart/head/mutant diff --git a/modular_nova/modules/customization/modules/client/augment/limbs.dm b/modular_nova/modules/customization/modules/client/augment/limbs.dm index 17f099e79a2..23e5d0fc51f 100644 --- a/modular_nova/modules/customization/modules/client/augment/limbs.dm +++ b/modular_nova/modules/customization/modules/client/augment/limbs.dm @@ -47,6 +47,7 @@ new_limb.limb_id = BODYPART_ID_DIGITIGRADE new_limb.base_limb_id = BODYPART_ID_DIGITIGRADE new_limb.bodyshape = old_limb.bodyshape + new_limb.replace_limb(augmented, special = TRUE) qdel(old_limb)