Merge pull request #8367 from Poojawa/genital-improvements

[READY] Genital fixes and skintone sync [Adds erections[]
This commit is contained in:
kevinz000
2019-05-19 22:47:01 -07:00
committed by GitHub
22 changed files with 79 additions and 47 deletions
+5
View File
@@ -76,6 +76,9 @@
#define MILK_RATE_MULT 1
#define MILK_EFFICIENCY 1
#define AROUSAL_MINIMUM_DEFAULT 0
#define AROUSAL_MAXIMUM_DEFAULT 100
#define AROUSAL_START_VALUE 1
//Individual logging define
#define INDIVIDUAL_LOOC_LOG "LOOC log"
@@ -98,6 +101,8 @@
#define SKINTONE 40 //uses skin tones
//Citadel istypes
#define isgenital(A) (istype(A, /obj/item/organ/genital))
#define isborer(A) (istype(A, /mob/living/simple_animal/borer))
#define isipcperson(A) (is_species(A, /datum/species/ipc))
#define ismammal(A) (is_species(A, /datum/species/mammal))
@@ -3,7 +3,7 @@
id = "abductor"
say_mod = "gibbers"
sexes = FALSE
species_traits = list(NOBLOOD,NOEYES)
species_traits = list(NOBLOOD,NOEYES,NOGENITALS)
inherent_traits = list(TRAIT_VIRUSIMMUNE,TRAIT_NOGUNS,TRAIT_NOHUNGER,TRAIT_NOBREATH)
mutanttongue = /obj/item/organ/tongue/abductor
var/scientist = FALSE // vars to not pollute spieces list with castes
@@ -2,7 +2,7 @@
name = "Android"
id = "android"
say_mod = "states"
species_traits = list(NOBLOOD)
species_traits = list(NOBLOOD,NOGENITALS)
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_RADIMMUNE,TRAIT_NOFIRE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_LIMBATTACHMENT)
inherent_biotypes = list(MOB_ROBOTIC, MOB_HUMANOID)
meat = null
@@ -15,6 +15,6 @@
attack_sound = 'sound/weapons/resonator_blast.ogg'
blacklisted = 1
use_skintones = 0
species_traits = list(NOBLOOD,EYECOLOR)
species_traits = list(NOBLOOD,EYECOLOR,NOGENITALS)
inherent_traits = list(TRAIT_RADIMMUNE,TRAIT_VIRUSIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOHUNGER)
sexes = 0
@@ -2,7 +2,7 @@
// Animated beings of stone. They have increased defenses, and do not need to breathe. They're also slow as fuuuck.
name = "Golem"
id = "iron golem"
species_traits = list(NOBLOOD,MUTCOLORS,NO_UNDERWEAR)
species_traits = list(NOBLOOD,MUTCOLORS,NO_UNDERWEAR,NOGENITALS)
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOFIRE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER)
inherent_biotypes = list(MOB_INORGANIC, MOB_HUMANOID)
mutant_organs = list(/obj/item/organ/adamantine_resonator)
@@ -9,7 +9,7 @@
nojumpsuit = TRUE
say_mod = "poofs" //what does a mushroom sound like
species_traits = list(MUTCOLORS, NOEYES, NO_UNDERWEAR)
species_traits = list(MUTCOLORS, NOEYES, NO_UNDERWEAR,NOGENITALS)
inherent_traits = list(TRAIT_NOBREATH)
speedmod = 1.5 //faster than golems but not by much
@@ -4,7 +4,7 @@
say_mod = "rattles"
sexes = 0
meat = /obj/item/stack/sheet/mineral/plasma
species_traits = list(NOBLOOD,NOTRANSSTING)
species_traits = list(NOBLOOD,NOTRANSSTING,NOGENITALS)
inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_RADIMMUNE,TRAIT_NOHUNGER)
inherent_biotypes = list(MOB_INORGANIC, MOB_HUMANOID)
mutantlungs = /obj/item/organ/lungs/plasmaman
@@ -38,7 +38,7 @@
burnmod = 1.5
blacklisted = TRUE
no_equip = list(SLOT_WEAR_MASK, SLOT_WEAR_SUIT, SLOT_GLOVES, SLOT_SHOES, SLOT_W_UNIFORM, SLOT_S_STORE)
species_traits = list(NOBLOOD,NO_UNDERWEAR,NO_DNA_COPY,NOTRANSSTING,NOEYES)
species_traits = list(NOBLOOD,NO_UNDERWEAR,NO_DNA_COPY,NOTRANSSTING,NOEYES,NOGENITALS)
inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_NOBREATH,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_VIRUSIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOHUNGER)
mutanteyes = /obj/item/organ/eyes/night_vision/nightmare
mutant_organs = list(/obj/item/organ/heart/nightmare)
@@ -6,7 +6,7 @@
blacklisted = 1
sexes = 0
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/skeleton
species_traits = list(NOBLOOD)
species_traits = list(NOBLOOD,NOGENITALS)
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_FAKEDEATH)
inherent_biotypes = list(MOB_UNDEAD, MOB_HUMANOID)
mutanttongue = /obj/item/organ/tongue/bone
@@ -3,7 +3,7 @@
id = "synth"
say_mod = "beep boops" //inherited from a user's real species
sexes = 0
species_traits = list(NOTRANSSTING) //all of these + whatever we inherit from the real species
species_traits = list(NOTRANSSTING,NOGENITALS) //all of these + whatever we inherit from the real species
inherent_traits = list(TRAIT_VIRUSIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOHUNGER,TRAIT_NOBREATH)
inherent_biotypes = list(MOB_ROBOTIC, MOB_HUMANOID)
dangerous_existence = 1
+14 -11
View File
@@ -1,13 +1,13 @@
//Mob vars
/mob/living
var/arousalloss = 0 //How aroused the mob is.
var/min_arousal = 0 //The lowest this mobs arousal will get. default = 0
var/max_arousal = 100 //The highest this mobs arousal will get. default = 100
var/arousal_rate = 1 //The base rate that arousal will increase in this mob.
var/arousal_loss_rate = 1 //How easily arousal can be relieved for this mob.
var/canbearoused = FALSE //Mob-level disabler for arousal. Starts off and can be enabled as features are added for different mob types.
var/mb_cd_length = 100 //5 second cooldown for masturbating because fuck spam.
var/mb_cd_timer = 0 //The timer itself
var/arousalloss = 0 //How aroused the mob is.
var/min_arousal = AROUSAL_MINIMUM_DEFAULT //The lowest this mobs arousal will get. default = 0
var/max_arousal = AROUSAL_MAXIMUM_DEFAULT //The highest this mobs arousal will get. default = 100
var/arousal_rate = AROUSAL_START_VALUE //The base rate that arousal will increase in this mob.
var/arousal_loss_rate = AROUSAL_START_VALUE //How easily arousal can be relieved for this mob.
var/canbearoused = FALSE //Mob-level disabler for arousal. Starts off and can be enabled as features are added for different mob types.
var/mb_cd_length = 5 SECONDS //5 second cooldown for masturbating because fuck spam.
var/mb_cd_timer = 0 //The timer itself
/mob/living/carbon/human
canbearoused = TRUE
@@ -22,8 +22,8 @@
//Species vars
/datum/species
var/arousal_gain_rate = 1 //Rate at which this species becomes aroused
var/arousal_lose_rate = 1 //Multiplier for how easily arousal can be relieved
var/arousal_gain_rate = AROUSAL_START_VALUE //Rate at which this species becomes aroused
var/arousal_lose_rate = AROUSAL_START_VALUE //Multiplier for how easily arousal can be relieved
var/list/cum_fluids = list("semen")
var/list/milk_fluids = list("milk")
var/list/femcum_fluids = list("femcum")
@@ -77,7 +77,8 @@
updatearousal()
/mob/living/proc/getPercentAroused()
return ((100 / max_arousal) * arousalloss)
var/percentage = ((100 / max_arousal) * arousalloss)
return percentage
/mob/living/proc/isPercentAroused(percentage)//returns true if the mob's arousal (measured in a percent of 100) is greater than the arg percentage.
if(!isnum(percentage) || percentage > 100 || percentage < 0)
@@ -104,6 +105,8 @@
S = GLOB.breasts_shapes_list[G.shape]
if(S?.alt_aroused)
G.aroused_state = isPercentAroused(G.aroused_amount)
if(getArousalLoss() >= ((max_arousal / 100) * 33))
G.aroused_state = TRUE
else
G.aroused_state = FALSE
G.update_appearance()
@@ -36,8 +36,6 @@
reagents.add_reagent(fluid_id, (fluid_mult * fluid_rate))
/obj/item/organ/genital/breasts/update_appearance()
var/string = "breasts_[lowertext(shape)]_[size]"
icon_state = sanitize_text(string)
var/lowershape = lowertext(shape)
switch(lowershape)
if("pair")
@@ -50,10 +48,19 @@
desc += " You wouldn't measure them in cup sizes."
if(producing && aroused_state)
desc += " They're leaking [fluid_id]."
var/string
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)]"
string = "breasts_[lowertext(shape)]_[size]-s"
else
color = "#[owner.dna.features["breasts_color"]]"
string = "breasts_[lowertext(shape)]_[size]"
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.update_genitals()
icon_state = sanitize_text(string)
@@ -92,7 +92,7 @@
var/list/genital_list = list()
for(var/obj/item/organ/O in internal_organs)
if(istype(O, /obj/item/organ/genital))
if(isgenital(O))
var/obj/item/organ/genital/G = O
if(!G.internal)
genital_list += G
@@ -110,10 +110,13 @@
/obj/item/organ/genital/proc/update_size()
return
/obj/item/organ/genital/proc/update_appearance()
return
/obj/item/organ/genital/proc/update_link()
return
/obj/item/organ/genital/proc/remove_ref()
if(linked_organ)
@@ -211,7 +214,10 @@
/mob/living/carbon/human/proc/give_ovipositor()
return
/mob/living/carbon/human/proc/give_eggsack()
return
/mob/living/carbon/human/proc/give_vagina()
if(!dna)
return FALSE
@@ -280,7 +286,8 @@
var/list/genitals_to_add = list()
var/list/relevant_layers = list(GENITALS_BEHIND_LAYER, GENITALS_ADJ_LAYER, GENITALS_FRONT_LAYER)
var/list/standing = list()
var/size = null
var/size
var/aroused_state
for(var/L in relevant_layers) //Less hardcode
H.remove_overlay(L)
@@ -288,7 +295,7 @@
//start scanning for genitals
//var/list/worn_stuff = H.get_equipped_items()//cache this list so it's not built again
for(var/obj/item/organ/O in H.internal_organs)
if(istype(O, /obj/item/organ/genital))
if(isgenital(O))
var/obj/item/organ/genital/G = O
if(G.is_exposed()) //Checks appropriate clothing slot and if it's through_clothes
genitals_to_add += H.getorganslot(G.slot)
@@ -300,6 +307,7 @@
for(var/obj/item/organ/genital/G in genitals_to_add)
var/datum/sprite_accessory/S
size = G.size
aroused_state = G.aroused_state
switch(G.type)
if(/obj/item/organ/genital/penis)
S = GLOB.cock_shapes_list[G.shape]
@@ -311,13 +319,14 @@
if(!S || S.icon_state == "none")
continue
var/mutable_appearance/genital_overlay = mutable_appearance(S.icon, layer = -layer)
genital_overlay.icon_state = "[G.slot]_[S.icon_state]_[size]_[G.aroused_state]_[layertext]"
genital_overlay.icon_state = "[G.slot]_[S.icon_state]_[size]_[aroused_state]_[layertext]"
if(S.center)
genital_overlay = center_image(genital_overlay, S.dimension_x, S.dimension_y)
if(use_skintones && H.dna.features["genitals_use_skintone"])
genital_overlay.color = "#[skintone2hex(H.skin_tone)]"
genital_overlay.icon_state = "[G.slot]_[S.icon_state]_[size]-s_[aroused_state]_[layertext]"
else
switch(S.color_src)
if("cock_color")
@@ -326,21 +335,7 @@
genital_overlay.color = "#[H.dna.features["breasts_color"]]"
if("vag_color")
genital_overlay.color = "#[H.dna.features["vag_color"]]"
if(MUTCOLORS)
if(fixed_mut_color)
genital_overlay.color = "#[fixed_mut_color]"
else
genital_overlay.color = "#[H.dna.features["mcolor"]]"
if(MUTCOLORS2)
if(fixed_mut_color2)
genital_overlay.color = "#[fixed_mut_color2]"
else
genital_overlay.color = "#[H.dna.features["mcolor2"]]"
if(MUTCOLORS3)
if(fixed_mut_color3)
genital_overlay.color = "#[fixed_mut_color3]"
else
genital_overlay.color = "#[H.dna.features["mcolor3"]]"
standing += genital_overlay
if(LAZYLEN(standing))
H.overlays_standing[layer] = standing.Copy()
@@ -87,6 +87,13 @@
icon_state = "hairy"
name = "Hairy"
/datum/sprite_accessory/vagina/spade
icon_state = "spade"
name = "Spade"
/datum/sprite_accessory/vagina/furred
icon_state = "furred"
name = "Furred"
//BREASTS BE HERE
/datum/sprite_accessory/breasts
@@ -27,7 +27,7 @@
size = 1
if(5 to 9)
size = 2
if(9 to INFINITY)
if(15 to INFINITY)
size = 3//no new sprites for anything larger yet
/* if(9 to 15)
size = 3
@@ -37,8 +37,7 @@
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/string
var/lowershape = lowertext(shape)
desc = "You see [aroused_state ? "an erect" : "a flaccid"] [lowershape] penis. You estimate it's about [round(length, 0.25)] inch[round(length, 0.25) != 1 ? "es" : ""] long and [round(girth, 0.25)] inch[round(girth, 0.25) != 1 ? "es" : ""] in girth."
@@ -47,8 +46,15 @@
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)]"
string = "penis_[GLOB.cock_shapes_icons[shape]]_[size]-s"
else
color = "#[owner.dna.features["cock_color"]]"
string = "penis_[GLOB.cock_shapes_icons[shape]]_[size]"
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.update_genitals()
icon_state = sanitize_text(string)
/obj/item/organ/genital/penis/update_link()
if(owner)
@@ -17,12 +17,11 @@
var/clits = 1
var/clit_diam = 0.25
var/clit_len = 0.25
var/list/vag_types = list("tentacle", "dentata", "hairy")
var/list/vag_types = list("tentacle", "dentata", "hairy", "spade", "furred")
/obj/item/organ/genital/vagina/update_appearance()
var/string = "vagina" //Keeping this code here, so making multiple sprites for the different kinds is easier.
icon_state = sanitize_text(string)
var/string //Keeping this code here, so making multiple sprites for the different kinds is easier.
var/lowershape = lowertext(shape)
var/details
@@ -37,6 +36,10 @@
details = "It is taut with smooth skin, though without much hair and "
if("gaping")
details = "It is gaping slightly open, though without much hair and "
if("spade")
details = "It is a plush canine spade, it "
if("furred")
details = "It has neatly groomed fur around the outer folds, it "
else
details = "It has an exotic shape and "
if(aroused_state)
@@ -51,9 +54,15 @@
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)]"
string = "vagina-s"
else
color = "#[owner.dna.features["vag_color"]]"
string = "vagina"
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.update_genitals()
icon_state = sanitize_text(string)
/obj/item/organ/genital/vagina/update_link()
if(owner)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 703 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 B

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 644 B

After

Width:  |  Height:  |  Size: 939 B