Refactors Regenerate Organs, and a few organ helpers (#74219)

## About The Pull Request

Refactors regenerate organs to be slightly more intelligent in handling
organ changes and replacements.
Noteably:
- We don't remove organs that were modified by the owner; such as
changing out your heart for a cybernetic
- We early break out of the for loop if they aren't supposed to have an
organ there and remove it
- We check for the organ already being correct, and just healing it and
continuing if it is

Also changes the names of some of the organ helpers into snake_case
### Mapping March
Ckey to receive rewards: N/A

## Why It's Good For The Game
## Changelog

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
This commit is contained in:
Zephyr
2023-03-26 17:54:36 +01:00
committed by GitHub
co-authored by Jacquerel
parent 4f0c7dd2f6
commit ecbcef778d
205 changed files with 569 additions and 559 deletions
+1 -1
View File
@@ -819,7 +819,7 @@
status = "<font color='red'><b>Dead</b></font>"
health_description = "Status: [status]"
health_description += "<br>Brute: [lifer.getBruteLoss()] - Burn: [lifer.getFireLoss()] - Toxin: [lifer.getToxLoss()] - Suffocation: [lifer.getOxyLoss()]"
health_description += "<br>Clone: [lifer.getCloneLoss()] - Brain: [lifer.getOrganLoss(ORGAN_SLOT_BRAIN)] - Stamina: [lifer.getStaminaLoss()]"
health_description += "<br>Clone: [lifer.getCloneLoss()] - Brain: [lifer.get_organ_loss(ORGAN_SLOT_BRAIN)] - Stamina: [lifer.getStaminaLoss()]"
else
health_description = "This mob type has no health to speak of."
+1 -1
View File
@@ -216,7 +216,7 @@
for(var/obj/item/item in human_target.get_equipped_items(delete_pocket))
qdel(item)
var/obj/item/organ/internal/brain/human_brain = human_target.getorganslot(BRAIN)
var/obj/item/organ/internal/brain/human_brain = human_target.get_organ_slot(BRAIN)
human_brain.destroy_all_skillchips() // get rid of skillchips to prevent runtimes
if(dresscode != "Naked")
+1 -1
View File
@@ -95,7 +95,7 @@
newamt = L.getOxyLoss()
if("brain")
L.adjustOrganLoss(ORGAN_SLOT_BRAIN, amount)
newamt = L.getOrganLoss(ORGAN_SLOT_BRAIN)
newamt = L.get_organ_loss(ORGAN_SLOT_BRAIN)
if("clone")
L.adjustCloneLoss(amount, forced = TRUE)
newamt = L.getCloneLoss()