[MANUAL MIRROR] Robotic organ and disease improvements (#22631)

* Robotic organ and disease improvements (#76766)

## About The Pull Request

In the code description for the `ORGAN_ROBOTIC` flag, it says that
robotic organs are not supposed to decay or regenerate health. I went
and fixed this and added some more "robotic" behavior.

New changes for robotic organs:
- No longer heal damage passively
- No longer gain health from revival
- No longer heal in the smart organ fridge
- No longer heal from pluoxium
- Robotic ears no longer heal from ear healing items (earmuffs, etc.)
- Robotic eyes are immune to changeling blind stings
- Robotic eyes no longer heal from occuline

New changes for diseases:
- Some diseases now require an organ to work. A robotic organ will give
immunity to the disease symptom unless the disease has "Inorganic
Biology".
- The transmission methods for diseases require organs to work but
robotic organs are immune. (except inorganic biology) Airborne disease
transmission require lungs. Ingested (drunk or eaten) disease
transmission requires a stomach. Blood (inject or patch) disease
transmission requires a heart.
- Organs removed from a mob that is afflicted with a disease will be
infectious while handling or transplanting it. (again, robotic organs
are immune unless inorganic biology is present) Certain admin spawned or
special diseases are exempt from this transmission method.
- A stomach is required for nebula nausea, gastritium, carpellosis,
metabolic boost, vomit, weight loss, death sandwich poisoning,
- Lungs are required for choking, asphyxiation, cough, cold9, oxygen
restoration, sneezing, flu, cold, spanish flu, tuberculosis
- A liver is required for tissue hydration, plasma fixation, parasitic
infection
- Ears are required for deafness, sensory restoration
- A heart is required for toxolysis, heart failure
- Eyes are required for sensory restoration, hyphema
- A tongue is required for voice change, parrot possession, pierrot
throat
- Wizarditis no longer requires a head (wtf?) to function

## Why It's Good For The Game

Robotic organs should behave as intended. Not naturally healing (like
organic organs) was supposed to be their downside to counteract their
their ability to not decay upon death.

## Changelog

🆑
fix: Fix robotic organs to not gain health passively, from revival,
smart organ fridge, pluxium, occuline, and earmuffs.
add: Some diseases now require the appropriate internal organ to work. A
robotic organ will give immunity to the disease symptom unless the
disease has "Inorganic Biology".
add: Disease transmission methods now require an internal organ to be
successful. Robotic organs give immunity. (except inorganic biology)
Airborne disease transmission require lungs. Ingested (drunk or eaten)
disease transmission requires a stomach. Blood (inject or patch) disease
transmission requires a heart.
add: Organs removed from a mob that is afflicted with a disease will be
infectious while handling or transplanting it. (again, robotic organs
are immune unless inorganic biology is present) Certain admin spawned or
special diseases are exempt from this transmission method.
add: A stomach is required for nebula nausea, gastritium, carpellosis,
metabolic boost, vomit, weight loss, death sandwich poisoning
add: Lungs are required for choking, asphyxiation, cough, cold9, oxygen
restoration, sneezing, flu, cold, spanish flu, tuberculosis
add: A liver is required for tissue hydration, plasma fixation,
parasitic infection
add: Ears are required for deafness, sensory restoration
add: A heart is required for toxolysis, heart failure
add: Eyes are required for sensory restoration, hyphema
add: A tongue is required for voice change, pierrot throat
bal: Remove head requirement for wizarditis disease
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>

* Modular parts

* Printing time

* Hah typos

* I cant spell

* Golden Shower feedback

* Posi-Time

* Update modular_skyrat/modules/synths/code/bodyparts/brain.dm

---------

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
This commit is contained in:
Zergspower
2023-08-04 14:07:07 -05:00
committed by GitHub
parent 6debbb2ff9
commit 88bf87fa4e
55 changed files with 512 additions and 239 deletions
@@ -127,7 +127,10 @@
return ..()
for(var/obj/item/organ/organ_being_healed as anything in breather.organs)
organ_being_healed.apply_organ_damage(-0.5 * REM * seconds_per_tick)
if(!organ_being_healed.damage)
continue
organ_being_healed.apply_organ_damage(-0.5 * REM * seconds_per_tick, required_organ_flag = ORGAN_ORGANIC)
return ..()
@@ -227,17 +227,17 @@
if(SPT_PROB(2.5, seconds_per_tick) && iscarbon(drinker))
var/obj/item/organ/internal/eyes/eyes = drinker.get_organ_slot(ORGAN_SLOT_EYES)
if(drinker.is_blind())
if(istype(eyes))
if(eyes && IS_ORGANIC_ORGAN(eyes)) // doesn't affect robotic eyes
if(drinker.is_blind())
eyes.Remove(drinker)
eyes.forceMove(get_turf(drinker))
to_chat(drinker, span_userdanger("You double over in pain as you feel your eyeballs liquify in your head!"))
drinker.emote("scream")
drinker.adjustBruteLoss(15, required_bodytype = affected_bodytype)
else
to_chat(drinker, span_userdanger("You scream in terror as you go blind!"))
eyes.apply_organ_damage(eyes.maxHealth)
drinker.emote("scream")
else
to_chat(drinker, span_userdanger("You scream in terror as you go blind!"))
eyes.apply_organ_damage(eyes.maxHealth)
drinker.emote("scream")
if(SPT_PROB(1.5, seconds_per_tick) && iscarbon(drinker))
drinker.visible_message(span_danger("[drinker] starts having a seizure!"), span_userdanger("You have a seizure!"))
@@ -730,7 +730,7 @@
// Healing eye damage will cure nearsightedness and blindness from ... eye damage
eyes.apply_organ_damage(-2 * REM * seconds_per_tick * normalise_creation_purity(), required_organ_flag = affected_organ_flags)
// If our eyes are seriously damaged, we have a probability of causing eye blur while healing depending on purity
if(eyes.damaged && SPT_PROB(16 - min(normalized_purity * 6, 12), seconds_per_tick))
if(eyes.damaged && IS_ORGANIC_ORGAN(eyes) && SPT_PROB(16 - min(normalized_purity * 6, 12), seconds_per_tick))
// While healing, gives some eye blur
if(affected_mob.is_blind_from(EYE_DAMAGE))
to_chat(affected_mob, span_warning("Your vision slowly returns..."))
@@ -32,9 +32,22 @@
if((strain.spread_flags & DISEASE_SPREAD_SPECIAL) || (strain.spread_flags & DISEASE_SPREAD_NON_CONTAGIOUS))
continue
if(methods & (INJECT|INGEST|PATCH))
if(methods & INGEST)
if(!strain.has_required_infectious_organ(exposed_mob, ORGAN_SLOT_STOMACH))
continue
exposed_mob.ForceContractDisease(strain)
else if((methods & (TOUCH|VAPOR)) && (strain.spread_flags & DISEASE_SPREAD_CONTACT_FLUIDS))
else if(methods & (INJECT|PATCH))
if(!strain.has_required_infectious_organ(exposed_mob, ORGAN_SLOT_HEART))
continue
exposed_mob.ForceContractDisease(strain)
else if((methods & VAPOR) && (strain.spread_flags & DISEASE_SPREAD_CONTACT_FLUIDS))
if(!strain.has_required_infectious_organ(exposed_mob, ORGAN_SLOT_LUNGS))
continue
exposed_mob.ContactContractDisease(strain)
else if((methods & TOUCH) && (strain.spread_flags & DISEASE_SPREAD_CONTACT_FLUIDS))
exposed_mob.ContactContractDisease(strain)
if(iscarbon(exposed_mob))