diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index 785dd15417..53e3723912 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -67,27 +67,6 @@ #define BREASTS_VOLUME_BASE 50 //base volume for the reagents in the breasts, multiplied by the size then multiplier. 50u for A cups, 850u for HH cups. #define BREASTS_VOLUME_MULT 1 //global multiplier for breast volume. -#define BREASTS_SIZE_FLAT 0 -#define BREASTS_SIZE_A 1 -#define BREASTS_SIZE_AA 1.5 -#define BREASTS_SIZE_B 2 -#define BREASTS_SIZE_BB 2.5 -#define BREASTS_SIZE_C 3 -#define BREASTS_SIZE_CC 3.5 -#define BREASTS_SIZE_D 4 -#define BREASTS_SIZE_DD 4.5 -#define BREASTS_SIZE_E 5 -#define BREASTS_SIZE_EE 5.5 -#define BREASTS_SIZE_F 6 -#define BREASTS_SIZE_FF 6.5 -#define BREASTS_SIZE_G 7 -#define BREASTS_SIZE_GG 7.5//Are these even real sizes? The world may never know because cup sizes make no fucking sense. -#define BREASTS_SIZE_H 8 -#define BREASTS_SIZE_HH 8.5//Largest size, ever. For now. - -#define BREASTS_SIZE_MIN BREASTS_SIZE_A -#define BREASTS_SIZE_DEF BREASTS_SIZE_C -#define BREASTS_SIZE_MAX BREASTS_SIZE_HH #define MILK_RATE 5 #define MILK_RATE_MULT 1 diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index 3cd64af8c7..05309333af 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -72,6 +72,9 @@ #define STATUS_EFFECT_ICHORIAL_STAIN /datum/status_effect/ichorial_stain //Prevents a servant from being revived by vitality matrices for one minute. +#define STATUS_EFFECT_BREASTS_ENLARGEMENT /datum/status_effect/chem/breast_enlarger //Applied slowdown due to the ominous bulk. + +#define STATUS_EFFECT_PENIS_ENLARGEMENT //More applied slowdown, just like the above. ///////////// // NEUTRAL // ///////////// diff --git a/code/game/objects/items/devices/compressionkit.dm b/code/game/objects/items/devices/compressionkit.dm index 5ac958328d..a5a9377690 100644 --- a/code/game/objects/items/devices/compressionkit.dm +++ b/code/game/objects/items/devices/compressionkit.dm @@ -89,30 +89,23 @@ else to_chat(user, "Anomalous error. Summon a coder.") - if(istype(target, /mob/living)) - var/mob/living/victim = target - if(istype(victim, /mob/living/carbon/human)) - if(user.zone_selected == "groin") // pp smol. There's probably a smarter way to do this but im retarded. If you have a simpler method let me know. - var/list/organs = victim.getorganszone("groin") - for(var/internal_organ in organs) - if(istype(internal_organ, /obj/item/organ/genital/penis)) - var/obj/item/organ/genital/penis/O = internal_organ - playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 1) - victim.visible_message("[user] is preparing to shrink [victim]\'s [O.name] with their bluespace compression kit!") - if(do_mob(user, victim, 40) && charges > 0 && O.length > 0) - victim.visible_message("[user] has shrunk [victim]\'s [O.name]!") - playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 50, 1) - sparks() - flash_lighting_fx(3, 3, LIGHT_COLOR_CYAN) - charges -= 1 - O.length -= 5 - if(O.length < 1) - victim.visible_message("[user]\'s [O.name] vanishes!") - qdel(O) // no pp for you - else - O.update_size() - O.update_appearance() - + else if(ishuman(target) && user.zone_selected == BODY_ZONE_PRECISE_GROIN) + var/mob/living/carbon/human/H = target + var/obj/item/organ/genital/penis/P = H.getorganslot(ORGAN_SLOT_PENIS) + if(!P) + return + playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 1) + H.visible_message("[user] is preparing to shrink [H]\'s [P.name] with their bluespace compression kit!") + if(do_mob(user, H, 40) && charges > 0 && P.length > 0) + H.visible_message("[user] has shrunk [H]\'s [P.name]!") + playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 50, 1) + sparks() + flash_lighting_fx(3, 3, LIGHT_COLOR_CYAN) + charges -= 1 + var/p_name = P.name + P.modify_size(-5) + if(QDELETED(P)) + H.visible_message("[H]\'s [p_name] vanishes!") /obj/item/compressionkit/attackby(obj/item/I, mob/user, params) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 2f7a8652ba..669ac602dc 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1965,24 +1965,6 @@ M.emote("nya") ..() -//Kept for legacy, I think it will break everything if you enable it. -/datum/reagent/penis_enlargement - name = "Penis Enlargement" - id = "penis_enlargement" - description = "A patented chemical forumula by Doctor Ronald Hyatt that is guaranteed to bring maximum GROWTH and LENGTH to your penis, today!" - color = "#888888" - taste_description = "chinese dragon powder" - metabolization_rate = INFINITY //So it instantly removes all of itself. Don't want to put strain on the system. - -/datum/reagent/penis_enlargement/on_mob_life(mob/living/carbon/C) - var/obj/item/organ/genital/penis/P = C.getorganslot(ORGAN_SLOT_PENIS) - if(P) - var/added_length = round(volume/30,0.01) //Every 30u gives an extra inch. Rounded to the nearest 0.01 so float fuckery doesn't occur with the division by 30. - if(added_length >= 0.20) //Only add the length if it's greater than or equal to 0.2. This is to prevent people from smoking the reagents and causing the penis to update constantly. - P.length += added_length - P.update() - ..() - /datum/reagent/changeling_string name = "UNKNOWN" id = "changeling_sting_real" diff --git a/modular_citadel/code/datums/status_effects/chems.dm b/modular_citadel/code/datums/status_effects/chems.dm index 4bc83d2af6..a14c490999 100644 --- a/modular_citadel/code/datums/status_effects/chems.dm +++ b/modular_citadel/code/datums/status_effects/chems.dm @@ -37,64 +37,62 @@ alert_type = null var/moveCalc = 1 var/cachedmoveCalc = 1 + var/last_checked_size //used to prevent potential cpu waste from happening every tick. -/datum/status_effect/chem/breast_enlarger/on_apply(mob/living/carbon/human/H)//Removes clothes, they're too small to contain you. You belong to space now. +/datum/status_effect/chem/breast_enlarger/on_apply()//Removes clothes, they're too small to contain you. You belong to space now. log_game("FERMICHEM: [owner]'s breasts has reached comical sizes. ID: [owner.key]") - var/mob/living/carbon/human/o = owner - var/items = o.get_contents() - for(var/obj/item/W in items) - if(W == o.w_uniform || W == o.wear_suit) - o.dropItemToGround(W, TRUE) - playsound(o.loc, 'sound/items/poster_ripped.ogg', 50, 1) - to_chat(o, "Your clothes give, ripping into peices under the strain of your swelling breasts! Unless you manage to reduce the size of your breasts, there's no way you're going to be able to put anything on over these melons..!") - o.visible_message("[o]'s chest suddenly bursts forth, ripping their clothes off!'") - else - to_chat(o, "Your bountiful bosom is so rich with mass, you seriously doubt you'll be able to fit any clothes over it.") - return ..() + var/mob/living/carbon/human/H = owner + var/message = FALSE + if(H.w_uniform) + H.dropItemToGround(H.w_uniform, TRUE) + message = TRUE + if(H.wear_suit) + H.dropItemToGround(H.wear_suit, TRUE) + message = TRUE + if(message) + playsound(H.loc, 'sound/items/poster_ripped.ogg', 50, 1) + H.visible_message("[H]'s chest suddenly bursts forth, ripping their clothes off!'", \ + "Your clothes give, ripping into peices under the strain of your swelling breasts! Unless you manage to reduce the size of your breasts, there's no way you're going to be able to put anything on over these melons..!") + else + to_chat(H, "Your bountiful bosom is so rich with mass, you seriously doubt you'll be able to fit any clothes over it.") + return ..() -/datum/status_effect/chem/breast_enlarger/tick(mob/living/carbon/human/H)//If you try to wear clothes, you fail. Slows you down if you're comically huge - var/mob/living/carbon/human/o = owner - var/obj/item/organ/genital/breasts/B = o.getorganslot("breasts") - moveCalc = 1+((round(B.cached_size) - 9)/3) //Afffects how fast you move, and how often you can click. +/datum/status_effect/chem/breast_enlarger/tick()//If you try to wear clothes, you fail. Slows you down if you're comically huge + var/mob/living/carbon/human/H = owner + var/obj/item/organ/genital/breasts/B = H.getorganslot(ORGAN_SLOT_BREASTS) if(!B) - o.remove_movespeed_modifier(BREAST_MOVEMENT_SPEED) - sizeMoveMod(1) - owner.remove_status_effect(src) - var/items = o.get_contents() - for(var/obj/item/W in items) - if(W == o.w_uniform || W == o.wear_suit) - o.dropItemToGround(W, TRUE) - playsound(o.loc, 'sound/items/poster_ripped.ogg', 50, 1) - to_chat(owner, "Your enormous breasts are way too large to fit anything over them!") + H.remove_status_effect(src) + return + moveCalc = 1+((round(B.cached_size) - 9)/3) //Afffects how fast you move, and how often you can click. + var/message = FALSE + if(H.w_uniform) + H.dropItemToGround(H.w_uniform, TRUE) + message = TRUE + if(H.wear_suit) + H.dropItemToGround(H.wear_suit, TRUE) + message = TRUE + if(message) + playsound(H.loc, 'sound/items/poster_ripped.ogg', 50, 1) + to_chat(H, "Your enormous breasts are way too large to fit anything over them!") + + if(last_checked_size != B.cached_size) + H.add_movespeed_modifier(BREAST_MOVEMENT_SPEED, TRUE, 100, NONE, override = TRUE, multiplicative_slowdown = moveCalc) + sizeMoveMod(moveCalc) + if (B.size == "huge") if(prob(1)) to_chat(owner, "Your back is feeling sore.") - var/target = o.get_bodypart(BODY_ZONE_CHEST) - o.apply_damage(0.1, BRUTE, target) - if(!B.cached_size == B.breast_values[B.prev_size]) - o.add_movespeed_modifier(BREAST_MOVEMENT_SPEED, TRUE, 100, NONE, override = TRUE, multiplicative_slowdown = moveCalc) - sizeMoveMod(moveCalc) - return ..() - else if (B.breast_values[B.size] > B.breast_values[B.prev_size]) - o.add_movespeed_modifier(BREAST_MOVEMENT_SPEED, TRUE, 100, NONE, override = TRUE, multiplicative_slowdown = moveCalc) - sizeMoveMod(moveCalc) - else if (B.breast_values[B.size] < B.breast_values[B.prev_size]) - o.add_movespeed_modifier(BREAST_MOVEMENT_SPEED, TRUE, 100, NONE, override = TRUE, multiplicative_slowdown = moveCalc) - sizeMoveMod(moveCalc) - if((B.cached_size) < 16) - switch(round(B.cached_size)) - if(9) - if (B.breast_values[B.prev_size] != B.breast_values[B.size]) - to_chat(o, "Your expansive chest has become a more managable size, liberating your movements.") - if(10 to INFINITY) - if (B.breast_values[B.prev_size] != B.breast_values[B.size]) - to_chat(H, "Your indulgent busom is so substantial, it's affecting your movements!") + var/target = H.get_bodypart(BODY_ZONE_CHEST) + H.apply_damage(0.1, BRUTE, target) + else if(prob(1)) - to_chat(owner, "Your back is feeling a little sore.") - ..() + to_chat(H, "Your back is feeling a little sore.") + last_checked_size = B.cached_size + ..() -/datum/status_effect/chem/breast_enlarger/on_remove(mob/living/carbon/M) +/datum/status_effect/chem/breast_enlarger/on_remove() log_game("FERMICHEM: [owner]'s breasts has reduced to an acceptable size. ID: [owner.key]") + to_chat(owner, "Your expansive chest has become a more managable size, liberating your movements.") owner.remove_movespeed_modifier(BREAST_MOVEMENT_SPEED) sizeMoveMod(1) @@ -112,51 +110,57 @@ alert_type = null var/bloodCalc var/moveCalc + var/last_checked_size //used to prevent potential cpu waste, just like the above. -/datum/status_effect/chem/penis_enlarger/on_apply(mob/living/carbon/human/H)//Removes clothes, they're too small to contain you. You belong to space now. +/datum/status_effect/chem/penis_enlarger/on_apply()//Removes clothes, they're too small to contain you. You belong to space now. log_game("FERMICHEM: [owner]'s dick has reached comical sizes. ID: [owner.key]") - var/mob/living/carbon/human/o = owner - var/items = o.get_contents() - if(o.w_uniform || o.wear_suit) - to_chat(o, "Your clothes give, ripping into peices under the strain of your swelling pecker! Unless you manage to reduce the size of your emancipated trouser snake, there's no way you're going to be able to put anything on over this girth..!") - owner.visible_message("[o]'s schlong suddenly bursts forth, ripping their clothes off!'") + var/mob/living/carbon/human/H = owner + var/message = FALSE + if(H.w_uniform) + H.dropItemToGround(H.w_uniform, TRUE) + message = TRUE + if(H.wear_suit) + H.dropItemToGround(H.wear_suit, TRUE) + message = TRUE + if(message) + playsound(H.loc, 'sound/items/poster_ripped.ogg', 50, 1) + H.visible_message("[H]'s schlong suddenly bursts forth, ripping their clothes off!'", \ + "Your clothes give, ripping into peices under the strain of your swelling pecker! Unless you manage to reduce the size of your emancipated trouser snake, there's no way you're going to be able to put anything on over this girth..!") else - to_chat(o, "Your emancipated trouser snake is so ripe with girth, you seriously doubt you'll be able to fit any clothes over it.") - for(var/obj/item/W in items) - if(W == o.w_uniform || W == o.wear_suit) - o.dropItemToGround(W, TRUE) - playsound(o.loc, 'sound/items/poster_ripped.ogg', 50, 1) + to_chat(H, "Your emancipated trouser snake is so ripe with girth, you seriously doubt you'll be able to fit any clothes over it.") return ..() -/datum/status_effect/chem/penis_enlarger/tick(mob/living/carbon/M) - var/mob/living/carbon/human/o = owner - var/obj/item/organ/genital/penis/P = o.getorganslot("penis") +/datum/status_effect/chem/penis_enlarger/tick() + var/mob/living/carbon/human/H = owner + var/obj/item/organ/genital/penis/P = H.getorganslot(ORGAN_SLOT_PENIS) + if(!P) + owner.remove_status_effect(src) + return moveCalc = 1+((round(P.length) - 21)/3) //effects how fast you can move bloodCalc = 1+((round(P.length) - 21)/15) //effects how much blood you need (I didn' bother adding an arousal check because I'm spending too much time on this organ already.) - if(!P) - o.remove_movespeed_modifier(DICK_MOVEMENT_SPEED) - o.ResetBloodVol() - owner.remove_status_effect(src) - var/items = o.get_contents() - for(var/obj/item/W in items) - if(W == o.w_uniform || W == o.wear_suit) - o.dropItemToGround(W, TRUE) - playsound(o.loc, 'sound/items/poster_ripped.ogg', 50, 1) - to_chat(owner, "Your enormous package is way to large to fit anything over!") - switch(round(P.cached_length)) - if(21) - to_chat(o, "Your rascally willy has become a more managable size, liberating your movements.") - o.remove_movespeed_modifier(DICK_MOVEMENT_SPEED) - o.AdjustBloodVol(bloodCalc) - if(22 to INFINITY) - if(prob(2)) - to_chat(o, "Your indulgent johnson is so substantial, it's taking all your blood and affecting your movements!") - o.add_movespeed_modifier(DICK_MOVEMENT_SPEED, TRUE, 100, NONE, override = TRUE, multiplicative_slowdown = moveCalc) - o.AdjustBloodVol(bloodCalc) + + var/message = FALSE + if(H.w_uniform) + H.dropItemToGround(H.w_uniform, TRUE) + message = TRUE + if(H.wear_suit) + H.dropItemToGround(H.wear_suit, TRUE) + message = TRUE + if(message) + playsound(H.loc, 'sound/items/poster_ripped.ogg', 50, 1) + to_chat(H, "Your enormous package is way to large to fit anything over!") + + if(P.length < 22 && H.has_movespeed_modifier(DICK_MOVEMENT_SPEED)) + to_chat(owner, "Your rascally willy has become a more managable size, liberating your movements.") + H.remove_movespeed_modifier(DICK_MOVEMENT_SPEED) + else if(P.length >= 22 && !H.has_movespeed_modifier(DICK_MOVEMENT_SPEED)) + to_chat(H, "Your indulgent johnson is so substantial, it's taking all your blood and affecting your movements!") + H.add_movespeed_modifier(DICK_MOVEMENT_SPEED, TRUE, 100, NONE, override = TRUE, multiplicative_slowdown = moveCalc) + H.AdjustBloodVol(bloodCalc) ..() -/datum/status_effect/chem/penis_enlarger/on_remove(mob/living/carbon/human/o) +/datum/status_effect/chem/penis_enlarger/on_remove() log_game("FERMICHEM: [owner]'s dick has reduced to an acceptable size. ID: [owner.key]") owner.remove_movespeed_modifier(DICK_MOVEMENT_SPEED) owner.ResetBloodVol() diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index 7b3b637e26..593874496a 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -105,6 +105,9 @@ picked_organ.toggle_visibility(picked_visibility) return +/obj/item/organ/genital/proc/modify_size(modifier, min = -INFINITY, max = INFINITY) + return + /obj/item/organ/genital/proc/update_size() return @@ -215,34 +218,23 @@ if(!QDELETED(src)) dna.species.handle_genitals(src) -//fermichem procs -/mob/living/carbon/human/proc/Force_update_genitals(mob/living/carbon/human/H) //called in fermiChem - dna.species.handle_genitals(src)//should work. - //dna.species.handle_breasts(src) - //Checks to see if organs are new on the mob, and changes their colours so that they don't get crazy colours. /mob/living/carbon/human/proc/emergent_genital_call() - var/organCheck = FALSE - var/breastCheck = FALSE - var/willyCheck = FALSE if(!canbearoused) - ADD_TRAIT(src, TRAIT_PHARMA, "pharma")//Prefs prevent unwanted organs. - return - for(var/O in internal_organs) - if(istype(O, /obj/item/organ/genital)) - organCheck = TRUE - if(istype(O, /obj/item/organ/genital/penis)) - willyCheck = TRUE - if(istype(O, /obj/item/organ/genital/breasts)) - breastCheck = TRUE + return FALSE + + var/organCheck = locate(/obj/item/organ/genital) in internal_organs + var/breastCheck = getorganslot(ORGAN_SLOT_BREASTS) + var/willyCheck = getorganslot(ORGAN_SLOT_PENIS) + if(organCheck == FALSE) if(ishuman(src) && dna.species.id == "human") dna.features["genitals_use_skintone"] = TRUE dna.species.use_skintones = TRUE if(MUTCOLORS) if(src.dna.species.fixed_mut_color) - dna.features["cock_color"] = "[src.dna.species.fixed_mut_color]" - dna.features["breasts_color"] = "[src.dna.species.fixed_mut_color]" + dna.features["cock_color"] = "[dna.species.fixed_mut_color]" + dna.features["breasts_color"] = "[dna.species.fixed_mut_color]" return //So people who haven't set stuff up don't get rainbow surprises. dna.features["cock_color"] = "[dna.features["mcolor"]]" @@ -252,7 +244,7 @@ dna.features["breasts_color"] = dna.features["cock_color"] else if (willyCheck == FALSE) dna.features["cock_color"] = dna.features["breasts_color"] - return + return TRUE /datum/species/proc/handle_genitals(mob/living/carbon/human/H)//more like handle sadness if(!H)//no args @@ -263,6 +255,7 @@ for(var/L in relevant_layers) //Less hardcode H.remove_overlay(L) + H.remove_overlay(GENITALS_EXPOSED_LAYER) //start scanning for genitals var/list/gen_index[GENITAL_LAYER_INDEX_LENGTH] @@ -329,6 +322,7 @@ if(LAZYLEN(fully_exposed)) H.overlays_standing[GENITALS_EXPOSED_LAYER] = fully_exposed + H.apply_overlay(GENITALS_EXPOSED_LAYER) for(var/L in relevant_layers) H.apply_overlay(L) diff --git a/modular_citadel/code/modules/arousal/organs/breasts.dm b/modular_citadel/code/modules/arousal/organs/breasts.dm index 08b99eabfa..fe502ab66e 100644 --- a/modular_citadel/code/modules/arousal/organs/breasts.dm +++ b/modular_citadel/code/modules/arousal/organs/breasts.dm @@ -5,22 +5,21 @@ icon = 'modular_citadel/icons/obj/genitals/breasts.dmi' zone = BODY_ZONE_CHEST slot = ORGAN_SLOT_BREASTS - size = BREASTS_SIZE_DEF + size = "c" //refer to the breast_values static list below for the cups associated number values fluid_id = "milk" shape = "pair" genital_flags = CAN_MASTURBATE_WITH|CAN_CLIMAX_WITH|GENITAL_FUID_PRODUCTION masturbation_verb = "massage" orgasm_verb = "leaking" fluid_transfer_factor = 0.5 - var/list/static/breast_values = list("a" = 1, "b" = 2, "c" = 3, "d" = 4, "e" = 5, "f" = 6, "g" = 7, "h" = 8, "i" = 9, "j" = 10, "k" = 11, "l" = 12, "m" = 13, "n" = 14, "o" = 15, "huge" = 16, "flat" = 0) - var/cached_size //for enlargement SHOULD BE A NUMBER - var/prev_size //For flavour texts SHOULD BE A LETTER + var/static/list/breast_values = list("a" = 1, "b" = 2, "c" = 3, "d" = 4, "e" = 5, "f" = 6, "g" = 7, "h" = 8, "i" = 9, "j" = 10, "k" = 11, "l" = 12, "m" = 13, "n" = 14, "o" = 15, "huge" = 16, "flat" = 0) + var/cached_size //these two vars pertain size modifications and so should be expressed in NUMBERS. + var/prev_size //former cached_size value, to allow update_size() to early return should be there no significant changes. /obj/item/organ/genital/breasts/Initialize(mapload, mob/living/carbon/human/H) if(!H) - cached_size = size - size = breast_values[size] - prev_size = size + cached_size = breast_values[size] + prev_size = cached_size return ..() /obj/item/organ/genital/breasts/update_appearance() @@ -67,41 +66,47 @@ //Rediculous sizes makes you more cumbersome. //this is far too lewd wah +/obj/item/organ/genital/breasts/modify_size(modifier, min = -INFINITY, max = INFINITY) + var/new_value = CLAMP(cached_size + modifier, min, max) + if(new_value == prev_size) + return + prev_size = cached_size + cached_size = new_value + update() + /obj/item/organ/genital/breasts/update_size()//wah + var/rounded_cached = round(cached_size) if(cached_size < 0)//I don't actually know what round() does to negative numbers, so to be safe!!fixed if(owner) to_chat(owner, "You feel your breasts shrinking away from your body as your chest flattens out.") QDEL_IN(src, 1) return var/enlargement = FALSE - switch(round(cached_size)) + switch(rounded_cached) if(0) //flatchested size = "flat" if(1 to 8) //modest - size = breast_values[round(cached_size)] + size = breast_values[rounded_cached] if(9 to 15) //massive - size = breast_values[round(cached_size)] + size = breast_values[rounded_cached] enlargement = TRUE if(16 to INFINITY) //rediculous size = "huge" enlargement = TRUE if(owner) - var/status_effect = owner.has_status_effect(/datum/status_effect/chem/breast_enlarger) + var/status_effect = owner.has_status_effect(STATUS_EFFECT_BREASTS_ENLARGEMENT) if(enlargement && !status_effect) - owner.apply_status_effect(/datum/status_effect/chem/breast_enlarger) + owner.apply_status_effect(STATUS_EFFECT_BREASTS_ENLARGEMENT) else if(status_effect) - owner.remove_status_effect(/datum/status_effect/chem/breast_enlarger) + owner.remove_status_effect(STATUS_EFFECT_BREASTS_ENLARGEMENT) - if(round(cached_size) < 16)//Because byond doesn't count from 0, I have to do this. - if(owner) - var/mob/living/carbon/human/H = owner - if (breast_values[size] > breast_values[prev_size]) - to_chat(H, "Your breasts [pick("swell up to", "flourish into", "expand into", "burst forth into", "grow eagerly into", "amplify into")] a [uppertext(size)]-cup.") - H.dna.species.handle_genitals(src) - else if (breast_values[size] > 0.5) - to_chat(H, "Your breasts [pick("shrink down to", "decrease into", "diminish into", "deflate into", "shrivel regretfully into", "contracts into")] a [uppertext(size)]-cup.") - H.dna.species.handle_genitals(src) - prev_size = size + if(rounded_cached < 16 && owner)//Because byond doesn't count from 0, I have to do this. + var/mob/living/carbon/human/H = owner + var/r_prev_size = round(prev_size) + if (rounded_cached > r_prev_size) + to_chat(H, "Your breasts [pick("swell up to", "flourish into", "expand into", "burst forth into", "grow eagerly into", "amplify into")] a [uppertext(size)]-cup.") + else if (rounded_cached < r_prev_size) + to_chat(H, "Your breasts [pick("shrink down to", "decrease into", "diminish into", "deflate into", "shrivel regretfully into", "contracts into")] a [uppertext(size)]-cup.") /obj/item/organ/genital/breasts/get_features(mob/living/carbon/human/H) var/datum/dna/D = H.dna @@ -112,15 +117,11 @@ size = D.features["breasts_size"] shape = D.features["breasts_shape"] fluid_id = D.features["breasts_fluid"] + if(!D.features["breasts_producing"]) + DISABLE_BITFIELD(genital_flags, GENITAL_FUID_PRODUCTION) if(!isnum(size)) - if(size == "flat") - cached_size = 0 - else if (size == "huge") - cached_size = 16 - else - cached_size = breast_values[size] - prev_size = size + cached_size = breast_values[size] else cached_size = size size = breast_values[size] - prev_size = size + prev_size = cached_size diff --git a/modular_citadel/code/modules/arousal/organs/penis.dm b/modular_citadel/code/modules/arousal/organs/penis.dm index c79a522405..5df9f30fdd 100644 --- a/modular_citadel/code/modules/arousal/organs/penis.dm +++ b/modular_citadel/code/modules/arousal/organs/penis.dm @@ -12,42 +12,47 @@ layer_index = PENIS_LAYER_INDEX var/length = 6 //inches var/prev_length = 6 //really should be renamed to prev_length - var/cached_length //used to detect a change in length var/girth = 4.38 var/girth_ratio = COCK_GIRTH_RATIO_DEF //0.73; check citadel_defines.dm - var/knot_girth_ratio = KNOT_GIRTH_RATIO_DEF - var/list/knotted_types = list("knotted", "barbed, knotted") + +/obj/item/organ/genital/penis/modify_size(modifier, min = -INFINITY, max = INFINITY) + var/new_value = CLAMP(length + modifier, min, max) + if(new_value == prev_length) + return + prev_length = length + length = CLAMP(length + modifier, min, max) + update() /obj/item/organ/genital/penis/update_size() - if(cached_length < 0)//I don't actually know what round() does to negative numbers, so to be safe!! + if(length < 0)//I don't actually know what round() does to negative numbers, so to be safe!! if(owner) to_chat(owner, "You feel your tallywacker shrinking away from your body as your groin flattens out!") QDEL_IN(src, 1) if(linked_organ) QDEL_IN(linked_organ, 1) return + var/rounded_length = round(length) var/new_size var/enlargement = FALSE - switch(round(cached_length)) + switch(rounded_length) if(0 to 6) //If modest size new_size = 1 if(7 to 10) //If large - size = 2 + new_size = 2 if(11 to 19) //If massive - size = 3 + new_size = 3 if(20 to 34) //If massive and due for large effects - size = 3 + new_size = 3 enlargement = TRUE if(35 to INFINITY) //If comical - size = 4 //no new sprites for anything larger yet + new_size = 4 //no new sprites for anything larger yet enlargement = TRUE - length = cached_length if(owner) - var/status_effect = owner.has_status_effect(/datum/status_effect/chem/penis_enlarger) + var/status_effect = owner.has_status_effect(STATUS_EFFECT_PENIS_ENLARGEMENT) if(enlargement && !status_effect) - owner.apply_status_effect(/datum/status_effect/chem/penis_enlarger) + owner.apply_status_effect(STATUS_EFFECT_PENIS_ENLARGEMENT) else if(status_effect) - owner.remove_status_effect(/datum/status_effect/chem/penis_enlarger) + owner.remove_status_effect(STATUS_EFFECT_PENIS_ENLARGEMENT) if(linked_organ) linked_organ.update_size(new_size - size) size = new_size @@ -57,7 +62,6 @@ to_chat(owner, "Your [pick(GLOB.gentlemans_organ_names)] [pick("swells up to", "flourishes into", "expands into", "bursts forth into", "grows eagerly into", "amplifys into")] a [uppertext(round(length))] inch penis.") else if ((round(length) < round(prev_length)) && (length > 0.5)) to_chat(owner, "Your [pick(GLOB.gentlemans_organ_names)] [pick("shrinks down to", "decreases into", "diminishes into", "deflates into", "shrivels regretfully into", "contracts into")] a [uppertext(round(length))] inch penis.") - prev_length = length icon_state = sanitize_text("penis_[shape]_[size]") girth = (length * girth_ratio)//Is it just me or is this ludicous, why not make it exponentially decay? @@ -92,4 +96,3 @@ girth_ratio = D.features["cock_girth_ratio"] shape = D.features["cock_shape"] prev_length = length - cached_length = length diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm index 87e1567eda..d6e0297581 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm @@ -30,6 +30,7 @@ InverseChemVal = 0.35 InverseChem = "BEsmaller" //At really impure vols, it just becomes 100% inverse can_synth = FALSE + var/message_spam = FALSE /datum/reagent/fermi/breast_enlarger/on_mob_metabolize(mob/living/M) . = ..() @@ -45,13 +46,9 @@ B.throw_at(T2, 8, 1) M.reagents.remove_reagent(id, volume) return - 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(ORGAN_SLOT_BREASTS) - if(!B) - H.emergent_genital_call() - return + if(!H.getorganslot(ORGAN_SLOT_BREASTS) && H.emergent_genital_call()) + H.genital_override = TRUE /datum/reagent/fermi/breast_enlarger/on_mob_life(mob/living/carbon/M) //Increases breast size if(!ishuman(M))//Just in case @@ -62,46 +59,45 @@ if(!B) //If they don't have breasts, give them breasts. //If they have Acute hepatic pharmacokinesis, then route processing though liver. - if(HAS_TRAIT(M, TRAIT_PHARMA)) - var/obj/item/organ/liver/L = M.getorganslot(ORGAN_SLOT_LIVER) + if(HAS_TRAIT(H, TRAIT_PHARMA) || !H.canbearoused) + var/obj/item/organ/liver/L = H.getorganslot(ORGAN_SLOT_LIVER) if(L) - L.swelling+= 0.05 - return..() + L.swelling += 0.05 else - M.adjustToxLoss(1) - return..() + H.adjustToxLoss(1) + return..() //otherwise proceed as normal - var/obj/item/organ/genital/breasts/nB = new - nB.Insert(M) - if(nB) - if(M.dna.species.use_skintones && M.dna.features["genitals_use_skintone"]) - nB.color = skintone2hex(H.skin_tone) - else if(M.dna.features["breasts_color"]) - nB.color = "#[M.dna.features["breasts_color"]]" - else - nB.color = skintone2hex(H.skin_tone) - nB.size = "flat" - nB.cached_size = 0 - nB.prev_size = "flat" - to_chat(M, "Your chest feels warm, tingling with newfound sensitivity.") - M.reagents.remove_reagent(id, 5) - B = nB + B = new + if(H.dna.species.use_skintones && H.dna.features["genitals_use_skintone"]) + B.color = skintone2hex(H.skin_tone) + else if(M.dna.features["breasts_color"]) + B.color = "#[M.dna.features["breasts_color"]]" + else + B.color = skintone2hex(H.skin_tone) + B.size = "flat" + B.cached_size = 0 + B.prev_size = 0 + to_chat(H, "Your chest feels warm, tingling with newfound sensitivity.") + H.reagents.remove_reagent(id, 5) + B.Insert(H) + //If they have them, increase size. If size is comically big, limit movement and rip clothes. - B.cached_size = B.cached_size + 0.05 - if (B.cached_size >= 8.5 && B.cached_size < 9) - if(H.w_uniform || H.wear_suit) - var/target = M.get_bodypart(BODY_ZONE_CHEST) - to_chat(M, "Your breasts begin to strain against your clothes tightly!") - M.adjustOxyLoss(5, 0) - M.apply_damage(1, BRUTE, target) - B.update() + B.modify_size(0.05) + + if (ISINRANGE_EX(B.cached_size, 8.5, 9) && (H.w_uniform || H.wear_suit)) + var/target = H.get_bodypart(BODY_ZONE_CHEST) + if(!message_spam) + to_chat(H, "Your breasts begin to strain against your clothes tightly!") + message_spam = TRUE + H.adjustOxyLoss(5, 0) + H.apply_damage(1, BRUTE, target) 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. //Acute hepatic pharmacokinesis. - if(HAS_TRAIT(M, TRAIT_PHARMA)) + if(HAS_TRAIT(M, TRAIT_PHARMA) || !M.canbearoused) var/obj/item/organ/liver/L = M.getorganslot(ORGAN_SLOT_LIVER) L.swelling+= 0.05 return ..() @@ -116,8 +112,7 @@ M.visible_message("[M] suddenly looks more feminine!", "You suddenly feel more feminine!") if(P) - P.cached_length = P.cached_length - 0.05 - P.update() + P.modify_size(-0.05) if(T) qdel(T) if(!V) @@ -141,15 +136,14 @@ var/obj/item/organ/genital/breasts/B = M.getorganslot(ORGAN_SLOT_BREASTS) if(!B) //Acute hepatic pharmacokinesis. - if(HAS_TRAIT(M, TRAIT_PHARMA)) + if(HAS_TRAIT(M, TRAIT_PHARMA) || !M.canbearoused) var/obj/item/organ/liver/L = M.getorganslot(ORGAN_SLOT_LIVER) L.swelling-= 0.05 return ..() //otherwise proceed as normal return..() - B.cached_size = B.cached_size - 0.05 - B.update() + B.modify_size(-0.05) return ..() /datum/reagent/fermi/BEsmaller_hypo @@ -176,15 +170,13 @@ 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. - B.cached_size = B.cached_size - 0.1 - B.update() - else if(B.cached_size > (sizeConv[M.dna.features["breasts_size"]]+0.1)) - B.cached_size = B.cached_size - 0.05 - B.update() - else if(B.cached_size < (sizeConv[M.dna.features["breasts_size"]])+0.1) - B.cached_size = B.cached_size + 0.05 - B.update() + var/optimal_size = B.breast_values[M.dna.features["breasts_size"]] + if(!optimal_size)//Fast fix for those who don't want it. + B.modify_size(-0.1) + else if(B.cached_size > optimal_size) + B.modify_size(-0.05, optimal_size) + else if(B.cached_size < optimal_size) + B.modify_size(0.05, 0, optimal_size) return ..() //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -205,6 +197,7 @@ InverseChemVal = 0.35 InverseChem = "PEsmaller" //At really impure vols, it just becomes 100% inverse and shrinks instead. can_synth = FALSE + var/message_spam = FALSE /datum/reagent/fermi/penis_enlarger/on_mob_metabolize(mob/living/M) . = ..() @@ -221,55 +214,48 @@ M.reagents.remove_reagent(id, volume) return var/mob/living/carbon/human/H = M - H.genital_override = TRUE - var/obj/item/organ/genital/penis/P = M.getorganslot(ORGAN_SLOT_PENIS) - if(!P) - H.emergent_genital_call() - return + if(!H.getorganslot(ORGAN_SLOT_PENIS) && H.emergent_genital_call()) + H.genital_override = TRUE /datum/reagent/fermi/penis_enlarger/on_mob_life(mob/living/carbon/M) //Increases penis size, 5u = +1 inch. if(!ishuman(M)) - return + return ..() var/mob/living/carbon/human/H = M - var/obj/item/organ/genital/penis/P = M.getorganslot(ORGAN_SLOT_PENIS) + var/obj/item/organ/genital/penis/P = H.getorganslot(ORGAN_SLOT_PENIS) if(!P)//They do have a preponderance for escapism, or so I've heard. //If they have Acute hepatic pharmacokinesis, then route processing though liver. - if(HAS_TRAIT(M, TRAIT_PHARMA)) - var/obj/item/organ/liver/L = M.getorganslot(ORGAN_SLOT_LIVER) + if(HAS_TRAIT(H, TRAIT_PHARMA) || !H.canbearoused) + var/obj/item/organ/liver/L = H.getorganslot(ORGAN_SLOT_LIVER) if(L) - L.swelling+= 0.05 - return..() + L.swelling += 0.05 else - M.adjustToxLoss(1) - return..() + H.adjustToxLoss(1) + return ..() //otherwise proceed as normal - var/obj/item/organ/genital/penis/nP = new - nP.Insert(M) - if(nP) - nP.length = 1 - to_chat(M, "Your groin feels warm, as you feel a newly forming bulge down below.") - nP.cached_length = 1 - nP.prev_length = 1 - M.reagents.remove_reagent(id, 5) - P = nP + P = new + P.length = 1 + to_chat(H, "Your groin feels warm, as you feel a newly forming bulge down below.") + P.prev_length = 1 + H.reagents.remove_reagent(id, 5) + P.Insert(H) - P.cached_length = P.cached_length + 0.1 - if (P.cached_length >= 20.5 && P.cached_length < 21) - if(H.w_uniform || H.wear_suit) - var/target = M.get_bodypart(BODY_ZONE_CHEST) - to_chat(M, "Your cock begin to strain against your clothes tightly!") - M.apply_damage(2.5, BRUTE, target) + P.modify_size(0.1) + if (ISINRANGE_EX(P.length, 20.5, 21) && (H.w_uniform || H.wear_suit)) + var/target = H.get_bodypart(BODY_ZONE_CHEST) + if(!message_spam) + to_chat(H, "Your cock begin to strain against your clothes tightly!") + message_spam = TRUE + H.apply_damage(2.5, BRUTE, target) - P.update() return ..() /datum/reagent/fermi/penis_enlarger/overdose_process(mob/living/carbon/human/M) //Turns you into a male if female and ODing, doesn't touch nonbinary and object genders. if(!istype(M)) return ..() //Acute hepatic pharmacokinesis. - if(HAS_TRAIT(M, TRAIT_PHARMA)) + if(HAS_TRAIT(M, TRAIT_PHARMA) || !M.canbearoused) var/obj/item/organ/liver/L = M.getorganslot(ORGAN_SLOT_LIVER) L.swelling+= 0.05 return..() @@ -284,8 +270,7 @@ M.visible_message("[M] suddenly looks more masculine!", "You suddenly feel more masculine!") if(B) - B.cached_size = B.cached_size - 0.05 - B.update() + B.modify_size(-0.05) if(M.getorganslot(ORGAN_SLOT_VAGINA)) qdel(V) if(W) @@ -305,6 +290,8 @@ can_synth = FALSE /datum/reagent/fermi/PEsmaller/on_mob_life(mob/living/carbon/M) + if(!ishuman(M)) + return ..() var/mob/living/carbon/human/H = M var/obj/item/organ/genital/penis/P = H.getorganslot(ORGAN_SLOT_PENIS) if(!P) @@ -312,12 +299,9 @@ if(HAS_TRAIT(M, TRAIT_PHARMA)) var/obj/item/organ/liver/L = M.getorganslot(ORGAN_SLOT_LIVER) L.swelling-= 0.05 - return..() - - //otherwise proceed as normal return..() - P.cached_length = P.cached_length - 0.1 - P.update() + + P.modify_size(-0.1) ..() /datum/reagent/fermi/PEsmaller_hypo @@ -334,6 +318,8 @@ if(!ishuman(M)) return var/mob/living/carbon/human/H = M + if(!H.getorganslot(ORGAN_SLOT_PENIS) && H.dna.features["has_cock"]) + H.give_genital(/obj/item/organ/genital/penis) if(!H.getorganslot(ORGAN_SLOT_TESTICLES) && H.dna.features["has_balls"]) H.give_genital(/obj/item/organ/genital/testicles) @@ -341,13 +327,11 @@ var/obj/item/organ/genital/penis/P = M.getorganslot(ORGAN_SLOT_PENIS) if(!P) return ..() - if(!M.dna.features["has_cock"])//Fast fix for those who don't want it. - P.cached_length = P.cached_length - 0.2 - P.update() - else if(P.cached_length > (M.dna.features["cock_length"]+0.1)) - P.cached_length = P.cached_length - 0.1 - P.update() - else if(P.cached_length < (M.dna.features["cock_length"]+0.1)) - P.cached_length = P.cached_length + 0.1 - P.update() + var/optimal_size = M.dna.features["cock_length"] + if(!optimal_size)//Fast fix for those who don't want it. + P.modify_size(-0.2) + else if(P.length > optimal_size) + P.modify_size(-0.1, optimal_size) + else if(P.length < optimal_size) + P.modify_size(0.1, 0, optimal_size) return ..()