Removes Lag (tm) (#313)
* sensible fixes * this too * some more * fixes chair icons reverted to state before tg pull * fixes telecomms icons revert to state before tg pull * fixes research icons reverted to before tg pull * de-whitewashed the stools * fixed missing broadcaster sprites * always load from the savefile helps custom servers who don't want to fuck with the config, this will never not be wanted with the system we have * stop it, ghosts * fixes limb augmentation https://github.com/tgstation/tgstation/pull/25446 * removes lag * re-adds sounds * exception * makes travis happy
This commit is contained in:
@@ -12,21 +12,22 @@
|
||||
var/amount = 2
|
||||
producing = TRUE
|
||||
|
||||
/obj/item/organ/genital/breasts/New()
|
||||
..()
|
||||
/obj/item/organ/genital/breasts/Initialize()
|
||||
create_reagents(fluid_max_volume)
|
||||
reagents.add_reagent(fluid_id, fluid_max_volume)
|
||||
update()
|
||||
|
||||
/obj/item/organ/genital/breasts/on_life()
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(!reagents || !owner)
|
||||
return
|
||||
reagents.maximum_volume = fluid_max_volume
|
||||
if(fluid_id && producing)
|
||||
generate_milk()
|
||||
|
||||
/obj/item/organ/genital/breasts/proc/generate_milk()
|
||||
if(!owner)
|
||||
return FALSE
|
||||
if(owner.stat == DEAD)
|
||||
return FALSE
|
||||
reagents.isolate_reagent(fluid_id)
|
||||
reagents.add_reagent(fluid_id, (fluid_mult * fluid_rate))
|
||||
reagents.add_reagent(fluid_id, (fluid_mult * fluid_rate))
|
||||
|
||||
@@ -13,16 +13,19 @@
|
||||
var/producing = FALSE
|
||||
|
||||
/obj/item/organ/genital/Initialize()
|
||||
..()
|
||||
reagents = create_reagents(fluid_max_volume)
|
||||
update()
|
||||
|
||||
/obj/item/organ/genital/Destroy()
|
||||
remove_ref()
|
||||
if(owner)
|
||||
Remove(owner, 1)//this should remove references to it, so it can be GCd correctly
|
||||
update_link()
|
||||
update_link()//this should remove any other links it has
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/genital/proc/update()
|
||||
if(QDELETED(src))
|
||||
return
|
||||
update_size()
|
||||
update_appearance()
|
||||
update_link()
|
||||
@@ -33,6 +36,8 @@
|
||||
|
||||
/obj/item/organ/genital/proc/update_link()
|
||||
|
||||
/obj/item/organ/genital/proc/remove_ref()
|
||||
|
||||
/obj/item/organ/genital/Insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
update()
|
||||
@@ -47,6 +52,7 @@
|
||||
var/obj/item/organ/genital/GtoClean
|
||||
for(GtoClean in internal_organs)
|
||||
qdel(GtoClean)
|
||||
|
||||
if(dna.features["has_cock"])
|
||||
give_penis()
|
||||
if(dna.features["has_balls"])
|
||||
@@ -92,7 +98,7 @@
|
||||
// T.color = skintone2hex(skin_tone)
|
||||
// else
|
||||
// T.color = "#[dna.features["balls_color"]]"
|
||||
T.size = dna.features["bals_size"]
|
||||
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"]
|
||||
@@ -101,7 +107,7 @@
|
||||
T.update()
|
||||
|
||||
/mob/living/carbon/human/proc/give_breasts()
|
||||
if(!has_dna())
|
||||
if(!dna)
|
||||
return FALSE
|
||||
if(NOGENITALS in dna.species.species_traits)
|
||||
return FALSE
|
||||
@@ -116,7 +122,7 @@
|
||||
/mob/living/carbon/human/proc/give_ovipositor()
|
||||
/mob/living/carbon/human/proc/give_eggsack()
|
||||
/mob/living/carbon/human/proc/give_vagina()
|
||||
if(!has_dna())
|
||||
if(!dna)
|
||||
return FALSE
|
||||
if(NOGENITALS in dna.species.species_traits)
|
||||
return FALSE
|
||||
@@ -126,10 +132,10 @@
|
||||
if(dna.species.use_skintones && dna.features["genitals_use_skintone"])
|
||||
V.color = skintone2hex(skin_tone)
|
||||
else
|
||||
V.color = dna.features["vag_color"]
|
||||
V.color = "[dna.features["vag_color"]]"
|
||||
V.update()
|
||||
/mob/living/carbon/human/proc/give_womb()
|
||||
if(!has_dna())
|
||||
if(!dna)
|
||||
return FALSE
|
||||
if(NOGENITALS in dna.species.species_traits)
|
||||
return FALSE
|
||||
@@ -163,19 +169,20 @@
|
||||
update_genitals()
|
||||
|
||||
/mob/living/carbon/human/proc/update_genitals()
|
||||
dna.species.handle_genitals(src)
|
||||
if(src && !QDELETED(src))
|
||||
dna.species.handle_genitals(src)
|
||||
|
||||
/datum/species/proc/handle_genitals(mob/living/carbon/human/H)
|
||||
if(!H)
|
||||
if(!H)//no args
|
||||
CRASH("H = null")
|
||||
if(!H.internal_organs.len)
|
||||
if(!LAZYLEN(H.internal_organs))//if they have no organs, we're done
|
||||
return
|
||||
if(NOGENITALS in species_traits)
|
||||
if(NOGENITALS in species_traits)//golems and such
|
||||
return
|
||||
|
||||
var/list/genitals_to_add = list()
|
||||
var/list/relevent_layers = list(GENITALS_BEHIND_LAYER, GENITALS_ADJ_LAYER, GENITALS_FRONT_LAYER)
|
||||
var/list/standing = list()
|
||||
var/list/genitals_to_add = list()
|
||||
var/list/relevent_layers = list(GENITALS_BEHIND_LAYER, GENITALS_ADJ_LAYER, GENITALS_FRONT_LAYER)
|
||||
var/list/standing = list()
|
||||
var/size
|
||||
|
||||
H.remove_overlay(GENITALS_BEHIND_LAYER)
|
||||
@@ -185,12 +192,15 @@
|
||||
if(H.disabilities & HUSK)
|
||||
return
|
||||
//start scanning for genitals
|
||||
if(H.has_penis() && H.is_groin_exposed())
|
||||
genitals_to_add += H.getorganslot("penis")
|
||||
if(H.has_breasts() && H.is_chest_exposed())
|
||||
genitals_to_add += H.getorganslot("breasts")
|
||||
if(H.has_vagina() && H.is_groin_exposed())
|
||||
genitals_to_add += H.getorganslot("vagina")
|
||||
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")
|
||||
if(H.has_vagina())
|
||||
genitals_to_add += H.getorganslot("vagina")
|
||||
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)
|
||||
@@ -230,8 +240,9 @@
|
||||
else
|
||||
I.color = "#[H.dna.features["mcolor3"]]"
|
||||
standing += I
|
||||
H.overlays_standing[layer] = standing.Copy()
|
||||
standing = list()
|
||||
if(LAZYLEN(standing))
|
||||
H.overlays_standing[layer] = standing.Copy()
|
||||
standing = list()
|
||||
|
||||
H.apply_overlay(GENITALS_BEHIND_LAYER)
|
||||
H.apply_overlay(GENITALS_ADJ_LAYER)
|
||||
|
||||
@@ -7,10 +7,6 @@
|
||||
color_src = "cock_color"
|
||||
locked = 0
|
||||
|
||||
/datum/sprite_accessory/penis/none
|
||||
icon_state = "none"
|
||||
name = "None"
|
||||
|
||||
/datum/sprite_accessory/penis/human
|
||||
icon_state = "human"
|
||||
name = "Human"
|
||||
@@ -40,9 +36,6 @@
|
||||
color_src = MUTCOLORS2 //I'll have skin_tone override this if the species uses them
|
||||
locked = 0
|
||||
/*!!ULTRACOMPRESSEDEDITION!!*/
|
||||
/datum/sprite_accessory/breasts/none
|
||||
icon_state = "none"
|
||||
name = "None"
|
||||
/datum/sprite_accessory/breasts/a
|
||||
icon_state = "a"
|
||||
name = "A"
|
||||
|
||||
@@ -13,5 +13,4 @@
|
||||
var/girth_ratio = COCK_GIRTH_RATIO_DEF //citadel_defines.dm for these defines
|
||||
var/knot_girth_ratio = KNOT_GIRTH_RATIO_DEF
|
||||
var/list/oviflags = list()
|
||||
|
||||
var/obj/item/organ/eggsack/linked_eggsack
|
||||
|
||||
@@ -9,43 +9,47 @@
|
||||
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("", "barbknot")
|
||||
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()
|
||||
update_size()
|
||||
update_appearance()
|
||||
update_link()
|
||||
|
||||
/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 12)
|
||||
size = 3//no new sprites for anything larger
|
||||
if(9 to 15)
|
||||
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
|
||||
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)
|
||||
// name = "[shape] penis"
|
||||
desc = "That's a [lowertext(shape)] 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)
|
||||
return
|
||||
color = "#[owner.dna.features["cock_color"]]"
|
||||
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[length > 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)
|
||||
@@ -56,3 +60,8 @@
|
||||
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
|
||||
|
||||
@@ -20,24 +20,19 @@
|
||||
update()
|
||||
|
||||
/obj/item/organ/genital/testicles/on_life()
|
||||
if(fluid_id && producing)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(reagents && producing)
|
||||
generate_cum()
|
||||
|
||||
/obj/item/organ/genital/testicles/proc/generate_cum()
|
||||
reagents.maximum_volume = fluid_max_volume
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
if(sent_full_message < 0)
|
||||
if(!sent_full_message)
|
||||
send_full_message()
|
||||
sent_full_message = 1
|
||||
return FALSE
|
||||
sent_full_message = 0
|
||||
if(!owner && linked_penis)
|
||||
if(linked_penis.linked_balls == src)
|
||||
linked_penis.linked_balls = null
|
||||
linked_penis = null
|
||||
return FALSE
|
||||
if(!reagents)
|
||||
create_reagents(fluid_max_volume)
|
||||
update_link()
|
||||
if(!linked_penis)
|
||||
return FALSE
|
||||
@@ -45,12 +40,13 @@
|
||||
reagents.add_reagent(fluid_id, (fluid_mult * fluid_rate))//generate the cum
|
||||
|
||||
/obj/item/organ/genital/testicles/update_link()
|
||||
if(owner)
|
||||
if(owner && !QDELETED(src))
|
||||
linked_penis = (owner.getorganslot("penis"))
|
||||
if(linked_penis)
|
||||
linked_penis.linked_balls = src
|
||||
else if(linked_penis != null)
|
||||
linked_penis.linked_balls = null
|
||||
else
|
||||
if(linked_penis)
|
||||
linked_penis.linked_balls = null
|
||||
linked_penis = null
|
||||
|
||||
/obj/item/organ/genital/testicles/proc/send_full_message(msg = "Your balls finally feel full, again.")
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
can_masturbate_with = 1
|
||||
w_class = 3
|
||||
var/wetness = 1
|
||||
var/capacity_length = 8//D E P T H
|
||||
var/capacity_girth = 8
|
||||
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
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
/obj/item/organ/genital/womb
|
||||
name = "womb"
|
||||
desc = "A female reproductive organ."
|
||||
icon = 'code/citadel/icons/vagina.dmi'
|
||||
icon_state = "womb"
|
||||
zone = "groin"
|
||||
slot = "womb"
|
||||
w_class = 3
|
||||
fluid_id = "femcum"
|
||||
var/obj/item/organ/genital/vagina/linked_vag
|
||||
|
||||
/obj/item/organ/genital/womb/Destroy()
|
||||
return ..()
|
||||
Reference in New Issue
Block a user