M/F body preferences.

This commit is contained in:
Ghommie
2020-03-22 19:47:48 +01:00
parent 82cf7e584b
commit 76ff0d4931
20 changed files with 65 additions and 41 deletions

View File

@@ -210,7 +210,8 @@
"ipc_screen" = snowflake_ipc_antenna_list ? pick(snowflake_ipc_antenna_list) : "None",
"ipc_antenna" = "None",
"flavor_text" = "",
"meat_type" = "Mammalian"
"meat_type" = "Mammalian",
"body_model" = MALE
))
/proc/random_hair_style(gender)

View File

@@ -412,13 +412,13 @@
switch(deconstruct_block(getblock(dna.uni_identity, DNA_GENDER_BLOCK), 4))
if(G_MALE)
gender = MALE
set_gender(MALE, TRUE)
if(G_FEMALE)
gender = FEMALE
set_gender(FEMALE, TRUE)
if(G_PLURAL)
gender = PLURAL
set_gender(PLURAL, TRUE)
else
gender = NEUTER
set_gender(NEUTER, TRUE)
/mob/living/carbon/human/updateappearance(icon_update=1, mutcolor_update=0, mutations_overlay_update=0)
..()

View File

@@ -41,6 +41,7 @@
H.dna.features["deco_wings"] = pick(GLOB.deco_wings_list)
H.dna.features["insect_fluff"] = pick(GLOB.insect_fluffs_list)
H.dna.features["flavor_text"] = "" //Oh no.
H.dna.features["body_model"] = H.gender
SEND_SIGNAL(H, COMSIG_HUMAN_ON_RANDOMIZE)

View File

@@ -61,7 +61,7 @@
/obj/machinery/abductor/experiment/proc/dissection_icon(mob/living/carbon/human/H)
var/icon/photo = null
var/g = (H.gender == FEMALE) ? "f" : "m"
var/g = (H.dna.features["body_model"] == FEMALE) ? "f" : "m"
if(H.dna.species.use_skintones)
photo = icon("icon" = 'icons/mob/human.dmi', "icon_state" = "[H.skin_tone]_[g]")
else

View File

@@ -150,7 +150,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
"ipc_screen" = "Sunburst",
"ipc_antenna" = "None",
"flavor_text" = "",
"meat_type" = "Mammalian"
"meat_type" = "Mammalian",
"body_model" = MALE
)
var/list/custom_names = list()
@@ -343,6 +344,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "[TextPreview(features["flavor_text"])]...<BR>"
dat += "<h2>Body</h2>"
dat += "<b>Gender:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=gender'>[gender == MALE ? "Male" : (gender == FEMALE ? "Female" : (gender == PLURAL ? "Non-binary" : "Object"))]</a><BR>"
if(gender != NEUTER && pref_species.sexes)
dat += "<b>Body Model:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=body_model'>[features["body_model"] == MALE ? "Masculine" : "Feminine"]</a><BR>"
dat += "<b>Species:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=species;task=input'>[pref_species.name]</a><BR>"
dat += "<b>Custom Species Name:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=custom_species;task=input'>[custom_species ? custom_species : "None"]</a><BR>"
dat += "<b>Random Body:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=all;task=random'>Randomize!</A><BR>"
@@ -2126,16 +2129,23 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(unlock_content)
toggles ^= MEMBER_PUBLIC
if("gender")
var/chosengender = input(user, "Select your character's gender.", "Gender Selection", gender) in list(MALE,FEMALE,"nonbinary","object")
var/chosengender = input(user, "Select your character's gender.", "Gender Selection", gender) as null|anything in list(MALE,FEMALE,"nonbinary","object")
switch(chosengender)
if("nonbinary")
chosengender = PLURAL
features["body_model"] = pick(MALE, FEMALE)
if("object")
chosengender = NEUTER
features["body_model"] = MALE
else
features["body_model"] = chosengender
gender = chosengender
facial_hair_style = random_facial_hair_style(gender)
hair_style = random_hair_style(gender)
if("body_model")
features["body_model"] = features["body_model"] == MALE ? FEMALE : MALE
if("hotkeys")
hotkeys = !hotkeys
if(hotkeys)

View File

@@ -375,6 +375,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["name_is_always_random"] >> be_random_name
S["body_is_always_random"] >> be_random_body
S["gender"] >> gender
S["body_model"] >> features["body_model"]
S["age"] >> age
S["hair_color"] >> hair_color
S["facial_hair_color"] >> facial_hair_color
@@ -490,6 +491,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
real_name = reject_bad_name(real_name)
gender = sanitize_gender(gender, TRUE, TRUE)
features["body_model"] = sanitize_gender(features["body_model"], FALSE, FALSE, gender == FEMALE ? FEMALE : MALE)
if(!real_name)
real_name = random_unique_name(gender)
custom_species = reject_bad_name(custom_species)
@@ -599,6 +601,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["name_is_always_random"] , be_random_name)
WRITE_FILE(S["body_is_always_random"] , be_random_body)
WRITE_FILE(S["gender"] , gender)
WRITE_FILE(S["body_model"] , features["body_model"])
WRITE_FILE(S["age"] , age)
WRITE_FILE(S["hair_color"] , hair_color)
WRITE_FILE(S["facial_hair_color"] , facial_hair_color)

View File

@@ -23,6 +23,10 @@
var/rando_race = pick(GLOB.roundstart_races)
pref_species = new rando_race()
features = random_features(pref_species?.id)
if(gender == MALE || gender != FEMALE)
features["body_model"] = gender
else if(gender == PLURAL)
features["body_model"] = pick(MALE,FEMALE)
age = rand(AGE_MIN,AGE_MAX)
/datum/preferences/proc/update_preview_icon(equip_job = TRUE)

View File

@@ -1025,3 +1025,19 @@
/mob/living/carbon/can_hold_items()
return TRUE
/mob/living/carbon/set_gender(ngender = NEUTER, silent = FALSE, update_icon = TRUE, forced = FALSE)
var/bender = gender != ngender
. = ..()
if(!.)
return
if(dna && bender)
if(ngender == MALE || ngender == FEMALE)
dna.features["body_model"] = ngender
if(!silent)
var/adj = ngender == MALE ? "masculine" : "feminine"
visible_message("<span class='boldnotice'>[src] suddenly looks more [adj]!</span>", "<span class='boldwarning'>You suddenly feel more [adj]!</span>")
else if(ngender == NEUTER)
dna.features["body_model"] = MALE
if(update_icon)
update_body()

View File

@@ -621,13 +621,14 @@
//Used for new human mobs created by cloning/goleming/podding
/mob/living/carbon/human/proc/set_cloned_appearance()
if(gender == MALE)
if(dna.features["body_model"] == MALE)
facial_hair_style = "Full Beard"
else
facial_hair_style = "Shaved"
hair_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
underwear = "Nude"
undershirt = "Nude"
socks = "Nude"
update_body()
update_hair()
update_genitals()

View File

@@ -585,7 +585,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(T)
var/state = "[T.icon_state][((DIGITIGRADE in species_traits) && T.has_digitigrade) ? "_d" : ""]"
var/mutable_appearance/MA
if(H.dna.species.sexes && H.gender == FEMALE)
if(H.dna.species.sexes && H.dna.features["body_model"] == FEMALE)
MA = wear_female_version(state, T.icon, BODY_LAYER)
else
MA = mutable_appearance(T.icon, state, -BODY_LAYER)
@@ -746,7 +746,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(!bodyparts_to_add)
return
var/g = (H.gender == FEMALE) ? "f" : "m"
var/g = (H.dna.features["body_model"] == FEMALE) ? "f" : "m"
for(var/layer in relevent_layers)
var/layertext = mutant_bodyparts_layertext(layer)

View File

@@ -132,7 +132,7 @@ There are several things that need to be remembered:
var/mutable_appearance/uniform_overlay
if(dna && dna.species.sexes)
var/G = (gender == FEMALE) ? "f" : "m"
var/G = (dna.features["body_model"] == FEMALE) ? "f" : "m"
if(G == "f" && U.fitted != NO_FEMALE_UNIFORM)
uniform_overlay = U.build_worn_icon(t_color, UNIFORM_LAYER, alt_worn, FALSE, U.fitted, variant_flag, FALSE)

View File

@@ -1192,3 +1192,9 @@
/mob/living/canface()
return ..() && CHECK_MOBILITY(src, MOBILITY_MOVE)
/mob/living/proc/set_gender(ngender = NEUTER, silent = FALSE, update_icon = TRUE, forced = FALSE)
if(forced || (!ckey || client?.prefs.cit_toggles & (ngender == FEMALE ? FORCED_FEM : FORCED_MASC)))
gender = ngender
return TRUE
return FALSE

View File

@@ -124,7 +124,7 @@ Contents:
return TRUE
/obj/item/clothing/suit/space/space_ninja/proc/lockIcons(mob/living/carbon/human/H)
icon_state = H.gender==FEMALE ? "s-ninjanf" : "s-ninjan"
icon_state = H.dna.features["body_model"] == FEMALE ? "s-ninjanf" : "s-ninjan"
H.gloves.icon_state = "s-ninjan"
H.gloves.item_state = "s-ninjan"

View File

@@ -121,11 +121,10 @@
if(isalienadult(ass) || istype(ass, /mob/living/simple_animal/hostile/alien)) //Xenos have their own asses, thanks to Pybro.
temp_img = icon('icons/ass/assalien.png')
else if(ishuman(ass)) //Suit checks are in check_ass
if(ass.gender == MALE)
temp_img = icon('icons/ass/assmale.png')
else if(ass.gender == FEMALE)
var/mob/living/carbon/human/H = ass
if(H.dna.features["body_model"] == FEMALE)
temp_img = icon('icons/ass/assfemale.png')
else //In case anyone ever makes the generic ass. For now I'll be using male asses.
else
temp_img = icon('icons/ass/assmale.png')
else if(isdrone(ass)) //Drones are hot
temp_img = icon('icons/ass/assdrone.png')

View File

@@ -342,12 +342,7 @@
to_chat(user, "<span class='warning'>You can't swap your gender!</span>")
return
if(user.gender == MALE)
user.gender = FEMALE
user.visible_message("<span class='boldnotice'>[user] suddenly looks more feminine!</span>", "<span class='boldwarning'>You suddenly feel more feminine!</span>")
else
user.gender = MALE
user.visible_message("<span class='boldnotice'>[user] suddenly looks more masculine!</span>", "<span class='boldwarning'>You suddenly feel more masculine!</span>")
user.set_gender(user.gender == MALE ? FEMALE : MALE, forced = TRUE) //You are doing this to yourself.
return 100
if(SLIME_ACTIVATE_MAJOR)
@@ -910,16 +905,9 @@
to_chat(user, "<span class='warning'>The potion can only be used on gendered things!</span>")
return
if(L.gender == MALE && (L.client?.prefs.cit_toggles & FORCED_FEM))
L.gender = FEMALE
L.visible_message("<span class='boldnotice'>[L] suddenly looks more feminine!</span>", "<span class='boldwarning'>You suddenly feel more feminine!</span>")
else if(L.gender == FEMALE && (L.client?.prefs.cit_toggles & FORCED_MASC))
L.gender = MALE
L.visible_message("<span class='boldnotice'>[L] suddenly looks more masculine!</span>", "<span class='boldwarning'>You suddenly feel more masculine!</span>")
else
if(!L.set_gender(L.gender == MALE ? FEMALE : MALE))
to_chat(user,"<span class='warning'>It won't work on [L]!</span>")
return
L.regenerate_icons()
qdel(src)
/obj/item/slimepotion/slime/renaming

View File

@@ -82,10 +82,7 @@
switch(invocation_type)
if("shout")
user.say("[invocation] [uppertext(chosenarea.name)]", forced = "spell")
if(user.gender==MALE)
playsound(user.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
else
playsound(user.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
playsound(user.loc, pick('sound/misc/null.ogg'), 100, 1)
if("whisper")
user.whisper("[invocation] [uppertext(chosenarea.name)]")

View File

@@ -347,7 +347,7 @@
else
skin_tone = ""
body_gender = H.gender
body_gender = H.dna.features["body_model"]
should_draw_gender = S.sexes
if(MUTCOLORS in S.species_traits)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

@@ -104,8 +104,7 @@
var/obj/item/organ/genital/womb/W = M.getorganslot(ORGAN_SLOT_WOMB)
if(M.gender == MALE)
M.gender = FEMALE
M.visible_message("<span class='boldnotice'>[M] suddenly looks more feminine!</span>", "<span class='boldwarning'>You suddenly feel more feminine!</span>")
M.set_gender(FEMALE)
if(P)
P.modify_size(-0.05)
@@ -251,8 +250,7 @@
var/obj/item/organ/genital/womb/W = M.getorganslot(ORGAN_SLOT_WOMB)
if(M.gender == FEMALE)
M.gender = MALE
M.visible_message("<span class='boldnotice'>[M] suddenly looks more masculine!</span>", "<span class='boldwarning'>You suddenly feel more masculine!</span>")
M.set_gender(MALE)
if(B)
B.modify_size(-0.05)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 112 KiB