diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index c71780e7e9..8a0db9ad9c 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -51,24 +51,25 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s //Human Overlays Indexes///////// //LOTS OF CIT CHANGES HERE. BE CAREFUL WHEN UPSTREAM ADDS MORE LAYERS -#define MUTATIONS_LAYER 31 //mutations. Tk headglows, cold resistance glow, etc -#define GENITALS_BEHIND_LAYER 30 //Some genitalia needs to be behind everything, such as with taurs (Taurs use body_behind_layer -#define BODY_BEHIND_LAYER 29 //certain mutantrace features (tail when looking south) that must appear behind the body parts -#define BODYPARTS_LAYER 28 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag -#define MARKING_LAYER 27 //Matrixed body markings because clashing with snouts? -#define BODY_ADJ_LAYER 26 //certain mutantrace features (snout, body markings) that must appear above the body parts -#define GENITALS_FRONT_LAYER 25 //Draws some genitalia above clothes and the TAUR body if need be. -#define BODY_LAYER 24 //underwear, undershirts, socks, eyes, lips(makeup) -#define FRONT_MUTATIONS_LAYER 23 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes) -#define DAMAGE_LAYER 22 //damage indicators (cuts and burns) -#define UNIFORM_LAYER 21 -#define ID_LAYER 20 +#define MUTATIONS_LAYER 32 //mutations. Tk headglows, cold resistance glow, etc +#define GENITALS_BEHIND_LAYER 31 //Some genitalia needs to be behind everything, such as with taurs (Taurs use body_behind_layer +#define BODY_BEHIND_LAYER 30 //certain mutantrace features (tail when looking south) that must appear behind the body parts +#define BODYPARTS_LAYER 29 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag +#define MARKING_LAYER 28 //Matrixed body markings because clashing with snouts? +#define BODY_ADJ_LAYER 27 //certain mutantrace features (snout, body markings) that must appear above the body parts +#define GENITALS_FRONT_LAYER 26 //Draws some genitalia above clothes and the TAUR body if need be. +#define BODY_LAYER 25 //underwear, undershirts, socks, eyes, lips(makeup) +#define FRONT_MUTATIONS_LAYER 24 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes) +#define DAMAGE_LAYER 23 //damage indicators (cuts and burns) +#define UNIFORM_LAYER 22 +#define ID_LAYER 21 #define HANDS_PART_LAYER 20 #define SHOES_LAYER 19 #define GLOVES_LAYER 18 #define EARS_LAYER 17 #define BODY_TAUR_LAYER 16 #define SUIT_LAYER 15 +#define GENITALS_EXPOSED_LAYER 14 #define GLASSES_LAYER 13 #define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt? #define SUIT_STORE_LAYER 11 @@ -82,7 +83,7 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s #define HANDS_LAYER 3 #define BODY_FRONT_LAYER 2 #define FIRE_LAYER 1 //If you're on fire -#define TOTAL_LAYERS 30 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_; +#define TOTAL_LAYERS 32 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_; //Human Overlay Index Shortcuts for alternate_worn_layer, layers //Because I *KNOW* somebody will think layer+1 means "above" diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index 5632aa7eef..f8e404713d 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -166,7 +166,7 @@ give_genital(/obj/item/organ/genital/womb) if(dna.features["has_balls"]) give_genital(/obj/item/organ/genital/testicles) - if(dna.features["has_breasts"]) // since we have multi-boobs as a thing, we'll want to at least draw over these. but not over the pingas. + if(dna.features["has_breasts"]) give_genital(/obj/item/organ/genital/breasts) if(dna.features["has_cock"]) give_genital(/obj/item/organ/genital/penis) @@ -183,6 +183,7 @@ G = new G G.get_features(src) G.Insert(src) + return G /obj/item/organ/genital/proc/get_features(mob/living/carbon/human/H) return @@ -191,8 +192,6 @@ switch(layer) if(GENITALS_BEHIND_LAYER) return "BEHIND" - /*if(GENITALS_ADJ_LAYER) - return "ADJ"*/ if(GENITALS_FRONT_LAYER) return "FRONT" @@ -227,14 +226,12 @@ if(!canbearoused) ADD_TRAIT(src, TRAIT_PHARMA, "pharma")//Prefs prevent unwanted organs. return - for(var/obj/item/organ/O in internal_organs) + for(var/O in internal_organs) if(istype(O, /obj/item/organ/genital)) organCheck = TRUE - if(/obj/item/organ/genital/penis) - //dna.features["has_cock"] = TRUE + if(istype(O, /obj/item/organ/genital/penis)) willyCheck = TRUE - if(/obj/item/organ/genital/breasts) - //dna.features["has_breasts"] = TRUE//Goddamnit get in there. + if(istype(O, /obj/item/organ/genital/breasts)) breastCheck = TRUE if(organCheck == FALSE) if(ishuman(src) && dna.species.id == "human") @@ -260,10 +257,7 @@ CRASH("H = null") if(!LAZYLEN(H.internal_organs) || ((NOGENITALS in species_traits) && !H.genital_override) || HAS_TRAIT(H, TRAIT_HUSK)) return - var/list/relevant_layers = list(GENITALS_BEHIND_LAYER, GENITALS_FRONT_LAYER) //GENITALS_ADJ_LAYER removed - var/list/standing = list() - var/size - var/aroused_state + var/list/relevant_layers = list(GENITALS_BEHIND_LAYER, GENITALS_FRONT_LAYER) for(var/L in relevant_layers) //Less hardcode H.remove_overlay(L) @@ -271,21 +265,25 @@ var/list/gen_index[GENITAL_LAYER_INDEX_LENGTH] var/list/genitals_to_add + var/list/fully_exposed for(var/obj/item/organ/genital/G in H.internal_organs) if(G.is_exposed()) //Checks appropriate clothing slot and if it's through_clothes LAZYADD(gen_index[G.layer_index], G) for(var/L in gen_index) if(L) //skip nulls LAZYADD(genitals_to_add, L) + if(!genitals_to_add) + return //Now we added all genitals that aren't internal and should be rendered //start applying overlays for(var/layer in relevant_layers) + var/list/standing = list() var/layertext = genitals_layertext(layer) for(var/A in genitals_to_add) var/obj/item/organ/genital/G = A var/datum/sprite_accessory/S - size = G.size - aroused_state = G.aroused_state + var/size = G.size + var/aroused_state = G.aroused_state switch(G.type) if(/obj/item/organ/genital/penis) S = GLOB.cock_shapes_list[G.shape] @@ -296,9 +294,6 @@ if(/obj/item/organ/genital/breasts) S = GLOB.breasts_shapes_list[G.shape] - - - if(!S || S.icon_state == "none") continue @@ -322,11 +317,16 @@ if("vag_color") genital_overlay.color = "#[H.dna.features["vag_color"]]" - standing += genital_overlay + if(layer == GENITALS_FRONT_LAYER && CHECK_BITFIELD(G.genital_flags, GENITAL_THROUGH_CLOTHES)) + LAZYADD(fully_exposed, genital_overlay) // to be added to a layer with higher priority than clothes, hence the name of the bitflag. + else + standing += genital_overlay if(LAZYLEN(standing)) - H.overlays_standing[layer] = standing.Copy() - standing = list() + H.overlays_standing[layer] = standing + + if(LAZYLEN(fully_exposed)) + H.overlays_standing[GENITALS_EXPOSED_LAYER] = fully_exposed for(var/L in relevant_layers) H.apply_overlay(L) diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm index 01a0e75710..a4c4e352ac 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm @@ -31,16 +31,13 @@ InverseChem = "BEsmaller" //At really impure vols, it just becomes 100% inverse can_synth = FALSE -/datum/reagent/fermi/breast_enlarger/on_mob_add(mob/living/carbon/M) +/datum/reagent/fermi/breast_enlarger/on_mob_metabolize(mob/living/M) . = ..() if(!ishuman(M)) //The monkey clause if(volume >= 15) //To prevent monkey breast farms var/turf/T = get_turf(M) var/obj/item/organ/genital/breasts/B = new /obj/item/organ/genital/breasts(T) - var/list/seen = viewers(8, T) - for(var/mob/S in seen) - to_chat(S, "A pair of breasts suddenly fly out of the [M]!") - //var/turf/T2 = pick(turf in view(5, M)) + M.visible_message("A pair of breasts suddenly fly out of the [M]!") var/T2 = get_random_station_turf() M.adjustBruteLoss(25) M.Knockdown(50) @@ -51,7 +48,7 @@ log_game("FERMICHEM: [M] ckey: [M.key] has ingested Sucubus milk") var/mob/living/carbon/human/H = M H.genital_override = TRUE - var/obj/item/organ/genital/breasts/B = H.getorganslot("breasts") + var/obj/item/organ/genital/breasts/B = H.getorganslot(ORGAN_SLOT_BREASTS) if(!B) H.emergent_genital_call() return @@ -103,7 +100,7 @@ M.adjustOxyLoss(5, 0) M.apply_damage(1, BRUTE, target) B.update() - ..() + return ..() /datum/reagent/fermi/breast_enlarger/overdose_process(mob/living/carbon/M) //Turns you into a female if male and ODing, doesn't touch nonbinary and object genders. @@ -135,7 +132,7 @@ var/obj/item/organ/genital/womb/nW = new nW.Insert(M) W = nW - ..() + return ..() /datum/reagent/fermi/BEsmaller name = "Modesty milk" @@ -159,7 +156,7 @@ return..() B.cached_size = B.cached_size - 0.05 B.update() - ..() + return ..() /datum/reagent/fermi/BEsmaller_hypo name = "Rectify milk" //Rectify @@ -171,19 +168,18 @@ var/sizeConv = list("a" = 1, "b" = 2, "c" = 3, "d" = 4, "e" = 5) can_synth = TRUE -/datum/reagent/fermi/BEsmaller_hypo/on_mob_add(mob/living/carbon/M) +/datum/reagent/fermi/BEsmaller_hypo/on_mob_metabolize(mob/living/M) . = ..() - if(!M.getorganslot("vagina")) - if(M.dna.features["has_vag"]) - var/obj/item/organ/genital/vagina/nV = new - nV.Insert(M) - if(!M.getorganslot("womb")) - if(M.dna.features["has_womb"]) - var/obj/item/organ/genital/womb/nW = new - nW.Insert(M) + if(!ishuman(M)) + return + var/mob/living/carbon/human/H = M + if(!H.getorganslot(ORGAN_SLOT_VAGINA) && H.dna.features["has_vag"]) + H.give_genital(/obj/item/organ/genital/vagina) + if(!H.getorganslot(ORGAN_SLOT_WOMB) && H.dna.features["has_womb"]) + H.give_genital(/obj/item/organ/genital/womb) /datum/reagent/fermi/BEsmaller_hypo/on_mob_life(mob/living/carbon/M) - var/obj/item/organ/genital/breasts/B = M.getorganslot("breasts") + var/obj/item/organ/genital/breasts/B = M.getorganslot(ORGAN_SLOT_BREASTS) if(!B) return..() if(!M.dna.features["has_breasts"])//Fast fix for those who don't want it. @@ -195,7 +191,7 @@ else if(B.cached_size < (sizeConv[M.dna.features["breasts_size"]])+0.1) B.cached_size = B.cached_size + 0.05 B.update() - ..() + return ..() //////////////////////////////////////////////////////////////////////////////////////////////////// // PENIS ENLARGE @@ -216,15 +212,13 @@ InverseChem = "PEsmaller" //At really impure vols, it just becomes 100% inverse and shrinks instead. can_synth = FALSE -/datum/reagent/fermi/penis_enlarger/on_mob_add(mob/living/carbon/M) +/datum/reagent/fermi/penis_enlarger/on_mob_metabolize(mob/living/M) . = ..() if(!ishuman(M)) //Just monkeying around. if(volume >= 15) //to prevent monkey penis farms var/turf/T = get_turf(M) var/obj/item/organ/genital/penis/P = new /obj/item/organ/genital/penis(T) - var/list/seen = viewers(8, T) - for(var/mob/S in seen) - to_chat(S, "A penis suddenly flies out of the [M]!") + M.visible_message("A penis suddenly flies out of the [M]!") var/T2 = get_random_station_turf() M.adjustBruteLoss(25) M.Knockdown(50) @@ -234,7 +228,7 @@ return var/mob/living/carbon/human/H = M H.genital_override = TRUE - var/obj/item/organ/genital/penis/P = M.getorganslot("penis") + var/obj/item/organ/genital/penis/P = M.getorganslot(ORGAN_SLOT_PENIS) if(!P) H.emergent_genital_call() return @@ -277,7 +271,7 @@ M.apply_damage(2.5, BRUTE, target) P.update() - ..() + return ..() /datum/reagent/fermi/penis_enlarger/overdose_process(mob/living/carbon/M) //Turns you into a male if female and ODing, doesn't touch nonbinary and object genders. //Acute hepatic pharmacokinesis. @@ -306,7 +300,7 @@ var/obj/item/organ/genital/testicles/nT = new nT.Insert(M) T = nT - ..() + return ..() /datum/reagent/fermi/PEsmaller // Due to cozmo's request...! name = "Chastity draft" @@ -342,12 +336,13 @@ metabolization_rate = 0.5 can_synth = TRUE -/datum/reagent/fermi/PEsmaller_hypo/on_mob_add(mob/living/carbon/M) +/datum/reagent/fermi/PEsmaller_hypo/on_mob_metabolize(mob/living/M) . = ..() - if(!M.getorganslot("testicles")) - if(M.dna.features["has_balls"]) - var/obj/item/organ/genital/testicles/nT = new - nT.Insert(M) + if(!ishuman(M)) + return + var/mob/living/carbon/human/H = M + if(!H.getorganslot(ORGAN_SLOT_TESTICLES) && H.dna.features["has_balls"]) + H.give_genital(/obj/item/organ/genital/testicles) /datum/reagent/fermi/PEsmaller_hypo/on_mob_life(mob/living/carbon/M) var/obj/item/organ/genital/penis/P = M.getorganslot(ORGAN_SLOT_PENIS) @@ -362,4 +357,4 @@ else if(P.cached_length < (M.dna.features["cock_length"]+0.1)) P.cached_length = P.cached_length + 0.1 P.update() - ..() + return ..()