mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
[MIRROR] Fixes ethereals' hair. Separates fixed hair color from the 'fixed_mut_color' var [MDB IGNORE] (#22573)
* Fixes ethereals' hair. Separates fixed hair color from the 'fixed_mut_color' var (#76930) The series of "species nuking" prs made it so that the `fixed_mut_color` also applies to hair. The problem with that is you may not want that in some cases. It also introduced a bug where that var prevents ethereals' hair from changing colors when they die. So I have moved hair out of the things that gets `FIXED_MUT_COLOR` trait applied to it in favor of its own thing. `FIXED_HAIR_COLOR` trait is now used for ethereals to get a fixed hair color. Ethereals' hair should go out now when they die again, and it comes back on when they are revived. * Fixes ethereals' hair. Separates fixed hair color from the 'fixed_mut_color' var --------- Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
@@ -244,6 +244,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
#define TRAIT_MUTANT_COLORS "mutcolors"
|
||||
/// 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 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
|
||||
#define TRAIT_NO_BLOOD_OVERLAY "no_blood_overlay"
|
||||
/// Humans with this trait cannot have underwear
|
||||
|
||||
@@ -175,6 +175,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
"TRAIT_USES_SKINTONES" = TRAIT_USES_SKINTONES,
|
||||
"TRAIT_MUTANT_COLORS" = TRAIT_MUTANT_COLORS,
|
||||
"TRAIT_FIXED_MUTANT_COLORS" = TRAIT_FIXED_MUTANT_COLORS,
|
||||
"TRAIT_FIXED_HAIRCOLOR" = TRAIT_FIXED_HAIRCOLOR,
|
||||
"TRAIT_NO_BLOOD_OVERLAY" = TRAIT_NO_BLOOD_OVERLAY,
|
||||
"TRAIT_NO_UNDERWEAR" = TRAIT_NO_UNDERWEAR,
|
||||
"TRAIT_NO_AUGMENTS" = TRAIT_NO_AUGMENTS,
|
||||
|
||||
@@ -121,6 +121,8 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
var/siemens_coeff = 1
|
||||
///To use MUTCOLOR with a fixed color that's independent of the mcolor feature in DNA.
|
||||
var/fixed_mut_color = ""
|
||||
///A fixed hair color that's independent of the mcolor feature in DNA.
|
||||
var/fixed_hair_color = ""
|
||||
///Special mutation that can be found in the genepool exclusively in this species. Dont leave empty or changing species will be a headache
|
||||
var/inert_mutation = /datum/mutation/human/dwarfism
|
||||
///Used to set the mob's death_sound upon species change
|
||||
@@ -779,7 +781,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
if(hair_color == "mutcolor")
|
||||
accessory_overlay.color = source.dna.features["mcolor"]
|
||||
else if(hair_color == "fixedmutcolor")
|
||||
accessory_overlay.color = fixed_mut_color
|
||||
accessory_overlay.color = fixed_hair_color
|
||||
else
|
||||
accessory_overlay.color = source.hair_color
|
||||
if(FACIAL_HAIR_COLOR)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
// TRAIT_NO_UNDERWEAR, // SKYRAT EDIT - LET THEM WEAR PANTIES
|
||||
TRAIT_MUTANT_COLORS,
|
||||
TRAIT_FIXED_MUTANT_COLORS,
|
||||
TRAIT_FIXED_HAIRCOLOR,
|
||||
TRAIT_AGENDER,
|
||||
)
|
||||
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
|
||||
@@ -60,6 +61,7 @@
|
||||
return
|
||||
var/mob/living/carbon/human/ethereal = new_ethereal
|
||||
default_color = ethereal.dna.features["ethcolor"]
|
||||
fixed_hair_color = default_color
|
||||
r1 = GETREDPART(default_color)
|
||||
g1 = GETGREENPART(default_color)
|
||||
b1 = GETBLUEPART(default_color)
|
||||
@@ -119,11 +121,18 @@
|
||||
ethereal_light.set_light_range_power_color(1 + (2 * healthpercent), 1 + (1 * healthpercent), current_color)
|
||||
ethereal_light.set_light_on(TRUE)
|
||||
fixed_mut_color = current_color
|
||||
fixed_hair_color = current_color
|
||||
ethereal.update_body()
|
||||
ethereal.set_facial_haircolor(current_color, override = TRUE, update = FALSE)
|
||||
ethereal.set_haircolor(current_color, override = TRUE, update = TRUE)
|
||||
else
|
||||
ethereal_light.set_light_on(FALSE)
|
||||
fixed_mut_color = rgb(128,128,128)
|
||||
ethereal.set_facial_haircolor(current_color, update = FALSE)
|
||||
ethereal.set_haircolor(current_color, update = TRUE)
|
||||
var/dead_color = rgb(128,128,128)
|
||||
fixed_mut_color = dead_color
|
||||
fixed_hair_color = dead_color
|
||||
ethereal.update_body()
|
||||
ethereal.set_facial_haircolor(dead_color, override = TRUE, update = FALSE)
|
||||
ethereal.set_haircolor(dead_color, override = TRUE, update = TRUE)
|
||||
|
||||
/datum/species/ethereal/proc/on_emp_act(mob/living/carbon/human/H, severity)
|
||||
SIGNAL_HANDLER
|
||||
@@ -247,6 +256,7 @@
|
||||
TRAIT_NO_UNDERWEAR,
|
||||
TRAIT_MUTANT_COLORS,
|
||||
TRAIT_FIXED_MUTANT_COLORS,
|
||||
TRAIT_FIXED_HAIRCOLOR,
|
||||
TRAIT_AGENDER,
|
||||
TRAIT_TENACIOUS,
|
||||
TRAIT_NOBREATH,
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
facial_hairstyle = human_head_owner.facial_hairstyle
|
||||
facial_hair_alpha = owner_species.facial_hair_alpha
|
||||
facial_hair_color = human_head_owner.facial_hair_color
|
||||
fixed_hair_color = owner_species.fixed_mut_color //Can be null
|
||||
fixed_hair_color = owner_species.fixed_hair_color //Can be null
|
||||
gradient_styles = human_head_owner.grad_style?.Copy()
|
||||
gradient_colors = human_head_owner.grad_color?.Copy()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user