Alternate base sprites for zorren (#18093)

* [WIP] Alternate base sprites for zorren

Currently does not work, may need some help to figure out why.

The idea is to change the default base sprite of the zorren to a much lighter one, as many people complain about the dark greyscaling on the original. However, to preserve people's characters who incorporate the current sprites, I wanted to make this an option that could be selected through the custom species icon menu.

If I disable the "selects bodytype" var for the species, then the new light version appears as you would expect and everything works fine.
However, if I enable the new zorren define for selects bodytype, it gives you the two options in the menu as you would expect, but the appearance for both types is the dark version ingame. Basically, this does not seem to work and I can't get my head around why.

* Actually works now!
This commit is contained in:
SatinIsle
2025-08-02 14:26:26 +01:00
committed by GitHub
parent ab8497bfb8
commit 8b68a038f5
7 changed files with 25 additions and 6 deletions
@@ -28,6 +28,9 @@
choices = GLOB.custom_species_bases.Copy()
if(new_species != SPECIES_CUSTOM)
choices = (choices | new_species)
else if (spec.selects_bodytype == SELECTS_BODYTYPE_ZORREN)
choices = list(SPECIES_ZORREN_HIGH,SPECIES_ZORREN_DARK)
choices = choices.Copy()
return choices
/datum/category_item/player_setup_item/general/traits/proc/get_pref_choice_from_trait(var/mob/user, var/datum/trait/trait, var/preference)
@@ -154,10 +157,10 @@
var/datum/species/selected_species = GLOB.all_species[pref.species]
if(selected_species.selects_bodytype)
if (!(pref.custom_base in pref.get_custom_bases_for_species()))
pref.custom_base = SPECIES_HUMAN
pref.custom_base = selected_species.default_custom_base
//otherwise, allowed!
else if(!pref.custom_base || !(pref.custom_base in GLOB.custom_species_bases))
pref.custom_base = SPECIES_HUMAN
pref.custom_base = selected_species.default_custom_base
/datum/category_item/player_setup_item/general/traits/copy_to_mob(var/mob/living/carbon/human/character)
@@ -375,6 +375,8 @@
var/unarmed_bonus = 0 //do you have stronger unarmed attacks?
var/shredding = FALSE //do you shred when attacking? Affects escaping restraints, and punching normally unpunchable things
var/default_custom_base = SPECIES_HUMAN
/datum/species/proc/update_attack_types()
unarmed_attacks = list()
for(var/u_type in unarmed_types)
@@ -766,7 +768,7 @@
new_copy.race_key = race_key
if (selects_bodytype && custom_base)
new_copy.base_species = custom_base
if(selects_bodytype == SELECTS_BODYTYPE_CUSTOM) //If race selects a bodytype, retrieve the custom_base species and copy needed variables.
if(selects_bodytype == SELECTS_BODYTYPE_CUSTOM || SELECTS_BODYTYPE_ZORREN) //If race selects a bodytype, retrieve the custom_base species and copy needed variables.
var/datum/species/S = GLOB.all_species[custom_base]
S.copy_variables(new_copy, copy_vars)
@@ -881,7 +881,7 @@
/datum/species/hi_zoxxen
name = SPECIES_ZORREN_HIGH
name_plural = "Zorren"
icobase = 'icons/mob/human_races/r_fox_vr.dmi'
icobase = 'icons/mob/human_races/r_fox_light_vr.dmi'
deform = 'icons/mob/human_races/r_def_fox.dmi'
tail = "tail"
icobase_tail = 1
@@ -917,6 +917,9 @@
blood_reagents = REAGENT_ID_COPPER
reagent_tag = IS_ZORREN
color_mult = 1
default_custom_base = SPECIES_ZORREN_HIGH
selects_bodytype = SELECTS_BODYTYPE_ZORREN
genders = list(MALE, FEMALE, PLURAL, NEUTER)
@@ -926,6 +929,15 @@
"Your overheated skin itches."
)
/datum/species/hi_zoxxen/get_race_key()
var/datum/species/real = GLOB.all_species[base_species]
return real.race_key
/datum/species/hi_zoxxen/dark //alternate sprite base for zorren
name = SPECIES_ZORREN_DARK
icobase = 'icons/mob/human_races/r_fox_vr.dmi'
spawn_flags = SPECIES_IS_RESTRICTED
/datum/species/vulpkanin
name = SPECIES_VULPKANIN
name_plural = "Vulpkanin"