Skip to content

Commit

Permalink
make new skrell appearance (#4683)
Browse files Browse the repository at this point in the history
* add mod mask for skrell hair

* add skrellian head chains

* add new skrell hairs

* update default skrell_hair bodypart

* Update modular_nova/master_files/code/modules/client/preferences/mutant_parts.dm

* Prefs migration

* Update preferences_savefile.dm

* keep calm ci screenshot comparing

Co-authored-by: Bloop <[email protected]>

* Update modular_nova/modules/customization/modules/mob/living/carbon/human/species/skrell.dm

* Screenshot test needs updating after all

---------

Co-authored-by: Bloop <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Dec 18, 2024
1 parent 80078d5 commit 30175bb
Show file tree
Hide file tree
Showing 12 changed files with 196 additions and 5 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
* You can't really use the non-modular version, least you eventually want asinine merge
* conflicts and/or potentially disastrous issues to arise, so here's your own.
*/
<<<<<<< HEAD
#define MODULAR_SAVEFILE_VERSION_MAX 6
=======
#define MODULAR_SAVEFILE_VERSION_MAX 8
>>>>>>> 5bf4ef16d16 (make new skrell appearance (#4683))

#define MODULAR_SAVEFILE_UP_TO_DATE -1

Expand All @@ -13,6 +17,11 @@
#define VERSION_UNDERSHIRT_BRA_SPLIT 4
#define VERSION_CHRONOLOGICAL_AGE 5
#define VERSION_TG_LOADOUT 6
<<<<<<< HEAD
=======
#define VERSION_INTERNAL_EXTERNAL_ORGANS 7
#define VERSION_SKRELL_HAIR_NAME_UPDATE 8
>>>>>>> 5bf4ef16d16 (make new skrell appearance (#4683))

#define INDEX_UNDERWEAR 1
#define INDEX_BRA 2
Expand Down Expand Up @@ -266,6 +275,31 @@
if (length(loadout_list)) // We only want to write these changes down if we're certain that there was anything in that.
write_preference(GLOB.preference_entries[/datum/preference/loadout], loadout_list)

<<<<<<< HEAD
=======
if(current_version < VERSION_INTERNAL_EXTERNAL_ORGANS)
var/list/save_augments = SANITIZE_LIST(save_data["augments"])
var/prefix_length = length("/obj/item/organ/internal") // Shouldn't be any external augments, but if there are, it's the same length
for(var/augment_name in save_augments)
var/augment_path_string = save_augments[augment_name]
if(!(findtext(augment_path_string, "/obj/item/organ/internal") || findtext(augment_path_string, "/obj/item/organ/external")))
continue // Make sure we don't strip something that isn't there
var/augment_path_string_stripped = copytext(save_augments[augment_name], prefix_length + 1)
save_augments[augment_name] = "/obj/item/organ[augment_path_string_stripped]"
load_augments(save_augments)

if(current_version < VERSION_SKRELL_HAIR_NAME_UPDATE)
var/list/mutant_bodyparts = SANITIZE_LIST(save_data["mutant_bodyparts"])

if("skrell_hair" in mutant_bodyparts)
var/current_skrell_hair = mutant_bodyparts["skrell_hair"][MUTANT_INDEX_NAME]

if(current_skrell_hair == "Male")
write_preference(GLOB.preference_entries[/datum/preference/choiced/mutant_choice/skrell_hair], "Short")
else if(current_skrell_hair == "Female")
write_preference(GLOB.preference_entries[/datum/preference/choiced/mutant_choice/skrell_hair], "Long")

>>>>>>> 5bf4ef16d16 (make new skrell appearance (#4683))

/datum/preferences/proc/check_migration()
if(!tgui_prefs_migration)
Expand Down Expand Up @@ -333,3 +367,9 @@
#undef VERSION_SYNTH_REFACTOR
#undef VERSION_UNDERSHIRT_BRA_SPLIT
#undef VERSION_CHRONOLOGICAL_AGE
<<<<<<< HEAD
=======
#undef VERSION_TG_LOADOUT
#undef VERSION_INTERNAL_EXTERNAL_ORGANS
#undef VERSION_SKRELL_HAIR_NAME_UPDATE
>>>>>>> 5bf4ef16d16 (make new skrell appearance (#4683))
Binary file not shown.
Binary file not shown.
Binary file modified modular_nova/master_files/icons/obj/clothing/hats.dmi
Binary file not shown.
38 changes: 38 additions & 0 deletions modular_nova/modules/customization/modules/clothing/head/head.dm
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,41 @@
greyscale_config_worn = /datum/greyscale_config/sweet_bow/worn
greyscale_colors = "#7b9ab5"
flags_1 = IS_PLAYER_COLORABLE_1

// Skrell chains
/obj/item/clothing/head/skrell_chain
name = "gold skrellian head chain"
desc = "Traditional Skrellian chain"
icon = 'modular_nova/master_files/icons/obj/clothing/hats.dmi'
icon_state = "skrell_chain_gold"
worn_icon = 'modular_nova/master_files/icons/mob/clothing/head/skrell_chains.dmi'
worn_icon_state = "chain_gold"
w_class = WEIGHT_CLASS_TINY
custom_price = PAYCHECK_CREW * 2
var/list/chain_styles = list(
"Long Diadema" = "long_diadema_gold",
"Short Diadema" = "short_diadema_gold",
"Long Fest" = "long_fest_gold",
"Short Fest" = "short_fest_gold",
"Chain" = "chain_gold",
)

/obj/item/clothing/head/skrell_chain/examine(mob/user)
. = ..()
. += span_notice("<b>Use in hand</b> to pick a new style.")

/obj/item/clothing/head/skrell_chain/attack_self(mob/user)
var/style_name = tgui_input_list(user, "How does chain look when it's up?", "Pick!", chain_styles)
worn_icon_state = chain_styles[style_name]
balloon_alert(user, "style choiced!")

/obj/item/clothing/head/skrell_chain/silver
name = "silver skrellian head chain"
icon_state = "skrell_chain_silver"
worn_icon_state = "chain_silver"
custom_price = PAYCHECK_CREW
chain_styles = list(
"Long Diadema" = "long_diadema_silver",
"Short Diadema" = "short_diadema_silver",
"Chain" = "chain_silver",
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
organ_type = /obj/item/organ/external/skrell_hair

/datum/sprite_accessory/skrell_hair/is_hidden(mob/living/carbon/human/wearer)
// Exception for MODs
if(istype(wearer.head, /obj/item/clothing/head/mod))
return FALSE

if((wearer.head?.flags_inv & HIDEHAIR) || (wearer.wear_mask?.flags_inv & HIDEHAIR))
return TRUE

Expand All @@ -18,9 +22,85 @@
icon_state = "none"

/datum/sprite_accessory/skrell_hair/long
name = "Female"
name = "Long"
icon_state = "long"

/datum/sprite_accessory/skrell_hair/short
name = "Male"
name = "Short"
icon_state = "short"

/datum/sprite_accessory/skrell_hair/very_short
name = "Very short"
icon_state = "veryshort"

/datum/sprite_accessory/skrell_hair/very_long
name = "Very Long"
icon_state = "verylong"

/datum/sprite_accessory/skrell_hair/hoop
name = "Hoop"
icon_state = "hoop"

/datum/sprite_accessory/skrell_hair/backwater
name = "Backwater"
icon_state = "backwater"

/datum/sprite_accessory/skrell_hair/reef
name = "Reef"
icon_state = "reef"

/datum/sprite_accessory/skrell_hair/tucked
name = "Tucked"
icon_state = "tucked"

/datum/sprite_accessory/skrell_hair/straight_tuux
name = "Straight Tuux"
icon_state = "straight_tuux"

/datum/sprite_accessory/skrell_hair/straight_tuux_long
name = "Straight Tuux Long"
icon_state = "straight_tuux_long"

/datum/sprite_accessory/skrell_hair/long_tuux
name = "Long Tuux"
icon_state = "long_tuux"

/datum/sprite_accessory/skrell_hair/short_tuux
name = "Short Tuux"
icon_state = "short_tuux"

/datum/sprite_accessory/skrell_hair/left_behind
name = "Left Behind"
icon_state = "left_behind"

/datum/sprite_accessory/skrell_hair/left_behind_long
name = "Left Behind Long"
icon_state = "left_behind_long"

/datum/sprite_accessory/skrell_hair/right_behind
name = "Right Behind"
icon_state = "right_behind"

/datum/sprite_accessory/skrell_hair/right_behind_long
name = "Right Behind Long"
icon_state = "right_behind_long"

/datum/sprite_accessory/skrell_hair/mid_bun
name = "Mid Bun"
icon_state = "mid_bun"

/datum/sprite_accessory/skrell_hair/long_mid_bun
name = "Long Mid Bun"
icon_state = "long_mid_bun"

/datum/sprite_accessory/skrell_hair/loose_braid
name = "Loose Braid"
icon_state = "loose_braid"

/datum/sprite_accessory/skrell_hair/verylong_dmg_r
name = "Very Long Right Damaged"
icon_state = "verylong_dmg_r"

/datum/sprite_accessory/skrell_hair/verylong_dmg_l
name = "Very Long Left Damaged"
icon_state = "verylong_dmg_l"
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,25 @@
special_icon.Blend(MOD_texture, ICON_MULTIPLY)
return special_icon

// Skrell hair hardlight
/datum/sprite_accessory/skrell_hair
use_custom_mod_icon = TRUE

/datum/sprite_accessory/skrell_hair/get_custom_mod_icon(mob/living/carbon/human/wearer, mutable_appearance/appearance_to_use = null)
if(wearer?.head && istype(wearer.head, /obj/item/clothing/head/mod))
var/obj/item/mod/control/modsuit_control = wearer.back
if(!istype(modsuit_control))
return
var/datum/mod_theme/mod_theme = modsuit_control.theme

if(!modsuit_control.active || !mod_theme.hardlight)
return

var/icon/special_icon = appearance_to_use ? icon(appearance_to_use.icon, appearance_to_use.icon_state) : icon(icon, icon_state)
var/icon/MOD_texture = icon(HARDLIGHT_DMI, "[mod_theme.hardlight_theme]")
special_icon.Blend("#fff", ICON_ADD)
special_icon.Blend(MOD_texture, ICON_MULTIPLY)

return special_icon

#undef HARDLIGHT_DMI
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

/datum/species/skrell/get_default_mutant_bodyparts()
return list(
"skrell_hair" = list("Male", TRUE),
"skrell_hair" = list("Short", TRUE),
)

/datum/species/skrell/get_species_description()
Expand Down Expand Up @@ -71,7 +71,7 @@
skrell.dna.features["mcolor"] = skrell_color
skrell.dna.features["mcolor2"] = skrell_color
skrell.dna.features["mcolor3"] = skrell_color
skrell.dna.mutant_bodyparts["skrell_hair"] = list(MUTANT_INDEX_NAME = "Female", MUTANT_INDEX_COLOR_LIST = list(skrell_color, skrell_color, skrell_color))
skrell.dna.mutant_bodyparts["skrell_hair"] = list(MUTANT_INDEX_NAME = "Long", MUTANT_INDEX_COLOR_LIST = list(skrell_color, skrell_color, skrell_color))
regenerate_organs(skrell, src, visual_only = TRUE)
skrell.update_body(TRUE)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
icon_state = "random_fly_1"

mutantpart_key = "skrell_hair"
mutantpart_info = list(MUTANT_INDEX_NAME = "Female", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF"))
mutantpart_info = list(MUTANT_INDEX_NAME = "Long", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF"))

zone = BODY_ZONE_HEAD
slot = ORGAN_SLOT_EXTERNAL_SKRELL_HAIR
Expand All @@ -14,6 +14,8 @@
bodypart_overlay = /datum/bodypart_overlay/mutant/skrell_hair
use_mob_sprite_as_obj_sprite = TRUE

organ_flags = parent_type::organ_flags | ORGAN_EXTERNAL

/datum/bodypart_overlay/mutant/skrell_hair
feature_key = "skrell_hair"
layers = EXTERNAL_FRONT | EXTERNAL_ADJACENT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,14 @@
name = "Fancy Hairpin"
item_path = /obj/item/clothing/head/costume/hairpin

/datum/loadout_item/head/skrell_chain_gold
name = "Gold skrellian head chain"
item_path = /obj/item/clothing/head/skrell_chain

/datum/loadout_item/head/skrell_chain_silver
name = "Silver skrellian head chain"
item_path = /obj/item/clothing/head/skrell_chain/silver

/*
* CHRISTMAS
*/
Expand Down
2 changes: 2 additions & 0 deletions modular_nova/modules/modular_vending/code/clothesmate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@
/obj/item/clothing/suit/frenchtrench = 1,
/obj/item/clothing/suit/toggle/labcoat/nova/lalunevest = 2,
/obj/item/clothing/gloves/lalune_long = 2,
/obj/item/clothing/head/skrell_chain = 3,
/obj/item/clothing/head/skrell_chain/silver = 3,
)

contraband_nova = list(
Expand Down

0 comments on commit 30175bb

Please sign in to comment.