Files
GS13NG/code/citadel/organs/penis.dm
T
ktccd cc1768b872 Huge Sprite Rework
This is a big one, I reworked:
Vagina sprites, Breast sprites, both onmob and item, and some Taur
sprites
How Taur sprites are layered, finally making genitals show for Nagas as
they should.
How colours are chosen (Humans can enable/disabled matching genitals to
their skintones, everyone else has to pick a colour).
Vaginas and Breasts now follow the same naming convention for sprites
that penises use, so all genital organs can be rendered using the same
piece of code. This means that breast sizes have dropped to
single-letter variants, since those are what we got sprites for (Because
the cup-size is now the Size of the obj).
Breasts now have shapes! So far we only got the "pair" shape, but we got
code-support for other variants.
Vaginas can now also be chosen and will render properly, meaning we now
have more of them to choose from (Some of them terrifying). They don't
really use a size, but there's code support for it if sprites would be
made for it.
Breast items now change their size and color to the owner's when/if they
somehow lose the organs (gibbing for example). Both Breasts and Vaginas
change their description to match what the object is set to look like,
sprites are lacking in that area however.
Minor variable error in the penis-description code fixed.
Taur sprites renamed to use the correct layers. Shephard sprite bug
fixed where there was a missing 2 pixels in the middle of the body.
2017-04-04 17:28:42 +02:00

68 lines
2.2 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 = 1
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")
var/obj/item/organ/genital/testicles/linked_balls
/obj/item/organ/genital/penis/Initialize()
update()
/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_[lowertext(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)
color = "#[owner.dna.features["cock_color"]]"
/obj/item/organ/genital/penis/update_link()
if(owner)
linked_balls = (owner.getorganslot("testicles"))
if(linked_balls)
linked_balls.linked_penis = src
else
if(linked_balls)
linked_balls.linked_penis = null
linked_balls = null
/obj/item/organ/genital/penis/remove_ref()
if(linked_balls)
linked_balls.linked_penis = null
linked_balls = null