Huge Sprite Rework (#342)

* Revert "Revert "Huge Sprite Rework""

* Compilation of all feedback fixes

This commit contains all the suggested fixes so far and the changes we
came up with through discussion about the code.
For example, genitals **may** now use alternate icons for aroused
states, but does not have to, this is decided by a boolean variable in
the sprite accessory itself, defaulting to not using alternate icons.
Genital icon_state names now follow a new format to match these new
options in a modular way for all kinds of genitals.

* Conflict solving

reformats all the taurs to use the TAUR layer instead of the BODY_FRONT
layer. Same for the new Eevee sprites.

* Committing the old, unfixed file.

This will cause errors if used, but at least it won't cause conflicts.

* Contains fixed sprite names

The shepherd taur body should STILL have a hole in the body due to a
pixel error.
I have forgotten which pixes these are, so.... **le shrug**

* Anger commit

Commiting this in anger. I WILL make it work damnit!

* Proper name fixes.

Also renames the taur cow to no longer have an incorrectly duplicate
icon_state.

* Shepherd taur pixel fix

Fixes the missing pixels from the taur body that caused a hole to appear
when viewed from the sides.

* Conflict resolution

This PR will cause some sprite-breaking overlay errors.
But it's the only way to handle the conflicting .dmi.
So I'll make a separate PR to fix the sprites later.

* Fixes global lists

Now they use whatever weird new system we got for them.
This commit is contained in:
ktccd
2017-04-15 13:24:44 +02:00
committed by TalkingCactus
parent bd1a26de8d
commit c785038994
19 changed files with 336 additions and 145 deletions
+27 -2
View File
@@ -6,11 +6,11 @@
zone = "chest"
slot = "breasts"
w_class = 3
size = "e"
size = BREASTS_SIZE_DEF
fluid_id = "milk"
var/cup_size = BREASTS_SIZE_DEF
var/amount = 2
producing = TRUE
shape = "pair"
/obj/item/organ/genital/breasts/Initialize()
create_reagents(fluid_max_volume)
@@ -31,3 +31,28 @@
return FALSE
reagents.isolate_reagent(fluid_id)
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")
desc = "That's a pair of breasts."
else
desc = "That's breasts, they seem to be quite exotic."
if (size)
desc += " You estimate they're about [size]-cup size."
else
desc += " You wouldn't measure them in cup sizes."
if(producing)
desc += "\nThey're leaking [fluid_id]."
else
desc += "\nThey do not seem to be producing liquids."
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["breasts_color"]]"
+75 -49
View File
@@ -11,6 +11,8 @@
var/fluid_rate = 1
var/fluid_mult = 1
var/producing = FALSE
var/aroused_state = FALSE //Boolean used in icon_state strings
var/aroused_amount = 50 //This is a num from 0 to 100 for arousal percentage for when to use arousal state icons.
/obj/item/organ/genital/Initialize()
reagents = create_reagents(fluid_max_volume)
@@ -100,13 +102,14 @@
// T.color = skintone2hex(skin_tone)
// else
// T.color = "#[dna.features["balls_color"]]"
T.size = dna.features["balls_size"]
T.sack_size = dna.features["balls_sack_size"]
T.fluid_id = dna.features["balls_fluid"]
T.fluid_rate = dna.features["balls_cum_rate"]
T.fluid_mult = dna.features["balls_cum_mult"]
T.fluid_efficiency = dna.features["balls_efficiency"]
T.update()
if(T)
T.size = dna.features["balls_size"]
T.sack_size = dna.features["balls_sack_size"]
T.fluid_id = dna.features["balls_fluid"]
T.fluid_rate = dna.features["balls_cum_rate"]
T.fluid_mult = dna.features["balls_cum_mult"]
T.fluid_efficiency = dna.features["balls_efficiency"]
T.update()
/mob/living/carbon/human/proc/give_breasts()
if(!dna)
@@ -116,9 +119,15 @@
if(!getorganslot("breasts"))
var/obj/item/organ/genital/breasts/B = new
B.Insert(src)
B.cup_size = dna.features["breasts_size"]
B.fluid_id = dna.features["breasts_fluid"]
B.update()
if(B)
if(dna.species.use_skintones && dna.features["genitals_use_skintone"])
B.color = skintone2hex(skin_tone)
else
B.color = "#[dna.features["breasts_color"]]"
B.size = dna.features["breasts_size"]
B.shape = dna.features["breasts_shape"]
B.fluid_id = dna.features["breasts_fluid"]
B.update()
/mob/living/carbon/human/proc/give_ovipositor()
@@ -131,11 +140,14 @@
if(!getorganslot("vagina"))
var/obj/item/organ/genital/vagina/V = new
V.Insert(src)
if(dna.species.use_skintones && dna.features["genitals_use_skintone"])
V.color = skintone2hex(skin_tone)
else
V.color = "[dna.features["vag_color"]]"
V.update()
if(V)
if(dna.species.use_skintones && dna.features["genitals_use_skintone"])
V.color = skintone2hex(skin_tone)
else
V.color = "[dna.features["vag_color"]]"
V.shape = "[dna.features["vag_shape"]]"
V.update()
/mob/living/carbon/human/proc/give_womb()
if(!dna)
return FALSE
@@ -144,7 +156,8 @@
if(!getorganslot("womb"))
var/obj/item/organ/genital/womb/W = new
W.Insert(src)
W.update()
if(W)
W.update()
/datum/species/proc/genitals_layertext(layer)
@@ -183,69 +196,82 @@
return
var/list/genitals_to_add = list()
var/list/relevent_layers = list(GENITALS_BEHIND_LAYER, GENITALS_ADJ_LAYER, GENITALS_FRONT_LAYER)
var/list/relevant_layers = list(GENITALS_BEHIND_LAYER, GENITALS_ADJ_LAYER, GENITALS_FRONT_LAYER)
var/list/standing = list()
var/size
var/size = null
H.remove_overlay(GENITALS_BEHIND_LAYER)
H.remove_overlay(GENITALS_ADJ_LAYER)
H.remove_overlay(GENITALS_FRONT_LAYER)
for(var/L in relevant_layers) //Less hardcode
H.remove_overlay(L)
if(H.disabilities & HUSK)
return
//start scanning for genitals
var/list/worn_stuff = H.get_equipped_items()//cache this list so it's not built again
if(H.is_groin_exposed(worn_stuff))
if(H.has_penis())
genitals_to_add += H.getorganslot("penis")
//ORDER is important here. Vaginas first, theoretical testes after, and penis LAST.
//The latter is always drawn on top of the former.
if(H.has_vagina())
genitals_to_add += H.getorganslot("vagina")
if(H.has_penis())
genitals_to_add += H.getorganslot("penis")
if(H.is_chest_exposed(worn_stuff))
if(H.has_breasts())
genitals_to_add += H.getorganslot("breasts")
var/image/I
//start applying overlays
for(var/layer in relevent_layers)
for(var/layer in relevant_layers)
var/layertext = genitals_layertext(layer)
for(var/obj/item/organ/genital/G in genitals_to_add)
var/datum/sprite_accessory/S
size = G.size
switch(G.type)
if(/obj/item/organ/genital/penis)
S = GLOB.cock_shapes_list[G.shape]
size = G.size
if(/obj/item/organ/genital/vagina)
S = GLOB.vagina_shapes_list[G.shape]
if(/obj/item/organ/genital/breasts)
S = GLOB.breasts_shapes_list[G.shape]
if(!S || S.icon_state == "none")
continue
var/icon_string
icon_string = "[G.slot]_[S.icon_state]_[size]_[layertext]"
if(S.alt_aroused)
G.aroused_state = H.isPercentAroused(G.aroused_amount)
else
G.aroused_state = FALSE
icon_string = "[G.slot]_[S.icon_state]_[size]_[G.aroused_state]_[layertext]"
I = image("icon" = S.icon, "icon_state" = icon_string, "layer" =- layer)
if(S.center)
I = center_image(I,S.dimension_x,S.dimension_y)
switch(S.color_src)
if("cock_color")
I.color = "#[H.dna.features["cock_color"]]"
if("breasts_color")
I.color = "#[H.dna.features["breasts_color"]]"
if(MUTCOLORS)
if(fixed_mut_color)
I.color = "#[fixed_mut_color]"
else
I.color = "#[H.dna.features["mcolor"]]"
if(MUTCOLORS2)
if(fixed_mut_color2)
I.color = "#[fixed_mut_color2]"
else
I.color = "#[H.dna.features["mcolor2"]]"
if(MUTCOLORS3)
if(fixed_mut_color3)
I.color = "#[fixed_mut_color3]"
else
I.color = "#[H.dna.features["mcolor3"]]"
if(use_skintones && H.dna.features["genitals_use_skintone"])
I.color = "#[skintone2hex(H.skin_tone)]"
else
switch(S.color_src)
if("cock_color")
I.color = "#[H.dna.features["cock_color"]]"
if("breasts_color")
I.color = "#[H.dna.features["breasts_color"]]"
if("vag_color")
I.color = "#[H.dna.features["vag_color"]]"
if(MUTCOLORS)
if(fixed_mut_color)
I.color = "#[fixed_mut_color]"
else
I.color = "#[H.dna.features["mcolor"]]"
if(MUTCOLORS2)
if(fixed_mut_color2)
I.color = "#[fixed_mut_color2]"
else
I.color = "#[H.dna.features["mcolor2"]]"
if(MUTCOLORS3)
if(fixed_mut_color3)
I.color = "#[fixed_mut_color3]"
else
I.color = "#[H.dna.features["mcolor3"]]"
standing += I
if(LAZYLEN(standing))
H.overlays_standing[layer] = standing.Copy()
standing = list()
H.apply_overlay(GENITALS_BEHIND_LAYER)
H.apply_overlay(GENITALS_ADJ_LAYER)
H.apply_overlay(GENITALS_FRONT_LAYER)
for(var/L in relevant_layers)
H.apply_overlay(L)
@@ -1,3 +1,7 @@
/datum/sprite_accessory
var/alt_aroused = FALSE //CIT CODE if this is TRUE, then the genitals will use an alternate icon_state when aroused.
//DICKS,COCKS,PENISES,WHATEVER YOU WANT TO CALL THEM
/datum/sprite_accessory/penis
icon = 'code/citadel/icons/penis_onmob.dmi'
@@ -27,69 +31,49 @@
icon_state = "tapered"
name = "Tapered"
//Vaginas
/datum/sprite_accessory/vagina
icon = 'code/citadel/icons/vagina_onmob.dmi'
icon_state = null
name = "vagina"
gender_specific = 0
color_src = "vag_color"
locked = 0
alt_aroused = FALSE //if this is TRUE, then the genitals will use an alternate sprite for aroused states
/datum/sprite_accessory/vagina/human
icon_state = "human"
name = "Human"
alt_aroused = TRUE
/datum/sprite_accessory/vagina/tentacles
icon_state = "tentacle"
name = "Tentacle"
alt_aroused = TRUE
/datum/sprite_accessory/vagina/dentata
icon_state = "dentata"
name = "Dentata"
alt_aroused = TRUE
/datum/sprite_accessory/vagina/hairy
icon_state = "hairy"
name = "Hairy"
//BREASTS BE HERE
/datum/sprite_accessory/breasts
icon = 'code/citadel/icons/breasts_onmob.dmi'
icon_state = null
name = "breasts"
gender_specific = 0
color_src = MUTCOLORS2 //I'll have skin_tone override this if the species uses them
color_src = "breasts_color"
locked = 0
/*!!ULTRACOMPRESSEDEDITION!!*/
/datum/sprite_accessory/breasts/a
icon_state = "a"
name = "A"
/datum/sprite_accessory/breasts/aa
icon_state = "a"
name = "AA"
/datum/sprite_accessory/breasts/b
icon_state = "b"
name = "B"
/datum/sprite_accessory/breasts/bb
icon_state = "b"
name = "BB"
/datum/sprite_accessory/breasts/c
icon_state = "c"
name = "C"
/datum/sprite_accessory/breasts/cc
icon_state = "c"
name = "CC"
/datum/sprite_accessory/breasts/d
icon_state = "d"
name = "D"
/datum/sprite_accessory/breasts/dd
icon_state = "d"
name = "DD"
/datum/sprite_accessory/breasts/e
icon_state = "e"
name = "E"
/datum/sprite_accessory/breasts/ee
icon_state = "e"
name = "EE"
/datum/sprite_accessory/breasts/f
icon_state = "f"
name = "F"
locked = 1
/datum/sprite_accessory/breasts/ff
icon_state = "f"
name = "FF"
locked = 1
/datum/sprite_accessory/breasts/g
icon_state = "g"
name = "G"
locked = 1
/datum/sprite_accessory/breasts/gg
icon_state = "g"
name = "GG"
locked = 1
/datum/sprite_accessory/breasts/h
icon_state = "h"
name = "H"
locked = 1
/datum/sprite_accessory/breasts/hh
icon_state = "h"
name = "HH"
locked = 1
/datum/sprite_accessory/breasts/pair
icon_state = "pair"
name = "Pair"
//OVIPOSITORS BE HERE
/datum/sprite_accessory/ovipositor
@@ -100,10 +84,6 @@
color_src = "cock_color"
locked = 0
/datum/sprite_accessory/ovipositor/knotted
icon_state = "none"
name = "None"
/datum/sprite_accessory/ovipositor/knotted
icon_state = "knotted"
name = "Knotted"
+7 -2
View File
@@ -44,12 +44,17 @@
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[length > 1 ? "es" : ""] around the shaft \
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"]]"
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)
+55 -2
View File
@@ -5,13 +5,66 @@
icon_state = "vagina"
zone = "groin"
slot = "vagina"
size = 1 //There is only 1 size right now
can_masturbate_with = 1
w_class = 3
var/wetness = 1
var/cap_length = 8//D E P T H (cap = capacity)
var/cap_girth = 12
var/cap_girth_ratio = 1.5
var/clits = 1
var/clit_diam = 0.25
var/clit_len = 0.25
var/obj/item/organ/womb/linked_womb
var/list/vag_types = list("tentacle", "dentata", "hairy")
var/obj/item/organ/genital/womb/linked_womb
/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/lowershape = lowertext(shape)
var/details
switch(lowershape)
if("tentacle")
details = "\nIts opening is lined with several tentacles and "
if("dentata")
details = "\nThere's teeth inside it and it is "
if("hairy")
details = "\nIt has quite a bit of hair growing on it and is "
if("human")
details = "\nIt is taut with smooth skin, though without much hair and "
if("gaping")
details = "\nIt is gaping slightly open, though without much hair and "
else
details = "\nIt has an exotic shape and is "
if(aroused_state)
details += "slick with female arousal."
else
details += "not very wet."
desc = "That's a [lowershape] vagina. You estimate it to be around [round(cap_length, 0.5)] inch[cap_length > 1 ? "es" : ""] deep and could stretch around something [round(cap_girth, 0.5)] inch[cap_girth > 1 ? "es" : ""] in girth. \
It has [clits > 1 ? "[clits] clits" : "a clit"] about [round(clit_len,0.25)] inch[clit_len > 1 ? "es" : ""] long and [round(clit_diam, 0.25)] inch[clit_diam > 1 ? "es" : ""] in diameter.[details]"
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["vag_color"]]"
/obj/item/organ/genital/vagina/update_link()
if(owner)
linked_womb = (owner.getorganslot("womb"))
if(linked_womb)
linked_womb.linked_vag = src
else
if(linked_womb)
linked_womb.linked_vag = null
linked_womb = null
/obj/item/organ/genital/vagina/remove_ref()
if(linked_womb)
linked_womb.linked_vag = null
linked_womb = null
+15
View File
@@ -9,5 +9,20 @@
fluid_id = "femcum"
var/obj/item/organ/genital/vagina/linked_vag
/obj/item/organ/genital/womb/update_link()
if(owner)
linked_vag = (owner.getorganslot("vagina"))
if(linked_vag)
linked_vag.linked_womb = src
else
if(linked_vag)
linked_vag.linked_womb = null
linked_vag = null
/obj/item/organ/genital/womb/remove_ref()
if(linked_vag)
linked_vag.linked_womb = null
linked_vag = null
/obj/item/organ/genital/womb/Destroy()
return ..()