Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slime People and IPC; Imitating Species Cosmetically. #27359

Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c570e5b
Pain
Spaghetti-bit Oct 1, 2024
b0e1e77
More transparency / alpha
Spaghetti-bit Oct 1, 2024
5e5b6e3
Vulp + Name override
Spaghetti-bit Oct 1, 2024
4114b67
more transparency alpha stuff
Spaghetti-bit Oct 1, 2024
d30735d
Reworks species subtype for slimepeople
Spaghetti-bit Oct 3, 2024
82659f6
Iteration 3...
Spaghetti-bit Oct 12, 2024
da8ba6e
Merge branch 'default' into TerminatorMachinesAndMorphlingSlimes
Spaghetti-bit Nov 14, 2024
4fa8dec
Me when initial
Spaghetti-bit Nov 14, 2024
1c7e807
60 - 61
Spaghetti-bit Nov 14, 2024
2cc5eea
Character.dm select query changes.
Spaghetti-bit Nov 15, 2024
9cbbcf3
Merge branch 'master' into TerminatorMachinesAndMorphlingSlimes
Spaghetti-bit Nov 15, 2024
2b63b99
61-62
Spaghetti-bit Nov 15, 2024
52c7836
The real 61-62
Spaghetti-bit Nov 15, 2024
1ebdbfb
Merge branch 'master' into TerminatorMachinesAndMorphlingSlimes
Spaghetti-bit Nov 15, 2024
d2b1971
Update to IPC imitation
Spaghetti-bit Nov 16, 2024
2b5614e
Merge branch 'TerminatorMachinesAndMorphlingSlimes' of https://github…
Spaghetti-bit Nov 16, 2024
0276079
Merge branch 'TerminatorMachinesAndMorphlingSlimes' of https://github…
Spaghetti-bit Jan 30, 2025
bec00d1
+63-64.sql
Spaghetti-bit Jan 30, 2025
9b9683f
Pain2
Spaghetti-bit Jan 30, 2025
19a8910
SQL
Spaghetti-bit Jan 30, 2025
f458218
Merge branch 'master' into TerminatorMachinesAndMorphlingSlimes
Spaghetti-bit Jan 30, 2025
87aa43b
Frankenstein monster fix
Spaghetti-bit Jan 30, 2025
5c159f9
Slimify! ...no longer applies to robotic limbs.
Spaghetti-bit Jan 30, 2025
6fc73d3
220 Alpha to 200
Spaghetti-bit Jan 30, 2025
dd4b80a
Ordering issue fix.
Spaghetti-bit Feb 2, 2025
e44583b
Last ordering issue.
Spaghetti-bit Feb 2, 2025
10cf4f4
Merge branch 'master' into TerminatorMachinesAndMorphlingSlimes
Spaghetti-bit Feb 8, 2025
69f4f7f
aa review, paradise_schema.sql
Spaghetti-bit Feb 8, 2025
c3c96c8
Apply suggestions from code review
Spaghetti-bit Feb 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions SQL/updates/61-62.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Updates the DB from 61 to 62 ~SpaghettiBit
# Adds a subtype race to be stored on character saves

# Add species_subtype after species
ALTER TABLE `characters`
ADD COLUMN `species_subtype` VARCHAR(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'None' AFTER `species`;
7 changes: 4 additions & 3 deletions code/__DEFINES/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@
#define HAS_ALT_HEADS (1<<11)
#define HAS_WING (1<<12)
#define HAS_BODYACC_COLOR (1<<13)
#define BALD (1<<14)
#define ALL_RPARTS (1<<15)
#define SHAVED (1<<16)
#define HAS_SPECIES_SUBTYPE (1<<14)
#define BALD (1<<15)
#define ALL_RPARTS (1<<16)
#define SHAVED (1<<17)

//Pre-baked combinations of the above body flags
#define HAS_BODY_ACCESSORY (HAS_TAIL | HAS_WING)
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/misc_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
#define INVESTIGATE_HOTMIC "hotmic"

// The SQL version required by this version of the code
#define SQL_VERSION 61
#define SQL_VERSION 62

// Vending machine stuff
#define CAT_NORMAL (1<<0)
Expand Down
6 changes: 3 additions & 3 deletions code/datums/diseases/advance/symptoms/hair.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ BONUS
switch(A.stage)
if(1, 2, 3)
to_chat(H, "<span class='warning'>Your scalp itches.</span>")
head_organ.h_style = random_hair_style(H.gender, head_organ.dna.species.name)
head_organ.h_style = random_hair_style(H.gender, head_organ.dna.species.sprite_sheet_name)
else
to_chat(H, "<span class='warning'>Hair bursts forth from your scalp!</span>")
var/datum/sprite_accessory/tmp_hair_style = GLOB.hair_styles_full_list["Very Long Hair"]

if(head_organ.dna.species.name in tmp_hair_style.species_allowed) //If 'Very Long Hair' is a style the person's species can have, give it to them.
if(head_organ.dna.species.sprite_sheet_name in tmp_hair_style.species_allowed) //If 'Very Long Hair' is a style the person's species can have, give it to them.
head_organ.h_style = "Very Long Hair"
else //Otherwise, give them a random hair style.
head_organ.h_style = random_hair_style(H.gender, head_organ.dna.species.name)
head_organ.h_style = random_hair_style(H.gender, head_organ.dna.species.sprite_sheet_name)
H.update_hair()
2 changes: 1 addition & 1 deletion code/game/dna/dna2_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
var/list/available = list()
for(var/head_accessory in GLOB.head_accessory_styles_list)
var/datum/sprite_accessory/S = GLOB.head_accessory_styles_list[head_accessory]
if(!(head_organ.dna.species.name in S.species_allowed)) //If the user's head is not of a species the head accessory style allows, skip it. Otherwise, add it to the list.
if(!(head_organ.dna.species.sprite_sheet_name in S.species_allowed)) //If the user's head is not of a species the head accessory style allows, skip it. Otherwise, add it to the list.
continue
available += head_accessory
var/list/sorted = sortTim(available, GLOBAL_PROC_REF(cmp_text_asc))
Expand Down
4 changes: 2 additions & 2 deletions code/game/gamemodes/miniantags/tourist/tourist_arrivals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@
head_organ.sec_hair_colour = hair_c
M.change_eye_color(eye_c)
M.s_tone = skin_tone
head_organ.h_style = random_hair_style(M.gender, head_organ.dna.species.name)
head_organ.f_style = random_facial_hair_style(M.gender, head_organ.dna.species.name)
head_organ.h_style = random_hair_style(M.gender, head_organ.dna.species.sprite_sheet_name)
head_organ.f_style = random_facial_hair_style(M.gender, head_organ.dna.species.sprite_sheet_name)

M.regenerate_icons()
M.update_body()
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/structures/dresser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
var/list/valid_underwear = list()
for(var/underwear in GLOB.underwear_list)
var/datum/sprite_accessory/S = GLOB.underwear_list[underwear]
if(!(H.dna.species.name in S.species_allowed))
if(!(H.dna.species.sprite_sheet_name in S.species_allowed))
continue
valid_underwear[underwear] = GLOB.underwear_list[underwear]
var/new_underwear = tgui_input_list(user, "Choose your underwear:", "Changing", valid_underwear)
Expand All @@ -32,7 +32,7 @@
var/list/valid_undershirts = list()
for(var/undershirt in GLOB.undershirt_list)
var/datum/sprite_accessory/S = GLOB.undershirt_list[undershirt]
if(!(H.dna.species.name in S.species_allowed))
if(!(H.dna.species.sprite_sheet_name in S.species_allowed))
continue
valid_undershirts[undershirt] = GLOB.undershirt_list[undershirt]
var/new_undershirt = tgui_input_list(user, "Choose your undershirt:", "Changing", valid_undershirts)
Expand All @@ -43,7 +43,7 @@
var/list/valid_sockstyles = list()
for(var/sockstyle in GLOB.socks_list)
var/datum/sprite_accessory/S = GLOB.socks_list[sockstyle]
if(!(H.dna.species.name in S.species_allowed))
if(!(H.dna.species.sprite_sheet_name in S.species_allowed))
continue
valid_sockstyles[sockstyle] = GLOB.socks_list[sockstyle]
var/new_socks = tgui_input_list(user, "Choose your socks:", "Changing", valid_sockstyles)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/awaymissions/mob_spawn.dm
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,12 @@
if(hair_style)
D.h_style = hair_style
else
D.h_style = random_hair_style(gender, D.dna.species.name)
D.h_style = random_hair_style(gender, D.dna.species.sprite_sheet_name)
D.hair_colour = rand_hex_color()
if(facial_hair_style)
D.f_style = facial_hair_style
else
D.f_style = random_facial_hair_style(gender, D.dna.species.name)
D.f_style = random_facial_hair_style(gender, D.dna.species.sprite_sheet_name)
D.facial_colour = rand_hex_color()
if(skin_tone)
H.s_tone = skin_tone
Expand Down
48 changes: 39 additions & 9 deletions code/modules/client/preference/character.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
var/e_colour = "#000000" //Eye color
var/alt_head = "None" //Alt head style.
var/species = "Human"
/// Used for DNA species to allow select species to imitate / morph into different species.
var/species_subtype = "None"
var/language = "None" //Secondary language
var/autohiss_mode = AUTOHISS_OFF //Species autohiss level. OFF, BASIC, FULL.
/// If a spawned cyborg should have an MMI, a positronic, or a robobrain. MMI by default
Expand Down Expand Up @@ -147,6 +149,7 @@
body_type=:body_type,
age=:age,
species=:species,
species_subtype=:species_subtype,
language=:language,
hair_colour=:h_colour,
secondary_hair_colour=:h_sec_colour,
Expand Down Expand Up @@ -210,6 +213,7 @@
"body_type" = body_type,
"age" = age,
"species" = species,
"species_subtype" = species_subtype,
"language" = language,
"h_colour" = h_colour,
"h_sec_colour" = h_sec_colour,
Expand Down Expand Up @@ -302,7 +306,7 @@
player_alt_titles,
disabilities, organ_data, rlimb_data, nanotrasen_relation, physique, height, speciesprefs,
socks, body_accessory, gear, autohiss,
hair_gradient, hair_gradient_offset, hair_gradient_colour, hair_gradient_alpha, custom_emotes, runechat_color, cyborg_brain_type, body_type)
hair_gradient, hair_gradient_offset, hair_gradient_colour, hair_gradient_alpha, custom_emotes, runechat_color, cyborg_brain_type, body_type, species_subtype)
VALUES
(:ckey, :slot, :metadata, :name, :be_random_name, :gender,
:age, :species, :language,
Expand All @@ -329,7 +333,7 @@
:playertitlelist,
:disabilities, :organ_list, :rlimb_list, :nanotrasen_relation, :physique, :height, :speciesprefs,
:socks, :body_accessory, :gearlist, :autohiss_mode,
:h_grad_style, :h_grad_offset, :h_grad_colour, :h_grad_alpha, :custom_emotes, :runechat_color, :cyborg_brain_type, :body_type)
:h_grad_style, :h_grad_offset, :h_grad_colour, :h_grad_alpha, :custom_emotes, :runechat_color, :cyborg_brain_type, :body_type, :species_subtype)
"}, list(
// This has too many params for anyone to look at this without going insae
"ckey" = C.ckey,
Expand Down Expand Up @@ -392,7 +396,8 @@
"h_grad_alpha" = h_grad_alpha,
"custom_emotes" = json_encode(custom_emotes),
"runechat_color" = runechat_color,
"cyborg_brain_type" = cyborg_brain_type
"cyborg_brain_type" = cyborg_brain_type,
"species_subtype" = species_subtype
))

if(!query.warn_execute())
Expand All @@ -417,7 +422,6 @@
age = text2num(query.item[5])
species = query.item[6]
language = query.item[7]

h_colour = query.item[8]
h_sec_colour = query.item[9]
f_colour = query.item[10]
Expand Down Expand Up @@ -487,6 +491,7 @@
height = query.item[58]
cyborg_brain_type = query.item[59]
body_type = query.item[60]
species_subtype = query.item[61]

//Sanitize
var/datum/species/SP = GLOB.all_species[species]
Expand All @@ -501,6 +506,9 @@
species = "Human"
stack_trace("Character doesn't have a species, character name is [real_name]. Defaulting to human.")

if(isnull(species_subtype))
species_subtype = "None"

if(isnull(language))
language = "None"

Expand Down Expand Up @@ -823,19 +831,40 @@
//Icon-based species colour.
var/coloured_tail
if(current_species)
if(current_species.bodyflags & HAS_ICON_SKIN_TONE) //Handling species-specific icon-based skin tones by flagged race.
var/mob/living/carbon/human/H = new
H.dna.species = current_species
if(species_subtype != "None" && current_species.bodyflags & HAS_SPECIES_SUBTYPE && istype(current_species, /datum/species/slime))
var/datum/species/subtype_species = GLOB.all_species[species_subtype]
if(subtype_species)
current_species.sprite_sheet_name = subtype_species.sprite_sheet_name
current_species.icobase = subtype_species.icobase
current_species.tail = subtype_species.tail
current_species.wing = subtype_species.wing
current_species.eyes = subtype_species.eyes
current_species.scream_verb = subtype_species.scream_verb
current_species.male_scream_sound = subtype_species.male_scream_sound
current_species.female_scream_sound = subtype_species.female_scream_sound
current_species.default_headacc = subtype_species.default_headacc
current_species.default_bodyacc = subtype_species.default_bodyacc
current_species.male_cough_sounds = subtype_species.male_cough_sounds
current_species.female_cough_sounds = subtype_species.female_cough_sounds
current_species.male_sneeze_sound = subtype_species.male_sneeze_sound
current_species.female_sneeze_sound = subtype_species.female_sneeze_sound
current_species.bodyflags = subtype_species.bodyflags
current_species.bodyflags |= HAS_SKIN_COLOR | NO_EYES | HAS_SPECIES_SUBTYPE
var/mob/living/carbon/human/H = new
H.dna.species = current_species
if(current_species.bodyflags & HAS_SPECIES_SUBTYPE)
H.dna.species.updatespeciessubtype(H)
icobase = H.dna.species.icobase
else if(current_species.bodyflags & HAS_ICON_SKIN_TONE) //Handling species-specific icon-based skin tones by flagged race.
H.s_tone = s_tone
H.dna.species.updatespeciescolor(H, 0) //The mob's species wasn't set, so it's almost certainly different than the character's species at the moment. Thus, we need to be owner-insensitive.
var/obj/item/organ/external/chest/C = H.get_organ("chest")
icobase = C.icobase ? C.icobase : C.dna.species.icobase
if(H.dna.species.bodyflags & HAS_TAIL)
coloured_tail = H.tail ? H.tail : H.dna.species.tail

qdel(H)
else
icobase = current_species.icobase
qdel(H)
else
icobase = 'icons/mob/human_races/r_human.dmi'

Expand Down Expand Up @@ -1813,6 +1842,7 @@
/datum/character_save/proc/copy_to(mob/living/carbon/human/character)
var/datum/species/S = GLOB.all_species[species]
character.set_species(S.type, delay_icon_update = TRUE) // Yell at me if this causes everything to melt
character.species_subtype = species_subtype
if(be_random_name)
real_name = random_name(gender, species)

Expand Down
6 changes: 6 additions & 0 deletions code/modules/client/preference/link_processing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@

if(!(NS.autohiss_basic_map))
active_character.autohiss_mode = AUTOHISS_OFF
if("species_subtype")
if(S.bodyflags & HAS_SPECIES_SUBTYPE)
var/new_subtype = tgui_input_list(user, "Choose your character's species subtype:", "Character Preference", S.allowed_species_subtypes)
if(isnull(new_subtype))
return
active_character.species_subtype = new_subtype
if("speciesprefs")
active_character.speciesprefs = !active_character.speciesprefs //Starts 0, so if someone clicks the button up top there, this won't be 0 anymore. If they click it again, it'll go back to 0.
if("language")
Expand Down
2 changes: 2 additions & 0 deletions code/modules/client/preference/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ GLOBAL_LIST_INIT(special_role_times, list(
dat += "<b>Age:</b> <a href='byond://?_src_=prefs;preference=age;task=input'>[active_character.age]</a><br>"
dat += "<b>Body:</b> <a href='byond://?_src_=prefs;preference=all;task=random'>(&reg;)</a><br>"
dat += "<b>Species:</b> <a href='byond://?_src_=prefs;preference=species;task=input'>[active_character.species]</a><br>"
if(S.bodyflags & HAS_SPECIES_SUBTYPE)
dat += "<b>Species Sub-Type:</b> <a href='byond://?_src_=prefs;preference=species_subtype;task=input'>[active_character.species_subtype]</a><br>"
dat += "<b>Gender:</b> <a href='byond://?_src_=prefs;preference=gender'>[active_character.gender == MALE ? "Male" : (active_character.gender == FEMALE ? "Female" : "Genderless")]</a><br>"
dat += "<b>Body Type:</b> <a href='byond://?_src_=prefs;preference=body_type'>[active_character.body_type == MALE ? "Masculine" : "Feminine"]</a>"
dat += "<br>"
Expand Down
4 changes: 2 additions & 2 deletions code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@

if(H.dna.species)
if(exclusive)
if(!(H.dna.species.name in species_restricted))
if(!(H.dna.species.sprite_sheet_name in species_restricted))
wearable = TRUE
else
if(H.dna.species.name in species_restricted)
if(H.dna.species.sprite_sheet_name in species_restricted)
wearable = TRUE

if(!wearable)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/customitems/item_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
return

var/datum/sprite_accessory/body_markings/tattoo/temp_tatt = GLOB.marking_styles_list[tattoo_icon]
if(!(target.dna.species.name in temp_tatt.species_allowed))
if(!(target.dna.species.sprite_sheet_name in temp_tatt.species_allowed))
to_chat(user, "<span class= 'notice'>You can't think of a way to make the [tattoo_name] design work on [target == user ? "your" : "[target]'s"] body type.</span>")
return

Expand Down
18 changes: 9 additions & 9 deletions code/modules/mob/living/carbon/human/appearance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,14 @@
continue
if(H.dna.species.bodyflags & ALL_RPARTS) //If the user is a species who can have a robotic head...
var/datum/robolimb/robohead = GLOB.all_robolimbs[H.model]
if((H.dna.species.name in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
if((H.dna.species.sprite_sheet_name in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
valid_hairstyles += hairstyle //Give them their hairstyles if they do.
else
if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it.
But if the user has a robotic humanoid head and the hairstyle can fit humans, let them use it as a wig. */
valid_hairstyles += hairstyle
else //If the user is not a species who can have robotic heads, use the default handling.
if(H.dna.species.name in S.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list.
if(H.dna.species.sprite_sheet_name in S.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list.
valid_hairstyles += hairstyle

return sortTim(valid_hairstyles, GLOBAL_PROC_REF(cmp_text_asc))
Expand All @@ -415,15 +415,15 @@
continue
if(H.dna.species.bodyflags & ALL_RPARTS) //If the user is a species who can have a robotic head...
var/datum/robolimb/robohead = GLOB.all_robolimbs[H.model]
if(H.dna.species.name in S.species_allowed) //If this is a facial hair style native to the user's species...
if((H.dna.species.name in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a facial hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
if(H.dna.species.sprite_sheet_name in S.species_allowed) //If this is a facial hair style native to the user's species...
if((H.dna.species.sprite_sheet_name in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a facial hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
valid_facial_hairstyles += facialhairstyle //Give them their facial hairstyles if they do.
else
if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the facial hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it.
But if the user has a robotic humanoid head and the facial hairstyle can fit humans, let them use it as a wig. */
valid_facial_hairstyles += facialhairstyle
else //If the user is not a species who can have robotic heads, use the default handling.
if(H.dna.species.name in S.species_allowed) //If the user's head is of a species the facial hair style allows, add it to the list.
if(H.dna.species.sprite_sheet_name in S.species_allowed) //If the user's head is of a species the facial hair style allows, add it to the list.
valid_facial_hairstyles += facialhairstyle

return sortTim(valid_facial_hairstyles, GLOBAL_PROC_REF(cmp_text_asc))
Expand All @@ -437,7 +437,7 @@
for(var/head_accessory in GLOB.head_accessory_styles_list)
var/datum/sprite_accessory/S = GLOB.head_accessory_styles_list[head_accessory]

if(!(H.dna.species.name in S.species_allowed)) //If the user's head is not of a species the head accessory style allows, skip it. Otherwise, add it to the list.
if(!(H.dna.species.sprite_sheet_name in S.species_allowed)) //If the user's head is not of a species the head accessory style allows, skip it. Otherwise, add it to the list.
continue
valid_head_accessories += head_accessory

Expand All @@ -456,7 +456,7 @@
continue
if(S.marking_location != location) //If the marking isn't for the location we desire, skip.
continue
if(!(dna.species.name in S.species_allowed)) //If the user is not of a species the marking style allows, skip it. Otherwise, add it to the list.
if(!(dna.species.sprite_sheet_name in S.species_allowed)) //If the user is not of a species the marking style allows, skip it. Otherwise, add it to the list.
continue
if(location == "tail")
if(!body_accessory)
Expand Down Expand Up @@ -490,7 +490,7 @@
else if(check_rights(R_ADMIN, FALSE, src))
valid_body_accessories = GLOB.body_accessory_by_name.Copy()
break
else if(dna.species.name in A.allowed_species) //If the user is not of a species the body accessory style allows, skip it. Otherwise, add it to the list.
else if(dna.species.sprite_sheet_name in A.allowed_species) //If the user is not of a species the body accessory style allows, skip it. Otherwise, add it to the list.
valid_body_accessories += B
if(dna.species.optional_body_accessory)
valid_body_accessories += "None"
Expand All @@ -505,7 +505,7 @@
valid_alt_heads["None"] = GLOB.alt_heads_list["None"] //The only null entry should be the "None" option, and there should always be a "None" option.
for(var/alternate_head in GLOB.alt_heads_list)
var/datum/sprite_accessory/alt_heads/head = GLOB.alt_heads_list[alternate_head]
if(!(H.dna.species.name in head.species_allowed))
if(!(H.dna.species.sprite_sheet_name in head.species_allowed))
continue

valid_alt_heads += alternate_head
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/body_accessories.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ GLOBAL_LIST_EMPTY(body_accessory_by_species)
var/has_behind = FALSE

/datum/body_accessory/proc/try_restrictions(mob/living/carbon/human/H)
return (H.dna.species.name in allowed_species)
return (H.dna.species.sprite_sheet_name in allowed_species)

/datum/body_accessory/proc/get_animated_icon() //return animated if it has it, return static if it does not.
if(animated_icon)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/human/human_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
var/list/m_styles = DEFAULT_MARKING_STYLES //All markings set to None.

var/s_tone = 0 //Skin tone
/// Species Sub-Type - overrites the species_sheet_name when it's not "None", acts the same as a skin tone.
var/species_subtype = "None"

//Skin colour
var/skin_colour = "#000000"
Expand Down
Loading