diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 3ac0b8b9fb..9040ee25d8 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -75,6 +75,7 @@ #define TRAIT_NYMPHO "nymphomania" #define TRAIT_MASO "masochism" #define TRAIT_HIGH_BLOOD "high_blood" +#define TRAIT_PHARMA "hepatic_pharmacokinesis" diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index a613e9c518..c733b2086b 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -137,6 +137,15 @@ SLIME SCANNER to_chat(user, "Subject suffering from heart attack: Apply defibrillation or other electric shock immediately!") if(H.undergoing_liver_failure() && H.stat != DEAD) to_chat(user, "Subject is suffering from liver failure: Apply Corazone and begin a liver transplant immediately!") + var/obj/item/organ/liver/L = M.getorganslot("liver") + if(L.swelling > 20) + to_chat(user, "Subject is suffering from hyperhepatia.") //i.e. shrink their liver or give them a transplant. + var/obj/item/organ/tongue/T = M.getorganslot("tongue") + if(!T || T.damage > 40) + to_chat(user, "Subject is suffering from caustic burns on their tongue./span>") //i.e. their tongue is shot + var/obj/item/organ/lungs/Lung = M.getorganslot("lungs") + if(Lung.damage > 150) + to_chat(user, "Subject is suffering from an acute inhalation injury.") //i.e. Their lungs are shot var/msg = "*---------*\nAnalyzing results for [M]:\n\tOverall status: [mob_status]\n" diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm index ee767566e6..75c9c0e2eb 100755 --- a/code/modules/surgery/organs/liver.dm +++ b/code/modules/surgery/organs/liver.dm @@ -16,6 +16,8 @@ var/toxTolerance = LIVER_DEFAULT_TOX_TOLERANCE//maximum amount of toxins the liver can just shrug off var/toxLethality = LIVER_DEFAULT_TOX_LETHALITY//affects how much damage toxins do to the liver var/filterToxins = TRUE //whether to filter toxins + var/swelling = 0 + var/cachedmoveCalc = 1 /obj/item/organ/liver/on_life() var/mob/living/carbon/C = owner @@ -45,11 +47,39 @@ if(damage > maxHealth)//cap liver damage damage = maxHealth + if(swelling >= 10) + pharmacokinesis() + /obj/item/organ/liver/prepare_eat() var/obj/S = ..() S.reagents.add_reagent("iron", 5) return S +//Just in case +/obj/item/organ/liver/Remove(mob/living/carbon/M, special = 0) + M.remove_movespeed_modifier("pharma") + M.ResetBloodVol() //At the moment, this shouldn't allow application twice. You either have this OR a thirsty ferret. + sizeMoveMod(1, M) + +//Applies some of the effects to the patient. +/obj/item/organ/liver/proc/pharmacokinesis() + var/moveCalc = 1+((round(swelling) - 9)/3) + if(moveCalc == cachedmoveCalc)//reduce calculations + return + if(prob(5)) + to_chat(owner, "You feel a stange ache in your side, almost like a sitch. You notice a hint of perspiration as your breathing becomes labored, this pain is affeting your movements and amking you feel lightheaded.") + var/mob/living/carbon/human/H = owner + H.add_movespeed_modifier("pharma", TRUE, 100, NONE, override = TRUE, multiplicative_slowdown = moveCalc) + H.AdjustBloodVol(moveCalc/3) + sizeMoveMod(moveCalc, H) + +/obj/item/organ/liver/proc/sizeMoveMod(var/value, mob/living/carbon/human/H) + if(cachedmoveCalc == value) + return + H.next_move_modifier /= cachedmoveCalc + H.next_move_modifier *= value + cachedmoveCalc = value + /obj/item/organ/liver/fly name = "insectoid liver" icon_state = "liver-x" //xenomorph liver? It's just a black liver so it fits. diff --git a/modular_citadel/code/datums/traits/neutral.dm b/modular_citadel/code/datums/traits/neutral.dm index 05aeb27361..eb48a58c7f 100644 --- a/modular_citadel/code/datums/traits/neutral.dm +++ b/modular_citadel/code/datums/traits/neutral.dm @@ -31,3 +31,13 @@ mob_trait = TRAIT_MASO gain_text = "You desire to be hurt." lose_text = "Pain has become less exciting for you." + +/datum/quirk/pharmacokinesis //Prevents unwanted organ additions. + name = "Acute hepatic pharmacokinesis" + desc = "You've a rare genetic disorder that causes certain chemicals to be absorbed by your liver instead." + value = 0 + mob_trait = TRAIT_PHARMA + lose_text = "Your liver feels different." + var/active = FALSE + var/power = 0 + var/cachedmoveCalc = 1 diff --git a/modular_citadel/code/modules/arousal/organs/genitals.dm b/modular_citadel/code/modules/arousal/organs/genitals.dm index 73afd75002..d93496e867 100644 --- a/modular_citadel/code/modules/arousal/organs/genitals.dm +++ b/modular_citadel/code/modules/arousal/organs/genitals.dm @@ -297,6 +297,9 @@ var/organCheck = FALSE var/breastCheck = FALSE var/willyCheck = FALSE + if(!canbearoused) + add_trait(TRAIT_PHARMA)//Prefs prevent unwanted organs. + return for(var/obj/item/organ/O in internal_organs) if(istype(O, /obj/item/organ/genital)) organCheck = TRUE diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm index e16d12dcc3..27450aa060 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm @@ -547,10 +547,19 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING /datum/reagent/fermi/BElarger/on_mob_life(mob/living/carbon/M) //Increases breast size if(!ishuman(M))//Just in case - return + return..() + var/mob/living/carbon/human/H = M var/obj/item/organ/genital/breasts/B = M.getorganslot("breasts") if(!B) //If they don't have breasts, give them breasts. + + //If they have Acute hepatic pharmacokinesis, then route processing though liver. + if(M.has_trait(TRAIT_PHARMA)) + var/obj/item/organ/liver/L = M.getorganslot("liver") + L.swelling+= 0.1 + return..() + + //otherwise proceed as normal var/obj/item/organ/genital/breasts/nB = new nB.Insert(M) if(nB) @@ -579,6 +588,12 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING /datum/reagent/fermi/BElarger/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(M.has_trait(TRAIT_PHARMA)) + var/obj/item/organ/liver/L = M.getorganslot("liver") + L.swelling+= 0.05 + return ..() + var/obj/item/organ/genital/penis/P = M.getorganslot("penis") var/obj/item/organ/genital/testicles/T = M.getorganslot("testicles") var/obj/item/organ/genital/vagina/V = M.getorganslot("vagina") @@ -614,7 +629,14 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING /datum/reagent/fermi/BEsmaller/on_mob_life(mob/living/carbon/M) var/obj/item/organ/genital/breasts/B = M.getorganslot("breasts") if(!B) - return + //Acute hepatic pharmacokinesis. + if(M.has_trait(TRAIT_PHARMA)) + var/obj/item/organ/liver/L = M.getorganslot("liver") + L.swelling-= 0.1 + return ..() + + //otherwise proceed as normal + return..() B.cached_size = B.cached_size - 0.1 B.update() ..() @@ -669,6 +691,14 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING var/mob/living/carbon/human/H = M var/obj/item/organ/genital/penis/P = M.getorganslot("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(M.has_trait(TRAIT_PHARMA)) + var/obj/item/organ/liver/L = M.getorganslot("liver") + L.swelling+= 0.1 + return..() + + //otherwise proceed as normal var/obj/item/organ/genital/penis/nP = new nP.Insert(M) if(nP) @@ -690,6 +720,12 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING ..() /datum/reagent/fermi/PElarger/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. + if(M.has_trait(TRAIT_PHARMA)) + var/obj/item/organ/liver/L = M.getorganslot("liver") + L.swelling+= 0.05 + return..() + var/obj/item/organ/genital/breasts/B = M.getorganslot("breasts") var/obj/item/organ/genital/testicles/T = M.getorganslot("testicles") var/obj/item/organ/genital/vagina/V = M.getorganslot("vagina") @@ -724,7 +760,14 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING var/mob/living/carbon/human/H = M var/obj/item/organ/genital/penis/P = H.getorganslot("penis") if(!P) - return + //Acute hepatic pharmacokinesis. + if(M.has_trait(TRAIT_PHARMA)) + var/obj/item/organ/liver/L = M.getorganslot("liver") + L.swelling-= 0.1 + return..() + + //otherwise proceed as normal + return..() P.cached_length = P.cached_length - 0.1 P.update() ..()