Skip to content

Commit

Permalink
Баги потребления веществ
Browse files Browse the repository at this point in the history
  • Loading branch information
msw7007 committed Nov 3, 2024
1 parent 805ae3f commit a33fd5f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
if(owner?.nutrition < NUTRITION_LEVEL_FED || owner.stat != DEAD || owner.get_damage_amount() > AUTO_DEFIBRILATION_THRESHOLD)
return
var/defib_chance = owner.nutrition - NUTRITION_LEVEL_FED
owner.adjust_nutrition(-defib_chance)
if(prob(defib_chance))
owner.adjust_nutrition(defib_chance)
owner.setOxyLoss(0)
owner.set_heartattack(FALSE)
owner.update_revive()
Expand Down
2 changes: 1 addition & 1 deletion modular_ss220/species/_components/organs/organ_decay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

var/is_no_owner = isnull(organ.owner)
var/is_dead = (is_no_owner ? FALSE : organ.owner.stat == DEAD)
var/formaldehyde_found = owner?.get_chemical_value("formaldehyde") > 0
var/formaldehyde_found = organ.owner?.get_chemical_value("formaldehyde") > 0
var/is_destroying = (is_dead || (is_no_owner && !organ.is_in_freezer))
if(is_destroying && !formaldehyde_found)
organ.receive_damage(decay_rate, 1)
Expand Down
2 changes: 1 addition & 1 deletion modular_ss220/species/_components/organs/organ_hunger.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
organ.switch_mode(force_off = TRUE)
else
if(consuption_count)
organ.owner.adjust_nutrition(consuption_count)
organ.owner.adjust_nutrition(-consuption_count)

/datum/component/hunger_organ/proc/hunger_change_consuption(holder, new_consuption_count)
SIGNAL_HANDLER
Expand Down

0 comments on commit a33fd5f

Please sign in to comment.