From e26b43d80ba9fb95b558cff79c5460ef13e5ee19 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Tue, 31 Mar 2020 02:40:28 +0200 Subject: [PATCH] The banishment of the floating disembodied phallus. --- code/__DEFINES/citadel_defines.dm | 1 + code/__HELPERS/mobs.dm | 1 + code/modules/client/preferences.dm | 23 ++++++++++- code/modules/client/preferences_savefile.dm | 12 +++++- .../code/modules/arousal/genitals.dm | 17 +++++++-- .../arousal/genitals_sprite_accessories.dm | 38 ++++++------------- .../code/modules/arousal/organs/penis.dm | 9 ++++- 7 files changed, 67 insertions(+), 34 deletions(-) diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index 174b44c6fc..578255d086 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -25,6 +25,7 @@ #define GENITAL_CAN_AROUSE (1<<8) #define GENITAL_UNDIES_HIDDEN (1<<9) #define UPDATE_OWNER_APPEARANCE (1<<10) +#define GENITAL_CAN_TAUR (1<<11) #define DEF_VAGINA_SHAPE "Human" diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index f7546193aa..7548c313fa 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -184,6 +184,7 @@ "cock_length" = COCK_SIZE_DEF, "cock_diameter_ratio" = COCK_DIAMETER_RATIO_DEF, "cock_color" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"), + "cock_taur" = FALSE, "has_balls" = FALSE, "balls_color" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"), "balls_size" = BALLS_SIZE_DEF, diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index feaca1836b..1541f2410a 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -125,6 +125,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) "cock_length" = COCK_SIZE_DEF, "cock_diameter_ratio" = COCK_DIAMETER_RATIO_DEF, "cock_color" = "fff", + "cock_taur" = FALSE, "has_balls" = FALSE, "balls_color" = "fff", "balls_shape" = DEF_BALLS_SHAPE, @@ -762,7 +763,14 @@ GLOBAL_LIST_EMPTY(preferences_datums) else dat += "Penis Color:
" dat += "    Change
" - dat += "Penis Shape: [features["cock_shape"]]" + var/tauric_shape = FALSE + if(features["cock_taur"]) + var/datum/sprite_accessory/penis/P = GLOB.cock_shapes_list[features["cock_shape"]] + if(P.taur_icon && pref_species.mutant_bodyparts["taur"]) + var/datum/sprite_accessory/taur/T = GLOB.taur_list[features["taur"]] + if(T.taur_mode & P.accepted_taurs) + tauric_shape = TRUE + dat += "Penis Shape: [features["cock_shape"]][tauric_shape ? " (Taur)" : ""]" dat += "Penis Length: [features["cock_length"]] inch(es)" dat += "Penis Visibility:[features["cock_visibility"]]" dat += "Has Testicles:[features["has_balls"] == TRUE ? "Yes" : "No"]" @@ -1941,8 +1949,19 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("cock_shape") var/new_shape - new_shape = input(user, "Penis shape:", "Character Preference") as null|anything in GLOB.cock_shapes_list + var/list/hockeys = list() + if(pref_species.mutant_bodyparts["taur"]) + var/datum/sprite_accessory/taur/T = GLOB.taur_list[features["taur"]] + for(var/A in GLOB.cock_shapes_list) + var/datum/sprite_accessory/penis/P = GLOB.cock_shapes_list[A] + if(T.taur_mode & P.accepted_taurs) + LAZYSET(hockeys, "[A] (Taur)", A) + new_shape = input(user, "Penis shape:", "Character Preference") as null|anything in (GLOB.cock_shapes_list + hockeys) if(new_shape) + features["cock_taur"] = FALSE + if(hockeys[new_shape]) + new_shape = hockeys[new_shape] + features["cock_taur"] = TRUE features["cock_shape"] = new_shape if("cock_visibility") diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 7858bc099b..ca51a27dae 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -5,7 +5,7 @@ // You do not need to raise this if you are adding new values that have sane defaults. // Only raise this value when changing the meaning/format/name/layout of an existing value // where you would want the updater procs below to run -#define SAVEFILE_VERSION_MAX 27 +#define SAVEFILE_VERSION_MAX 28 /* SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn @@ -151,6 +151,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(tennis == "Hidden") features["balls_visibility"] = GEN_VISIBLE_NEVER + if(current_version < 28) + var/hockey + S["feature_cock_shape"] >> hockey + var/list/malformed_hockeys = list("Taur, Flared" = "Flared", "Taur, Knotted" = "Knotted", "Taur, Tapered" = "Tapered") + if(malformed_hockeys[hockey]) + features["cock_shape"] = malformed_hockeys[hockey] + features["cock_taur"] = TRUE + /datum/preferences/proc/load_path(ckey,filename="preferences.sav") if(!ckey) return @@ -457,6 +465,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["feature_cock_color"] >> features["cock_color"] S["feature_cock_length"] >> features["cock_length"] S["feature_cock_diameter"] >> features["cock_diameter"] + S["feature_cock_taur"] >> features["cock_taur"] S["feature_cock_visibility"] >> features["cock_visibility"] //balls features S["feature_has_balls"] >> features["has_balls"] @@ -673,6 +682,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["feature_cock_shape"], features["cock_shape"]) WRITE_FILE(S["feature_cock_color"], features["cock_color"]) WRITE_FILE(S["feature_cock_length"], features["cock_length"]) + WRITE_FILE(S["feature_cock_taur"], features["cock_taur"]) WRITE_FILE(S["feature_cock_visibility"], features["cock_visibility"]) WRITE_FILE(S["feature_has_balls"], features["has_balls"]) diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index 7705dcafd1..47a994326f 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -302,10 +302,21 @@ if(!S || S.icon_state == "none") continue var/aroused_state = G.aroused_state && S.alt_aroused + var/accessory_icon = S.icon + var/do_center = S.center + var/dim_x = S.dimension_x + var/dim_y = S.dimension_y + if(G.genital_flags & GENITAL_CAN_TAUR && S.taur_icon && (!S.feat_taur || dna.features[S.feat_taur]) && dna.species.mutant_bodyparts["taur"]) + var/datum/sprite_accessory/taur/T = GLOB.taur_list[dna.features["taur"]] + if(T?.taur_mode & S.accepted_taurs) + accessory_icon = S.taur_icon + do_center = TRUE + dim_x = S.taur_dimension_x + dim_y = S.taur_dimension_y - var/mutable_appearance/genital_overlay = mutable_appearance(S.icon, layer = -layer) - if(S.center) - genital_overlay = center_image(genital_overlay, S.dimension_x, S.dimension_y) + var/mutable_appearance/genital_overlay = mutable_appearance(accessory_icon, layer = -layer) + if(do_center) + genital_overlay = center_image(genital_overlay, dim_x, dim_y) if(dna.species.use_skintones && dna.features["genitals_use_skintone"]) genital_overlay.color = "#[skintone2hex(skin_tone)]" diff --git a/modular_citadel/code/modules/arousal/genitals_sprite_accessories.dm b/modular_citadel/code/modules/arousal/genitals_sprite_accessories.dm index 92c643c4bd..dcefa27305 100644 --- a/modular_citadel/code/modules/arousal/genitals_sprite_accessories.dm +++ b/modular_citadel/code/modules/arousal/genitals_sprite_accessories.dm @@ -1,5 +1,10 @@ /datum/sprite_accessory var/alt_aroused = FALSE //CIT CODE if this is TRUE, then the genitals will use an alternate icon_state when aroused. + var/taur_icon //leave null if the genital doesn't have a taur counterpart. + var/accepted_taurs = STYLE_HOOF_TAURIC|STYLE_PAW_TAURIC //Types that match with the accessory. + var/feat_taur //the text string of the dna feature to check for those who want to opt out. + var/taur_dimension_y = 0 + var/taur_dimension_x = 0 //DICKS,COCKS,PENISES,WHATEVER YOU WANT TO CALL THEM @@ -8,6 +13,7 @@ name = "penis" //the preview name of the accessory color_src = "cock_color" alt_aroused = TRUE + feat_taur = "cock_taur" /datum/sprite_accessory/penis/human icon_state = "human" @@ -16,10 +22,14 @@ /datum/sprite_accessory/penis/knotted icon_state = "knotted" name = "Knotted" + taur_icon = 'modular_citadel/icons/obj/genitals/taur_penis_onmob.dmi' + taur_dimension_y = 64 /datum/sprite_accessory/penis/flared icon_state = "flared" name = "Flared" + taur_icon = 'modular_citadel/icons/obj/genitals/taur_penis_onmob.dmi' + taur_dimension_y = 64 /datum/sprite_accessory/penis/barbknot icon_state = "barbknot" @@ -28,6 +38,8 @@ /datum/sprite_accessory/penis/tapered icon_state = "tapered" name = "Tapered" + taur_icon = 'modular_citadel/icons/obj/genitals/taur_penis_onmob.dmi' + taur_dimension_y = 64 /datum/sprite_accessory/penis/tentacle icon_state = "tentacle" @@ -41,33 +53,7 @@ icon_state = "hemiknot" name = "Knotted Hemi" - -//////////////////////// -// Taur cocks go here // -//////////////////////// -/datum/sprite_accessory/penis/taur_flared - icon = 'modular_citadel/icons/obj/genitals/taur_penis_onmob.dmi' //Needed larger width - icon_state = "flared" - name = "Taur, Flared" - center = TRUE //Center the image 'cause 2-tile wide. - dimension_x = 64 - -/datum/sprite_accessory/penis/taur_knotted - icon = 'modular_citadel/icons/obj/genitals/taur_penis_onmob.dmi' //Needed larger width - icon_state = "knotted" - name = "Taur, Knotted" - center = TRUE //Center the image 'cause 2-tile wide. - dimension_x = 64 - -/datum/sprite_accessory/penis/taur_tapered - icon = 'modular_citadel/icons/obj/genitals/taur_penis_onmob.dmi' //Needed larger width - icon_state = "tapered" - name = "Taur, Tapered" - center = TRUE //Center the image 'cause 2-tile wide. - dimension_x = 64 - //Testicles -//These ones aren't inert /datum/sprite_accessory/testicles icon = 'modular_citadel/icons/obj/genitals/testicles_onmob.dmi' icon_state = "testicle" diff --git a/modular_citadel/code/modules/arousal/organs/penis.dm b/modular_citadel/code/modules/arousal/organs/penis.dm index ded05134a9..b3ca0062f8 100644 --- a/modular_citadel/code/modules/arousal/organs/penis.dm +++ b/modular_citadel/code/modules/arousal/organs/penis.dm @@ -8,7 +8,7 @@ masturbation_verb = "stroke" arousal_verb = "You pop a boner" unarousal_verb = "Your boner goes down" - genital_flags = CAN_MASTURBATE_WITH|CAN_CLIMAX_WITH|GENITAL_CAN_AROUSE|UPDATE_OWNER_APPEARANCE|GENITAL_UNDIES_HIDDEN + genital_flags = CAN_MASTURBATE_WITH|CAN_CLIMAX_WITH|GENITAL_CAN_AROUSE|UPDATE_OWNER_APPEARANCE|GENITAL_UNDIES_HIDDEN|GENITAL_CAN_TAUR linked_organ_slot = ORGAN_SLOT_TESTICLES fluid_transfer_factor = 0.5 shape = DEF_COCK_SHAPE @@ -79,7 +79,6 @@ var/icon_shape = S ? S.icon_state : "human" icon_state = "penis_[icon_shape]_[size]" var/lowershape = lowertext(shape) - desc = "You see [aroused_state ? "an erect" : "a flaccid"] [lowershape] [name]. You estimate it's about [round(length, 0.25)] inch[round(length, 0.25) != 1 ? "es" : ""] long and [round(diameter, 0.25)] inch[round(diameter, 0.25) != 1 ? "es" : ""] in diameter." if(owner) if(owner.dna.species.use_skintones && owner.dna.features["genitals_use_skintone"]) @@ -89,6 +88,12 @@ icon_state += "_s" else color = "#[owner.dna.features["cock_color"]]" + if(genital_flags & GENITAL_CAN_TAUR && S?.taur_icon && (!S.feat_taur || owner.dna.features[S.feat_taur]) && owner.dna.species.mutant_bodyparts["taur"]) + var/datum/sprite_accessory/taur/T = GLOB.taur_list[owner.dna.features["taur"]] + if(T.taur_mode & S.accepted_taurs) //looks out of place on those. + lowershape = "taur, [lowershape]" + + desc = "You see [aroused_state ? "an erect" : "a flaccid"] [lowershape] [name]. You estimate it's about [round(length, 0.25)] inch[round(length, 0.25) != 1 ? "es" : ""] long and [round(diameter, 0.25)] inch[round(diameter, 0.25) != 1 ? "es" : ""] in diameter." /obj/item/organ/genital/penis/get_features(mob/living/carbon/human/H) var/datum/dna/D = H.dna