Merge pull request #11607 from Ghommie/Ghommie-cit642

Adds privates visibility preferences. Also underwear now fulfills its purpose.
This commit is contained in:
kevinz000
2020-03-26 13:24:26 -07:00
committed by GitHub
29 changed files with 218 additions and 171 deletions
@@ -71,11 +71,13 @@
//for snowflake/donor specific sprites
var/list/ckeys_allowed
//For soft-restricting markings to species IDs
var/list/recommended_species
/datum/sprite_accessory/underwear
icon = 'icons/mob/underwear.dmi'
var/has_color = FALSE
var/has_digitigrade = FALSE
var/has_digitigrade = FALSE
var/covers_groin = FALSE
var/covers_chest = FALSE
@@ -2,9 +2,13 @@
// Undershirt Definitions //
////////////////////////////
/datum/sprite_accessory/underwear/top
covers_chest = TRUE
/datum/sprite_accessory/underwear/top/nude
name = "Nude"
icon_state = null
covers_chest = FALSE
// please make sure they're sorted alphabetically and categorized
@@ -2,9 +2,13 @@
// Underwear Definitions //
///////////////////////////
/datum/sprite_accessory/underwear/bottom
covers_groin = TRUE
/datum/sprite_accessory/underwear/bottom/nude
name = "Nude"
icon_state = null
covers_groin = FALSE
/datum/sprite_accessory/underwear/bottom/mankini
name = "Mankini"
@@ -155,16 +159,19 @@
name = "Swimsuit, One Piece - Red"
icon_state = "swimming_red"
gender = FEMALE
covers_chest = TRUE
/datum/sprite_accessory/underwear/bottom/swimsuit
name = "Swimsuit, One Piece - Black"
icon_state = "swimming_black"
gender = FEMALE
covers_chest = TRUE
/datum/sprite_accessory/underwear/bottom/swimsuit_blue
name = "Swimsuit, One Piece - Striped Blue"
icon_state = "swimming_blue"
gender = FEMALE
covers_chest = TRUE
/datum/sprite_accessory/underwear/bottom/thong
name = "Thong"
@@ -629,9 +629,8 @@
underwear = "Nude"
undershirt = "Nude"
socks = "Nude"
update_body()
update_body(TRUE)
update_hair()
update_genitals()
/mob/living/carbon/human/singularity_pull(S, current_size)
..()
+34 -37
View File
@@ -549,48 +549,45 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
//Underwear, Undershirts & Socks
if(!(NO_UNDERWEAR in species_traits))
if(H.socks && H.get_num_legs(FALSE) >= 2)
if(H.hidden_socks)
H.socks = "Nude"
else
if(H.socks && !H.hidden_socks && H.get_num_legs(FALSE) >= 2)
if(H.saved_socks)
H.socks = H.saved_socks
var/datum/sprite_accessory/underwear/socks/S = GLOB.socks_list[H.socks]
if(S)
var/digilegs = ((DIGITIGRADE in species_traits) && S.has_digitigrade) ? "_d" : ""
var/mutable_appearance/MA = mutable_appearance(S.icon, "[S.icon_state][digilegs]", -BODY_LAYER)
if(S.has_color)
MA.color = "#[H.socks_color]"
standing += MA
H.saved_socks = ""
var/datum/sprite_accessory/underwear/socks/S = GLOB.socks_list[H.socks]
if(S)
var/digilegs = ((DIGITIGRADE in species_traits) && S.has_digitigrade) ? "_d" : ""
var/mutable_appearance/MA = mutable_appearance(S.icon, "[S.icon_state][digilegs]", -BODY_LAYER)
if(S.has_color)
MA.color = "#[H.socks_color]"
standing += MA
if(H.underwear)
if(H.hidden_underwear)
H.underwear = "Nude"
else
if(H.underwear && !H.hidden_underwear)
if(H.saved_underwear)
H.underwear = H.saved_underwear
var/datum/sprite_accessory/underwear/bottom/B = GLOB.underwear_list[H.underwear]
if(B)
var/digilegs = ((DIGITIGRADE in species_traits) && B.has_digitigrade) ? "_d" : ""
var/mutable_appearance/MA = mutable_appearance(B.icon, "[B.icon_state][digilegs]", -BODY_LAYER)
if(B.has_color)
MA.color = "#[H.undie_color]"
standing += MA
H.saved_underwear = ""
var/datum/sprite_accessory/underwear/bottom/B = GLOB.underwear_list[H.underwear]
if(B)
var/digilegs = ((DIGITIGRADE in species_traits) && B.has_digitigrade) ? "_d" : ""
var/mutable_appearance/MA = mutable_appearance(B.icon, "[B.icon_state][digilegs]", -BODY_LAYER)
if(B.has_color)
MA.color = "#[H.undie_color]"
standing += MA
if(H.undershirt)
if(H.hidden_undershirt)
H.undershirt = "Nude"
else
if(H.undershirt && !H.hidden_undershirt)
if(H.saved_undershirt)
H.undershirt = H.saved_undershirt
var/datum/sprite_accessory/underwear/top/T = GLOB.undershirt_list[H.undershirt]
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.dna.features["body_model"] == FEMALE)
MA = wear_female_version(state, T.icon, BODY_LAYER)
else
MA = mutable_appearance(T.icon, state, -BODY_LAYER)
if(T.has_color)
MA.color = "#[H.shirt_color]"
standing += MA
H.saved_undershirt = ""
var/datum/sprite_accessory/underwear/top/T = GLOB.undershirt_list[H.undershirt]
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.dna.features["body_model"] == FEMALE)
MA = wear_female_version(state, T.icon, BODY_LAYER)
else
MA = mutable_appearance(T.icon, state, -BODY_LAYER)
if(T.has_color)
MA.color = "#[H.shirt_color]"
standing += MA
if(standing.len)
H.overlays_standing[BODY_LAYER] = standing
@@ -57,10 +57,12 @@ There are several things that need to be remembered:
dna.species.handle_mutant_bodyparts(src)
/mob/living/carbon/human/update_body()
/mob/living/carbon/human/update_body(update_genitals = FALSE)
remove_overlay(BODY_LAYER)
dna.species.handle_body(src)
..()
if(update_genitals)
update_genitals()
/mob/living/carbon/human/update_fire()
..((fire_stacks > 3) ? "Standing" : "Generic_mob_burning")
@@ -72,7 +74,7 @@ There are several things that need to be remembered:
if(!..())
icon_render_key = null //invalidate bodyparts cache
update_body()
update_body(TRUE)
update_hair()
update_inv_w_uniform()
update_inv_wear_id()