Making it actually work.

This commit is contained in:
Ghommie
2020-03-25 17:08:09 +01:00
parent c6b4b5f686
commit c05d2c1572
2 changed files with 21 additions and 14 deletions
+4 -4
View File
@@ -761,7 +761,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<span style='border: 1px solid #161616; background-color: #[features["cock_color"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=cock_color;task=input'>Change</a><br>"
dat += "<b>Penis Shape:</b> <a style='display:block;width:120px' href='?_src_=prefs;preference=cock_shape;task=input'>[features["cock_shape"]]</a>"
dat += "<b>Penis Length:</b> <a style='display:block;width:120px' href='?_src_=prefs;preference=cock_length;task=input'>[features["cock_length"]] inch(es)</a>"
dat += "<b>Penis Visibility:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=cock_visibility;task=input'>[features["cock_visibility"]]</a>"
dat += "<b>Penis Visibility:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=cock_visibility;task=input'>[features["cock_visibility"]]</a>"
dat += "<b>Has Testicles:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=has_balls'>[features["has_balls"] == TRUE ? "Yes" : "No"]</a>"
if(features["has_balls"])
if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE)
@@ -770,7 +770,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
else
dat += "<b>Testicles Color:</b></a><BR>"
dat += "<span style='border: 1px solid #161616; background-color: #[features["balls_color"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=balls_color;task=input'>Change</a><br>"
dat += "<b>Testicles Visibility:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=balls_visibility;task=input'>[features["balls_visibility"]]</a>"
dat += "<b>Testicles Visibility:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=balls_visibility;task=input'>[features["balls_visibility"]]</a>"
dat += APPEARANCE_CATEGORY_COLUMN
dat += "<h3>Vagina</h3>"
dat += "<a style='display:block;width:50px' href='?_src_=prefs;preference=has_vag'>[features["has_vag"] == TRUE ? "Yes" : "No"]</a>"
@@ -782,7 +782,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
else
dat += "<b>Vagina Color:</b></a><BR>"
dat += "<span style='border: 1px solid #161616; background-color: #[features["vag_color"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=vag_color;task=input'>Change</a><br>"
dat += "<b>Vagina Visibility:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=vag_visibility;task=input'>[features["vag_visibility"]]</a>"
dat += "<b>Vagina Visibility:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=vag_visibility;task=input'>[features["vag_visibility"]]</a>"
dat += "<b>Has Womb:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=has_womb'>[features["has_womb"] == TRUE ? "Yes" : "No"]</a>"
dat += "</td>"
dat += APPEARANCE_CATEGORY_COLUMN
@@ -797,7 +797,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<span style='border: 1px solid #161616; background-color: #[features["breasts_color"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=breasts_color;task=input'>Change</a><br>"
dat += "<b>Cup Size:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=breasts_size;task=input'>[features["breasts_size"]]</a>"
dat += "<b>Breasts Shape:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=breasts_shape;task=input'>[features["breasts_shape"]]</a>"
dat += "<b>Breasts Visibility:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=breasts_visibility;task=input'>[features["breasts_visibility"]]</a>"
dat += "<b>Breasts Visibility:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=breasts_visibility;task=input'>[features["breasts_visibility"]]</a>"
dat += "<b>Lactates:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=breasts_producing'>[features["breasts_producing"] == TRUE ? "Yes" : "No"]</a>"
dat += "</td>"
dat += "</td>"
@@ -57,9 +57,9 @@
if(genital_flags & GENITAL_UNDIES_HIDDEN && ishuman(owner))
var/mob/living/carbon/human/H = owner
if(!(NO_UNDERWEAR in H.dna.species.species_traits))
var/datum/sprite_accessory/underwear/top/T = GLOB.undershirt_list[H.undershirt]
var/datum/sprite_accessory/underwear/bottom/B = GLOB.underwear_list[H.underwear]
if(zone == BODY_ZONE_CHEST ? (!H.hidden_undershirt && (T?.covers_chest || B?.covers_chest)) : (!H.hidden_underwear && (T?.covers_groin || B?.covers_groin)))
var/datum/sprite_accessory/underwear/top/T = H.hidden_undershirt ? null : GLOB.undershirt_list[H.undershirt]
var/datum/sprite_accessory/underwear/bottom/B = H.hidden_underwear ? null : GLOB.underwear_list[H.underwear]
if(zone == BODY_ZONE_CHEST ? (T?.covers_chest || B?.covers_chest) : (!T?.covers_groin || B?.covers_groin))
return FALSE
if(genital_flags & GENITAL_THROUGH_CLOTHES)
return TRUE
@@ -72,17 +72,19 @@
/obj/item/organ/genital/proc/toggle_visibility(visibility, update = TRUE)
genital_flags &= ~(GENITAL_THROUGH_CLOTHES|GENITAL_HIDDEN|GENITAL_UNDIES_HIDDEN)
owner.exposed_genitals -= src
if(owner)
owner.exposed_genitals -= src
switch(visibility)
if(GEN_VISIBLE_ALWAYS)
genital_flags |= GENITAL_THROUGH_CLOTHES
owner.exposed_genitals += src
if(owner)
owner.exposed_genitals += src
if(GEN_VISIBLE_NO_UNDIES)
genital_flags |= GENITAL_UNDIES_HIDDEN
if(GEN_VISIBLE_NEVER)
genital_flags |= GENITAL_HIDDEN
if(update && ishuman(owner)) //recast to use update genitals proc
if(update && owner && ishuman(owner)) //recast to use update genitals proc
var/mob/living/carbon/human/H = owner
H.update_genitals()
@@ -191,14 +193,19 @@
if(.)
update()
RegisterSignal(owner, COMSIG_MOB_DEATH, .proc/update_appearance)
if(genital_flags & GENITAL_THROUGH_CLOTHES)
owner.exposed_genitals += src
/obj/item/organ/genital/Remove(special = FALSE)
. = ..()
var/mob/living/carbon/human/H = .
var/mob/living/carbon/C = .
update()
if(!QDELETED(H))
UnregisterSignal(H, COMSIG_MOB_DEATH)
H.update_genitals()
if(!QDELETED(C))
if(genital_flags & UPDATE_OWNER_APPEARANCE && ishuman(C))
var/mob/living/carbon/human/H = .
H.update_genitals()
C.exposed_genitals -= src
UnregisterSignal(C, COMSIG_MOB_DEATH)
//proc to give a player their genitals and stuff when they log in
/mob/living/carbon/human/proc/give_genitals(clean = FALSE)//clean will remove all pre-existing genitals. proc will then give them any genitals that are enabled in their DNA