Skip to content

Commit

Permalink
fixed standart body_markings, cbelly still only white (bug)
Browse files Browse the repository at this point in the history
  • Loading branch information
Artemchik542 committed Feb 16, 2024
1 parent b89d63e commit d4f79ca
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
4 changes: 2 additions & 2 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_USES_SKINTONES "uses_skintones"
/// Species with this trait use mutant colors for coloration
#define TRAIT_MUTANT_COLORS "mutcolors"

/// Species with this trait use second mutant colors for coloration
#define TRAIT_MUTANT_COLORS_SECONDARY "mutcolors_secondary" // MASSMETA EDIT

/// Species with this trait have mutant colors that cannot be chosen by the player, nor altered ingame by external means
#define TRAIT_FIXED_MUTANT_COLORS "fixed_mutcolors"
/// Species with this trait have second mutant colors that cannot be chosen by the player, nor altered ingame by external means
#define TRAIT_FIXED_MUTANT_COLORS_SECONDARY "fixed_mutcolors_secondary" // MASSMETA EDIT
/// Species with this trait have a haircolor that cannot be chosen by the player, nor altered ingame by external means
#define TRAIT_FIXED_HAIRCOLOR "fixed_haircolor"
/// Humans with this trait won't get bloody hands, nor bloody feet
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_FIST_MINING" = TRAIT_FIST_MINING,
"TRAIT_FIXED_HAIRCOLOR" = TRAIT_FIXED_HAIRCOLOR,
"TRAIT_FIXED_MUTANT_COLORS" = TRAIT_FIXED_MUTANT_COLORS,
"TRAIT_FIXED_MUTANT_COLORS_SECONDARY" = TRAIT_FIXED_MUTANT_COLORS_SECONDARY, // MASSMETA EDIT
"TRAIT_FLESH_DESIRE" = TRAIT_FLESH_DESIRE,
"TRAIT_FLOORED" = TRAIT_FLOORED,
"TRAIT_FORBID_MINING_SHUTTLE_CONSOLE_OUTSIDE_STATION" = TRAIT_FORBID_MINING_SHUTTLE_CONSOLE_OUTSIDE_STATION,
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_FIST_MINING" = TRAIT_FIST_MINING,
"TRAIT_FIXED_HAIRCOLOR" = TRAIT_FIXED_HAIRCOLOR,
"TRAIT_FIXED_MUTANT_COLORS" = TRAIT_FIXED_MUTANT_COLORS,
"TRAIT_FIXED_MUTANT_COLORS_SECONDARY" = TRAIT_FIXED_MUTANT_COLORS_SECONDARY, // MASSMETA EDIT
"TRAIT_FLOORED" = TRAIT_FLOORED,
"TRAIT_FORCED_STANDING" = TRAIT_FORCED_STANDING,
"TRAIT_FREERUNNING" = TRAIT_FREERUNNING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
relevant_inherent_trait = TRAIT_MUTANT_COLORS_SECONDARY

/datum/preference/color/mutant_color_secondary/is_accessible(datum/preferences/preferences)
if (!..(preferences))
return FALSE

var/species_type = preferences.read_preference(/datum/preference/choiced/species)
var/datum/species/species = new species_type
return !(TRAIT_FIXED_MUTANT_COLORS_SECONDARY in species.inherent_traits)

/datum/preference/color/mutant_color_secondary/create_default_value()
return sanitize_hexcolor("[pick("7F", "FF")][pick("7F", "FF")][pick("7F", "FF")]")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
/// the list of external organs covered
var/list/external_slots = list()

/datum/sprite_accessory/body_markings
color_src = MUTANT_COLOR_SECONDARY

/datum/sprite_accessory/body_markings/cbelly
icon = 'massmeta/icons/mob/species/lizard/multipart.dmi'
name = "Color Belly"
body_slots = list(BODY_ZONE_HEAD)
external_slots = list(ORGAN_SLOT_EXTERNAL_TAIL)
icon = 'massmeta/icons/mob/species/lizard/multipart.dmi'
icon_state = "cbelly"
gender_specific = 1
color_src = MUTANT_COLOR_SECONDARY
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,21 @@ export const feature_lizard_tail: FeatureChoiced = {
},
};

export const feature_mcolor: Feature<string> = {
name: 'Mutant color',
component: FeatureColorInput,
};

// MASSMETA EDIT
// Add Secondary species color
export const feature_mcolor_secondary: Feature<string> = {
name: 'Mutant Secondary color',
description:
'Apply only on Colored Belly',
component: FeatureColorInput,
};
// End Edit

export const feature_mcolor: Feature<string> = {
name: 'Mutant color',
component: FeatureColorInput,
};

export const underwear_color: Feature<string> = {
name: 'Underwear color',
component: FeatureColorInput,
Expand Down

0 comments on commit d4f79ca

Please sign in to comment.