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
+4 -4
View File
@@ -46,12 +46,12 @@
return ..()
/obj/item/paperplane/suicide_act(mob/living/user)
var/obj/item/organ/internal/eyes/eyes = user.getorganslot(ORGAN_SLOT_EYES)
var/obj/item/organ/internal/eyes/eyes = user.get_organ_slot(ORGAN_SLOT_EYES)
user.Stun(200)
user.visible_message(span_suicide("[user] jams [src] in [user.p_their()] nose. It looks like [user.p_theyre()] trying to commit suicide!"))
user.adjust_eye_blur(12 SECONDS)
if(eyes)
eyes.applyOrganDamage(rand(6,8))
eyes.apply_organ_damage(rand(6,8))
sleep(1 SECONDS)
return BRUTELOSS
@@ -102,13 +102,13 @@
if(..() || !ishuman(hit_atom))//if the plane is caught or it hits a nonhuman
return
var/mob/living/carbon/human/H = hit_atom
var/obj/item/organ/internal/eyes/eyes = H.getorganslot(ORGAN_SLOT_EYES)
var/obj/item/organ/internal/eyes/eyes = H.get_organ_slot(ORGAN_SLOT_EYES)
if(prob(hit_probability))
if(H.is_eyes_covered())
return
visible_message(span_danger("\The [src] hits [H] in the eye[eyes ? "" : " socket"]!"))
H.adjust_eye_blur(12 SECONDS)
eyes?.applyOrganDamage(rand(6,8))
eyes?.apply_organ_damage(rand(6,8))
H.Paralyze(40)
H.emote("scream")