Kidney overhaul (#31324)

* The Kidneying

* Oculine
This commit is contained in:
DGamerL
2025-12-29 06:21:28 +01:00
committed by GitHub
parent d37f014ecc
commit 47f9d5a2ef
5 changed files with 42 additions and 14 deletions
@@ -13,6 +13,7 @@
voice = GetVoice()
if(.) //not dead
handle_kidneys()
if(check_mutations)
domutcheck(src)
@@ -981,6 +982,31 @@
AdjustLoseBreath(40 SECONDS, bound_lower = 0, bound_upper = 50 SECONDS)
adjustOxyLoss(20)
// Need this in species.
//#undef HUMAN_MAX_OXYLOSS
//#undef HUMAN_CRIT_MAX_OXYLOSS
/mob/living/carbon/human/proc/handle_kidneys()
var/obj/item/organ/kidneys = get_int_organ(/obj/item/organ/internal/kidneys)
if(isslimeperson(src))
kidneys = get_int_organ(/obj/item/organ/internal/brain)
var/damage_percentage = 0
if(kidneys && !(kidneys.status & ORGAN_DEAD)) // No kidneys = full damage
damage_percentage = ((kidneys.max_damage - kidneys.damage) / kidneys.max_damage) * 100
if(damage_percentage >= 75) // Above 75% HP, no damage
return
var/total_damage = 0
for(var/datum/reagent/chem as anything in reagents.reagent_list)
total_damage += chem.max_kidney_damage
if(!total_damage)
return // No damage
switch(damage_percentage)
// No 0 since that's full damage
if(1 to 25)
total_damage *= 0.5
if(25 to 50)
total_damage *= 0.2
if(50 to 75)
total_damage *= 0.05
adjustToxLoss(total_damage)
@@ -1076,6 +1076,7 @@
taste_description = "salt"
adj_dizzy = -5 SECONDS
process_flags = ORGANIC | SYNTHETIC
max_kidney_damage = 3
/datum/reagent/consumable/drink/electrolytes/on_mob_life(mob/living/M)
M.AdjustConfused(-5 SECONDS)
@@ -144,6 +144,7 @@
color = "#8523be"
taste_description = "nurturing"
goal_difficulty = REAGENT_GOAL_NORMAL
max_kidney_damage = 0
/datum/reagent/medicine/mitocholide/on_mob_life(mob/living/M)
if(ishuman(M))
@@ -449,6 +450,7 @@
reagent_state = LIQUID
taste_description = "dust"
goal_difficulty = REAGENT_GOAL_EASY
max_kidney_damage = 0
/datum/reagent/medicine/charcoal/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
@@ -472,6 +474,7 @@
addiction_threshold = 5
harmless = FALSE
taste_description = "health"
max_kidney_damage = 0
/datum/reagent/medicine/omnizine/on_mob_life(mob/living/carbon/human/H)
var/update_flags = STATUS_UPDATE_NONE
@@ -641,6 +644,7 @@
metabolization_rate = 0.2
taste_description = "safety"
goal_difficulty = REAGENT_GOAL_NORMAL
max_kidney_damage = 0
/datum/reagent/medicine/salbutamol/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
@@ -663,6 +667,7 @@
harmless = FALSE
taste_description = "oxygenation"
goal_difficulty = REAGENT_GOAL_NORMAL
max_kidney_damage = 0
/datum/reagent/medicine/perfluorodecalin/on_mob_life(mob/living/carbon/human/M)
var/update_flags = STATUS_UPDATE_NONE
@@ -833,6 +838,7 @@
color = "#757377"
taste_description = "clarity"
goal_difficulty = REAGENT_GOAL_HARD
max_kidney_damage = 0
/datum/reagent/medicine/oculine/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
@@ -1013,6 +1019,7 @@
harmless = FALSE
overdose_threshold = 15
goal_difficulty = REAGENT_GOAL_HARD
max_kidney_damage = 4
/datum/reagent/medicine/sanguine_reagent/on_mob_life(mob/living/M)
if(!ishuman(M))
@@ -1069,6 +1076,7 @@
harmless = FALSE
overdose_threshold = 30 //so a single shotgun dart can't cause the tumor effect
goal_difficulty = REAGENT_GOAL_HARD
max_kidney_damage = 4 // So much calcium
/datum/reagent/medicine/osseous_reagent/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
@@ -1096,6 +1104,7 @@
color = "#D1D1F1"
taste_description = "sweetness"
goal_difficulty = REAGENT_GOAL_EASY
max_kidney_damage = 0
/datum/reagent/medicine/mannitol/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
@@ -55,6 +55,9 @@
/// If we burn in a fire, what color do we have?
var/burn_color
/// How much damage can this reagent do when you have no kidneys?
var/max_kidney_damage = 2
/datum/reagent/Destroy()
. = ..()
holder = null
-11
View File
@@ -6,17 +6,6 @@
parent_organ = "groin"
slot = "kidneys"
/obj/item/organ/internal/kidneys/on_life()
// Coffee is really bad for you with busted kidneys.
// This should probably be expanded in some way, but fucked if I know
// what else kidneys can process in our reagent list.
var/datum/reagent/coffee = locate(/datum/reagent/consumable/drink/coffee) in owner.reagents.reagent_list
if(coffee)
if(is_bruised())
owner.adjustToxLoss(0.1 * PROCESS_ACCURACY)
else if(is_broken())
owner.adjustToxLoss(0.3 * PROCESS_ACCURACY)
/obj/item/organ/internal/kidneys/cybernetic
name = "cybernetic kidneys"
icon_state = "kidneys-c"