From 5ddd0484a8c14f1d37d188e42cf0d6c453b126eb Mon Sep 17 00:00:00 2001 From: Linzolle Date: Thu, 17 Oct 2019 22:11:47 -0500 Subject: [PATCH] colourable wings --- code/__DEFINES/DNA.dm | 1 + code/modules/client/preferences.dm | 22 ++++++- code/modules/client/preferences_savefile.dm | 17 +++++- .../mob/dead/new_player/preferences_setup.dm | 2 + .../new_player/sprite_accessories/wings.dm | 61 +++++++++++-------- .../mob/living/carbon/human/human_defines.dm | 2 + .../mob/living/carbon/human/species.dm | 7 +++ .../carbon/human/species_types/bugmen.dm | 2 +- .../carbon/human/species_types/furrypeople.dm | 2 +- .../carbon/human/species_types/humans.dm | 2 +- .../carbon/human/species_types/jellypeople.dm | 2 +- .../human/species_types/lizardpeople.dm | 2 +- 12 files changed, 86 insertions(+), 36 deletions(-) diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index 7be3533d47..60fb49f780 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -105,6 +105,7 @@ #define MATRIXED 22 //if icon is color matrix'd #define SKINTONE 23 //uses skin tones #define HORNCOLOR 24 +#define WINGCOLOR 25 //organ slots #define ORGAN_SLOT_BRAIN "brain" diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index c6166ca970..47c3293c35 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -86,6 +86,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/skin_tone = "caucasian1" //Skin color var/eye_color = "000" //Eye color var/horn_color = "85615a" //Horn color + var/wing_color = "fff" //Wing color var/datum/species/pref_species = new /datum/species/human() //Mutant race var/list/features = list("mcolor" = "FFF", "tail_lizard" = "Smooth", @@ -591,6 +592,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "

Decorative wings

" dat += "[features["deco_wings"]]" + dat += "    Change
" + if("insect_wings" in pref_species.default_features) if(!mutant_category) dat += APPEARANCE_CATEGORY_COLUMN @@ -598,6 +601,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "

Insect wings

" dat += "[features["insect_wings"]]" + dat += "    Change
" mutant_category++ if(mutant_category >= MAX_MUTANT_ROWS) dat += "" @@ -1689,7 +1693,10 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("horns_color") var/new_horn_color = input(user, "Choose your character's horn colour:", "Character Preference","#"+horn_color) as color|null if(new_horn_color) - horn_color = sanitize_hexcolor(new_horn_color) + if (new_horn_color == "#000000") + horn_color = "#85615A" + else + horn_color = sanitize_hexcolor(new_horn_color) if("wings") var/new_wings @@ -1697,6 +1704,14 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(new_wings) features["wings"] = new_wings + if("wings_color") + var/new_wing_color = input(user, "Choose your character's wing colour:", "Character Preference","#"+wing_color) as color|null + if(new_wing_color) + if (new_wing_color == "#000000") + wing_color = "#FFFFFF" + else + wing_color = sanitize_hexcolor(new_wing_color) + if("frills") var/new_frills new_frills = input(user, "Choose your character's frills:", "Character Preference") as null|anything in GLOB.frills_list @@ -1730,13 +1745,13 @@ GLOBAL_LIST_EMPTY(preferences_datums) new_insect_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.insect_wings_list if(new_insect_wings) features["insect_wings"] = new_insect_wings - + if("deco_wings") var/new_deco_wings new_deco_wings = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.deco_wings_list if(new_deco_wings) features["deco_wings"] = new_deco_wings - + if("insect_fluffs") var/new_insect_fluff new_insect_fluff = input(user, "Choose your character's wings:", "Character Preference") as null|anything in GLOB.insect_fluffs_list @@ -2262,6 +2277,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) character.hair_color = hair_color character.facial_hair_color = facial_hair_color character.horn_color = horn_color + character.wing_color = wing_color character.skin_tone = skin_tone character.hair_style = hair_style diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 94c1158885..01a46a44a0 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -317,6 +317,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(!S["features["mcolor"]"] || S["features["mcolor"]"] == "#000") WRITE_FILE(S["features["mcolor"]"] , "#FFF") + if(!S["features["horn_color"]"] || S["features["horn_color"]"] == "#000") + WRITE_FILE(S["features["horn_color"]"] , "#85615a") + + if(!S["features["wing_color"]"] || S["features["wing_color"]"] == "#000") + WRITE_FILE(S["features["wing_color"]"] , "#FFF") + //Character S["real_name"] >> real_name S["nameless"] >> nameless @@ -338,6 +344,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["socks"] >> socks S["socks_color"] >> socks_color S["horn_color"] >> horn_color + S["wing_color"] >> wing_color S["backbag"] >> backbag S["jumpsuit_style"] >> jumpsuit_style S["uplink_loc"] >> uplink_spawn_loc @@ -449,6 +456,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(!features["mcolor"] || features["mcolor"] == "#000") features["mcolor"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F") + if(!features["horn_color"] || features["horn_color"] == "#000") + features["horn_color"] = "85615a" + + if(!features["wing_color"] || features["wing_color"] == "#000") + features["wing_color"] = "FFFFFF" + nameless = sanitize_integer(nameless, 0, 1, initial(nameless)) be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name)) be_random_body = sanitize_integer(be_random_body, 0, 1, initial(be_random_body)) @@ -471,6 +484,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car eye_color = sanitize_hexcolor(eye_color, 3, 0) skin_tone = sanitize_inlist(skin_tone, GLOB.skin_tones) horn_color = sanitize_hexcolor(horn_color, 3, FALSE) + wing_color = sanitize_hexcolor(wing_color, 3, FALSE, "#FFFFFF") backbag = sanitize_inlist(backbag, GLOB.backbaglist, initial(backbag)) jumpsuit_style = sanitize_inlist(jumpsuit_style, GLOB.jumpsuitlist, initial(jumpsuit_style)) uplink_spawn_loc = sanitize_inlist(uplink_spawn_loc, GLOB.uplink_spawn_loc_list, initial(uplink_spawn_loc)) @@ -485,7 +499,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car features["body_markings"] = sanitize_inlist(features["body_markings"], GLOB.body_markings_list) features["feature_lizard_legs"] = sanitize_inlist(features["legs"], GLOB.legs_list) features["insect_wings"] = sanitize_inlist(features["insect_wings"], GLOB.insect_wings_list) - features["deco_wings"] = sanitize_inlist(features["deco_wings"], GLOB.deco_wings_list) + features["deco_wings"] = sanitize_inlist(features["deco_wings"], GLOB.deco_wings_list, "None") features["insect_fluff"] = sanitize_inlist(features["insect_fluff"], GLOB.insect_fluffs_list) joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole)) @@ -540,6 +554,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["socks"] , socks) WRITE_FILE(S["socks_color"] , socks_color) WRITE_FILE(S["horn_color"] , horn_color) + WRITE_FILE(S["wing_color"] , wing_color) WRITE_FILE(S["backbag"] , backbag) WRITE_FILE(S["jumpsuit_style"] , jumpsuit_style) WRITE_FILE(S["uplink_loc"] , uplink_spawn_loc) diff --git a/code/modules/mob/dead/new_player/preferences_setup.dm b/code/modules/mob/dead/new_player/preferences_setup.dm index 994d082585..d54b8256a9 100644 --- a/code/modules/mob/dead/new_player/preferences_setup.dm +++ b/code/modules/mob/dead/new_player/preferences_setup.dm @@ -17,6 +17,8 @@ hair_color = random_short_color() facial_hair_color = hair_color eye_color = random_eye_color() + horn_color = "85615a" + wing_color = "fff" if(!pref_species) var/rando_race = pick(GLOB.roundstart_races) pref_species = new rando_race() diff --git a/code/modules/mob/dead/new_player/sprite_accessories/wings.dm b/code/modules/mob/dead/new_player/sprite_accessories/wings.dm index 554b7edfdb..4a0fdd7eae 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/wings.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/wings.dm @@ -30,6 +30,7 @@ // Decorative wings /datum/sprite_accessory/deco_wings icon = 'icons/mob/wings.dmi' + color_src = WINGCOLOR /datum/sprite_accessory/deco_wings/plain name = "Plain" @@ -104,6 +105,22 @@ center = TRUE dimension_y = 34 +/datum/sprite_accessory/deco_wings/bee + name = "Bee" + icon_state = "bee" + +/datum/sprite_accessory/deco_wings/fairy + name = "Fairy" + icon_state = "fairy" + +/datum/sprite_accessory/deco_wings/bat + name = "Bat" + icon_state = "bat" + +/datum/sprite_accessory/deco_wings/feathery + name = "Feathery" + icon_state = "feathery" + /datum/sprite_accessory/deco_wings/none name = "None" icon_state = "none" @@ -113,7 +130,7 @@ /datum/sprite_accessory/insect_wings icon = 'icons/mob/wings.dmi' - color_src = null + color_src = WINGCOLOR /datum/sprite_accessory/insect_wings/none name = "None" @@ -183,10 +200,21 @@ name = "Snow" icon_state = "snow" -/datum/sprite_accessory/insect_wings/colored - name = "Colored (Hair)" - icon_state = "snowplain" - color_src = HAIR +/datum/sprite_accessory/insect_wings/bee + name = "Bee" + icon_state = "bee" + +/datum/sprite_accessory/insect_wings/fairy + name = "Fairy" + icon_state = "fairy" + +/datum/sprite_accessory/insect_wings/bat + name = "Bat" + icon_state = "bat" + +/datum/sprite_accessory/insect_wings/feathery + name = "Feathery" + icon_state = "feathery" /datum/sprite_accessory/insect_fluff/colored1 name = "Colored (Primary)" @@ -201,25 +229,4 @@ /datum/sprite_accessory/insect_fluff/colored3 name = "Colored (Tertiary)" icon_state = "snowplain" - color_src = MUTCOLORS3 - -/datum/sprite_accessory/insect_wings/bee - name = "Bee" - icon_state = "bee" - -/datum/sprite_accessory/insect_wings/bee_color - name = "Bee (Hair colored)" - icon_state = "bee" - color_src = HAIR - -/datum/sprite_accessory/insect_wings/fairy - name = "Fairy" - icon_state = "fairy" - -/datum/sprite_accessory/insect_wings/bat - name = "Bat" - icon_state = "bat" - -/datum/sprite_accessory/insect_wings/feathery - name = "Feathery" - icon_state = "feathery" + color_src = MUTCOLORS3 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index e32d073500..657c32ba01 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -19,6 +19,8 @@ var/horn_color = "85615a" //specific horn colors, because why not? + var/wing_color = "fff" //wings too + var/skin_tone = "caucasian1" //Skin tone var/lip_style = null //no lipstick by default- arguably misleading, as it could be used for general makeup diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 1f843483ee..a59d9e914b 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -37,6 +37,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) var/hair_alpha = 255 // the alpha used by the hair. 255 is completely solid, 0 is transparent. var/horn_color //specific horn colors, because why not? + var/wing_color var/use_skintones = 0 // does it use skintones or not? (spoiler alert this is only used by humans) var/exotic_blood = "" // If your race wants to bleed something other than bog standard blood, change this to reagent id. @@ -869,6 +870,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) accessory_overlay.color = "#[H.eye_color]" if(HORNCOLOR) accessory_overlay.color = "#[H.horn_color]" + if(WINGCOLOR) + accessory_overlay.color = "#[H.wing_color]" else accessory_overlay.color = forced_colour else @@ -946,6 +949,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(HORNCOLOR) extra_accessory_overlay.color = "#[H.horn_color]" + if(WINGCOLOR) + extra_accessory_overlay.color = "#[H.wing_color]" if(OFFSET_MUTPARTS in H.dna.species.offset_features) extra_accessory_overlay.pixel_x += H.dna.species.offset_features[OFFSET_MUTPARTS][1] @@ -985,6 +990,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) extra2_accessory_overlay.color = "#[H.hair_color]" if(HORNCOLOR) extra2_accessory_overlay.color = "#[H.horn_color]" + if(WINGCOLOR) + extra2_accessory_overlay.color = "#[H.wing_color]" if(OFFSET_MUTPARTS in H.dna.species.offset_features) extra2_accessory_overlay.pixel_x += H.dna.species.offset_features[OFFSET_MUTPARTS][1] diff --git a/code/modules/mob/living/carbon/human/species_types/bugmen.dm b/code/modules/mob/living/carbon/human/species_types/bugmen.dm index 94dba550b6..b4e55b60a5 100644 --- a/code/modules/mob/living/carbon/human/species_types/bugmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/bugmen.dm @@ -3,7 +3,7 @@ id = "insect" say_mod = "flutters" default_color = "00FF00" - species_traits = list(LIPS,NOEYES,HAIR,FACEHAIR,MUTCOLORS,HORNCOLOR) + species_traits = list(LIPS,NOEYES,HAIR,FACEHAIR,MUTCOLORS,HORNCOLOR,WINGCOLOR) inherent_biotypes = list(MOB_ORGANIC, MOB_HUMANOID, MOB_BUG) mutant_bodyparts = list("mam_ears", "mam_snout", "mam_tail", "taur", "insect_wings", "mam_snouts", "insect_fluff","horns") default_features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "mam_tail" = "None", "mam_ears" = "None", diff --git a/code/modules/mob/living/carbon/human/species_types/furrypeople.dm b/code/modules/mob/living/carbon/human/species_types/furrypeople.dm index 07e594d20b..0390d4accc 100644 --- a/code/modules/mob/living/carbon/human/species_types/furrypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/furrypeople.dm @@ -3,7 +3,7 @@ id = "mammal" default_color = "4B4B4B" should_draw_citadel = TRUE - species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR,HORNCOLOR) + species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR,HORNCOLOR,WINGCOLOR) inherent_biotypes = list(MOB_ORGANIC, MOB_HUMANOID) mutant_bodyparts = list("mam_tail", "mam_ears", "mam_body_markings", "mam_snouts", "deco_wings", "taur", "horns", "legs") default_features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "mam_snouts" = "Husky", "mam_tail" = "Husky", "mam_ears" = "Husky", "deco_wings" = "None", diff --git a/code/modules/mob/living/carbon/human/species_types/humans.dm b/code/modules/mob/living/carbon/human/species_types/humans.dm index 7147596766..0df2fca368 100644 --- a/code/modules/mob/living/carbon/human/species_types/humans.dm +++ b/code/modules/mob/living/carbon/human/species_types/humans.dm @@ -2,7 +2,7 @@ name = "Human" id = "human" default_color = "FFFFFF" - species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,MUTCOLORS_PARTSONLY) + species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,MUTCOLORS_PARTSONLY,WINGCOLOR) mutant_bodyparts = list("ears", "tail_human", "wings", "taur", "deco_wings") // CITADEL EDIT gives humans snowflake parts default_features = list("mcolor" = "FFF", "mcolor2" = "FFF","mcolor3" = "FFF","tail_human" = "None", "ears" = "None", "wings" = "None", "taur" = "None", "deco_wings" = "None") use_skintones = 1 diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 8cbeae7572..8e98569644 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -4,7 +4,7 @@ id = "jelly" default_color = "00FF90" say_mod = "chirps" - species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,NOBLOOD) + species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,NOBLOOD,WINGCOLOR) mutantlungs = /obj/item/organ/lungs/slime mutant_bodyparts = list("mam_tail", "mam_ears", "mam_snouts", "taur", "deco_wings") //CIT CHANGE default_features = list("mcolor" = "FFF", "mam_tail" = "None", "mam_ears" = "None", "mam_snouts" = "None", "taur" = "None", "deco_wings" = "None") //CIT CHANGE 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 c3eab37c98..a719f2eda0 100644 --- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -4,7 +4,7 @@ id = "lizard" say_mod = "hisses" default_color = "00FF00" - species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,LIPS,HORNCOLOR) + species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,LIPS,HORNCOLOR,WINGCOLOR) inherent_biotypes = list(MOB_ORGANIC, MOB_HUMANOID, MOB_REPTILE) mutant_bodyparts = list("tail_lizard", "snout", "spines", "horns", "frills", "body_markings", "legs", "taur", "deco_wings") mutanttongue = /obj/item/organ/tongue/lizard