Files
Bubberstation/code/modules/client/preferences/species_features/lizard.dm
T
lizardqueenlexiandGitHub e9cc620e9f Splits mutant_bodyparts.dmi into several subfiles. (#71408)
## About The Pull Request

Splits the `mutant_bodyparts.dmi` file up, as was suggested, but not
implemented, in #69302.

The following new files were created in the `icons\mob\species` folder,
containing the listed sprites:

- `lizard\lizard_misc.dmi`: Snouts, horns, frills, and body markings.
Anything I didn't feel needed an entire file to itself.
- `lizard\lizard_spines.dmi`: Lizard spines, both animated and not.
- `lizard\lizard_tails.dmi`: Lizard tails, both animated and not.
- `human\cat_features.dmi`: Felinid ears and tails.
- `monkey\monkey_tail.dmi`: The monkey tail.
- `mush_cap.dmi`: The lone mushperson cap, so easily forgotten.

Additionally, I moved `wings.dmi` from `mob\clothing` to `mob\species`.
I'm not sure what it was doing there.
## Why It's Good For The Game

`mutant_bodyparts.dmi` was something of a mess, with parts from four
different species thrown together haphazardly. It probably made sense in
earlier days when "mutant humans" were few and far between, but
splitting it up makes it more intuitive to find these sprites, and
brings it in line with other species - namely, moths. It also means that
any future sprites of these types added will not bloat an oversized file
even more.

Moving the wings file to the species folder just makes sense, because
wings are not a type of clothing.
## Changelog
🆑
refactor: Removed mutant_bodyparts.dmi and distributed its sprites in a
more sensible and granular manner.
/🆑
2022-11-22 19:13:49 +01:00

145 lines
5.1 KiB
Plaintext

/proc/generate_lizard_side_shots(list/sprite_accessories, key, include_snout = TRUE)
var/list/values = list()
var/icon/lizard = icon('icons/mob/species/lizard/bodyparts.dmi', "lizard_head", EAST)
var/icon/eyes = icon('icons/mob/species/human/human_face.dmi', "eyes", EAST)
eyes.Blend(COLOR_GRAY, ICON_MULTIPLY)
lizard.Blend(eyes, ICON_OVERLAY)
if (include_snout)
lizard.Blend(icon('icons/mob/species/lizard/lizard_misc.dmi', "m_snout_round_ADJ", EAST), ICON_OVERLAY)
for (var/name in sprite_accessories)
var/datum/sprite_accessory/sprite_accessory = sprite_accessories[name]
var/icon/final_icon = icon(lizard)
if (sprite_accessory.icon_state != "none")
var/icon/accessory_icon = icon(sprite_accessory.icon, "m_[key]_[sprite_accessory.icon_state]_ADJ", EAST)
final_icon.Blend(accessory_icon, ICON_OVERLAY)
final_icon.Crop(11, 20, 23, 32)
final_icon.Scale(32, 32)
final_icon.Blend(COLOR_VIBRANT_LIME, ICON_MULTIPLY)
values[name] = final_icon
return values
/datum/preference/choiced/lizard_body_markings
savefile_key = "feature_lizard_body_markings"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_FEATURES
main_feature_name = "Body markings"
should_generate_icons = TRUE
relevant_mutant_bodypart = "body_markings"
/datum/preference/choiced/lizard_body_markings/init_possible_values()
var/list/values = list()
var/icon/lizard = icon('icons/mob/species/lizard/bodyparts.dmi', "lizard_chest_m")
for (var/name in GLOB.body_markings_list)
var/datum/sprite_accessory/sprite_accessory = GLOB.body_markings_list[name]
var/icon/final_icon = icon(lizard)
if (sprite_accessory.icon_state != "none")
var/icon/body_markings_icon = icon(
'icons/mob/species/lizard/lizard_misc.dmi',
"m_body_markings_[sprite_accessory.icon_state]_ADJ",
)
final_icon.Blend(body_markings_icon, ICON_OVERLAY)
final_icon.Blend(COLOR_VIBRANT_LIME, ICON_MULTIPLY)
final_icon.Crop(10, 8, 22, 23)
final_icon.Scale(26, 32)
final_icon.Crop(-2, 1, 29, 32)
values[name] = final_icon
return values
/datum/preference/choiced/lizard_body_markings/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["body_markings"] = value
/datum/preference/choiced/lizard_frills
savefile_key = "feature_lizard_frills"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_FEATURES
main_feature_name = "Frills"
should_generate_icons = TRUE
/datum/preference/choiced/lizard_frills/init_possible_values()
return generate_lizard_side_shots(GLOB.frills_list, "frills")
/datum/preference/choiced/lizard_frills/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["frills"] = value
/datum/preference/choiced/lizard_horns
savefile_key = "feature_lizard_horns"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_FEATURES
main_feature_name = "Horns"
should_generate_icons = TRUE
/datum/preference/choiced/lizard_horns/init_possible_values()
return generate_lizard_side_shots(GLOB.horns_list, "horns")
/datum/preference/choiced/lizard_horns/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["horns"] = value
/datum/preference/choiced/lizard_legs
savefile_key = "feature_lizard_legs"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
relevant_mutant_bodypart = "legs"
/datum/preference/choiced/lizard_legs/init_possible_values()
return assoc_to_keys(GLOB.legs_list)
/datum/preference/choiced/lizard_legs/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["legs"] = value
/datum/preference/choiced/lizard_snout
savefile_key = "feature_lizard_snout"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_FEATURES
main_feature_name = "Snout"
should_generate_icons = TRUE
/datum/preference/choiced/lizard_snout/init_possible_values()
return generate_lizard_side_shots(GLOB.snouts_list, "snout", include_snout = FALSE)
/datum/preference/choiced/lizard_snout/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["snout"] = value
/datum/preference/choiced/lizard_spines
savefile_key = "feature_lizard_spines"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
relevant_mutant_bodypart = "spines"
/datum/preference/choiced/lizard_spines/init_possible_values()
return assoc_to_keys(GLOB.spines_list)
/datum/preference/choiced/lizard_spines/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["spines"] = value
/datum/preference/choiced/lizard_tail
savefile_key = "feature_lizard_tail"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
relevant_external_organ = /obj/item/organ/external/tail/lizard
/datum/preference/choiced/lizard_tail/init_possible_values()
return assoc_to_keys(GLOB.tails_list_lizard)
/datum/preference/choiced/lizard_tail/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["tail_lizard"] = value
/datum/preference/choiced/lizard_tail/create_default_value()
var/datum/sprite_accessory/tails/lizard/smooth/tail = /datum/sprite_accessory/tails/lizard/smooth
return initial(tail.name)