Baystation12/Baystation12 — pull request #6505 by Zuhayr (2014-09-24 15:08:29+00:00)
Title: Organremoval

Organ changes! Basically now you can yank out organs, throw them around, toss them at each other, watch them splurt blood on the ground, then jam them back in. There are a bunch of other things included such as brains being refactored to /obj/item/organ and whatnot. Every single detail is below. I'll paste in my working notes just for the sake of covering everything involved. [X] means done, [ ] is still coming.

Backend stuff:
[X] Organs are now generated and checked by-species and have arbitrary datums/objects associated with them.
[X] Tl;dr expanding organs to work on a by-species basis will be easy.
[X] Skull/ribcage are now represented by an 'encased' var that any limb can have.
[X] Brain and appendix removal are now folded into general organ removal.
[X] Slime cores/brain surgery have their own files.

Other stuff:
[X] You can now skip the clamping bleeder step if you're a terrible surgeon.
[X] Using the wrong tool will no longer attack the mob if you're on help intent.
[X] Skull-opening surgery is now the same as ribcage surgery (scalpel, hemostat, retractor, saw, retractor).
[X] Same goes for skull-closing (retractor, bone gel).
[X] Organs can now be removed by using scalpel, hemostat on an open limb.
[X] Organs can also be replaced by using a new organ followed by fixovein on an open limb.
[X] Hematoma surgery on a brain will only work above 20 damage and reduces damage to 20.
[X] Bone chip removal surgery on a brain will only work below or equal to20 damage, and will reduce damage to 0.
[X] Implant surgery is only doable if the brain is fully repaired.
[X] You have an appendix inside you. Appendicitis only occurs if it's in your guts.
[X] Kidneys live in your groin.
[X] Missing your heart will kill you.
[X] Missing your kidneys and liver will cause increasing toxins damage.
[X] Missing your eyes will result in permanent blindness.
[X] Organs have a limited shelf life when taken out of a body and not placed in a freezer.
[X] Fresh organs bleed everywhere when harvested.

Stretch Goals
[X] Eyes will keep track of their colour between mobs.
[ ] Unathi, Vox and Dionaea all have encased limbs and need to be opened like the chest (maybe, still need to think about this).
[ ] Human limb icons will update based on surgical state.
[ ] Incompatible organs (percentage chance based on blood type and guaranteed between species) will become necrotic.
[ ] Vital organ transplants will be possible using a subtype of surgery tables.
[ ] Bioprinting implemented.
[ ] Prosthetic organ production implemented.
[ ] Basic augmetic limb upgrade proof-of-concept implemented.
[ ] Organs will all be edible.

Shit to test:
[-] Alien embryo removal - can't spawn a facehugger on devcode, couldn't test.
[X] Appendicitis curing on appendix removal.
[X] Missing organs causing effects.
[X] How brain transplants impact ckey transfers and cloning.
[X] How organ transplant code impacts head transplanting.
[X] Slime core removal.
[X] Artificial organ removal.
[X] Eye repair surgery.
[X] By-species blood colours from organs.
[X] Brain repair surgery.
[X] Brain removal transferring mind properly.
[X] Eyestabbing correctly noting a lack of eyes.
[X] Organ repair, medpack and nanopaste.
[X] As above on missing organs.
[ ] Bone repair - should be fine, but dev is bugged and it can't be tested.