Vastly improves digitigrade leg code + hazard suit fix (#22547)

This commit is contained in:
SapphicOverload
2024-08-24 23:02:40 -04:00
committed by GitHub
parent 21fa9c71bf
commit f0c43f9c46
28 changed files with 160 additions and 197 deletions

View File

@@ -165,7 +165,7 @@
#define NOZOMBIE 9
/// If we want a race to have a standard color (for now this is only polysmorphs)
#define NOCOLORCHANGE 10
/// Uses weird leg sprites. Optional for Lizards, required for ashwalkers. Don't give it to other races unless you make sprites for this (see human_parts_greyscale.dmi)
/// Has weird leg sprites. Used by lizards and polysmorphs. Don't give it to other races unless you make sprites for this (see human_parts_greyscale.dmi)
#define DIGITIGRADE 11
#define NO_UNDERWEAR 12
#define NOLIVER 13

View File

@@ -109,12 +109,6 @@
#define FEMALE_UNIFORM_FULL 1
#define FEMALE_UNIFORM_TOP 2
//flags for alternate styles: These are hard sprited so don't set this if you didn't put the effort in
#define NORMAL_STYLE 0
#define ALT_STYLE 1
#define DIGITIGRADE_STYLE 2
#define DIGIALT_STYLE 3 //Yogs
//flags for digitigrade checks related to footwear. Only Human accessible / Both accessible / Only funny leg accessible.
#define NO_DIGIT 0
#define EITHER_STYLE 1
@@ -123,10 +117,6 @@
//flags for outfits that have mutantrace variants (try not to use this): Currently only needed if you're trying to add tight fitting bootyshorts
#define DIGITIGRADE_VARIATION (1<<0)
#define NOT_DIGITIGRADE 0
#define FULL_DIGITIGRADE 1
#define SQUISHED_DIGITIGRADE 2
//flags for covering body parts
#define GLASSESCOVERSEYES (1<<0)
#define MASKCOVERSEYES (1<<1) // get rid of some of the other retardation in these flags

View File

@@ -180,6 +180,8 @@
#define TRAIT_NOCLONE "noclone" // No cloning
#define TRAIT_NODEFIB "nodefib" // No defibbing
#define TRAIT_COLDBLOODED "coldblooded" // Your body is literal room temperature. Does not make you immune to the temp
#define TRAIT_DIGITIGRADE "digitigrade" // the funny lizard legs
#define TRAIT_DIGI_SQUISH "digi_squish" // squished funny lizard legs
#define TRAIT_EAT_MORE "eat_more" //You get hungry three times as fast
#define TRAIT_BOTTOMLESS_STOMACH "bottomless_stomach" // Can never be full
#define TRAIT_MESONS "mesons"

View File

@@ -180,7 +180,7 @@
else if(istype(W, /obj/item/bodypart/r_leg/robot))
var/obj/item/bodypart/r_leg/robot/L = W
if(L.use_digitigrade != NOT_DIGITIGRADE)
if(L.use_digitigrade)
to_chat(user, span_warning("You can only install plantigrade legs on [src]!"))
return
if(src.r_leg)
@@ -194,7 +194,7 @@
else if(istype(W, /obj/item/bodypart/l_arm/robot))
var/obj/item/bodypart/l_leg/robot/L = W
if(L.use_digitigrade != NOT_DIGITIGRADE)
if(L.use_digitigrade)
to_chat(user, span_warning("You can only install plantigrade legs on [src]!"))
return
if(l_arm)

View File

@@ -232,7 +232,7 @@
additionalmessage = "You have mutated werewolf legs!"
mutation = /obj/item/clothing/shoes/wolflegs
slot = ITEM_SLOT_FEET
if(DIGITIGRADE in user.dna.species.species_traits)
if(HAS_TRAIT(user, TRAIT_DIGITIGRADE))
mutation = /obj/item/clothing/shoes/xeno_wraps/wolfdigilegs
if(5 to INFINITY)
to_chat(user, span_danger("The beast inside of you seems satisfied with your current form."))

View File

@@ -61,7 +61,6 @@
/datum/action/cooldown/bloodsucker/gangrel/transform/proc/transform(chosen_transform)
var/datum/antagonist/bloodsucker/bloodsuckerdatum = owner.mind.has_antag_datum(/datum/antagonist/bloodsucker)
var/mob/living/carbon/human/user = owner
var/datum/species/user_species = user.dna.species
switch(chosen_transform)
if("Lizard/Felinid")
if(iscatperson(user))
@@ -70,17 +69,13 @@
else
user.set_species(/datum/species/human/felinid)
playsound(user.loc, 'sound/voice/feline/meow1.ogg', 50)
if(!LAZYFIND(user_species.species_traits, DIGITIGRADE))
user_species.species_traits += DIGITIGRADE
user.dna.species.armor -= 20 //careful
user.dna.species.speedmod = -0.5
user.dna.species.action_speed_coefficient *= 0.7
bloodsuckerdatum.AddBloodVolume(75)
user.dna.species.armor -= 20 //careful
user.dna.species.speedmod = -0.5
user.dna.species.action_speed_coefficient *= 0.7
bloodsuckerdatum.AddBloodVolume(75)
if("Gorilla")
user.set_species(/datum/species/gorilla)
playsound(user.loc, 'sound/creatures/gorilla.ogg', 50)
if(DIGITIGRADE in user_species.species_traits)
user_species.species_traits -= DIGITIGRADE
user.dna.species.punchdamagelow += 10
user.dna.species.punchdamagehigh += 10 //very stronk
user.dna.species.punchstunthreshold += 10

View File

@@ -447,16 +447,8 @@ BLIND // can't see anything
H.update_body()
/obj/item/clothing/under/proc/toggle_jumpsuit_adjust() //Yogs Start: Reworking this to allow for Digialt to function
switch(adjusted)
if(NORMAL_STYLE)
adjusted = ALT_STYLE
if(ALT_STYLE)
adjusted = NORMAL_STYLE
if(DIGITIGRADE_STYLE)
adjusted = DIGIALT_STYLE
if(DIGIALT_STYLE)
adjusted = DIGITIGRADE_STYLE
if(adjusted == ALT_STYLE || adjusted == DIGIALT_STYLE) //Yogs End
adjusted = !adjusted
if(adjusted) //Yogs End
if(fitted != FEMALE_UNIFORM_TOP)
fitted = NO_FEMALE_UNIFORM
if(!alt_covers_chest) // for the special snowflake suits that expose the chest when adjusted (and also the arms, realistically)

View File

@@ -16,7 +16,6 @@
var/equipped_before_drop = FALSE
var/xenoshoe = NO_DIGIT // Check for if shoes can be worn by straight legs (NO_DIGIT) which is default, both / hybrid (EITHER_STYLE), or digitigrade only (YES_DIGIT)
var/mutantrace_variation = NONE // Assigns shoes to have variations for if worn clothing doesn't enforce straight legs (such as cursed jumpskirts)
var/adjusted = NORMAL_STYLE // Default needed to make the above work
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 15, RAD = 0, FIRE = 0, ACID = 0)
/obj/item/clothing/shoes/suicide_act(mob/living/carbon/user)
@@ -60,18 +59,15 @@
. += bloody_shoes
/obj/item/clothing/shoes/equipped(mob/user, slot)
if(adjusted)
adjusted = NORMAL_STYLE
if(mutantrace_variation && ishuman(user))
var/mob/living/carbon/human/H = user
if(DIGITIGRADE in H.dna.species.species_traits)
for(var/X in H.bodyparts)
var/obj/item/bodypart/O = X
if(!O.use_digitigrade)
continue
if(O.use_digitigrade == FULL_DIGITIGRADE)
adjusted = DIGITIGRADE_STYLE
user.update_inv_shoes()
if(!(mutantrace_variation & DIGITIGRADE_VARIATION) && ishuman(user))
if(slot_flags & slot)
ADD_TRAIT(user, TRAIT_DIGI_SQUISH, REF(src))
else
REMOVE_TRAIT(user, TRAIT_DIGI_SQUISH, REF(src))
var/mob/living/carbon/human/human_user = user
human_user.update_inv_w_uniform()
human_user.update_inv_wear_suit()
human_user.update_body_parts()
. = ..()
if(offset && slot_flags & slot)
user.pixel_y += offset
@@ -86,6 +82,12 @@
worn_y_dimension = world.icon_size
/obj/item/clothing/shoes/dropped(mob/user)
if(!(mutantrace_variation & DIGITIGRADE_VARIATION) && ishuman(user))
REMOVE_TRAIT(user, TRAIT_DIGI_SQUISH, REF(src))
var/mob/living/carbon/human/human_user = user
human_user.update_inv_w_uniform()
human_user.update_inv_wear_suit()
human_user.update_body_parts()
if(offset && equipped_before_drop)
restore_offsets(user)
. = ..()

View File

@@ -13,7 +13,7 @@
var/togglename = null
var/suittoggled = FALSE
var/mutantrace_variation = NONE
var/adjusted = NORMAL_STYLE
var/adjusted = FALSE
limb_integrity = 0 // disabled for most exo-suits
var/obj/item/badge/attached_badge
var/mutable_appearance/badge_overlay
@@ -53,13 +53,26 @@
/obj/item/clothing/suit/equipped(mob/user, slot)
..()
if(adjusted)
adjusted = NORMAL_STYLE
adjusted = FALSE
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_w_uniform()
if(!(mutantrace_variation & DIGITIGRADE_VARIATION) && ishuman(user))
if(slot_flags & slot)
ADD_TRAIT(user, TRAIT_DIGI_SQUISH, REF(src))
else
REMOVE_TRAIT(user, TRAIT_DIGI_SQUISH, REF(src))
var/mob/living/carbon/human/human_user = user
human_user.update_inv_w_uniform()
human_user.update_inv_shoes()
human_user.update_body_parts()
/obj/item/clothing/suit/dropped(mob/user)
if(!(mutantrace_variation & DIGITIGRADE_VARIATION) && ishuman(user))
REMOVE_TRAIT(user, TRAIT_DIGI_SQUISH, REF(src))
var/mob/living/carbon/human/human_user = user
human_user.update_inv_w_uniform()
human_user.update_inv_shoes()
human_user.update_body_parts()
return ..()
/obj/item/clothing/suit/attackby(obj/item/I, mob/user, params)
if(!attach_badge(I, user))

View File

@@ -17,7 +17,7 @@
var/random_sensor = TRUE
var/sensor_mode = NO_SENSORS
var/can_adjust = TRUE
var/adjusted = NORMAL_STYLE
var/adjusted = FALSE
var/alt_covers_chest = FALSE // for adjusted/rolled-down jumpsuits, FALSE = exposes chest and arms, TRUE = exposes arms only
var/mutantrace_variation = NONE //Are there special sprites for specific situations? Don't use this unless you need to.
var/freshly_laundered = FALSE
@@ -90,7 +90,7 @@
/obj/item/clothing/under/equipped(mob/user, slot)
..()
if(adjusted)
adjusted = NORMAL_STYLE
adjusted = FALSE
fitted = initial(fitted)
if(!alt_covers_chest)
body_parts_covered |= CHEST
@@ -101,39 +101,43 @@
if(!ishuman(user)) //Yogs Start: Reorganized to reduce repetition
return
var/mob/living/carbon/human/H = user
if(mutantrace_variation & DIGITIGRADE_VARIATION)
var/is_digi = FALSE
if(DIGITIGRADE in H.dna.species.species_traits)
is_digi = TRUE
if(is_digi && !adjusted == ALT_STYLE && mutantrace_variation)
adjusted = DIGITIGRADE_STYLE
else if(is_digi && adjusted == ALT_STYLE && mutantrace_variation) //Handles when you are using an alternate style while having digi legs
adjusted = DIGIALT_STYLE
else if(!is_digi && adjusted == DIGITIGRADE_STYLE)
adjusted = NORMAL_STYLE
else if(!is_digi && adjusted == DIGIALT_STYLE)
adjusted = ALT_STYLE
H.update_inv_w_uniform()
var/update_suit = FALSE
var/mob/living/carbon/human/human_user = user
if(!(mutantrace_variation & DIGITIGRADE_VARIATION))
if(slot_flags & slot)
ADD_TRAIT(user, TRAIT_DIGI_SQUISH, REF(src))
else
REMOVE_TRAIT(user, TRAIT_DIGI_SQUISH, REF(src))
human_user.update_inv_shoes()
human_user.update_body_parts()
update_suit = TRUE
//Yogs End
if(attached_accessory && slot != ITEM_SLOT_HANDS)
attached_accessory.on_clothing_equip(src, user)
if(attached_accessory.above_suit)
H.update_inv_wear_suit()
update_suit = TRUE
if(update_suit)
human_user.update_inv_wear_suit()
if(is_synth(user) && has_sensor)
to_chat(user, span_notice("Suit sensors disabled due to non-compatible user."))
sensor_mode = SENSOR_OFF
/obj/item/clothing/under/dropped(mob/user)
if(attached_accessory)
attached_accessory.on_clothing_dropped(src, user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(ishuman(user))
var/update_suit = FALSE
var/mob/living/carbon/human/human_user = user
if(!(mutantrace_variation & DIGITIGRADE_VARIATION))
REMOVE_TRAIT(user, TRAIT_DIGI_SQUISH, REF(src))
human_user.update_inv_shoes()
human_user.update_body_parts()
update_suit = TRUE
if(attached_accessory)
attached_accessory.on_clothing_dropped(src, user)
if(attached_accessory.above_suit)
H.update_inv_wear_suit()
..()
update_suit = TRUE
if(update_suit)
human_user.update_inv_wear_suit()
return ..()
/obj/item/clothing/under/proc/attach_accessory(obj/item/I, mob/user, notifyAttach = 1)
. = FALSE
@@ -197,7 +201,7 @@
if(freshly_laundered)
. += "It looks fresh and clean."
if(can_adjust)
if(adjusted == ALT_STYLE || adjusted == DIGIALT_STYLE)
if(adjusted)
. += "Alt-click on [src] to wear it normally."
else
. += "Alt-click on [src] to wear it casually."

View File

@@ -58,7 +58,6 @@
icon_state = "hazard"
item_state = "suit-orange"
alt_covers_chest = TRUE
mutantrace_variation = NONE
/obj/item/clothing/under/rank/engineering/engineer/skirt
name = "engineer's jumpskirt"

View File

@@ -331,7 +331,7 @@
if (H.jumpsuit_style == PREF_SKIRT && uniform_skirt)
uniform = uniform_skirt
if((DIGITIGRADE in H.dna.species.species_traits) && digitigrade_shoes)
if(HAS_TRAIT(H, TRAIT_DIGITIGRADE) && digitigrade_shoes)
shoes = digitigrade_shoes
/datum/outfit/job/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)

View File

@@ -27,7 +27,7 @@
max_heat_protection_temperature = FIRE_HELM_MAX_TEMP_PROTECT
armor = list(MELEE = 25, BULLET = 5, LASER = 5, ENERGY = 5, BOMB = 50, BIO = 100, RAD = 50, FIRE = 50, ACID = 50, WOUND = 10)
resistance_flags = FIRE_PROOF
var/adjusted = NORMAL_STYLE
var/adjusted = FALSE
/obj/item/clothing/suit/hooded/explorer/Initialize(mapload)
. = ..()
@@ -42,15 +42,13 @@
set name = "Adjust Hood Style"
set category = null
set src in usr
switch(adjusted)
if(NORMAL_STYLE)
adjusted = ALT_STYLE
to_chat(usr, span_notice("You adjust the hood to wear it more casually."))
flags_inv &= ~HIDEHAIR
if(ALT_STYLE)
adjusted = NORMAL_STYLE
to_chat(usr, span_notice("You adjust the hood back to normal."))
flags_inv |= HIDEHAIR
adjusted = !adjusted
if(adjusted)
to_chat(usr, span_notice("You adjust the hood to wear it more casually."))
flags_inv &= ~HIDEHAIR
else
to_chat(usr, span_notice("You adjust the hood back to normal."))
flags_inv |= HIDEHAIR
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
H.update_hair()

View File

@@ -459,8 +459,8 @@ GLOBAL_LIST_EMPTY(features_by_species)
C.hud_used.update_locked_slots()
// this needs to be FIRST because qdel calls update_body which checks if we have DIGITIGRADE legs or not and if not then removes DIGITIGRADE from species_traits
if(DIGITIGRADE in species_traits)
C.Digitigrade_Leg_Swap(FALSE)
if((DIGITIGRADE in species_traits) && !(DIGITIGRADE in old_species.species_traits))
C.digitigrade_leg_swap(FALSE)
C.mob_biotypes = inherent_biotypes
C.bubble_icon = bubble_icon
@@ -518,8 +518,8 @@ GLOBAL_LIST_EMPTY(features_by_species)
/datum/species/proc/on_species_loss(mob/living/carbon/human/C, datum/species/new_species, pref_load)
if(C.dna.species.exotic_bloodtype)
C.dna.blood_type = random_blood_type()
if(DIGITIGRADE in species_traits)
C.Digitigrade_Leg_Swap(TRUE)
if((DIGITIGRADE in species_traits) && !(DIGITIGRADE in new_species.species_traits))
C.digitigrade_leg_swap(TRUE)
if(inherent_biotypes & MOB_ROBOTIC)
for(var/obj/item/bodypart/B in C.bodyparts)
B.change_bodypart_status(BODYPART_ORGANIC, FALSE, TRUE)
@@ -1026,44 +1026,6 @@ GLOBAL_LIST_EMPTY(features_by_species)
else if ("vox_tail" in mutant_bodyparts)
bodyparts_to_add -= "wagging_vox_tail_markings"
//Digitigrade legs are stuck in the phantom zone between true limbs and mutant bodyparts. Mainly it just needs more agressive updating than most limbs.
var/update_needed = FALSE
var/not_digitigrade = TRUE
for(var/X in H.bodyparts)
var/obj/item/bodypart/O = X
if(!O.use_digitigrade)
continue
not_digitigrade = FALSE
if(!(DIGITIGRADE in species_traits)) //Someone cut off a digitigrade leg and tacked it on
species_traits += DIGITIGRADE
var/should_be_squished = FALSE
if(H.wear_suit && ((H.wear_suit.flags_inv & HIDEJUMPSUIT) || (H.wear_suit.body_parts_covered & LEGS))) //Check for snowflake suit
var/obj/item/clothing/suit/A = H.wear_suit
if(!(A.mutantrace_variation & DIGITIGRADE_VARIATION))
should_be_squished = TRUE
if(H.w_uniform && (H.w_uniform.body_parts_covered & LEGS)) //Check for snowflake jumpsuit
var/obj/item/clothing/under/U = H.w_uniform
if(!(U.mutantrace_variation & DIGITIGRADE_VARIATION))
should_be_squished = TRUE
if(H.shoes)
var/obj/item/clothing/shoes/S = H.shoes
if(!(S.mutantrace_variation & DIGITIGRADE_VARIATION))
should_be_squished = TRUE
if(should_be_squished)
S.adjusted = NORMAL_STYLE
else
S.adjusted = DIGITIGRADE_STYLE
H.update_inv_shoes()
if(O.use_digitigrade == FULL_DIGITIGRADE && should_be_squished)
O.use_digitigrade = SQUISHED_DIGITIGRADE
update_needed = TRUE
else if(O.use_digitigrade == SQUISHED_DIGITIGRADE && !should_be_squished)
O.use_digitigrade = FULL_DIGITIGRADE
update_needed = TRUE
if(update_needed)
H.update_body_parts()
if(not_digitigrade && (DIGITIGRADE in species_traits)) //Curse is lifted
species_traits -= DIGITIGRADE
if(!bodyparts_to_add)
return
@@ -1347,7 +1309,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
if(num_legs < 2)
return FALSE
var/obj/item/clothing/shoes/S = I
if(istype(S) && ((!S && (DIGITIGRADE in species_traits)) || ((DIGITIGRADE in species_traits) ? S.xenoshoe == NO_DIGIT : S.xenoshoe == YES_DIGIT))) // Checks leg compatibilty with shoe digitigrade or not flag
if(istype(S) && (HAS_TRAIT(H, TRAIT_DIGITIGRADE) ? S.xenoshoe == NO_DIGIT : S.xenoshoe == YES_DIGIT)) // Checks leg compatibilty with shoe digitigrade or not flag
if(!disable_warning)
to_chat(H, span_warning("This footwear isn't compatible with your feet!"))
return FALSE

View File

@@ -2,7 +2,7 @@
//Human xenopmorph hybrid
name = "Polysmorph"
id = SPECIES_POLYSMORPH
species_traits = list(NOEYESPRITES, DIGITIGRADE, MUTCOLORS, NOCOLORCHANGE, DIGITIGRADE, HAS_FLESH, HAS_BONE, HAS_TAIL)
species_traits = list(NOEYESPRITES, DIGITIGRADE, MUTCOLORS, NOCOLORCHANGE, HAS_FLESH, HAS_BONE, HAS_TAIL)
possible_genders = list(FEMALE)
inherent_traits = list(TRAIT_ACIDBLOOD, TRAIT_SKINNY)
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID

View File

@@ -157,12 +157,10 @@ There are several things that need to be remembered:
var/obj/item/bodypart/r_leg = get_bodypart(BODY_ZONE_R_LEG)
var/obj/item/bodypart/chest/chest = get_bodypart(BODY_ZONE_CHEST)
uniform.species_fitted = null
if(uniform.adjusted == ALT_STYLE)
if(uniform.adjusted)
target_overlay = "[target_overlay]_d"
else if(uniform.adjusted == DIGITIGRADE_STYLE) // yogs - digitigrade alt sprites
target_overlay = "[target_overlay]_l"
else if(uniform.adjusted == DIGIALT_STYLE)
target_overlay = "[target_overlay]_d_l" // yogs end
if((uniform.mutantrace_variation & DIGITIGRADE_VARIATION) && HAS_TRAIT(src, TRAIT_DIGITIGRADE) && !HAS_TRAIT(src, TRAIT_DIGI_SQUISH)) // yogs - digitigrade alt sprites
target_overlay = "[target_overlay]_l" // yogs end
//Checks for GAGS
if(uniform.greyscale_config && uniform.greyscale_colors)
if("GAGS_sprite" in uniform.sprite_sheets)
@@ -387,14 +385,14 @@ There are several things that need to be remembered:
var/obj/item/bodypart/r_leg = get_bodypart(BODY_ZONE_R_LEG)
shoes.species_fitted = null
if(istype(shoes, /obj/item/clothing/shoes))
var/obj/item/clothing/shoes/S = shoes
if(S.adjusted == DIGITIGRADE_STYLE)
var/obj/item/clothing/shoes/real_shoes = shoes
if((real_shoes.mutantrace_variation & DIGITIGRADE_VARIATION) && HAS_TRAIT(src, TRAIT_DIGITIGRADE) && !HAS_TRAIT(src, TRAIT_DIGI_SQUISH))
target_overlay = "[target_overlay]_l"
if("GAGS_sprite" in S.sprite_sheets)
var/list/GAGS_species = S.sprite_sheets["GAGS_sprite"]
if("GAGS_sprite" in real_shoes.sprite_sheets)
var/list/GAGS_species = real_shoes.sprite_sheets["GAGS_sprite"]
if((l_leg?.species_id == r_leg?.species_id) && (l_leg.species_id in GAGS_species))
target_overlay += "_[l_leg.species_id]"
S.species_fitted = l_leg.species_id
real_shoes.species_fitted = l_leg.species_id
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
@@ -500,26 +498,26 @@ There are several things that need to be remembered:
if(istype(wear_suit, /obj/item))
wear_suit.screen_loc = ui_oclothing
var/obj/item/clothing/suit/S = wear_suit
var/worn_suit_icon = RESOLVE_ICON_STATE(S)
if(S.adjusted == DIGITIGRADE_STYLE)
var/obj/item/clothing/suit/suit = wear_suit
var/worn_suit_icon = RESOLVE_ICON_STATE(suit)
if((suit.mutantrace_variation & DIGITIGRADE_VARIATION) && HAS_TRAIT(src, TRAIT_DIGITIGRADE) && !HAS_TRAIT(src, TRAIT_DIGI_SQUISH))
worn_suit_icon = "[wear_suit.icon_state]_l" // Checks for digitgrade version of a suit and forces the alternate if it does
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown)
client.screen += wear_suit
var/obj/item/bodypart/chest/chest = get_bodypart(BODY_ZONE_CHEST)
var/icon_to_use = DEFAULT_SUIT_FILE
S.species_fitted = null
suit.species_fitted = null
var/obj/item/bodypart/l_leg = get_bodypart(BODY_ZONE_L_LEG)
var/obj/item/bodypart/r_leg = get_bodypart(BODY_ZONE_R_LEG)
if(l_leg?.species_id == r_leg?.species_id == SPECIES_VOX)//for Vox, it's the Vox legs that make regular sprites not fit
if(icon_exists(S.sprite_sheets[l_leg.species_id], S.icon_state))
icon_to_use = S.sprite_sheets[l_leg.species_id]
S.species_fitted = l_leg.species_id
else if(chest?.species_id in S.sprite_sheets)
if(icon_exists(S.sprite_sheets[chest.species_id], S.icon_state))
icon_to_use = S.sprite_sheets[chest.species_id]
S.species_fitted = chest.species_id
if(icon_exists(suit.sprite_sheets[l_leg.species_id], suit.icon_state))
icon_to_use = suit.sprite_sheets[l_leg.species_id]
suit.species_fitted = l_leg.species_id
else if(chest?.species_id in suit.sprite_sheets)
if(icon_exists(suit.sprite_sheets[chest.species_id], suit.icon_state))
icon_to_use = suit.sprite_sheets[chest.species_id]
suit.species_fitted = chest.species_id
overlays_standing[SUIT_LAYER] = wear_suit.build_worn_icon(default_layer = SUIT_LAYER, default_icon_file = icon_to_use, override_state = worn_suit_icon)
var/mutable_appearance/suit_overlay = overlays_standing[SUIT_LAYER]
if(OFFSET_SUIT in dna.species.offset_features)
@@ -568,9 +566,7 @@ There are several things that need to be remembered:
if(wear_mask)
var/target_overlay = RESOLVE_ICON_STATE(wear_mask)
if("snout" in dna.species.mutant_bodyparts) //checks for snout and uses lizard mask variant
if((wear_mask.mutantrace_variation & DIGITIGRADE_VARIATION) && !wear_mask.mask_adjusted) // i know digitigrade isn't the right word here but still
target_overlay = "[target_overlay]_l"
else if(wear_mask.mutantrace_adjusted & DIGITIGRADE_VARIATION)
if((wear_mask.mutantrace_variation & DIGITIGRADE_VARIATION) && (!wear_mask.mask_adjusted || (wear_mask.mutantrace_adjusted & DIGITIGRADE_VARIATION)))
target_overlay = "[target_overlay]_l"
update_hud_wear_mask(wear_mask)
if(!(head && (head.flags_inv & HIDEMASK)))
@@ -803,10 +799,11 @@ generate/load female uniform sprites matching all previously decided variables
else
. += "-robotic"
if(BP.use_digitigrade)
var/squished = HAS_TRAIT(src, TRAIT_DIGI_SQUISH)
if("[dna.species]" == SPECIES_POLYSMORPH)
. += "-pdigitigrade[BP.use_digitigrade]"
. += "-pdigitigrade[squished]"
else
. += "-digitigrade[BP.use_digitigrade]"
. += "-digitigrade[squished]"
if(BP.dmg_overlay_type)
. += "-[BP.dmg_overlay_type]"
if(BP.has_static_sprite_part)

View File

@@ -479,11 +479,12 @@
//produces a key based on the mob's limbs
/mob/living/carbon/proc/generate_icon_render_key()
var/squished = HAS_TRAIT(src, TRAIT_DIGI_SQUISH)
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
. += "-[BP.body_zone]"
if(BP.use_digitigrade)
. += "-digitigrade[BP.use_digitigrade]"
. += "-digitigrade[squished]"
if(BP.animal_origin)
. += "-[BP.animal_origin]"
if(BP.status == BODYPART_ORGANIC)

View File

@@ -20,7 +20,7 @@
var/aux_zone // used for hands
var/aux_layer
var/body_part = NONE //bitflag used to check which clothes cover this bodypart
var/use_digitigrade = NOT_DIGITIGRADE //Used for alternate legs, useless elsewhere
var/use_digitigrade = FALSE //Used for alternate legs, useless elsewhere
var/list/embedded_objects = list()
var/held_index = 0 //are we a hand? if so, which one!
var/render_like_organic = FALSE // TRUE is for when you want a BODYPART_ROBOTIC to pretend to be a BODYPART_ORGANIC.
@@ -685,6 +685,8 @@
/obj/item/bodypart/proc/set_owner(new_owner)
if(owner == new_owner)
return FALSE //`null` is a valid option, so we need to use a num var to make it clear no change was made.
if(owner && use_digitigrade)
REMOVE_TRAIT(owner, TRAIT_DIGITIGRADE, REF(src))
. = owner
owner = new_owner
var/needs_update_disabled = FALSE //Only really relevant if there's an owner
@@ -700,6 +702,8 @@
SIGNAL_ADDTRAIT(TRAIT_NOLIMBDISABLE),
))
if(owner)
if(use_digitigrade)
ADD_TRAIT(owner, TRAIT_DIGITIGRADE, REF(src))
if(initial(can_be_disabled))
if(HAS_TRAIT(owner, TRAIT_NOLIMBDISABLE))
set_can_be_disabled(FALSE)
@@ -964,12 +968,13 @@
if(should_draw_gender)
limb.icon_state = "[species_id]_[body_zone]_[icon_gender]"
else if(use_digitigrade)
var/squished = owner ? HAS_TRAIT(owner, TRAIT_DIGI_SQUISH) : FALSE
if("[species_id]" == SPECIES_POLYSMORPH)
limb.icon_state = "pdigitigrade_[use_digitigrade]_[body_zone]"
limb.icon_state = "pdigitigrade_[squished]_[body_zone]"
else if("[species_id]" == SPECIES_PRETERNIS)
limb.icon_state = "preternis_[use_digitigrade]_[body_zone]"
limb.icon_state = "preternis_[squished]_[body_zone]"
else
limb.icon_state = "digitigrade_[use_digitigrade]_[body_zone]"
limb.icon_state = "digitigrade_[squished]_[body_zone]"
else
limb.icon_state = "[species_id]_[body_zone]"
else
@@ -997,7 +1002,7 @@
if(should_draw_gender)
limb.icon_state = "[body_zone]_[icon_gender]"
else if(use_digitigrade)
limb.icon_state = "digitigrade_[use_digitigrade]_[body_zone]"
limb.icon_state = "digitigrade_[owner ? HAS_TRAIT(owner, TRAIT_DIGI_SQUISH) : FALSE]_[body_zone]"
else if(body_zone == BODY_ZONE_HEAD || body_zone == BODY_ZONE_CHEST)//default to male for the torso and head if the species is agendered
limb.icon_state = "[body_zone]_m"
else

View File

@@ -178,6 +178,8 @@
L = new /obj/item/bodypart/r_leg()
if(BODY_ZONE_CHEST)
L = new /obj/item/bodypart/chest()
if((L.body_part & LEG_LEFT|LEG_RIGHT) && (DIGITIGRADE in dna?.species?.species_traits))
L.set_digitigrade(TRUE)
if(L)
L.update_limb(fixed_icon, src)
if(robotic)
@@ -280,7 +282,7 @@
if("green")
. = "#a8e61d"
/mob/living/carbon/proc/Digitigrade_Leg_Swap(swap_back)
/mob/living/carbon/proc/digitigrade_leg_swap(swap_back)
var/body_plan_changed = FALSE
for(var/X in bodyparts)
var/obj/item/bodypart/O = X
@@ -305,12 +307,11 @@
if(body_plan_changed && ishuman(src))
var/mob/living/carbon/human/H = src
if(H.w_uniform)
var/obj/item/clothing/under/U = H.w_uniform
if(U.mutantrace_variation)
if(swap_back)
U.adjusted = NORMAL_STYLE
else
U.adjusted = DIGITIGRADE_STYLE
H.update_inv_w_uniform()
if(H.shoes && !swap_back)
H.dropItemToGround(H.shoes)
H.update_inv_w_uniform()
if(H.wear_suit)
H.update_inv_wear_suit()
if(H.shoes)
if(!H.can_equip(H.shoes, ITEM_SLOT_FEET, TRUE))
H.dropItemToGround(H.shoes)
else
H.update_inv_shoes()

View File

@@ -262,6 +262,9 @@
/// Used by the bloodysoles component to make footprints
var/footprint_sprite = FOOTPRINT_SPRITE_SHOES
/obj/item/bodypart/l_leg/set_digitigrade(use_digi)
use_digitigrade = use_digi
/obj/item/bodypart/l_leg/set_owner(new_owner)
. = ..()
if(. == FALSE)
@@ -309,7 +312,7 @@
/obj/item/bodypart/l_leg/digitigrade
name = "left digitigrade leg"
use_digitigrade = FULL_DIGITIGRADE
use_digitigrade = TRUE
/obj/item/bodypart/l_leg/monkey
icon = 'icons/mob/animal_parts.dmi'
@@ -354,6 +357,9 @@
/// Used by the bloodysoles component to make footprints
var/footprint_sprite = FOOTPRINT_SPRITE_SHOES
/obj/item/bodypart/r_leg/set_digitigrade(use_digi)
use_digitigrade = use_digi
/obj/item/bodypart/r_leg/set_owner(new_owner)
. = ..()
if(. == FALSE)
@@ -401,7 +407,7 @@
/obj/item/bodypart/r_leg/digitigrade
name = "right digitigrade leg"
use_digitigrade = FULL_DIGITIGRADE
use_digitigrade = TRUE
/obj/item/bodypart/r_leg/monkey
icon = 'icons/mob/animal_parts.dmi'

View File

@@ -170,30 +170,28 @@
/obj/item/bodypart/l_leg/robot/attackby(obj/item/W, mob/user, params)
if(W.tool_behaviour != TOOL_SCREWDRIVER)
return ..()
to_chat(user, span_notice("You configure [src] into [use_digitigrade != FULL_DIGITIGRADE ? "digitigrade" : "plantigrade"] mode."))
set_digitigrade(use_digitigrade != FULL_DIGITIGRADE)
to_chat(user, span_notice("You configure [src] into [!use_digitigrade ? "digitigrade" : "plantigrade"] mode."))
set_digitigrade(!use_digitigrade)
/obj/item/bodypart/l_leg/robot/set_digitigrade(use_digi = FALSE)
use_digitigrade = use_digi
if(use_digi)
use_digitigrade = FULL_DIGITIGRADE
icon_state = digi_icon_state
else
use_digitigrade = NOT_DIGITIGRADE
icon_state = initial(icon_state)
update_icon()
/obj/item/bodypart/r_leg/robot/attackby(obj/item/W, mob/user, params)
if(W.tool_behaviour != TOOL_SCREWDRIVER)
return ..()
to_chat(user, span_notice("You configure [src] into [use_digitigrade != FULL_DIGITIGRADE ? "digitigrade" : "plantigrade"] mode."))
set_digitigrade(use_digitigrade != FULL_DIGITIGRADE)
to_chat(user, span_notice("You configure [src] into [!use_digitigrade ? "digitigrade" : "plantigrade"] mode."))
set_digitigrade(!use_digitigrade)
/obj/item/bodypart/r_leg/robot/set_digitigrade(use_digi = FALSE)
use_digitigrade = use_digi
if(use_digi)
use_digitigrade = FULL_DIGITIGRADE
icon_state = digi_icon_state
else
use_digitigrade = NOT_DIGITIGRADE
icon_state = initial(icon_state)
update_icon()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

@@ -36,22 +36,20 @@
max_heat_protection_temperature = FIRE_HELM_MAX_TEMP_PROTECT
armor = list(MELEE = 40, BULLET = 5, LASER = 5, ENERGY = 5, BOMB = 50, BIO = 100, RAD = 50, FIRE = 50, ACID = 50, WOUND = 10)
resistance_flags = FIRE_PROOF
var/adjusted = NORMAL_STYLE
var/adjusted = FALSE
//don't want this to be a subtype of the explorer suit or it'll inherit the armor plating
/obj/item/clothing/head/hooded/miningmedic/verb/hood_adjust()
set name = "Adjust Hood Style"
set category = null
set src in usr
switch(adjusted)
if(NORMAL_STYLE)
adjusted = ALT_STYLE
to_chat(usr, span_notice("You adjust the hood to wear it more casually."))
flags_inv &= ~HIDEHAIR
if(ALT_STYLE)
adjusted = NORMAL_STYLE
to_chat(usr, span_notice("You adjust the hood back to normal."))
flags_inv |= HIDEHAIR
adjusted = !adjusted
if(adjusted)
to_chat(usr, span_notice("You adjust the hood to wear it more casually."))
flags_inv &= ~HIDEHAIR
else
to_chat(usr, span_notice("You adjust the hood back to normal."))
flags_inv |= HIDEHAIR
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
H.update_hair()