diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm
index 53416d80c64..cce6b67dbca 100644
--- a/code/__DEFINES/inventory.dm
+++ b/code/__DEFINES/inventory.dm
@@ -104,6 +104,9 @@
#define FULL_DIGITIGRADE 1
#define SQUISHED_DIGITIGRADE 2
+
+#define DIGI_ICON_FILE_PASSED (1<<0) //! NSV13 - An accursed flag for update_worn_icon that implies a digi file was passed by the calling proc. This will override other file variables.
+
//! ## flags for covering body parts
#define GLASSESCOVERSEYES (1<<0)
#define MASKCOVERSEYES (1<<1) //! get rid of some of the other stupidity in these flags
diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm
index e0cd1540902..370e4a8dbc4 100644
--- a/code/datums/traits/negative.dm
+++ b/code/datums/traits/negative.dm
@@ -444,6 +444,12 @@
if(BODY_ZONE_R_LEG)
prosthetic = new/obj/item/bodypart/r_leg/robot/surplus(quirk_holder)
slot_string = "right leg"
+ //NSV13 - If the old limb is digitigrade, so is your prosthetic.
+ if(old_part.bodytype & BODYTYPE_DIGITIGRADE) //This proc seems to trust old part never missing and so will I :)
+ prosthetic.bodytype |= BODYTYPE_DIGITIGRADE
+ prosthetic.static_icon = 'nsv13/icons/mob/augmentation/digitigrade_legs.dmi'
+ prosthetic.limb_id = "digitigrade"
+ //NSV13 end.
prosthetic.replace_limb(H)
qdel(old_part)
H.regenerate_icons()
diff --git a/code/game/machinery/aug_manipulator.dm b/code/game/machinery/aug_manipulator.dm
index 9613dafc597..74abe7acd49 100644
--- a/code/game/machinery/aug_manipulator.dm
+++ b/code/game/machinery/aug_manipulator.dm
@@ -9,7 +9,7 @@
var/obj/item/bodypart/storedpart
var/initial_icon_state
var/static/list/style_list_icons = list("standard" = 'icons/mob/augmentation/augments.dmi', "engineer" = 'icons/mob/augmentation/augments_engineer.dmi', "security" = 'icons/mob/augmentation/augments_security.dmi', "mining" = 'icons/mob/augmentation/augments_mining.dmi', "veymed female" = 'nsv13/icons/mob/augmentation/veymed.dmi', "veymed male" = 'nsv13/icons/mob/augmentation/veymedm.dmi', "shellguard" = 'nsv13/icons/mob/augmentation/shellguard.dmi', "xion" = 'nsv13/icons/mob/augmentation/xion.dmi', "zeng-hu" = 'nsv13/icons/mob/augmentation/zenghu.dmi', "ward-takahashi" = 'nsv13/icons/mob/augmentation/wardtakahashi.dmi', "bishop" = 'nsv13/icons/mob/augmentation/bishop.dmi') //NSV13 added extra sprites for additional prosthetic looks
-
+ var/static/list/style_list_legs_bonus_icons = list("digitigrade" = 'nsv13/icons/mob/augmentation/digitigrade_legs.dmi') //NSV13 - digitigrade (leg) augmentations WOOOOO
/obj/machinery/aug_manipulator/examine(mob/user)
. = ..()
@@ -102,14 +102,27 @@
add_fingerprint(user)
if(storedpart)
- var/augstyle = input(user, "Select style.", "Augment Custom Fitting") as null|anything in style_list_icons
+ //NSV13 - digitigrade robot leggies
+ var/style_options = style_list_icons
+ if(istype(storedpart, /obj/item/bodypart/r_leg) || istype(storedpart, /obj/item/bodypart/l_leg))
+ style_options += style_list_legs_bonus_icons //Doing this with assoc lists IS actually legal. Very cool. And Yes I know this somewhat reduces the point of using static lists, but this proc is rare.
+ var/augstyle = input(user, "Select style.", "Augment Custom Fitting") as null|anything in style_options
+ //NSV13 end.
if(!augstyle)
return
if(!in_range(src, user))
return
if(!storedpart)
return
- storedpart.static_icon = style_list_icons[augstyle]
+ //NSV13 - digi robot leggies. This is kind of scuffed but the proc gets called rarely enough and this is compact.
+ storedpart.static_icon = style_options[augstyle]
+ if(augstyle == "digitigrade")
+ storedpart.bodytype |= BODYTYPE_DIGITIGRADE
+ storedpart.limb_id = "digitigrade" //Sooo basically limb code is cursed and digitigrade limbs even more so.
+ else
+ storedpart.bodytype &= ~(BODYTYPE_DIGITIGRADE)
+ storedpart.limb_id = "robotic" //Sooo basically augment code is also cursed which means this actually fixes a bug :)
+ //NSV13 end.
eject_part(user)
else
diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm
index 43ce2baed00..e1bdee8c52c 100644
--- a/code/modules/clothing/spacesuits/hardsuit.dm
+++ b/code/modules/clothing/spacesuits/hardsuit.dm
@@ -196,6 +196,7 @@
icon = 'nsv13/icons/obj/clothing/suits.dmi' //NSV13
worn_icon = 'nsv13/icons/mob/suit.dmi' //NSV13
icon_state = "hardsuit-engineering-legacy" //NSV13
+ supports_variations = DIGITIGRADE_VARIATION //NSV13 - legacy sprite has digisprite.
item_state = "eng_hardsuit"
armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 15, "bomb" = 10, "bio" = 100, "rad" = 75, "fire" = 100, "acid" = 75, "stamina" = 20)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine
@@ -216,6 +217,7 @@
name = "atmospherics hardsuit"
desc = "A special suit that protects against hazardous, low pressure environments. Has thermal shielding."
icon_state = "hardsuit-atmospherics-legacy" //NSV13
+ supports_variations = DIGITIGRADE_VARIATION //NSV13 - legacy sprite has digisprite.
item_state = "atmo_hardsuit"
armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 15, "bomb" = 10, "bio" = 100, "rad" = 25, "fire" = 100, "acid" = 75, "stamina" = 20)
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS //Uncomment to enable firesuit protection
@@ -236,6 +238,7 @@
/obj/item/clothing/suit/space/hardsuit/engine/elite
icon_state = "hardsuit-white-legacy" //NSV13
+ supports_variations = DIGITIGRADE_VARIATION //NSV13 - legacy sprite has digisprite.
name = "advanced hardsuit"
desc = "An advanced suit that protects against hazardous, low pressure environments. Shines with a high polish."
item_state = "ce_hardsuit"
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index 8a7fd1487ed..f8a43d4bf67 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -313,6 +313,7 @@ There are several things that need to be remembered:
if(shoes)
var/icon_file = 'icons/mob/clothing/feet.dmi'
+ var/build_worn_icon_override_flags = NONE //NSV13 - variable to pass override flags to build worn icon.
if(istype(shoes, /obj/item/clothing/shoes))
var/obj/item/clothing/shoes/S = shoes
if(S.sprite_sheets & (dna?.species.bodyflag))
@@ -321,13 +322,14 @@ There are several things that need to be remembered:
if(dna?.species.bodytype & BODYTYPE_DIGITIGRADE)
if(S.supports_variations & DIGITIGRADE_VARIATION)
icon_file = 'icons/mob/species/misc/digitigrade_shoes.dmi'
+ build_worn_icon_override_flags |= DIGI_ICON_FILE_PASSED //NSV13 - high priority file.
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
client.screen += shoes //add it to client's screen
update_observer_view(shoes,1)
- overlays_standing[SHOES_LAYER] = shoes.build_worn_icon(default_layer = SHOES_LAYER, default_icon_file = icon_file)
+ overlays_standing[SHOES_LAYER] = shoes.build_worn_icon(default_layer = SHOES_LAYER, default_icon_file = icon_file, special_override_flags = build_worn_icon_override_flags) //NSV13 - pass special override flags.
var/mutable_appearance/shoes_overlay = overlays_standing[SHOES_LAYER]
if(OFFSET_SHOES in dna.species.offset_features)
shoes_overlay.pixel_x += dna.species.offset_features[OFFSET_SHOES][1]
@@ -427,6 +429,7 @@ There are several things that need to be remembered:
if(istype(wear_suit, /obj/item/clothing/suit))
var/icon_file = 'icons/mob/clothing/suit.dmi'
+ var/build_worn_icon_override_flags = NONE //NSV13 - override flags passed to build worn icon.
var/obj/item/clothing/suit/S = wear_suit
if(S.sprite_sheets & (dna?.species.bodyflag))
icon_file = dna.species.get_custom_icons("suit")
@@ -434,6 +437,7 @@ There are several things that need to be remembered:
if(dna?.species.bodytype & BODYTYPE_DIGITIGRADE)
if(S.supports_variations & DIGITIGRADE_VARIATION)
icon_file = 'icons/mob/species/misc/digitigrade_suits.dmi'
+ build_worn_icon_override_flags |= DIGI_ICON_FILE_PASSED //NSV13 - high priority file.
wear_suit.screen_loc = ui_oclothing
if(client && hud_used && hud_used.hud_shown)
@@ -441,7 +445,7 @@ There are several things that need to be remembered:
client.screen += wear_suit
update_observer_view(wear_suit,1)
- overlays_standing[SUIT_LAYER] = wear_suit.build_worn_icon(default_layer = SUIT_LAYER, default_icon_file = icon_file)
+ overlays_standing[SUIT_LAYER] = wear_suit.build_worn_icon(default_layer = SUIT_LAYER, default_icon_file = icon_file, special_override_flags = build_worn_icon_override_flags) //NSV13 - can pass special override flags.
var/mutable_appearance/suit_overlay = overlays_standing[SUIT_LAYER]
if(OFFSET_SUIT in dna.species.offset_features)
suit_overlay.pixel_x += dna.species.offset_features[OFFSET_SUIT][1]
@@ -667,7 +671,7 @@ generate/load female uniform sprites matching all previously decided variables
*/
-/obj/item/proc/build_worn_icon(default_layer = 0, default_icon_file = null, isinhands = FALSE, femaleuniform = NO_FEMALE_UNIFORM, override_state = null)
+/obj/item/proc/build_worn_icon(default_layer = 0, default_icon_file = null, isinhands = FALSE, femaleuniform = NO_FEMALE_UNIFORM, override_state = null, special_override_flags = NONE) //NSV13 - special override flag to help with the mess that is digisprites.
var/t_state
if(override_state)
@@ -676,7 +680,7 @@ generate/load female uniform sprites matching all previously decided variables
t_state = !isinhands ? (worn_icon_state ? worn_icon_state : icon_state) : (item_state ? item_state : icon_state)
//Find a valid icon file from variables+arguments
- var/file2use = !isinhands ? (worn_icon ? worn_icon : default_icon_file) : default_icon_file
+ var/file2use = !isinhands ? ((worn_icon && !(special_override_flags & DIGI_ICON_FILE_PASSED)) ? worn_icon : default_icon_file) : default_icon_file //NSV13 - prioritize digitigrade file over ANY others if it is passed.
//Find a valid layer from variables+arguments
var/layer2use = alternate_worn_layer ? alternate_worn_layer : default_layer
diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm
index b92e729398d..2ed52079952 100644
--- a/code/modules/surgery/bodyparts/bodyparts.dm
+++ b/code/modules/surgery/bodyparts/bodyparts.dm
@@ -93,7 +93,7 @@
if(burn_dam >= DAMAGE_PRECISION)
. += "This limb has [burn_dam > 30 ? "severe" : "minor"] burns."
if(limb_id)
- . += "It is a [limb_id] [parse_zone(body_zone)]."
+ . += "It is a [limb_id][bonus_limb_id_text()] [parse_zone(body_zone)]." //NSV13 - I have to hook in here.
/obj/item/bodypart/blob_act()
take_damage(max_damage)
diff --git a/icons/mob/species/misc/digitigrade_suits.dmi b/icons/mob/species/misc/digitigrade_suits.dmi
index 9abc584e2f9..c76b84959a8 100644
Binary files a/icons/mob/species/misc/digitigrade_suits.dmi and b/icons/mob/species/misc/digitigrade_suits.dmi differ
diff --git a/nsv13.dme b/nsv13.dme
index b3b278369d7..8806afaff65 100644
--- a/nsv13.dme
+++ b/nsv13.dme
@@ -4104,6 +4104,7 @@
#include "nsv13\code\modules\squads\squad_lead_finder.dm"
#include "nsv13\code\modules\squads\squad_manager.dm"
#include "nsv13\code\modules\squads\squad_vendor.dm"
+#include "nsv13\code\modules\surgery\bodyparts\nsv_modular_bodypart_overrides.dm"
#include "nsv13\code\modules\surgery\organs\tails.dm"
#include "nsv13\code\modules\turbolift\lazylift.dm"
#include "nsv13\code\modules\turbolift\turbolift.dm"
diff --git a/nsv13/code/modules/surgery/bodyparts/nsv_modular_bodypart_overrides.dm b/nsv13/code/modules/surgery/bodyparts/nsv_modular_bodypart_overrides.dm
new file mode 100644
index 00000000000..73d2b0a3a91
--- /dev/null
+++ b/nsv13/code/modules/surgery/bodyparts/nsv_modular_bodypart_overrides.dm
@@ -0,0 +1,17 @@
+//This file is for some NSV bodypart overrides to avoid throwing them into base files.
+
+///Bonus text to get for a given limb in its examine.
+/obj/item/bodypart/proc/bonus_limb_id_text()
+ return ""
+
+//These two are here because how the name is static-built is stupid and this is a nice-ish way to attach to it.
+
+/obj/item/bodypart/r_leg/robot/bonus_limb_id_text()
+ if(bodytype & BODYTYPE_DIGITIGRADE)
+ return " robotic"
+ return ""
+
+/obj/item/bodypart/l_leg/robot/bonus_limb_id_text()
+ if(bodytype & BODYTYPE_DIGITIGRADE)
+ return " robotic"
+ return ""
diff --git a/nsv13/icons/mob/augmentation/digitigrade_legs.dmi b/nsv13/icons/mob/augmentation/digitigrade_legs.dmi
new file mode 100644
index 00000000000..43456a5132d
Binary files /dev/null and b/nsv13/icons/mob/augmentation/digitigrade_legs.dmi differ