Improve, cleanup, and expand wound code (#20757)

This PR includes several changes to bring our wound code up to date with
baystation, nebula, and modern standards. Highlights include:
- The usage of integers between 0 and 100 for ratios (expressed as a
percentage), instead of 0.0 to 1.0. Small decimal values are prone to
floating point precision errors, but by moving to a percentage instead,
we can reduce the impact of this.
- The untangling of damage flags and injury flags, which were used
interchangably in the code. This could have caused issues should we
expand any of these.
- Larger embedded objects now halt bleeding in wounds, until they are
pulled out. In exchange however, embedded objects will halt healing in
wounds (it is difficult to close an open wound that currently has a rod
stuck in it)
- A lot of data, such as implanted objects and organs, are now stored in
amputated limbs.
This commit is contained in:
Cody Brittain
2025-12-19 15:22:29 -05:00
committed by GitHub
parent 034d0e4cb1
commit 96a2951608
23 changed files with 861 additions and 575 deletions
@@ -165,11 +165,10 @@
var/obj/item/organ/external/E = A
if(BP_IS_ROBOTIC(E))
continue
if (E.wounds.len)
for(var/datum/wound/W in E.wounds)
if(W.germ_level < INFECTION_LEVEL_ONE)
W.germ_level = INFECTION_LEVEL_ONE
W.germ_level += rand(10, 50)
for(var/datum/wound/W in E.wounds)
if(W.germ_level < INFECTION_LEVEL_ONE)
W.germ_level = INFECTION_LEVEL_ONE
W.germ_level += rand(10, 50)
/turf/simulated/floor/exoplanet/water/shallow/moghes
icon = 'icons/turf/flooring/exoplanet/moghes.dmi'