Expands "genderless" to all species, adds body-type option, removes some gender checks (#23910)

* adds most body type support, removes some gender checks

* remove gender from species, accessories

* restore pick_list

* re-adds limitations on accessories

* Universal access to body hair

* remove unused var

* Update example config, some preference saving code

* updates tgui bundle

* oops

* Remove formatting

* hopefully undoes formatting changes

* dammit

* been meaning to fix this one for a while

* dgamer reviews

* move body_type into human_defines

* sql file changes

* update tgui

* Update db code

* bump versions

---------

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Luc
2024-04-21 15:59:23 +00:00
committed by GitHub
co-authored by S34N github-actions <41898282+github-actions[bot]@users.noreply.github.com>
parent 9bc9b4b67a
commit f83ef617e9
34 changed files with 171 additions and 170 deletions
@@ -4,27 +4,28 @@
AC.ui_interact(user)
/mob/living/carbon/human/proc/change_gender(new_gender, update_dna = TRUE)
var/obj/item/organ/external/head/H = bodyparts_by_name["head"]
if(gender == new_gender || (gender == PLURAL && !dna.species.has_gender))
if(gender == new_gender)
return
gender = new_gender
if(istype(H))
var/datum/sprite_accessory/hair/current_hair = GLOB.hair_styles_full_list[H.h_style]
if(current_hair.gender != NEUTER && current_hair.gender != gender)
reset_head_hair()
var/datum/sprite_accessory/hair/current_fhair = GLOB.facial_hair_styles_list[H.f_style]
if(current_fhair.gender != NEUTER && current_fhair.gender != gender)
reset_facial_hair()
if(update_dna)
update_dna()
sync_organ_dna(assimilate = FALSE)
update_body()
return TRUE
/mob/living/carbon/human/proc/change_body_type(new_body, update_dna = TRUE)
if(!new_body || new_body == body_type)
return
body_type = new_body
if(update_dna)
update_dna()
sync_organ_dna(FALSE)
update_body(TRUE)
/mob/living/carbon/human/proc/change_hair(hair_style, fluff)
var/obj/item/organ/external/head/H = get_organ("head")
@@ -373,8 +374,6 @@
if(hairstyle == "Bald") //Just in case.
valid_hairstyles += hairstyle
continue
if((H.gender == MALE && S.gender == FEMALE) || (H.gender == FEMALE && S.gender == MALE))
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.
@@ -401,8 +400,6 @@
if(facialhairstyle == "Shaved") //Just in case.
valid_facial_hairstyles += facialhairstyle
continue
if((H.gender == MALE && S.gender == FEMALE) || (H.gender == FEMALE && S.gender == MALE))
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...
@@ -32,6 +32,8 @@
var/height = "average height"
/// Players physique (even MORE fluff)
var/physique = "average"
/// The body type associated with the body
var/body_type = MALE
var/underwear = "Nude" //Which underwear the player wants
var/undershirt = "Nude" //Which undershirt the player wants
@@ -1087,9 +1087,6 @@
if(oldspecies.default_language)
remove_language(oldspecies.default_language)
if(gender == PLURAL && oldspecies.has_gender)
change_gender(pick(MALE, FEMALE))
oldspecies.handle_dna(src, TRUE) // Remove any mutations that belong to the old species
oldspecies.on_species_loss(src)
@@ -118,7 +118,6 @@
var/forced_heartattack = FALSE //Some species have blood, but we still want them to have heart attacks
var/dies_at_threshold = FALSE // Do they die or get knocked out at specific thresholds, or do they go through complex crit?
var/can_revive_by_healing // Determines whether or not this species can be revived by simply healing them
var/has_gender = TRUE
var/blacklisted = FALSE
var/dangerous_existence = FALSE
@@ -22,7 +22,6 @@
inherent_biotypes = MOB_ORGANIC | MOB_HUMANOID | MOB_PLANT
clothing_flags = HAS_SOCKS
default_hair_colour = "#000000"
has_gender = FALSE
bodyflags = SHAVED
dietflags = DIET_HERB //Diona regenerate nutrition in light and water, no diet necessary, but if they must, they eat other plants *scream
taste_sensitivity = TASTE_SENSITIVITY_DULL
@@ -32,7 +32,6 @@
species_traits = list(LIPS, NO_HAIR)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT
bodyflags = HAS_SKIN_TONE | HAS_BODY_MARKINGS | BALD | SHAVED
has_gender = FALSE
dietflags = DIET_OMNI
cold_level_1 = -1 //Default 260 - Lower is better
@@ -26,7 +26,6 @@
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = HAS_BODY_MARKINGS | HAS_BODYACC_COLOR | SHAVED | BALD
dietflags = DIET_HERB
has_gender = FALSE
reagent_tag = PROCESS_ORG
flesh_color = "#a598ad"
blood_color = "#A200FF"
@@ -34,7 +34,6 @@
default_hair = "Blue IPC Screen"
dies_at_threshold = TRUE
can_revive_by_healing = 1
has_gender = FALSE
reagent_tag = PROCESS_SYN
male_scream_sound = 'sound/goonstation/voice/robot_scream.ogg'
female_scream_sound = 'sound/goonstation/voice/robot_scream.ogg'
@@ -30,7 +30,6 @@
flesh_color = "#808D11"
//Default styles for created mobs.
default_hair = "Short Vox Quills"
has_gender = FALSE
default_hair_colour = "#614f19" //R: 97, G: 79, B: 25
butt_sprite = "vox"
@@ -10,7 +10,6 @@
icon = 'icons/mob/human_face.dmi' // Special case, use the bald icon in human face
name = "Shaved"
icon_state = "bald"
gender = NEUTER
species_allowed = list("Human", "Unathi", "Tajaran", "Skrell", "Vox", "Diona", "Kidan", "Greys", "Vulpkanin", "Slime People")
/datum/sprite_accessory/facial_hair/watson
@@ -563,7 +563,6 @@
/datum/sprite_accessory/hair/joestar
name = "Joestar"
icon_state = "joestar"
gender = MALE
species_allowed = list("Human", "Slime People", "Unathi", "Tajaran", "Vulpkanin")
/datum/sprite_accessory/hair/nitori
@@ -5,12 +5,10 @@
/datum/sprite_accessory/hair/skrell/skr_tentacle_m
name = "Skrell Male Tentacles"
icon_state = "male"
gender = MALE
/datum/sprite_accessory/hair/skrell/skr_tentacle_f
name = "Skrell Female Tentacles"
icon_state = "female"
gender = FEMALE
/datum/sprite_accessory/hair/skrell/skr_tentacleslong
name = "Long Skrell Tentacles"
@@ -23,39 +21,33 @@
/datum/sprite_accessory/hair/skrell/skr_gold_m
name = "Gold plated Skrell Male Tentacles"
icon_state = "male"
gender = MALE
secondary_theme = "gold"
no_sec_colour = 1
/datum/sprite_accessory/hair/skrell/skr_gold_f
name = "Gold chained Skrell Female Tentacles"
icon_state = "female"
gender = FEMALE
secondary_theme = "gold"
no_sec_colour = 1
/datum/sprite_accessory/hair/skrell/skr_clothtentacle_m
name = "Cloth draped Skrell Male Tentacles"
icon_state = "male"
gender = MALE
secondary_theme = "cloth"
/datum/sprite_accessory/hair/skrell/skr_clothtentacle_f
name = "Cloth draped Skrell Female Tentacles"
icon_state = "female"
gender = FEMALE
secondary_theme = "cloth"
/datum/sprite_accessory/hair/skrell/skr_gclothtentacle_m
name = "Ombre Dye, Skrell Male Tentacles"
icon_state = "male"
gender = MALE
secondary_theme = "gradient"
/datum/sprite_accessory/hair/skrell/skr_gclothtentacle_f
name = "Ombre Dye, Skrell Female Tentacles"
icon_state = "female"
gender = FEMALE
secondary_theme = "gradient"
/datum/sprite_accessory/hair/skrell/skr_gclothtentacleslong
@@ -71,14 +63,12 @@
/datum/sprite_accessory/hair/skrell/skr_diablacktentacle_m
name = "Black headress Skrell Male Tentacles"
icon_state = "male"
gender = MALE
secondary_theme = "blackdia"
no_sec_colour = 1
/datum/sprite_accessory/hair/skrell/skr_diablacktentacle_f
name = "Black headress Skrell Female Tentacles"
icon_state = "female"
gender = FEMALE
secondary_theme = "blackdia"
no_sec_colour = 1
@@ -92,14 +82,12 @@
/datum/sprite_accessory/hair/skrell/skr_diagoldtentacle_m
name = "Gold headress Skrell Male Tentacles"
icon_state = "male"
gender = MALE
secondary_theme = "golddia"
no_sec_colour = 1
/datum/sprite_accessory/hair/skrell/skr_diagoldtentacle_f
name = "Gold headress Skrell Female Tentacles"
icon_state = "female"
gender = FEMALE
secondary_theme = "golddia"
no_sec_colour = 1
@@ -112,14 +100,12 @@
/datum/sprite_accessory/hair/skrell/skr_diasilvertentacle_m
name = "Silver headress Skrell Male Tentacles"
icon_state = "male"
gender = MALE
secondary_theme = "silvdia"
no_sec_colour = 1
/datum/sprite_accessory/hair/skrell/skr_diasilvertentacle_f
name = "Silver headress Skrell Female Tentacles"
icon_state = "female"
gender = FEMALE
secondary_theme = "silvdia"
no_sec_colour = 1
@@ -132,14 +118,12 @@
/datum/sprite_accessory/hair/skrell/skr_festivetentacle_m
name = "Festive headress Skrell Male Tentacles"
icon_state = "male"
gender = MALE
secondary_theme = "fest"
no_sec_colour = 1
/datum/sprite_accessory/hair/skrell/skr_festivetentacle_f
name = "Festive headress Skrell Female Tentacles"
icon_state = "female"
gender = FEMALE
secondary_theme = "fest"
no_sec_colour = 1
@@ -18,10 +18,14 @@
*/
/proc/init_sprite_accessory_subtypes(prototype, list/L, list/male, list/female, list/full_list)
if(!istype(L)) L = list()
if(!istype(male)) male = list()
if(!istype(female)) female = list()
if(!istype(full_list)) full_list = list()
if(!istype(L))
L = list()
if(!istype(male))
male = list()
if(!istype(female))
female = list()
if(!istype(full_list))
full_list = list()
for(var/path in subtypesof(prototype))
var/datum/sprite_accessory/D = new path()
@@ -33,9 +37,11 @@
L[D.name] = D
full_list[D.name] = D
switch(D.gender)
if(MALE) male[D.name] = D
if(FEMALE) female[D.name] = D
switch(D.body_type)
if(MALE)
male[D.name] = D
if(FEMALE)
female[D.name] = D
else
male[D.name] = D
female[D.name] = D
@@ -45,7 +51,7 @@
var/icon //the icon file the accessory is located in
var/icon_state //the icon_state of the accessory
var/name //the preview name of the accessory
var/gender = NEUTER //Determines if the accessory will be skipped or included in random hair generations
var/body_type = NEUTER //Determines if the accessory will be skipped or included in random hair generations
// Restrict some styles to specific species
var/list/species_allowed = list("Human", "Slime People")
@@ -74,7 +80,6 @@
glasses_over = 1
/datum/sprite_accessory/facial_hair
gender = MALE // barf (unless you're a dorf, dorfs dig chix /w beards :P)
icon = 'icons/mob/sprite_accessories/human/human_facial_hair.dmi'
var/over_hair
@@ -174,7 +179,6 @@
"Grey" = 'icons/mob/clothing/species/grey/underwear.dmi',
"Kidan" = 'icons/mob/clothing/species/kidan/underwear.dmi'
)
gender = NEUTER
/datum/sprite_accessory/underwear/nude
name = "Nude"
@@ -182,7 +186,7 @@
species_allowed = list("Human", "Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Machine", "Skrell", "Slime People", "Skeleton", "Drask", "Vox", "Nian")
/datum/sprite_accessory/underwear/male
gender = MALE
body_type = MALE
/datum/sprite_accessory/underwear/male/male_white
name = "Mens White"
@@ -233,7 +237,7 @@
icon_state = "male_mankini"
/datum/sprite_accessory/underwear/female
gender = FEMALE
body_type = FEMALE
/datum/sprite_accessory/underwear/female/female_red
name = "Ladies Red"
@@ -305,7 +309,6 @@
"Grey" = 'icons/mob/clothing/species/grey/underwear.dmi',
"Kidan" = 'icons/mob/clothing/species/kidan/underwear.dmi'
)
gender = NEUTER
/datum/sprite_accessory/undershirt/nude
name = "Nude"
@@ -494,17 +497,17 @@
/datum/sprite_accessory/undershirt/tank_redtop
name = "Red Crop-Top"
icon_state = "tank_redtop"
gender = FEMALE
body_type = FEMALE
/datum/sprite_accessory/undershirt/tank_whitetop
name = "White Crop-Top"
icon_state = "tank_whitetop"
gender = FEMALE
body_type = FEMALE
/datum/sprite_accessory/undershirt/tank_midriff
name = "White Mid Tank-Top"
icon_state = "tank_midriff"
gender = FEMALE
body_type = FEMALE
/datum/sprite_accessory/undershirt/tank_white
name = "White Tank-Top"
@@ -547,7 +550,6 @@
"Nian" = 'icons/mob/clothing/species/nian/underwear.dmi'
)
gender = NEUTER
/datum/sprite_accessory/socks/nude
name = "Nude"
@@ -581,7 +583,7 @@
/datum/sprite_accessory/socks/thin_knee
name = "Knee-high Thin"
icon_state = "thin_knee"
gender = FEMALE
body_type = FEMALE
/datum/sprite_accessory/socks/striped_norm
name = "Normal Striped"
@@ -606,7 +608,7 @@
/datum/sprite_accessory/socks/thin_thigh
name = "Thigh-high Thin"
icon_state = "thin_thigh"
gender = FEMALE
body_type = FEMALE
/datum/sprite_accessory/socks/striped_thigh
name = "Thigh-high Striped"
@@ -619,7 +621,7 @@
/datum/sprite_accessory/socks/pantyhose
name = "Pantyhose"
icon_state = "pantyhose"
gender = FEMALE
body_type = FEMALE
/datum/sprite_accessory/socks/black_fishnet
name = "Black Fishnet"
@@ -1,7 +1,6 @@
/datum/sprite_accessory/facial_hair/unathi
icon = 'icons/mob/sprite_accessories/unathi/unathi_facial_hair.dmi'
species_allowed = list("Unathi")
gender = NEUTER
over_hair = 1
/datum/sprite_accessory/facial_hair/unathi/una_spines_long
@@ -1,7 +1,6 @@
/datum/sprite_accessory/facial_hair/vox
icon = 'icons/mob/sprite_accessories/vox/vox_facial_hair.dmi'
species_allowed = list("Vox")
gender = NEUTER
/datum/sprite_accessory/facial_hair/vox/vox_colonel
name = "Vox Colonel Beard"
@@ -1,7 +1,6 @@
/datum/sprite_accessory/facial_hair/vulpkanin
icon = 'icons/mob/sprite_accessories/vulpkanin/vulpkanin_facial_hair.dmi'
species_allowed = list("Vulpkanin")
gender = NEUTER
/datum/sprite_accessory/facial_hair/vulpkanin/vulp_earfluff
name = "Vulpkanin Earfluff"
@@ -84,7 +84,6 @@
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_raine
name = "Raine"
icon_state = "raine"
gender = FEMALE
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_jeremy
name = "Jeremy"