Adds a new experimental item digestion mode that divides the digestion damage between all items within the gut instead of going through one item at a time. Disabled by default.

Experimental because I don't know how badly it affects performance and because I'm feeling too lazy to make a vorepanel button for it rn, so it's a varedit toggle for now.
This commit is contained in:
Verkister
2021-08-06 23:33:12 +03:00
parent e6eb01b9bb
commit b923f7a3e4
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -654,7 +654,7 @@
//the item should be worth
/obj/belly/proc/digest_item(obj/item/item, /var/touchable_amount) //CHOMPEdit
var/digested = item.digest_act(src, touchable_amount) //CHOMPEdit
if(!digested > 0) //CHOMPEdit
if(digested == FALSE) //CHOMPEdit
items_preserved |= item
else
owner.adjust_nutrition((nutrition_percent / 100) * 5 * digested)
@@ -27,6 +27,8 @@
if(isbelly(item_storage))
var/obj/belly/B = item_storage
g_damage = 0.25 * (B.digest_brute + B.digest_burn) / touchable_amount //CHOMPEdit
if(g_damage <= 0) //CHOMPEdit
return FALSE //CHOMPEdit
if(digest_stage > 0)
if(g_damage > digest_stage)