* Genital refactoring and masturbation rework Refactors a lot of genitalia code. Reworks masturbation code. Adds the ability to expose onself through clothing (Still bugfixing it). * Fixes it so everything works Toggling exposing your genitals now works properly. You can now expose genitals through clothing. Genitalia is rendered a bit more modularly and less hardcoded. Genitalia no longer has linked_penis and such, but instead linked_organ. More variables made general for genitals. Breasts can now be used to masturbate and climax, also letting you fill beakers and others with milk. Both being pulled and pulling someone can let you count them as a partner for climaxing verbs. Mob_climax split up into more sub-procs. Hexacrocin made less verbose, and not as spam-happy with forced orgasms. Hexacamphor also made less verbose. * Removes outcommented code Forgot to remove the old masturbation code that I commented out. * Changes one tab further on line 248 As pointed out to me ^^. * Climaxing with partner tabulation Also copied the command for the spillage version. * capitalisation and timers Removed timers from forced climaxes and made it a default value parameter instead, so it's adjustable. Changed capitalisation of genitals and the mentions of them now use the .name to avoid including a "The" in the mention. * I accidentally runtimestation Accidentally committed changing the map to runtimestation when I debugged my code. Changed it back to basemap now.
72 lines
2.5 KiB
Plaintext
72 lines
2.5 KiB
Plaintext
/obj/item/organ/genital/penis
|
|
name = "penis"
|
|
desc = "A male reproductive organ."
|
|
icon_state = "penis"
|
|
icon = 'code/citadel/icons/penis.dmi'
|
|
zone = "groin"
|
|
slot = "penis"
|
|
w_class = 3
|
|
can_masturbate_with = TRUE
|
|
masturbation_verb = "stroke"
|
|
can_climax = TRUE
|
|
fluid_transfer_factor = 0.5
|
|
size = 2 //arbitrary value derived from length and girth for sprites.
|
|
var/length = 6 //inches
|
|
var/cached_length //used to detect a change in length
|
|
var/girth = 0
|
|
var/girth_ratio = COCK_GIRTH_RATIO_DEF //0.73; check citadel_defines.dm
|
|
var/knot_girth_ratio = KNOT_GIRTH_RATIO_DEF
|
|
var/list/dickflags = list()
|
|
var/list/knotted_types = list("knotted", "barbknot")
|
|
|
|
/obj/item/organ/genital/penis/update_size()
|
|
if(length == cached_length)
|
|
return
|
|
switch(length)
|
|
if(-INFINITY to 5)
|
|
size = 1
|
|
if(5 to 9)
|
|
size = 2
|
|
if(9 to INFINITY)
|
|
size = 3//no new sprites for anything larger yet
|
|
/* if(9 to 15)
|
|
size = 3
|
|
if(15 to INFINITY)
|
|
size = 3*/
|
|
girth = (length * girth_ratio)
|
|
cached_length = length
|
|
|
|
/obj/item/organ/genital/penis/update_appearance()
|
|
var/string = "penis_[GLOB.cock_shapes_icons[shape]]_[size]"
|
|
icon_state = sanitize_text(string)
|
|
var/lowershape = lowertext(shape)
|
|
if(lowershape in knotted_types)
|
|
if(lowershape == "barbknot")
|
|
lowershape = "barbed, knotted"
|
|
desc = "That's a [lowershape] penis. You estimate it's about [round(length, 0.25)] inch[length > 1 ? "es" : ""] long, [round(girth, 0.25)] inch[girth > 1 ? "es" : ""] around the shaft \
|
|
and [round(length * knot_girth_ratio, 0.25)] inch[length > 1 ? "es" : ""] around the knot."
|
|
else
|
|
desc = "That's a [lowershape] penis. You estimate it's about [round(length, 0.25)] inch[length > 1 ? "es" : ""] long and [round(girth, 0.25)] inch[length > 1 ? "es" : ""] around."
|
|
if(owner)
|
|
if(owner.dna.species.use_skintones && owner.dna.features["genitals_use_skintone"])
|
|
if(ishuman(owner)) // Check before recasting type, although someone fucked up if you're not human AND have use_skintones somehow...
|
|
var/mob/living/carbon/human/H = owner // only human mobs have skin_tone, which we need.
|
|
color = "#[skintone2hex(H.skin_tone)]"
|
|
else
|
|
color = "#[owner.dna.features["cock_color"]]"
|
|
|
|
/obj/item/organ/genital/penis/update_link()
|
|
if(owner)
|
|
linked_organ = (owner.getorganslot("testicles"))
|
|
if(linked_organ)
|
|
linked_organ.linked_organ = src
|
|
else
|
|
if(linked_organ)
|
|
linked_organ.linked_organ = null
|
|
linked_organ = null
|
|
|
|
/obj/item/organ/genital/penis/is_exposed()
|
|
. = ..()
|
|
if(.)
|
|
return TRUE
|
|
return owner.is_groin_exposed() |