Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes lizard sprites #22784

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ SEE_PIXELS// if an object is located on an unlit area, but some of its pixels ar
BLIND // can't see anything
*/

/proc/generate_female_clothing(index, t_color, icon, type) //In a shellnut, blends the uniform sprite with a pre-made sprite in uniform.dmi that's mostly white pixels with a few empty ones to trim off the pixels in the empty spots
/proc/generate_female_clothing(index, t_color, icon, type = FEMALE_UNIFORM_FULL, flat = FALSE) //In a shellnut, blends the uniform sprite with a pre-made sprite in uniform.dmi that's mostly white pixels with a few empty ones to trim off the pixels in the empty spots
var/icon/female_clothing_icon = icon("icon" = icon, "icon_state" = t_color) // and make the uniform the "female" shape. female_s is either the top-only one (for jumpskirts and the like) or the full one (for jumpsuits)
var/icon/female_s = icon("icon" = 'icons/effects/clothing.dmi', "icon_state" = "[(type == FEMALE_UNIFORM_FULL) ? "female_full" : "female_top"]")
var/icon/female_s = icon("icon" = 'icons/effects/clothing.dmi', "icon_state" = "[(type == FEMALE_UNIFORM_FULL) ? "female_full" : "female_top"]_[flat]")
female_clothing_icon.Blend(female_s, ICON_MULTIPLY)
female_clothing_icon = fcopy_rsc(female_clothing_icon)
GLOB.female_clothing_icons[index] = female_clothing_icon //Then it saves the icon in a global list so it doesn't have to make it again
Expand Down
4 changes: 3 additions & 1 deletion code/modules/mob/living/carbon/human/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,8 @@ GLOBAL_LIST_EMPTY(features_by_species)
if(underwear)
if(HAS_TRAIT(H, TRAIT_SKINNY))
standing += wear_skinny_version(underwear.icon_state, underwear.icon, BODY_LAYER) //Neat, this works
else if((H.gender == FEMALE && (FEMALE in possible_genders)) && H.dna.species.is_dimorphic)
standing += wear_female_version(underwear.icon_state, underwear.icon, BODY_LAYER, flat = !!(H.mob_biotypes & MOB_REPTILE)) // lizards
else
var/mutable_appearance/underwear_overlay = mutable_appearance(underwear.icon, underwear.icon_state, -BODY_LAYER)
if(H.dna.species.id in underwear.sprite_sheets)
Expand All @@ -858,7 +860,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
if(HAS_TRAIT(H, TRAIT_SKINNY)) //Check for skinny first
standing += wear_skinny_version(undershirt.icon_state, undershirt.icon, BODY_LAYER)
else if((H.gender == FEMALE && (FEMALE in possible_genders)) && H.dna.species.is_dimorphic)
standing += wear_female_version(undershirt.icon_state, undershirt.icon, BODY_LAYER)
standing += wear_female_version(undershirt.icon_state, undershirt.icon, BODY_LAYER, flat = !!(H.mob_biotypes & MOB_REPTILE)) // lizards
else
var/mutable_appearance/undershirt_overlay = mutable_appearance(undershirt.icon, undershirt.icon_state, -BODY_LAYER)
if(H.dna.species.id in undershirt.sprite_sheets)
Expand Down
8 changes: 4 additions & 4 deletions code/modules/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -614,11 +614,11 @@ There are several things that need to be remembered:
overlays_standing[BACK_LAYER] = back_overlay
apply_overlay(BACK_LAYER)

/proc/wear_female_version(t_color, icon, layer, type, greyscale_colors)
var/index = "[t_color]-[greyscale_colors]"
/proc/wear_female_version(t_color, icon, layer, type, greyscale_colors, flat)
var/index = "[t_color]-[greyscale_colors]-[flat]"
var/icon/female_clothing_icon = GLOB.female_clothing_icons[index]
if(!female_clothing_icon) //Create standing/laying icons if they don't exist
generate_female_clothing(index, t_color, icon, type)
generate_female_clothing(index, t_color, icon, type, flat)
return mutable_appearance(GLOB.female_clothing_icons[index], layer = -layer) //Grab the standing/laying icons once/if they do exist

/proc/wear_skinny_version(t_color, icon, layer, type, greyscale_colors)
Expand Down Expand Up @@ -726,7 +726,7 @@ generate/load female uniform sprites matching all previously decided variables
if(HAS_TRAIT(H, TRAIT_SKINNY) && (H.underwear == "Nude"))
standing = wear_skinny_version(t_state, file2use, layer2use, femaleuniform, greyscale_colors)
else
standing = wear_female_version(t_state, file2use, layer2use, femaleuniform, greyscale_colors)
standing = wear_female_version(t_state, file2use, layer2use, femaleuniform, greyscale_colors, !!(H.mob_biotypes & MOB_REPTILE)) // lizards
if(!standing)
standing = mutable_appearance(file2use, t_state, -layer2use)

Expand Down
Binary file modified icons/effects/clothing.dmi
Binary file not shown.
Binary file modified icons/mob/human_parts_greyscale.dmi
Binary file not shown.
Binary file modified icons/mob/mutant_bodyparts.dmi
Binary file not shown.
Loading