Skip to content

Commit

Permalink
Update organs.dm
Browse files Browse the repository at this point in the history
  • Loading branch information
Helg2 committed Sep 13, 2024
1 parent e5f42fd commit b135f07
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion code/modules/organs/organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
var/current_medicine_count = 0
///How many drugs we can take before they overwhelm us. Decreases with damage
var/current_medicine_cap = 5
///Additional medicine capacity given by the freyr module.
var/freyr_medicine_cap = 3
///Whether we were over cap the last time we checked.
var/old_overflow = FALSE
///Total medicines added since last tick
Expand Down Expand Up @@ -89,8 +91,13 @@
current_medicine_cap = initial(current_medicine_cap) - 2 * organ_status

/datum/internal_organ/kidneys/process()
var/medicine_cap = current_medicine_cap

if(SEND_SIGNAL(owner, COMSIG_LIVING_UPDATE_PLANE_BLUR) & COMPONENT_CANCEL_BLUR)
medicine_cap += freyr_medicine_cap

current_medicine_count += new_medicines //We want to include medicines that were individually both added and removed this tick
var/overflow = current_medicine_count - current_medicine_cap //This catches any case where a reagent was added with volume below its metabolism
var/overflow = current_medicine_count - medicine_cap //This catches any case where a reagent was added with volume below its metabolism
current_medicine_count -= removed_medicines //Otherwise, you can microdose infinite chems without kidneys complaining

new_medicines = 0
Expand Down

0 comments on commit b135f07

Please sign in to comment.