Skip to content

Commit

Permalink
minor tgui fixening
Browse files Browse the repository at this point in the history
  • Loading branch information
CliffracerX committed Sep 19, 2024
1 parent 7fa92cc commit 000ad9f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
6 changes: 3 additions & 3 deletions modular_doppler/modular_customization/preferences/antennae.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
return ..()
var/color_intended = COLOR_WHITE

var/tcol_1 = limb.owner.dna.features["moth_antennae_1"]
var/tcol_2 = limb.owner.dna.features["moth_antennae_2"]
var/tcol_3 = limb.owner.dna.features["moth_antennae_3"]
var/tcol_1 = limb.owner.dna.features["antennae_color_1"]
var/tcol_2 = limb.owner.dna.features["antennae_color_2"]
var/tcol_3 = limb.owner.dna.features["antennae_color_3"]
if(tcol_1 && tcol_2 && tcol_3)
//this is beyond ugly but it works
var/r1 = hex2num(copytext(tcol_1, 2, 4)) / 255.0
Expand Down
18 changes: 9 additions & 9 deletions modular_doppler/modular_customization/tri_color/antennae.dm
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/// Moth antennae colors!
/datum/preference/tri_color/moth_antennae_color
/datum/preference/tri_color/antennae_color
priority = PREFERENCE_PRIORITY_BODY_TYPE
savefile_key = "moth_antennae_color"
savefile_key = "antennae_color"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_SUPPLEMENTAL_FEATURES
//relevant_external_organ = /obj/item/organ/external/wings

/datum/preference/tri_color/moth_antennae_color/create_default_value()
/datum/preference/tri_color/antennae_color/create_default_value()
return list(sanitize_hexcolor("[pick("7F", "FF")][pick("7F", "FF")][pick("7F", "FF")]"),
sanitize_hexcolor("[pick("7F", "FF")][pick("7F", "FF")][pick("7F", "FF")]"),
sanitize_hexcolor("[pick("7F", "FF")][pick("7F", "FF")][pick("7F", "FF")]"))

/datum/preference/tri_color/moth_antennae_color/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["moth_antennae_color_1"] = value[1]
target.dna.features["moth_antennae_color_2"] = value[2]
target.dna.features["moth_antennae_color_3"] = value[3]
/datum/preference/tri_color/antennae_color/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["antennae_color_1"] = value[1]
target.dna.features["antennae_color_2"] = value[2]
target.dna.features["antennae_color_3"] = value[3]

/datum/preference/tri_color/moth_antennae_color/is_valid(value)
/datum/preference/tri_color/antennae_color/is_valid(value)
if (!..(value))
return FALSE

Expand All @@ -26,6 +26,6 @@
/datum/preference/choiced/moth_antennae/compile_constant_data()
var/list/data = ..()

data[SUPPLEMENTAL_FEATURE_KEY] = /datum/preference/tri_color/moth_antennae_color::savefile_key
data[SUPPLEMENTAL_FEATURE_KEY] = /datum/preference/tri_color/antennae_color::savefile_key

return data
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ export const has_antennae: FeatureToggle = {
component: CheckboxInput,
};

export const antennae_color: Feature<string[]> = {
name: 'Antennae Color',
component: FeatureTriColorInput,
};

export const has_fluff: FeatureToggle = {
name: 'Add Part: Fluff',
category: 'GAMEPLAY',
Expand Down

0 comments on commit 000ad9f

Please sign in to comment.