Skip to content

Commit

Permalink
Pathfinder Gear Betterment (#10274)
Browse files Browse the repository at this point in the history
* Sprites and legs and hats

* Makes overlay sprite change properly

* Protects the feets
  • Loading branch information
Mqiib committed Nov 1, 2020
1 parent 14ecb01 commit b2da398
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 3 deletions.
13 changes: 13 additions & 0 deletions code/modules/clothing/suits/_suits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
var/blood_overlay_type = "suit"
var/togglename = null
var/suittoggled = FALSE
var/mutantrace_variation = NO_MUTANTRACE_VARIATION
var/adjusted = NORMAL_STYLE


/obj/item/clothing/suit/worn_overlays(isinhands = FALSE)
Expand All @@ -30,3 +32,14 @@
if(ismob(loc))
var/mob/M = loc
M.update_inv_wear_suit()

/obj/item/clothing/suit/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)
adjusted = DIGITIGRADE_STYLE
H.update_inv_w_uniform()
1 change: 1 addition & 0 deletions code/modules/clothing/suits/armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
cold_protection = CHEST|GROIN|LEGS|ARMS
min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT
mutantrace_variation = MUTANTRACE_VARIATION

/obj/item/clothing/suit/armor/pathfinder/Initialize()
. = ..()
Expand Down
10 changes: 8 additions & 2 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,14 @@ GLOBAL_LIST_EMPTY(mentor_races)
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)) || (H.w_uniform && (H.w_uniform.body_parts_covered & LEGS)))
should_be_squished = TRUE
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 != MUTANTRACE_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 != MUTANTRACE_VARIATION)
should_be_squished = TRUE
if(O.use_digitigrade == FULL_DIGITIGRADE && should_be_squished)
O.use_digitigrade = SQUISHED_DIGITIGRADE
update_needed = TRUE
Expand Down
6 changes: 5 additions & 1 deletion code/modules/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,16 @@ There are several things that need to be remembered:

if(istype(wear_suit, /obj/item/clothing/suit))
wear_suit.screen_loc = ui_oclothing
var/obj/item/clothing/suit/S = wear_suit
var/worn_suit_icon = S.icon_state
if(S.adjusted == DIGITIGRADE_STYLE)
worn_suit_icon = "[wear_suit.icon_state]_l" // Checks for digitgrade version of a suit if it has it
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown)
client.screen += wear_suit
update_observer_view(wear_suit,1)

overlays_standing[SUIT_LAYER] = wear_suit.build_worn_icon(state = wear_suit.icon_state, default_layer = SUIT_LAYER, default_icon_file = 'icons/mob/suit.dmi')
overlays_standing[SUIT_LAYER] = wear_suit.build_worn_icon(state = worn_suit_icon, default_layer = SUIT_LAYER, default_icon_file = 'icons/mob/suit.dmi')
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]
Expand Down
Binary file modified icons/mob/head.dmi
Binary file not shown.
Binary file modified icons/mob/suit.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/hats.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/suits.dmi
Binary file not shown.

0 comments on commit b2da398

Please sign in to comment.