diff --git a/code/modules/client/preferences/_preference.dm b/code/modules/client/preferences/_preference.dm index b5b30e96d70..cd965159ae6 100644 --- a/code/modules/client/preferences/_preference.dm +++ b/code/modules/client/preferences/_preference.dm @@ -354,7 +354,7 @@ GLOBAL_LIST_INIT(preference_entries_by_key, init_preference_entries_by_key()) abstract_type = /datum/preference/choiced - /// A list of the four co-ordinates to crop to, if `generate_icons` is enabled. Useful for icons whose main contents are smaller than 32x32. Please keep it square. + /// A list of the four co-ordinates to crop to, if `generate_icons` is enabled. Useful for icons whose main contents are smaller than 32x32. Please keep it square. (x1, y1, x2, y2) var/list/crop_area /// A color to apply to the icon if it's greyscale, and `generate_icons` is enabled. var/greyscale_color diff --git a/code/modules/client/preferences/species_features/_mutant.dm b/code/modules/client/preferences/species_features/_mutant.dm index 22fe10177da..af3a69e7815 100644 --- a/code/modules/client/preferences/species_features/_mutant.dm +++ b/code/modules/client/preferences/species_features/_mutant.dm @@ -9,8 +9,6 @@ var/color_feature_id /// The global list containing the sprite accessories to use. Override New to set. var/list/sprite_accessory - /// The typepath of the external organ to add. - var/organ_to_add /// Direction to render the preview on. Can take NORTH, SOUTH, EAST, WEST. var/sprite_direction = SOUTH /// A list of types to exclude, including their subtypes. @@ -24,13 +22,14 @@ /datum/preference/choiced/mutant/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) target.dna.features[relevant_mutant_bodypart] = value - if(organ_to_add) - var/datum/sprite_accessory/accessory = sprite_accessory[value] + + var/datum/sprite_accessory/accessory = sprite_accessory[value] + if(accessory.organ_type_to_use) if(!accessory) CRASH("Accessory is null for [value]!") if(accessory.name == "None" || !is_accessible(preferences)) return - var/obj/item/organ/external/new_organ_to_add = new organ_to_add(FALSE, accessory.type) + var/obj/item/organ/external/new_organ_to_add = new accessory.organ_type_to_use(FALSE, accessory.type) new_organ_to_add.Insert(target, TRUE, FALSE) /datum/preference/choiced/mutant/is_accessible(datum/preferences/preferences) diff --git a/code/modules/client/preferences/species_features/human.dm b/code/modules/client/preferences/species_features/human.dm index 0b77ee175e1..9c00dcf2026 100644 --- a/code/modules/client/preferences/species_features/human.dm +++ b/code/modules/client/preferences/species_features/human.dm @@ -6,7 +6,6 @@ greyscale_color = COLOR_DARK_BROWN main_feature_name = "Tail" color_feature_id = "tail_human_color" - organ_to_add = /obj/item/organ/external/tail sprite_direction = NORTH accessories_to_ignore = list(/datum/sprite_accessory/tails/lizard) @@ -30,7 +29,6 @@ MUTANT_CHOICED_NEW(tail_human, GLOB.tails_list) greyscale_color = COLOR_DARK_BROWN main_feature_name = "Ears" color_feature_id = "ears_color" - organ_to_add = /obj/item/organ/internal/ears crop_area = list(11, 22, 21, 32) // We want just the head area. MUTANT_CHOICED_NEW(ears, GLOB.ears_list) @@ -53,7 +51,6 @@ MUTANT_CHOICED_NEW(ears, GLOB.ears_list) greyscale_color = COLOR_DARK_BROWN main_feature_name = "Horns" color_feature_id = "horns_color" - organ_to_add = /obj/item/organ/external/horns crop_area = list(11, 22, 21, 32) // We want just the head area. MUTANT_CHOICED_NEW(horns, GLOB.horns_list) diff --git a/code/modules/client/preferences/species_features/lizard.dm b/code/modules/client/preferences/species_features/lizard.dm index b20def08fda..49ad16e9873 100644 --- a/code/modules/client/preferences/species_features/lizard.dm +++ b/code/modules/client/preferences/species_features/lizard.dm @@ -5,6 +5,15 @@ main_feature_name = "Body markings" should_generate_icons = TRUE relevant_mutant_bodypart = "body_markings" + var/sprite_accessory // Shitcode cause I don't want to write new code to do the same shit as mutant stuff + +/datum/preference/choiced/lizard_body_markings/New() + . = ..() + sprite_accessory = GLOB.body_markings_list + +/datum/preference/choiced/lizard_body_markings/compile_constant_data() + . = ..() + .[SUPPLEMENTAL_FEATURE_KEY] = "body_markings_color" /datum/preference/choiced/lizard_body_markings/init_possible_values() var/list/values = list() @@ -36,13 +45,17 @@ /datum/preference/choiced/lizard_body_markings/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) target.dna.features["body_markings"] = value +/datum/preference/color/mutant/lizard_body_markings + savefile_key = "body_markings_color" + relevant_mutant_bodypart = "body_markings" + choiced_preference_datum = /datum/preference/choiced/lizard_body_markings + /datum/preference/choiced/mutant/lizard_frills savefile_key = "feature_lizard_frills" main_feature_name = "Frills" relevant_mutant_bodypart = MUTANT_FRILLS should_generate_icons = TRUE color_feature_id = "lizard_frills_color" - organ_to_add = /obj/item/organ/external/frills sprite_direction = EAST greyscale_color = COLOR_VIBRANT_LIME crop_area = list(11, 22, 21, 32) // We want just the head. @@ -83,7 +96,6 @@ MUTANT_CHOICED_NEW(lizard_frills, GLOB.frills_list) should_generate_icons = TRUE relevant_mutant_bodypart = MUTANT_SNOUT color_feature_id = "lizard_snout_color" - organ_to_add = /obj/item/organ/external/snout sprite_direction = EAST greyscale_color = COLOR_VIBRANT_LIME crop_area = list(14, 22, 24, 32) // We want just the head. @@ -101,30 +113,47 @@ MUTANT_CHOICED_NEW(lizard_snout, GLOB.snouts_list) relevant_mutant_bodypart = MUTANT_SNOUT choiced_preference_datum = /datum/preference/choiced/mutant/lizard_snout -/datum/preference/choiced/lizard_spines +/datum/preference/choiced/mutant/lizard_spines savefile_key = "feature_lizard_spines" - savefile_identifier = PREFERENCE_CHARACTER - category = PREFERENCE_CATEGORY_APPEARANCE_LIST - relevant_mutant_bodypart = "spines" + main_feature_name = "Spines" + should_generate_icons = TRUE + relevant_mutant_bodypart = MUTANT_SPINES + color_feature_id = "lizard_spines_color" + sprite_direction = NORTH + greyscale_color = COLOR_VIBRANT_LIME -/datum/preference/choiced/lizard_spines/init_possible_values() - return assoc_to_keys(GLOB.spines_list) +MUTANT_CHOICED_NEW(lizard_spines, GLOB.spines_list) -/datum/preference/choiced/lizard_spines/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) - target.dna.features["spines"] = value +/datum/preference/choiced/mutant/lizard_spines/generate_icon_state(datum/sprite_accessory/sprite_accessory, original_icon_state, suffix) + return "m_spines_[original_icon_state]_ADJ[suffix]" -/datum/preference/choiced/lizard_tail +/datum/preference/choiced/mutant/lizard_spines/create_default_value() + return pick(sprite_accessory) + +/datum/preference/color/mutant/lizard_spines + savefile_key = "lizard_spines_color" + relevant_mutant_bodypart = MUTANT_SPINES + choiced_preference_datum = /datum/preference/choiced/mutant/lizard_spines + +/datum/preference/choiced/mutant/lizard_tail savefile_key = "feature_lizard_tail" - savefile_identifier = PREFERENCE_CHARACTER - category = PREFERENCE_CATEGORY_APPEARANCE_LIST - relevant_external_organ = /obj/item/organ/external/tail/lizard + main_feature_name = "Lizard Tail" + should_generate_icons = TRUE + relevant_mutant_bodypart = MUTANT_LIZARD_TAIL + color_feature_id = "lizard_tail_color" + sprite_direction = SOUTH + greyscale_color = COLOR_VIBRANT_LIME + crop_area = list(1, 1, 20, 20) // We want just the lower+mid left legs+torso area. -/datum/preference/choiced/lizard_tail/init_possible_values() - return assoc_to_keys(GLOB.tails_list_lizard) +MUTANT_CHOICED_NEW(lizard_tail, GLOB.tails_list_lizard) -/datum/preference/choiced/lizard_tail/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) - target.dna.features["tail_lizard"] = value +/datum/preference/choiced/mutant/lizard_tail/generate_icon_state(datum/sprite_accessory/sprite_accessory, original_icon_state, suffix) + return "m_tail_lizard_[original_icon_state]_BEHIND[suffix]" + +/datum/preference/choiced/mutant/lizard_tail/create_default_value() + return pick(sprite_accessory) -/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) +/datum/preference/color/mutant/lizard_tail + savefile_key = "lizard_tail_color" + relevant_mutant_bodypart = MUTANT_LIZARD_TAIL + choiced_preference_datum = /datum/preference/choiced/mutant/lizard_tail diff --git a/code/modules/client/preferences/species_features/pod.dm b/code/modules/client/preferences/species_features/pod.dm index 5a36bea5ec2..8a955fbc5a1 100644 --- a/code/modules/client/preferences/species_features/pod.dm +++ b/code/modules/client/preferences/species_features/pod.dm @@ -6,6 +6,8 @@ should_generate_icons = TRUE color_feature_id = "pod_hair_color" +MUTANT_CHOICED_NEW(pod_hair, GLOB.pod_hair_list) + /datum/preference/choiced/mutant/pod_hair/init_possible_values() var/list/values = list() @@ -28,7 +30,7 @@ return values /datum/preference/choiced/mutant/pod_hair/create_default_value() - return pick(GLOB.pod_hair_list) + return "Cabbage" /datum/preference/color/mutant/pod_hair savefile_key = "pod_hair_color" diff --git a/code/modules/client/preferences/species_features/synth.dm b/code/modules/client/preferences/species_features/synth.dm index 0fa0c2f1c18..5c22ca5c68b 100644 --- a/code/modules/client/preferences/species_features/synth.dm +++ b/code/modules/client/preferences/species_features/synth.dm @@ -58,7 +58,6 @@ relevant_mutant_bodypart = MUTANT_SYNTH_SCREEN crop_area = list(11, 22, 21, 32) // We want just the head. color_feature_id = "synth_screen_color" - organ_to_add = /obj/item/organ/external/screen /datum/preference/choiced/mutant/synth_screen/New() . = ..() @@ -88,7 +87,6 @@ crop_area = list(11, 22, 21, 32) // We want just the head. color_feature_id = "synth_antenna_color" greyscale_color = DEFAULT_SYNTH_PART_COLOR - organ_to_add = /obj/item/organ/external/synth_antenna MUTANT_CHOICED_NEW(synth_antenna, GLOB.synth_antennae) diff --git a/code/modules/mob/dead/new_player/sprite_accessories.dm b/code/modules/mob/dead/new_player/sprite_accessories.dm index 8c80783b384..65338fa09d3 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories.dm @@ -113,7 +113,6 @@ GLOBAL_LIST_INIT(sprite_accessory_layers, list( \ /datum/sprite_accessory/New() . = ..() if(color_src == TRI_COLOR_LAYERS) - color_layer_names = list() if(!GLOB.cached_sprite_accessory_sprites[icon]) GLOB.cached_sprite_accessory_sprites[icon] = icon_states(new /icon(icon)) for(var/layer in GLOB.sprite_accessory_layers) diff --git a/code/modules/mob/dead/new_player/sprite_accessories/mutant/ears.dm b/code/modules/mob/dead/new_player/sprite_accessories/mutant/ears.dm index 9b49b714469..b63112de6a3 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/mutant/ears.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/mutant/ears.dm @@ -3,6 +3,7 @@ key = "ears" em_block = TRUE color_src = TRI_COLOR_LAYERS + organ_type_to_use = /obj/item/organ/internal/ears /datum/sprite_accessory/ears/none name = "None" diff --git a/code/modules/mob/dead/new_player/sprite_accessories/mutant/frills.dm b/code/modules/mob/dead/new_player/sprite_accessories/mutant/frills.dm index ce514ac9672..f2bea3029cb 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/mutant/frills.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/mutant/frills.dm @@ -1,5 +1,6 @@ /datum/sprite_accessory/frills icon = 'icons/mob/species/lizard/lizard_misc.dmi' + organ_type_to_use = /obj/item/organ/external/frills /datum/sprite_accessory/frills/none name = "None" diff --git a/code/modules/mob/dead/new_player/sprite_accessories/mutant/horns.dm b/code/modules/mob/dead/new_player/sprite_accessories/mutant/horns.dm index a34f9914b9f..c3c8210d9bd 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/mutant/horns.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/mutant/horns.dm @@ -1,6 +1,8 @@ +// Oh man, these really are horny /datum/sprite_accessory/horns icon = 'icons/mob/species/lizard/lizard_misc.dmi' em_block = TRUE + organ_type_to_use = /obj/item/organ/external/horns /datum/sprite_accessory/horns/none name = "None" diff --git a/code/modules/mob/dead/new_player/sprite_accessories/mutant/snouts.dm b/code/modules/mob/dead/new_player/sprite_accessories/mutant/snouts.dm index 58b57fe8bd2..6970b995bbe 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/mutant/snouts.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/mutant/snouts.dm @@ -1,6 +1,7 @@ /datum/sprite_accessory/snouts icon = 'icons/mob/species/lizard/lizard_misc.dmi' em_block = TRUE + organ_type_to_use = /obj/item/organ/external/snout /datum/sprite_accessory/snouts/sharp name = "Sharp" diff --git a/code/modules/mob/dead/new_player/sprite_accessories/mutant/spines.dm b/code/modules/mob/dead/new_player/sprite_accessories/mutant/spines.dm index 9262a74c60f..4a0e43fd04f 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/mutant/spines.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/mutant/spines.dm @@ -1,10 +1,13 @@ /datum/sprite_accessory/spines icon = 'icons/mob/species/lizard/lizard_spines.dmi' em_block = TRUE + organ_type_to_use = /obj/item/organ/external/spines /datum/sprite_accessory/spines_animated icon = 'icons/mob/species/lizard/lizard_spines.dmi' em_block = TRUE + // This shouldn't be needed... but shitcode has it's ways. + organ_type_to_use = /obj/item/organ/external/spines /datum/sprite_accessory/spines/none name = "None" diff --git a/code/modules/mob/dead/new_player/sprite_accessories/mutant/tails.dm b/code/modules/mob/dead/new_player/sprite_accessories/mutant/tails.dm index 1de3911f2fd..8726076d1e4 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/mutant/tails.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/mutant/tails.dm @@ -6,6 +6,7 @@ /datum/sprite_accessory/tails/lizard icon = 'icons/mob/species/lizard/lizard_tails.dmi' key = "tail_lizard" + organ_type_to_use = /obj/item/organ/external/tail/lizard /datum/sprite_accessory/tails/lizard/smooth name = "Smooth" diff --git a/code/modules/mob/dead/new_player/synth_sprite_accessories.dm b/code/modules/mob/dead/new_player/synth_sprite_accessories.dm index 198007023ac..ce3acfe4583 100644 --- a/code/modules/mob/dead/new_player/synth_sprite_accessories.dm +++ b/code/modules/mob/dead/new_player/synth_sprite_accessories.dm @@ -6,6 +6,7 @@ icon = 'icons/mob/species/synth/screens.dmi' gender_specific = FALSE color_src = null + organ_type_to_use = /obj/item/organ/external/screen /datum/sprite_accessory/screen/none name = "None" @@ -148,6 +149,7 @@ /datum/sprite_accessory/antenna icon = 'icons/mob/species/synth/synth_antennas.dmi' key = "synth_antenna" + organ_type_to_use = /obj/item/organ/external/synth_antenna /datum/sprite_accessory/antenna/none name = "None" diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm index 27e69b64f4a..b88fac9e4fb 100644 --- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -19,11 +19,9 @@ MUTANT_HORNS = "None", MUTANT_FRILLS = "None", MUTANT_SNOUT = "Round", + MUTANT_SPINES = "Long", + MUTANT_LIZARD_TAIL = "Smooth", ) - external_organs = list( - /obj/item/organ/external/spines = "None", - /obj/item/organ/external/tail/lizard = "Smooth", - ) mutanttongue = /obj/item/organ/internal/tongue/lizard coldmod = 1.5 heatmod = 0.67 diff --git a/code/modules/surgery/organs/external/tails.dm b/code/modules/surgery/organs/external/tails.dm index aa5e0606db1..175e2079e16 100644 --- a/code/modules/surgery/organs/external/tails.dm +++ b/code/modules/surgery/organs/external/tails.dm @@ -144,4 +144,4 @@ /obj/item/organ/external/tail/lizard/fake name = "fabricated lizard tail" - desc = "A fabricated severed lizard tail. This one's made of synthflesh. Probably not usable for lizard wine." + desc = "A fabricated severed lizard tail." diff --git a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard.png b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard.png index c52a9c194d4..04e24da91b2 100644 Binary files a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard.png and b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard.png differ diff --git a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_ashwalker.png b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_ashwalker.png index 59bc786abf1..8849aa3250b 100644 Binary files a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_ashwalker.png and b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_ashwalker.png differ diff --git a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_silverscale.png b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_silverscale.png index ba4449601cd..a0af108fa7f 100644 Binary files a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_silverscale.png and b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_silverscale.png differ diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/species_features.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/species_features.tsx index 00a650361e9..5bff1531494 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/species_features.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/species_features.tsx @@ -148,3 +148,18 @@ export const lizard_snout_color: Feature = { name: 'Snout Color', component: FeatureTriColorInput, }; + +export const lizard_tail_color: Feature = { + name: 'Tail Color', + component: FeatureTriColorInput, +}; + +export const lizard_spines_color: Feature = { + name: 'Spines Color', + component: FeatureTriColorInput, +}; + +export const body_markings_color: Feature = { + name: 'Body Markings Color', + component: FeatureTriColorInput, +};