[MIRROR] Refactors throw vore code. Again. (#12868)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-07-02 20:12:42 -07:00
committed by GitHub
parent 60a0796797
commit 0ab75ff4ef
7 changed files with 93 additions and 82 deletions
+12 -11
View File
@@ -187,6 +187,7 @@ GLOBAL_LIST_INIT(digest_modes, list())
/datum/digest_mode/heal/process_mob(obj/belly/B, mob/living/L)
var/oldstat = L.stat
var/needs_stomach_update = FALSE
if(L.stat == DEAD || !L.permit_healbelly) //healpref check
return null // Can't heal the dead with healbelly
var/mob/living/carbon/human/H = L
@@ -196,29 +197,29 @@ GLOBAL_LIST_INIT(digest_modes, list())
if(O.brute_dam > 0 || O.burn_dam > 0) //Making sure healing continues until fixed.
O.heal_damage(0.5, 0.5, 0, 1) // Less effective healing as able to fix broken limbs
B.owner.adjust_nutrition(-5) // More costly for the pred, since metals and stuff
if(B.health_impacts_size)
B.owner.handle_belly_update()
if(L.health < L.getMaxHealth())
L.adjustToxLoss(-2)
L.adjustOxyLoss(-2)
L.adjustCloneLoss(-1)
B.owner.adjust_nutrition(-1) // Normal cost per old functionality
if(B.health_impacts_size)
B.owner.handle_belly_update()
if(L.health < L.getMaxHealth())
needs_stomach_update = TRUE
L.adjustToxLoss(-2)
L.adjustOxyLoss(-2)
L.adjustCloneLoss(-1)
B.owner.adjust_nutrition(-1) // Normal cost per old functionality
if(B.owner.nutrition > 90 && (L.health < L.getMaxHealth()) && !H.isSynthetic())
needs_stomach_update = TRUE
L.adjustBruteLoss(-2.5)
L.adjustFireLoss(-2.5)
L.adjustToxLoss(-5)
L.adjustOxyLoss(-5)
L.adjustCloneLoss(-1.25)
B.owner.adjust_nutrition(-2)
if(B.health_impacts_size)
B.owner.handle_belly_update()
if(L.nutrition <= 400)
L.adjust_nutrition(1)
else if(B.owner.nutrition > 90 && (L.nutrition <= 400))
B.owner.adjust_nutrition(-1)
L.adjust_nutrition(1)
if(B.health_impacts_size && needs_stomach_update)
B.owner.handle_belly_update()
if(L.stat != oldstat)
return list("to_update" = TRUE)
-47
View File
@@ -837,53 +837,6 @@
/mob/living/proc/get_digestion_efficiency_modifier()
return 1
/mob/living/proc/eat_trash()
set name = "Eat Trash"
set category = "Abilities.Vore"
set desc = "Consume held garbage."
if(stat || is_paralyzed() || weakened || stunned || world.time < last_special)
to_chat(src, span_warning("You can't do that in your current state."))
return FALSE
if(!vore_selected)
to_chat(src,span_warning("You either don't have a belly selected, or don't have a belly!"))
return FALSE
var/obj/item/I = get_active_hand()
if(!I)
to_chat(src, span_warning("You are not holding anything."))
return FALSE
if(!I.check_item_devourability(src))
to_chat(src, span_warning("You can not eat this item."))
return FALSE
if(!I.on_trash_eaten(src)) // shows object's rejection message itself
return FALSE
drop_item()
vore_selected.nom_atom(I)
updateVRPanel()
log_admin("VORE: [src] used Eat Trash to swallow [I].")
I.after_trash_eaten(src)
visible_message(span_vwarning(src.vore_selected.belly_format_string(src.vore_selected.trash_eater_in, I, item=I)))
return FALSE
/mob/living/proc/toggle_trash_catching() //Ported from chompstation
set name = "Toggle Trash Catching"
set category = "Abilities.Vore"
set desc = "Toggle Trash Eater throw vore abilities."
trash_catching = !trash_catching
to_chat(src, span_vwarning("Trash catching [trash_catching ? "enabled" : "disabled"]."))
/mob/living/proc/eat_minerals() //Actual eating abstracted so the user isn't given a prompt due to an argument in this verb.
set name = "Eat Minerals"
set category = "Abilities.Vore"
set desc = "Consume held raw ore, gems and refined minerals. Snack time!"
handle_eat_minerals()
/mob/living/proc/handle_eat_minerals(obj/item/snack, mob/living/user)
var/mob/living/feeder = user ? user : src //Whoever's doing the feeding - us or someone else.
var/mob/living/carbon/human/H = src