Skip to content

Commit

Permalink
[MIRROR] Xenomorph stomachs and vore will no longer destroy items dir…
Browse files Browse the repository at this point in the history
…ectly, refactored it to use acid_act() (#2166)

* Xenomorph stomachs and vore will no longer destroy items directly, refactored it to use acid_act() (#81534)

## About The Pull Request

senomorph stomachs and vore will no longer destroy items and mobs
directly, refactored it to use acid_act()
fixes xenomorph vore accidentally destroying mobs it wasn't supposed to
destroy, im thinking this was modified list in place shenanigans

## Why It's Good For The Game

this shit is jank as hell and better done this way and results in less
weird edge cases, and also makes xenomorphs feel less bullshit

## Changelog

:cl:
balance: xenomorph stomachs will no longer destroy items directly,
refactored it to use acid_act()
fix: fixes xenomorph vore accidentally destroying mobs it wasn't
supposed to destroy, im thinking this was modified list in place
shenanigans
/:cl:

* Xenomorph stomachs and vore will no longer destroy items directly, refactored it to use acid_act()

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Iamgoofball <[email protected]>
  • Loading branch information
3 people authored Feb 29, 2024
1 parent c4ba0cd commit 60aaaa8
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions code/modules/mob/living/carbon/alien/organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -197,23 +197,14 @@
for(var/atom/movable/thing as anything in stomach_contents)
if(!digestable_cache[thing.type])
continue
thing.reagents.trans_to(src, 4)

if(isliving(thing))
var/mob/living/lad = thing
lad.adjustBruteLoss(6)
else if(!thing.reagents.total_volume) // Mobs can't get dusted like this, too important
qdel(thing)
thing.acid_act(75, 10)

/obj/item/organ/internal/stomach/alien/proc/consume_thing(atom/movable/thing)
RegisterSignal(thing, COMSIG_MOVABLE_MOVED, PROC_REF(content_moved))
RegisterSignal(thing, COMSIG_QDELETING, PROC_REF(content_deleted))
if(isliving(thing))
var/mob/living/lad = thing
RegisterSignal(thing, COMSIG_LIVING_DEATH, PROC_REF(content_died))
if(lad.stat == DEAD)
qdel(lad)
return
stomach_contents += thing
thing.forceMove(owner || src) // We assert that if we have no owner, we will not be nullspaced

Expand Down

0 comments on commit 60aaaa8

Please sign in to comment.