Paradise icon indicating copy to clipboard operation
Paradise copied to clipboard

Organ Deletion Upon Removal is now handled by base procs instead of overrides

Open Sirryan2002 opened this issue 2 years ago • 3 comments

What Does This PR Do

Refactors organ removal to instead rely on a destroy_on_removal var that will handle QDEL'ing the organ instead of organs doing it manually in their override. Fixes #18610

Why It's Good For The Game

Prevents runtimes and makes it easier on coders who wish to add organs down the line. Refactor > Bandaid Fix

Testing

For multiple organs that utilize this new variable, I gave a carbon mob the organ, and then used the VV edit verb Remove Organ, and then I also did the same with a proc call on the organ with the remove() proc and passed the user as one of the parameters. Both times the organ was fully removed and it properly QDEL'd in the deletion log. No runtimes made themselves apparent during this.

No player facing changes

Sirryan2002 avatar Jul 28 '22 20:07 Sirryan2002

weird, I'll have to add a check in for that. I'll look into the special param, I didn't initially because I just assumed that somewhere it was used for something.

Sirryan2002 avatar Jul 30 '22 14:07 Sirryan2002

Yeah, I did some investigation into the special param for organ removal while poking into surgery. In some cases, it seems to be used as "don't act on this any further, this thing is gonna be deleted soon", but in other cases it's just used to specify special behavior. In abductor surgeries, a value of 2 is returned (!) and used in one single place. It could use a pretty good rework.

lewcc avatar Aug 06 '22 22:08 lewcc

documentation updated as per moxian's request. Further testing revealed that no runtimes were produced when calling remove() on external limbs, I did this further with droplimb() aswell. If somebody wants to make certain limbs delete upon removal that is fine, however, they will need to refactor that part of the code themselves since qdel'ing limbs is baked into certain admin tools and this PR's focus is really on internal organs not limbs.

Sirryan2002 avatar Aug 08 '22 18:08 Sirryan2002