Commit Graph

307 Commits

Author SHA1 Message Date
shayoki f601a6ddaf Merge remote-tracking branch 'tgstation/master' into upstream-6-2-2026 2026-06-03 01:23:54 -05:00
Leland Kemble f761462047 Scanned wounds stay scanned when healing (#96174) 2026-05-25 20:54:20 -04:00
Alexis 21b4095dfd [MDB IGNORE] [IDB IGNORE] Upstream Sync - 04/17/2026 (#5453)
Upstream 04/17/2026

fixes https://github.com/Bubberstation/Bubberstation/issues/5549

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com>
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com>
Co-authored-by: loganuk <fakeemail123@aol.com>
Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com>
Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com>
Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com>
Co-authored-by: Lucy <lucy@absolucy.moe>
Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com>
Co-authored-by: Isratosh <Isratosh@hotmail.com>
Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com>
Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Co-authored-by: Alexander V. <volas@ya.ru>
Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com>
Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com>
Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com>
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com>
Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com>
Co-authored-by: Josh <josh.adam.powell@gmail.com>
Co-authored-by: Josh Powell <josh.powell@softwire.com>
Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com>
Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com>
Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com>
Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
2026-05-16 00:56:00 +02:00
MrMelbert 4174c91330 Tweaks (Fixes) formula for "internal bleeding" volume (#95753)
## About The Pull Request

Before: Internal bleeding `volume = rand(1, damage * coefficient)`

Bleeding could vary between 1 to 40, causing some attacks to drain you
of 0.1% of your blood, and other attacks to drain you of 7% of your
blood

After: Internal bleeding `volume = sqrt(damage) * coefficient *
rand(0.75, 1.5)`

Bleeding may vary between ranges like 5 to 16, amounting to 1% to 3% of
your blood

Also I broke it, now it's fixed oops

## Why It's Good For The Game

The variance in "internal bleeding" roll was so large that it could
practically instantly sign your death warrant or would never matter
across 100 attacks

This aims to raise the low end and lower the high end to bring a more
sensible range of "volume"

## Changelog

🆑 Melbert
balance: The amount of blood loss from an attack to an already bleeding
wound has been tweaked. As an example, a 20 force attack used to range
0.1% to 4% blood loss, and now ranges 1% to 3%.
/🆑
2026-04-23 08:53:48 +12:00
Leland Kemble cc0fc61d9e Fixes tape instantly falling off bleeding wounds & cleanmedical gauze (#95667)
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2026-04-08 16:45:08 +02:00
SmArtKar 16aef3a2fd Completely refactors HUD element management and datumizes inventory HUDs (#95119)
## About The Pull Request

This is a port/revival of Kapu's
https://github.com/DaedalusDock/daedalusdock/pull/883
By god, please TM this for a while, as HUDs are rather volatile and I
might've missed something (also the original PR had harddel issues, so
we should probably be on the lookout for those)

Instead of being stored in a metric ton of separate variables, all HUD
elements are now kept in a ``key -> element`` assoc list, and separate
category lists have been turned into a single ``group_key -> list of
elements`` assoc list for easier management.
This massively simplifies HUD creation and management, and allows us to
sanely dynamically modify HUDs without having to keep track of our
elements ourselves (harddel fuel)

I've also noticed that plasma vessels had... interesting, to say the
least, way of managing their HUD and in humans were unable to display
it, which I've changed (the element itself is displayed below stamina in
non-aliens, as latter occupies the spot where you'd normally see it)
Also fixes a bunch of minor unlikely to occur issues with HUD not
updating when it should've sometimes.

## Why It's Good For The Game

The two most important results of this is that A) we can fix the issue
with items larger than 32x32 not displaying properly in inventories (in
a separate PR) and B) this paves the way for datumized inventory slots,
although that is a separate nightmare
Some of this code is also actually over a decade old, and is an absolute
nightmare to work with.

## Changelog
🆑
qol: Non-aliens with an implanted plasma vessel now see their plasma
level in their HUD instead of just the stat panel
refactor: Refactored the entirety of HUD management code, report if
anything breaks!
/🆑

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2026-04-02 15:20:55 -04:00
Leland Kemble 27cfcf45b4 Fixes being unable to use tape to secure limbs (#95475)
## About The Pull Request

Gives the `limb_applicable` component a third callback, `do_apply`, for
the sake of holding all the sleeping parts of the previous callback
`can_apply`, so that `can_apply` can be put in the signal part of the
component, fixing the mentioned issue.

## Why It's Good For The Game

fixes #95471
2026-03-25 16:31:33 -05:00
SmArtKar b42ebeb4c2 Adjusts all get_temperature() accesses to compare it to a value (#95236)
## About The Pull Request

``get_temperature()`` returns a value in kelvins, not a boolean. Trying
to treat it as such will result in ***any*** item with a thermal value,
like condensers, being treated as a lighter.

## Why It's Good For The Game

Consistency, allows us to have actually functioning cooling items that
don't act like lighters all the time.

## Changelog
🆑
fix: Condensers can no longer be used to ignite things
/🆑
2026-02-24 21:05:44 -05:00
MrMelbert ef28e00690 [MDB Ignore] Refactors gauze, adds Tourniquets (#95041)
## About The Pull Request

1. Refactors gauze

Removes gauze var from `/stack`, adds a shared parent between tape and
gauze.
Behavior of "sticking thing on limb" is now a bit more generic, with
there being a component to facilitate it and a framework on `/bodypart`

Closes #92990

2. Adds Tourniquets

A first aid item, when attached to a limb it reduces blood loss from
that limb by 90%.
However while attached you walk slower (if on a leg), interact slower
(if on a arm), and yes, you rapidly die if you put it on your head

Paramedic belts have their starting equipment changed again for the
500th time.
Surgical tape -> Tourniquet
Bone gel -> Bonesetter

<img width="604" height="224" alt="image"
src="https://github.com/user-attachments/assets/443dd5c0-44a3-4ccb-9f6a-c561bbf2fba9"
/>

## Why It's Good For The Game

Adds some more variety for field treatment of bleeding wounds, and in
the future we can add things like "improvised tourniquets" or
"improvised splints" with wooden planks.

## Changelog

🆑 Melbert
add: Adds Tourniquets. While attached to a limb, reduces blood loss from
that limb by 90%, but makes you walk / interact slower. (Or if you put
it on your head, you die.)
add: You can purchase Tourniquets from the premium section of the
medical vendor
add: Paramedic belt setup has changed yet again: Surgical tape replaced
with Tourniquet, Bone gel replaced with Bonesetter.
add: You can use all forms of tape as splint - like Gauze. Will secure a
fracture but won't stop your blood from exiting.
refactor: Refactored gauze entirely, report any strangeness with it (or
tape, or tourniquets)
/🆑
2026-02-15 08:30:57 +01:00
nevimer 00ccf0c6b5 Merge remote-tracking branch 'tgstation/master' into upstream-feb12-2026
# Conflicts:
#	.github/CODEOWNERS
#	.github/workflows/compile_changelogs.yml
#	.github/workflows/stale.yml
#	SQL/database_changelog.md
#	_maps/map_files/CatwalkStation/CatwalkStation_2023.dmm
#	code/__DEFINES/atom_hud.dm
#	code/__DEFINES/inventory.dm
#	code/__DEFINES/mobs.dm
#	code/__DEFINES/species_clothing_paths.dm
#	code/__DEFINES/subsystems.dm
#	code/__DEFINES/surgery.dm
#	code/__HELPERS/global_lists.dm
#	code/_globalvars/lists/maintenance_loot.dm
#	code/_globalvars/traits/_traits.dm
#	code/controllers/subsystem/minor_mapping.dm
#	code/controllers/subsystem/processing/quirks.dm
#	code/controllers/subsystem/shuttle.dm
#	code/datums/components/palette.dm
#	code/datums/components/surgery_initiator.dm
#	code/datums/diseases/advance/advance.dm
#	code/datums/hud.dm
#	code/datums/mood.dm
#	code/datums/mutations/chameleon.dm
#	code/datums/quirks/negative_quirks/nyctophobia.dm
#	code/datums/status_effects/debuffs/debuffs.dm
#	code/datums/status_effects/debuffs/drunk.dm
#	code/datums/status_effects/debuffs/slime/slime_leech.dm
#	code/datums/weather/weather.dm
#	code/game/data_huds.dm
#	code/game/objects/items.dm
#	code/game/objects/items/devices/scanners/health_analyzer.dm
#	code/game/objects/items/frog_statue.dm
#	code/game/objects/items/rcd/RLD.dm
#	code/game/objects/items/robot/items/hypo.dm
#	code/game/objects/items/stacks/medical.dm
#	code/game/objects/items/stacks/wrap.dm
#	code/game/objects/items/storage/garment.dm
#	code/game/objects/items/tools/medical/defib.dm
#	code/game/objects/items/weaponry.dm
#	code/game/objects/items/weaponry/melee/misc.dm
#	code/game/objects/structures/crates_lockers/closets/secure/security.dm
#	code/game/objects/structures/curtains.dm
#	code/game/objects/structures/dresser.dm
#	code/game/objects/structures/girders.dm
#	code/game/objects/structures/maintenance.dm
#	code/game/objects/structures/mirror.dm
#	code/modules/admin/greyscale_modify_menu.dm
#	code/modules/admin/verbs/light_debug.dm
#	code/modules/antagonists/ashwalker/ashwalker.dm
#	code/modules/antagonists/heretic/knowledge/starting_lore.dm
#	code/modules/antagonists/ninja/ninjaDrainAct.dm
#	code/modules/art/paintings.dm
#	code/modules/client/preferences.dm
#	code/modules/client/verbs/ooc.dm
#	code/modules/clothing/head/wig.dm
#	code/modules/events/disease_outbreak.dm
#	code/modules/holodeck/holo_effect.dm
#	code/modules/jobs/job_types/head_of_security.dm
#	code/modules/jobs/job_types/security_officer.dm
#	code/modules/library/skill_learning/generic_skillchips/point.dm
#	code/modules/mining/lavaland/ash_flora.dm
#	code/modules/mining/lavaland/mining_loot/megafauna/ash_drake.dm
#	code/modules/mob/dead/new_player/new_player.dm
#	code/modules/mob/living/basic/guardian/guardian.dm
#	code/modules/mob/living/basic/space_fauna/space_dragon/space_dragon.dm
#	code/modules/mob/living/carbon/carbon.dm
#	code/modules/mob/living/carbon/human/human.dm
#	code/modules/mob/living/carbon/human/human_defines.dm
#	code/modules/mob/living/carbon/life.dm
#	code/modules/mob/living/living.dm
#	code/modules/mob/living/living_defines.dm
#	code/modules/mob/mob.dm
#	code/modules/mob_spawn/ghost_roles/mining_roles.dm
#	code/modules/mod/mod_control.dm
#	code/modules/mod/modules/modules_general.dm
#	code/modules/modular_computers/computers/item/computer_ui.dm
#	code/modules/paperwork/paper.dm
#	code/modules/paperwork/paperbin.dm
#	code/modules/power/lighting/light.dm
#	code/modules/projectiles/guns/energy/kinetic_accelerator.dm
#	code/modules/projectiles/projectile.dm
#	code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm
#	code/modules/reagents/chemistry/reagents/food_reagents.dm
#	code/modules/reagents/chemistry/reagents/other_reagents.dm
#	code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
#	code/modules/research/xenobiology/crossbreeding/_clothing.dm
#	code/modules/research/xenobiology/crossbreeding/prismatic.dm
#	code/modules/surgery/advanced/brainwashing.dm
#	code/modules/surgery/advanced/lobotomy.dm
#	code/modules/surgery/amputation.dm
#	code/modules/surgery/blood_filter.dm
#	code/modules/surgery/bodyparts/_bodyparts.dm
#	code/modules/surgery/brain_surgery.dm
#	code/modules/surgery/cavity_implant.dm
#	code/modules/surgery/coronary_bypass.dm
#	code/modules/surgery/gastrectomy.dm
#	code/modules/surgery/healing.dm
#	code/modules/surgery/limb_augmentation.dm
#	code/modules/surgery/organ_manipulation.dm
#	code/modules/surgery/revival.dm
#	code/modules/surgery/sleeper_protocol.dm
#	code/modules/surgery/surgery_helpers.dm
#	code/modules/surgery/surgery_step.dm
#	code/modules/unit_tests/_unit_tests.dm
#	code/modules/unit_tests/designs.dm
#	code/modules/unit_tests/icon_state_worn.dm
#	code/modules/unit_tests/screenshots/screenshot_antag_icons_cultist.png
#	code/modules/unit_tests/screenshots/screenshot_antag_icons_headrevolutionary.png
#	code/modules/unit_tests/screenshots/screenshot_antag_icons_provocateur.png
#	code/modules/unit_tests/screenshots/screenshot_husk_body.png
#	code/modules/unit_tests/screenshots/screenshot_husk_body_missing_limbs.png
#	icons/map_icons/clothing/head/_head.dmi
#	icons/map_icons/clothing/shoes.dmi
#	icons/map_icons/items/_item.dmi
#	icons/mob/huds/hud.dmi
#	icons/mob/inhands/64x64_lefthand.dmi
#	icons/mob/inhands/64x64_righthand.dmi
#	icons/obj/machines/computer.dmi
#	tgui/packages/tgui/interfaces/OperatingComputer.jsx
#	tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferences/MainPage.tsx
#	tgui/packages/tgui/interfaces/PreferencesMenu/types.ts
#	tgui/packages/tgui/interfaces/SurgeryInitiator.tsx
#	tools/icon_cutter/check.py
2026-02-12 23:50:09 -05:00
MrMelbert 2a9faabcd7 Fix wound surgical state (#94858)
## About The Pull Request

Fixes #94855

Three things

1. We filter incompatible surgical states when removing the wound. I'm
not sure if this contributed to the problem, but it seemed wrong
regardless - At that point we don't really care about incompatible
states since we're removing everything regardless
2. `COMSIG_BODYPART_UPDATING_SURGERY_STATE` was registered before adding
the states, which would cause the act of adding the states to clear the
variable.
3. The signal handler was missing the source arg, so it was removing the
wrong values.

## Changelog

🆑 Melbert
fix: Surgical state applied by wounds no longer persist after fix
/🆑
2026-01-14 15:14:42 -07:00
SmArtKar a4f0dcb76f Adds flaying, human butchering and limb surgeries (#94612)
## About The Pull Request

Merry Christmas!

This PR expands on the more gruesome areas of chef content, such as
cannibalism.
Human limbs can now be individually butchered for their meat and skin
with a knife or another butchering implement once the skin has been cut
and retracted (forks now can be used as bootleg retractors). If the limb
contains organs, those will need to be removed first, which also can be
quickly performed with a butchering tool at the cost of damaging the
inhards (head and chest will require the bone to be cut first, which can
be done with a butcher's cleaver if you don't have a saw)
You can also butcher humans whole by right clicking them with a
butchering implement on combat mode, which will attempt to gut/cut apart
the selected limb. Obviously this requires the limb to be prepped first,
so meat hooks/kitchenspikes now allow mobs strung on them to be operated
on without needing drapes. Its a pretty bad spot to be performing
surgeries at though, so beware! Torsos can only be butchered after all
other limbs have been. The gutting/butchering delay is based off the
owner's stat, halving if the limb is detached and doubling if the owner
is still alive and kicking.

<img width="392" height="265" alt="dreamseeker_D7QWbWKStd"
src="https://github.com/user-attachments/assets/050d7c25-3572-4b02-ae93-d8efefe54885"
/>

(The video is too large for github)
https://streamable.com/459a0y

After being butchered, most limbs will leave behind a nonfunctional
skeletal limb (with exceptions like jelly limbs with no skeleton inside)
which is always disabled. Skeleton chests husk their owner, so you'll
need to replace it first.
Gibbers now source their meat from the victim's limbs (and not their
species) at an RNG-based percentage based on the matter bin's tier.

As to allow individual limbs to be butchered, you can now perform (some)
surgeries on individual limbs. There are some obvious restrictions like
zombification or bioware surgeries, but most of the ones that make sense
can be performed on someone's chopped off head as long as you've got the
tools.
Wounds also contribute to surgeries now, major slash wounds count as
cut/open skin (and sealing the vessels would reduce their bleed rate),
and critical blunt wounds count as sawed bones.

I've refactored gibbers, butchering and meat spike code as well as fixed
some backend bugs while I was at it.

## Why It's Good For The Game

While rather gruesome, I feel like the freedom which these mechanics
provide fits us pretty well. We already have plenty of nasty stuff and
this doesn't really go that much further, and a chef serving their own
leg in their dish is pretty funny. (Also you can scrape plasma off
plasmamen bones)
2025-12-31 12:55:39 -06:00
SyncIt21 7c5ef1cfb8 Removes unused parameter times_fired from mob procs (#94590)
## About The Pull Request
What it says on the tin. `times_fired` is the most unused parameter in
all mob procs. I say most because there were just 2 cases where it was
used
- handling breathing
- handling heartbeat

Besides these 2 cases this parameter did nothing in every proc. Removing
it does 2 things
- Makes those procs more readable as it now has 1 less parameter that
was documented poorly and did nothing
- Makes those procs slightly faster as we are passing 1 less variable to
its parameter call stack

It can easily be substituted with `SSmobs.times_fired` which was its
original value anyways

## Changelog
🆑
code: removes an unused parameter `times_fired` from mob life procs.
Making them function slightly faster
/🆑
2025-12-26 09:51:33 -05:00
MrMelbert bfdb237612 Spooky Scary Supreme Surgery (Rework) (#93697) 2025-12-19 18:42:58 +01:00
SmArtKar 2a30f0b639 Fixes runtimes and optimizes wound/limb deletion code (#94500)
## About The Pull Request

Wounds tried to update their limb's wounds upon said limb being
destroyed during owner's species change, which caused a runtime. We can
optimize wound/limb deletion by preventing update_wounds calls entirely
when the wound is deleted during the limb's own deletion process, as its
bleed stacks or visuals no longer matter at that point. This should save
us plenty of time otherwise spent updating wound and icon data on limbs.

## Changelog
🆑
fix: Fixed runtimes caused by species changes with pre-existing wounds
code: Optimized deletion code for limbs with wounds
/🆑
2025-12-16 21:56:14 -05:00
nevimer 6e9f2ccfc0 Merge remote-tracking branch 'tgstation/master' into upstream-12-15
# Conflicts:
#	.github/workflows/compile_all_maps.yml
#	.github/workflows/run_integration_tests.yml
#	_maps/map_files/CatwalkStation/CatwalkStation_2023.dmm
#	code/_onclick/hud/credits.dm
#	code/controllers/subsystem/networks/id_access.dm
#	code/datums/diseases/advance/advance.dm
#	code/datums/diseases/advance/symptoms/heal.dm
#	code/game/machinery/doors/door.dm
#	code/game/objects/structures/crates_lockers/closets/secure/medical.dm
#	code/game/objects/structures/crates_lockers/closets/secure/security.dm
#	code/modules/antagonists/malf_ai/malf_ai_modules.dm
#	code/modules/jobs/job_types/_job.dm
#	code/modules/loadout/categories/accessories.dm
#	code/modules/loadout/loadout_helpers.dm
#	code/modules/loadout/loadout_items.dm
#	code/modules/loadout/loadout_preference.dm
#	code/modules/mob/living/silicon/robot/robot_defense.dm
#	code/modules/mod/mod_theme.dm
#	code/modules/projectiles/ammunition/energy/laser.dm
#	code/modules/reagents/reagent_containers/cups/drinks.dm
#	code/modules/shuttle/mobile_port/variants/supply.dm
#	code/modules/surgery/organs/internal/eyes/_eyes.dm
#	code/modules/unit_tests/screenshots/screenshot_antag_icons_heretic.png
#	icons/hud/screen_full.dmi
2025-12-15 18:12:29 -05:00
MrMelbert 296f3a7cbd Minor rebalance of blood loss effects / blood regeneration chemicals (#93993)
## About The Pull Request

- Across the board, bleeding wounds cause ~0.85x slower blood loss.
   - Wound clot rate while bandaged has also seen a ~0.85x reduction.
- And slashing wounds have also had their natural clotting rate reduced
by ~0.85x.
- All in all, blood wounds are expected to last marginally longer while
keeping the same level of deadliness.

- Sutures blood flow reduction has been reduced by ~0.85x as well.
Medicated suture is unaffected.

- Blood Mary now scales blood regeneration based on drunkness. 
   - Old: Flat 3 blood/tick.
- 0 drunkness = 0 blood/tick. 40 drunkness = 2 blood/tick. 80 drunkness
= 4 blood/tick.

- Epoetin Alfa saw drastic changes.
   - No longer heals liver damage.
   - No longer adds Sanguirite to the system. 
- Now directly clots 0.1 flow of bloodiest wound (almost effectively
quadrupling clot rate, but 3x less effective than sanguirite)
   - Blood/tick reduced from 3 blood/tick to 1 blood/tick.
   - Now causes minor heart damage (0.2 damage/tick).

## Why It's Good For The Game

- A while back we were talking about how volatile blood wounds were.
Blood wounds are super scary, which is good, but just how scary they
were meant that the extent to which you interacted with this was a bit
stifled. My thoughts are slowing their pace a bit should open up more
opportunities for interaction while keeping them as scary.

- See above.

- Bloody Mary was ridiculously good at healing blood loss, better than
any chemical. The tweak to the effect aims to keep it as a pocket option
for aspiring bartender-alchemists without overpowering other chemicals
in medical contexts.

- Epoetin Alfa is effectively a producible form of Sanguirite which is
something that I believe is not mass producible for a reason (it's
really strong). The changes to it aim to make it a bit less potent that
sanguirite itself while keeping it as a viable blood healing option.
- I understand the liver healing is kinda a real world analog but in the
context of our chemical system, liver damage is something intentionally
not very common. It allows for complete negation of several other chem's
downsides. While I like this form of emergent chem mixing (mannitol and
bath salts, for example), this one earns a "particularly problematic"
badge due to negating 100% of the downsides of many chems.

## Changelog

🆑 Melbert
balance: Blood flow and clotting has universally been slashed by about
0.85x. This means blood wounds kill you slightly slower, but heal
slightly slower.
balance: Sutures now heal 0.85x less blood flow and gauze's clotting
bonus is also 0.85x lower. Medicated sutures are unaffected.
balance: Bloody Mary's blood healing effect now scales with how drunk
you are. Worse in low amounts, better in high amounts.
balance: Epoetin Alfa no longer generates Sangurite. It now directly
clots bleeding wounds (at a rate ~3x worse than sangurite, but still ~4x
better than the natural clotting rate)
balance: Epoetin Alfa no longer heals liver damage.
balance: Epoetin Alfa regenerates 3x less blood. It's still 4x effective
than Saline Glucose or Iron.
balance: Epoetin Alfa now causes minor heart damage (0.2 damage per
tick).
code: All "coagulating" effects now use a shared function. 
/🆑
2025-12-07 22:09:44 -05:00
nevimer baf3837ae8 Merge remote-tracking branch 'tgstation/master' into upstream-2025-11-29
# Conflicts:
#	_maps/RandomRuins/SpaceRuins/derelict_sulaco.dmm
#	_maps/RandomRuins/SpaceRuins/garbagetruck2.dmm
#	_maps/map_files/CatwalkStation/CatwalkStation_2023.dmm
#	_maps/map_files/tramstation/tramstation.dmm
#	code/_onclick/hud/new_player.dm
#	code/datums/components/squashable.dm
#	code/datums/diseases/advance/symptoms/heal.dm
#	code/datums/diseases/chronic_illness.dm
#	code/datums/status_effects/buffs.dm
#	code/datums/status_effects/debuffs/drunk.dm
#	code/datums/status_effects/debuffs/stamcrit.dm
#	code/game/machinery/computer/crew.dm
#	code/game/objects/items/devices/scanners/health_analyzer.dm
#	code/game/objects/items/wall_mounted.dm
#	code/game/turfs/closed/indestructible.dm
#	code/modules/admin/view_variables/filterrific.dm
#	code/modules/antagonists/heretic/influences.dm
#	code/modules/cargo/orderconsole.dm
#	code/modules/client/preferences.dm
#	code/modules/events/space_vines/vine_mutations.dm
#	code/modules/mob/dead/new_player/new_player.dm
#	code/modules/mob/living/carbon/human/death.dm
#	code/modules/mob/living/carbon/human/species_types/jellypeople.dm
#	code/modules/mob/living/damage_procs.dm
#	code/modules/mob/living/living.dm
#	code/modules/mob_spawn/ghost_roles/mining_roles.dm
#	code/modules/mob_spawn/mob_spawn.dm
#	code/modules/projectiles/ammunition/energy/laser.dm
#	code/modules/projectiles/guns/ballistic/launchers.dm
#	code/modules/projectiles/guns/energy/laser.dm
#	code/modules/reagents/chemistry/machinery/chem_dispenser.dm
#	code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
#	code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm
#	code/modules/reagents/chemistry/reagents/medicine_reagents.dm
#	code/modules/surgery/healing.dm
#	code/modules/unit_tests/designs.dm
#	icons/mob/inhands/items_lefthand.dmi
#	icons/mob/inhands/items_righthand.dmi
#	tgui/packages/tgui/interfaces/ChemDispenser.tsx
2025-11-29 22:49:21 -05:00
Joshua Kidder 7a3ad79506 All camelCase (Brute|Burn|Fire|Tox|Oxy|Organ|Stamina)(Loss) procs now use snake_case. UNDERSCORES RULE! (#94111)
## About The Pull Request
It's just a partial cleanup of
anti-[STYLE](https://github.com/tgstation/tgstation/blob/master/.github/guides/STYLE.md)
code from /tg/'s ancient history. I compiled & tested with my helpful
assistant and damage is still working.

<img width="1920" height="1040" alt="image"
src="https://github.com/user-attachments/assets/26dabc17-088f-4008-b299-3ff4c27142c3"
/>


I'll upload the .cs script I used to do it shortly.

## Why It's Good For The Game
Just minor code cleanup.

Script used is located at https://metek.tech/camelTo-Snake.7z

EDIT 11/23/25: Updated the script to use multithreading and sequential
scan so it works a hell of a lot faster
```
/*
//
Copyright 2025 Joshua 'Joan Metekillot' Kidder

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
//
*/
using System.Text.RegularExpressions;
class Program
{
    static async Task Main(string[] args)
    {
        var readFile = new FileStreamOptions
        {
            Access = FileAccess.Read,
            Share = FileShare.ReadWrite,
            Options = FileOptions.Asynchronous | FileOptions.SequentialScan
        };
        FileStreamOptions writeFile = new FileStreamOptions
        {
            Share = FileShare.ReadWrite,
            Access = FileAccess.ReadWrite,
            Mode = FileMode.Truncate,
            Options = FileOptions.Asynchronous
        };
        RegexOptions regexOptions = RegexOptions.Multiline | RegexOptions.Compiled;
        Dictionary<string, int> changedProcs = new();
        string regexPattern = @"(?<=\P{L})([a-z]+)([A-Z]{1,2}[a-z]+)*(Brute|Burn|Fire|Tox|Oxy|Organ|Stamina)(Loss)([A-Z]{1,2}[a-z]+)*";
        Regex camelCaseProcRegex = new(regexPattern, regexOptions);

        string snakeify(Match matchingRegex)
        {
            var vals =
            matchingRegex.Groups.Cast<Group>().SelectMany(_ => _.Captures).Select(_ => _.Value).ToArray();
            var newVal = string.Join("_", vals.Skip(1).ToArray()).ToLower();
            string logString = $"{vals[0]} => {newVal}";
            if (changedProcs.TryGetValue(logString, out int value))
            {
                changedProcs[logString] = value + 1;
            }
            else
            {
                changedProcs.Add(logString, 1);
            }
            return newVal;
        }
        var dmFiles = Directory.EnumerateFiles(".", "*.dm", SearchOption.AllDirectories).ToAsyncEnumerable<string>();

        // uses default ParallelOptions
        // https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.paralleloptions?view=net-10.0#main
        await Parallel.ForEachAsync(dmFiles, async (filePath, UnusedCancellationToken) =>
        {
            var reader = new StreamReader(filePath, readFile);
            string oldContent = await reader.ReadToEndAsync();
            string newContent = camelCaseProcRegex.Replace(oldContent, new MatchEvaluator((Func<Match, string>)snakeify));
            if (oldContent != newContent)
            {
                var writer = new StreamWriter(filePath, writeFile);
                await writer.WriteAsync(newContent);
                await writer.DisposeAsync();
            }
            reader.Dispose();
        });
        var logToList = changedProcs.Cast<KeyValuePair<string, int>>().ToList();
        foreach (var pair in logToList)
        {
            Console.WriteLine($"{pair.Key}: {pair.Value} locations");
        }
    }
}

```

## Changelog
🆑 Bisar
code: All (Brute|Burn|Fire|Tox|Oxy|Organ|Stamina)(Loss) procs now use
snake_case, in-line with the STYLE guide. Underscores rule!
/🆑
2025-11-27 15:50:23 -05:00
RikuTheKiller c7cb0674cc Preliminary blood refactor (#93854)
## About The Pull Request

Moves all blood handling into procs and adds ways to easily hook into
basically every basic blood behavior.

This PR is not meant to fix every single case of janky blood logic in
the game. The main point and motivation of this PR is to add hooks for
blood behaviors. This allows for way more flexibility with blood code.

I am not going to fix our 3000 instances of single-letter vars, wacky
blood transfers, etc. This is just the groundwork for future PRs to
build off of, and by itself, should do very little to change blood
behavior.

I also added a rigorous set of unit tests for verifying that all of the
basic blood volume procs work correctly.

## Why It's Good For The Game

Previously, blood was handled via directly reading/writing
[var/blood_volume]. This was INCREDIBLY inconsistent and there was no
way to hook into it. This PR makes blood handling way more consistent,
which is great for all sorts of features.
2025-11-13 11:45:36 -06:00
MrMelbert 668211326a Kicks wounds out of the attack chain & core gun code (#93840) 2025-11-13 08:56:37 +01:00
Roxy 71faa643bf Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-2025-11-12 2025-11-12 16:44:13 -05:00
MrMelbert 8f99a39115 Renames burn "infestation" -> burn "infection" (#93830)
## About The Pull Request

Renames burn infestation -> burn infection

## Why It's Good For The Game

These are two radically different things and fortunately we not actually
modeling infestation.
In fact everywhere the user receives feedback about this value it uses
the correct word, infection.

So for the sake of the coders it should be accurate
2025-11-09 15:41:51 +01:00
xPokee 5e629dff04 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync 2025-10-03 07:05:54 -04:00
SmArtKar 11c3300aa0 Cleans up/optimizes wounding code (#93113)
## About The Pull Request

So turns out that wounding is actually one of the main time consumers in
``apply_damage()``, as it has a lot of unused or unnecessary code which
it runs all the time, be it storing a lot of info in lists despite never
passing more than a single value, or running checks multiple times. I've
cut out or simplified unnecessary/overly complex logic, and tried to
pull out some of the more expensive checks to make it run faster.
There's probably tons more stuff to improve here because this code is so
convoluted, but this is the best I've got for now.

## Why It's Good For The Game

Cleaner code, runs faster too.

## Changelog
🆑
code: Cleaned up wound code, should hopefully run a bit faster now.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-10-02 22:23:55 +02:00
necromanceranne 097c2e52cd TRAIT_HARDLY_WOUNDED and TRAIT_EASILY_WOUNDED now decrease and increase the max considered damage for wounds by 50%, rather than adjusting the considered damage itself. (#92993) 2025-09-24 18:13:08 +02:00
xPokee b308ee9d78 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync 2025-09-24 10:13:01 -04:00
MrMelbert 750ca9d2ec Two as anything greps (and some other cleanup) (#92974) 2025-09-20 13:44:28 -04:00
xPokee 939f2fc9ac Merge branch 'master' of https://github.com/tgstation/tgstation into xpokee-test-upstream-sync 2025-09-10 14:12:16 -04:00
MrMelbert 135a09182b Refactors obscured (#92779)
## About The Pull Request

Fixes #85028

Obscured flags and covered flags are tracked on carbons, updated as
items are equipped and unequipped. It's that shrimple.

Closes #92760

Just removes the species exception checks for not making sense

Also refactors handcuffs / legcuffs removal. In all of these situations
they were hardcoded when they could easily just use an inventory proc to
work.

## Why It's Good For The Game

Stops a million excessive calls to `check_obscured_slots`

Makes obscured behavior more consistent

Makes obscured behavior easier to use

Cleans up human rendering (There was some cursed stuff before with
render item -> updated obscured -> update body -> cause side effects)

## Changelog

🆑 Melbert
del: Golems which somehow manage to grow wings and somehow manage to
equip something that covers their jumpsuit can no longer fly.
(Seriously, this will not affect anyone)
refactor: Refactored clothing obscurity entirely. Items should be a
loooot more consistent and what covers what, and should update a lot
snappier. As always, report any oddities, like mysteriously disappearing
articles of clothing, hair, or species parts
refactored: Refactored handcuffs and legcuffs a bit, report any odd
situations with cuffs like getting stuck restrained
/🆑
2025-09-07 09:24:34 +02:00
MrMelbert 7454100c5e Every so slightly buffs airlock crushing (#92403)
## About The Pull Request

+5 damage to airlock crushing
Now uses apply damage (which means it can wound and is affected by
physiology)
Has a wound bonus so it has the potential to cause wounds. In testing it
seems super uncommon unless you're frail though.

## Why It's Good For The Game

15 damage for being smashed in a door? Insane

## Changelog

🆑 Melbert
balance: Airlock crushing now does 20 damage, up from 15. Also may
uncommonly cause wounds. Also is properly affected by damage reduction
or modifiers.
/🆑

(cherry picked from commit f84df6300b)

# Conflicts:
#	code/game/machinery/doors/door.dm
2025-08-08 15:32:19 -04:00
MrMelbert f84df6300b Every so slightly buffs airlock crushing (#92403)
## About The Pull Request

+5 damage to airlock crushing
Now uses apply damage (which means it can wound and is affected by
physiology)
Has a wound bonus so it has the potential to cause wounds. In testing it
seems super uncommon unless you're frail though.

## Why It's Good For The Game

15 damage for being smashed in a door? Insane

## Changelog

🆑 Melbert
balance: Airlock crushing now does 20 damage, up from 15. Also may
uncommonly cause wounds. Also is properly affected by damage reduction
or modifiers.
/🆑
2025-08-06 22:03:37 -04:00
necromanceranne 690bfc04b4 Rebalances wound determination values, wounding escalation and wound armor to hopefully be less explosive (#91099)
This is a big one so please bear with me, wounds are complicated

We've decreased the max contributed damage to wound rolls from 35 to 25.
This results, after the exponent, a max possible wound roll of 1 to 91
before any modifiers (assuming the attack, after armor, is 25 or above).

The minimum value to wound is still 5.

Most wounds were contributing significant numbers per wound type to the
potential for a new wound to occur. Getting wounded once meant you were
getting wound a lot, but actually getting past that first wounding may
be the tricky part.

We have significantly reigned in the wound penalty that having a wound
contributes, and instead utilize the series wound penalty to allow same
type wounds to escalate themselves faster as a priority. Having wounds
still makes you more wound vulnerable, just not to such an extreme
degree.

The priority here for what wounds matter most for contributing to
overall wounding vulnerability is ``Infected BURNS > BURNS >
SLASH|PIERCE > BLUNT.``

Wound armor, unlike all other kinds of armor, was used as a additive
value to the wound roll modifiers rather than a multiplicative value.

We have reworked how wound armor is determined by changing how wound
modifiers are calculated.

Firstly, we're passing our entire injury roll into the
``check_woundings_mod()`` proc, as we're not treating this as a proc
that just adds values anymore.

Secondly, bare wound bonus only applies if there is no potential wound
protection from any source, as expected. But it comes last in the
calculations.

Thirdly, wound protection is applied to the injury roll last, after
wound bonuses from the attack, wound bonuses from other wounds and wound
bonuses from a disabled limb are applied. This does not include serial
wound bonuses, which are determined outside of this proc.

Wound protection comes from two sources. Clothing and limb wound
resistance. Your chest and head have an amount of wound resistance so
long as they are not mangled in any fashion. Being mangled means having
either a hairline fracture or a weeping avulsion wound.

Wound protection reduces the final injury roll by a percentage. Say our
roll is 50, and we have effectively 50% wound protection. The final roll
would be 25.

~~Most clothing have had their wound armor values changed. As a loose
rule, I used the highest of melee or bomb armor, except where that value
was 100, in which case I used the lowest instead. I'm basing this
decision on how embeds are calculated, which is attack type agnostic.~~

~~Some armor have inconsistent values because they are alternative
armors to an existing armor type or are hyperspecialized armor.
Ablative, bulletproof and security vests all share a value of 35,
despite the former two not having decent melee or bomb armor.~~

~~Some clothing missing wound armor that should have had them now have
wound armor.~~

~~This may need a bit of scrutiny in case one or two seem weirdly high.
Some have maybe become too low. Its a bit hard to say.~~

I changed it to ``exposed_wound_bonus`` to better represent when it
applies. You can be naked and still not be affected by this bonus if the
limb has wound resistance.

I'm not promising anything with this PR, but this is an attempt to
sanity check the values on wounds so that we're not seeing what the data
that determined the removal of beheading presented. An extreme
over-representation of tier 3 wounds. ~~And, from that, maybe I can
argue for beheadings coming back. That's my goal. I think beheadings
happened so much because the numbers were in need of work.~~ Well okay I
just wanna make wounds a bit more workable actually more than I want
beheadings.

Why is it that tier 3 wounds were so over-represented? Because wounds
will often force more severe wounds of other types by merit of any
wounds existing at all on a limb. Having **_a_** wound makes you more
wound prone for any kind of wound, and not just making you more likely
to suffer a more severe type of the same wound.

The threshold mechanic was intended to simulate making a wound worse,
but oddly just made a limb broadly more prone to getting worse from any
kind of attack to such a degree that future wound rolls of different
types were often going to start at the threshold necessary to be a tier
3 wound.

Dismemberment, mind you, requires you to suffer a flesh wound while you
have a bone wound of tier 2 or higher (with tier 3 giving a bonus to
this). You can do this readily via just a sharp weapon, because having a
mangled limb causes the wound to turn into a bone wound. Technically,
this is meant to be less likely as the effective damage for this wound
is halved. But the wound bonus from having a flesh wound was almost
always significant enough to kick your new bone wound up to a tier 3.

In other words; its not surprising that you saw so many beheadings,
because the system wanted to behead you as fast as it possibly can
thanks to all these escalating values.

Wound armor was only applied as a flat reduction on the roll. The
average for wound armor was 10. After receiving a single wound, you can
expect wound rolls to reach upwards of 100, even if the actual damage
roll was not particularly high, due to wound stacking bonuses form being
wounded.

This meant that wounds, if they happened, came thick and fast after the
first, regardless of what your protection might be to wounds. It was
just a matter of getting past the initial bump.

This is why effects that forced wounds were so powerful. They basically
made a given limb more prone to taking a wound without having to deal
with the protection problem first.

Finally, this is just a broad flaw with the system that is not its
fault. It is actually a problem that isn't a problem. Most people in the
game are not wearing helmets that protect their head. So most people are
going to suffer from a higher proclivity of being wounded if people are
aiming for the head. There is this...kind of cargo cult belief that
aiming for the head means you do more damage, or can stun someone if
you're lucky or what have you. It's entirely nonsense, but it has a
grain of truth in that people rarely wear, or even have access too,
headwear that provides wound protection or any protection at all. People
have jumpsuits, which are universally wound protected, but that isn't
true of the head. Look, the point is, they're not aiming at the head
because it is usually less armored, its for other reasons but it just so
happens to become true due to wounds and how wounds roll their type.

To soften this issue, I've decided to treat wound resistance as armor
until the limb suffers a tier 3 wound. This way, hits to the head MAY
not necessarily escalate to tier 3 instantly as they would on live even
from relatively low power weapons. Some weapons have very low force, but
have extreme bare wound bonuses. This should be less likely after this
change. I doubt this will necessarily make high damage high wound
weapons like energy swords any less prone to cutting you clean open, but
it might thanks to the reduction to contributed damage to the injury
roll. The system is now _a bit more random_.

🆑
balance: Wounds do not make you as vulnerable to suffering wounds of all
types as before. Instead, wounds make you more vulnerable to suffering
worse versions of themselves as a priority.
balance: Wound armor is now more impactful when protecting you from
wounds when you have already been wounded.
balance: Your head and chest are more difficult to wound until they have
been mangled; either from suffering from a weeping avulsion or a
hairline fracture.
code: Changed the variable for bare_wound_bonus to exposed_wound_bonus
to better explain what that variable is doing.
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2025-06-21 22:32:18 -04:00
throwawayuseless df3df27e1d Diagnosis: The Diagnosing (#91361)
Adds more analog diagnostic stuff, and expands on what's already there.
Current content added:

- Custom text for when you examine different kinds of organs with
stethoscopes and penlights.
- Examining eldritchly corrupted organs too closely (stethoscope and
penlight) is a bad idea.
- If you place a metal disk against a guy sparking like a tesla coil,
you get shocked. Go figure.
- If someone has an actively damaging zombie infection (ie. got clawed
by a zombie, not romerol), you can see it on penlight.
- New Hemoanalytic Scanner, for use in places where real health scanners
with actual useful features are too high class. It's able to scan for
medicines in the blood, check blood and oxygen levels, determine if the
scannee has tox damage, and even check their blood type. It's printable
roundstart for iron and glass, so that medbay isn't completely fucked if
science doesn't do their job and they lose their health analyzers
somehow.
- Nifty status effect messages for those tools!

Fun, rarely used systems are being improved, and seeing as how the
easily available, faster health analyzer is basically the end-all be-all
of diagnostic tools anyways, it's not going to unbalance anything unless
i literally make them just a health analyzer but better.
🆑
add: Vaguely estimate what kinds of hearts and lungs people have from a
variety of weird stethoscope noises! (Or just look it up on the pr, I
won't judge.)
add: Using analog diagnostic tools on eldritch organs from beyond the
waking world or people whose hearts cause their skin to arc like a tesla
coil is a bad idea. Examine people, ya goof.
add: You can see if someone has an actively damaging (read: contracted
straight from the groaning hungry source) zombie infection by using a
penlight. Act out highly emotional headshot hesitation scenes today!
add: New Hemoanalytic Scanner (read: really shitty but roundstart
printable chem scanner), which tells you all about someone's blood, and
can also detect medicines in their bloodstream! Not toxins or
miscellaneous reagents though.
refactor: Refactored and added some penlight, stethoscope, and organ
code. If shit is fucked, please report it on the github issue tracker
ASAP.
fix: X-Ray vision generically causes eyes to glow under penlight, not
just specifically the mutation X-Ray vision.
fix: Reflex Hammers now fit in medical storage items, IE. medbelts and
medkits.
balance: People with welding-eyes or similar will not have their pupils
react to penlight examination.
/🆑

---------

Co-authored-by: ThrowawayUseless <notarealemail@emailservice.fake>
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
2025-06-21 22:26:28 -04:00
necromanceranne 57624ca1e2 Rebalances wound determination values, wounding escalation and wound armor to hopefully be less explosive (#91099)
## About The Pull Request

This is a big one so please bear with me, wounds are complicated

### Max Potential Wound Rolls

We've decreased the max contributed damage to wound rolls from 35 to 25.
This results, after the exponent, a max possible wound roll of 1 to 91
before any modifiers (assuming the attack, after armor, is 25 or above).

The minimum value to wound is still 5.

### Wound Escalation Penalties

Most wounds were contributing significant numbers per wound type to the
potential for a new wound to occur. Getting wounded once meant you were
getting wound a lot, but actually getting past that first wounding may
be the tricky part.

We have significantly reigned in the wound penalty that having a wound
contributes, and instead utilize the series wound penalty to allow same
type wounds to escalate themselves faster as a priority. Having wounds
still makes you more wound vulnerable, just not to such an extreme
degree.

The priority here for what wounds matter most for contributing to
overall wounding vulnerability is ``Infected BURNS > BURNS >
SLASH|PIERCE > BLUNT.``

### Wound Armor

Wound armor, unlike all other kinds of armor, was used as a additive
value to the wound roll modifiers rather than a multiplicative value.

We have reworked how wound armor is determined by changing how wound
modifiers are calculated.

Firstly, we're passing our entire injury roll into the
``check_woundings_mod()`` proc, as we're not treating this as a proc
that just adds values anymore.

Secondly, bare wound bonus only applies if there is no potential wound
protection from any source, as expected. But it comes last in the
calculations.

Thirdly, wound protection is applied to the injury roll last, after
wound bonuses from the attack, wound bonuses from other wounds and wound
bonuses from a disabled limb are applied. This does not include serial
wound bonuses, which are determined outside of this proc.

Wound protection comes from two sources. Clothing and limb wound
resistance. Your chest and head have an amount of wound resistance so
long as they are not mangled in any fashion. Being mangled means having
either a hairline fracture or a weeping avulsion wound.

Wound protection reduces the final injury roll by a percentage. Say our
roll is 50, and we have effectively 50% wound protection. The final roll
would be 25.

### ~~Wound Armor on Clothing~~ Reverted

~~Most clothing have had their wound armor values changed. As a loose
rule, I used the highest of melee or bomb armor, except where that value
was 100, in which case I used the lowest instead. I'm basing this
decision on how embeds are calculated, which is attack type agnostic.~~

~~Some armor have inconsistent values because they are alternative
armors to an existing armor type or are hyperspecialized armor.
Ablative, bulletproof and security vests all share a value of 35,
despite the former two not having decent melee or bomb armor.~~

~~Some clothing missing wound armor that should have had them now have
wound armor.~~

~~This may need a bit of scrutiny in case one or two seem weirdly high.
Some have maybe become too low. Its a bit hard to say.~~

### The ``bare_wound_bonus`` variable

I changed it to ``exposed_wound_bonus`` to better represent when it
applies. You can be naked and still not be affected by this bonus if the
limb has wound resistance.

## Why It's Good For The Game

I'm not promising anything with this PR, but this is an attempt to
sanity check the values on wounds so that we're not seeing what the data
that determined the removal of beheading presented. An extreme
over-representation of tier 3 wounds. ~~And, from that, maybe I can
argue for beheadings coming back. That's my goal. I think beheadings
happened so much because the numbers were in need of work.~~ Well okay I
just wanna make wounds a bit more workable actually more than I want
beheadings.

Why is it that tier 3 wounds were so over-represented? Because wounds
will often force more severe wounds of other types by merit of any
wounds existing at all on a limb. Having **_a_** wound makes you more
wound prone for any kind of wound, and not just making you more likely
to suffer a more severe type of the same wound.

The threshold mechanic was intended to simulate making a wound worse,
but oddly just made a limb broadly more prone to getting worse from any
kind of attack to such a degree that future wound rolls of different
types were often going to start at the threshold necessary to be a tier
3 wound.

Dismemberment, mind you, requires you to suffer a flesh wound while you
have a bone wound of tier 2 or higher (with tier 3 giving a bonus to
this). You can do this readily via just a sharp weapon, because having a
mangled limb causes the wound to turn into a bone wound. Technically,
this is meant to be less likely as the effective damage for this wound
is halved. But the wound bonus from having a flesh wound was almost
always significant enough to kick your new bone wound up to a tier 3.

In other words; its not surprising that you saw so many beheadings,
because the system wanted to behead you as fast as it possibly can
thanks to all these escalating values.

Wound armor was only applied as a flat reduction on the roll. The
average for wound armor was 10. After receiving a single wound, you can
expect wound rolls to reach upwards of 100, even if the actual damage
roll was not particularly high, due to wound stacking bonuses form being
wounded.

This meant that wounds, if they happened, came thick and fast after the
first, regardless of what your protection might be to wounds. It was
just a matter of getting past the initial bump.

This is why effects that forced wounds were so powerful. They basically
made a given limb more prone to taking a wound without having to deal
with the protection problem first.

Finally, this is just a broad flaw with the system that is not its
fault. It is actually a problem that isn't a problem. Most people in the
game are not wearing helmets that protect their head. So most people are
going to suffer from a higher proclivity of being wounded if people are
aiming for the head. There is this...kind of cargo cult belief that
aiming for the head means you do more damage, or can stun someone if
you're lucky or what have you. It's entirely nonsense, but it has a
grain of truth in that people rarely wear, or even have access too,
headwear that provides wound protection or any protection at all. People
have jumpsuits, which are universally wound protected, but that isn't
true of the head. Look, the point is, they're not aiming at the head
because it is usually less armored, its for other reasons but it just so
happens to become true due to wounds and how wounds roll their type.

To soften this issue, I've decided to treat wound resistance as armor
until the limb suffers a tier 3 wound. This way, hits to the head MAY
not necessarily escalate to tier 3 instantly as they would on live even
from relatively low power weapons. Some weapons have very low force, but
have extreme bare wound bonuses. This should be less likely after this
change. I doubt this will necessarily make high damage high wound
weapons like energy swords any less prone to cutting you clean open, but
it might thanks to the reduction to contributed damage to the injury
roll. The system is now _a bit more random_.

## Changelog
🆑
balance: Wounds do not make you as vulnerable to suffering wounds of all
types as before. Instead, wounds make you more vulnerable to suffering
worse versions of themselves as a priority.
balance: Wound armor is now more impactful when protecting you from
wounds when you have already been wounded.
balance: Your head and chest are more difficult to wound until they have
been mangled; either from suffering from a weeping avulsion or a
hairline fracture.
code: Changed the variable for bare_wound_bonus to exposed_wound_bonus
to better explain what that variable is doing.
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2025-06-19 17:49:59 +02:00
throwawayuseless f02819360b Diagnosis: The Diagnosing (#91361)
## About The Pull Request
Adds more analog diagnostic stuff, and expands on what's already there.
Current content added:

- Custom text for when you examine different kinds of organs with
stethoscopes and penlights.
- Examining eldritchly corrupted organs too closely (stethoscope and
penlight) is a bad idea.
- If you place a metal disk against a guy sparking like a tesla coil,
you get shocked. Go figure.
- If someone has an actively damaging zombie infection (ie. got clawed
by a zombie, not romerol), you can see it on penlight.
- New Hemoanalytic Scanner, for use in places where real health scanners
with actual useful features are too high class. It's able to scan for
medicines in the blood, check blood and oxygen levels, determine if the
scannee has tox damage, and even check their blood type. It's printable
roundstart for iron and glass, so that medbay isn't completely fucked if
science doesn't do their job and they lose their health analyzers
somehow.
- Nifty status effect messages for those tools!

## Why It's Good For The Game
Fun, rarely used systems are being improved, and seeing as how the
easily available, faster health analyzer is basically the end-all be-all
of diagnostic tools anyways, it's not going to unbalance anything unless
i literally make them just a health analyzer but better.
## Changelog
🆑
add: Vaguely estimate what kinds of hearts and lungs people have from a
variety of weird stethoscope noises! (Or just look it up on the pr, I
won't judge.)
add: Using analog diagnostic tools on eldritch organs from beyond the
waking world or people whose hearts cause their skin to arc like a tesla
coil is a bad idea. Examine people, ya goof.
add: You can see if someone has an actively damaging (read: contracted
straight from the groaning hungry source) zombie infection by using a
penlight. Act out highly emotional headshot hesitation scenes today!
add: New Hemoanalytic Scanner (read: really shitty but roundstart
printable chem scanner), which tells you all about someone's blood, and
can also detect medicines in their bloodstream! Not toxins or
miscellaneous reagents though.
refactor: Refactored and added some penlight, stethoscope, and organ
code. If shit is fucked, please report it on the github issue tracker
ASAP.
fix: X-Ray vision generically causes eyes to glow under penlight, not
just specifically the mutation X-Ray vision.
fix: Reflex Hammers now fit in medical storage items, IE. medbelts and
medkits.
balance: People with welding-eyes or similar will not have their pupils
react to penlight examination.
/🆑

---------

Co-authored-by: ThrowawayUseless <notarealemail@emailservice.fake>
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
2025-06-19 09:36:02 +02:00
SmArtKar d841c9df40 [MDB IGNORE] Blood Refactor Chapter 2: Collector's Edition (#91054)
Refactors most of blood handling code untouched by #90593 and completely
rewrites all blood decals, components and reagents.

- Blood types now have behavioral flags which allow them to control
where they leave decals/DNA/viruses. Oil no longer transfers DNA and
viruses with it, while podpeople water-blood doesn't leave visible
decals on turfs and items, but still can be picked up by DNA scanners.
- Multiple blood types have received unique handling - liquid
electricity blood now glows in the dark, oil trails are flammable and
lube ones are slippery. Oil blood can be restored with fuel, lube with
silicon and slime with stable plasma (as normal plasma already passively
regenerates their blood), instead of everything using iron. Saline
solution only supplements on iron-based blood and won't do anything to
help with bloodloss for species who rely on different blood types.
(Roundstart this applies only to Ethereals)
- All blood logic has been moved away from the blood reagent itself into
a blood element that is assigned to the blood reagent by default, and to
any reagent that's drawn from a mob as their "blood" (in
``transfer_blood_to``). This means that blood you draw from lizards will
be green and have lizard's blood description instead of mentioning red
blood cells, Ethereal "blood" will actually contain their DNA and genes,
etc.
- Refactored all blood decals. Blood states are no more, everything is
now handled via blood DNA. Credits to MrMelbert and Maplestation, as a
significant amount of code has been taken from
https://github.com/MrMelbert/MapleStationCode/pull/436 and many of his
followup PRs. Oil and xenomorph splatters are now subtypes of blood,
blood drying is now animated, blood trails now curve and can be
diagonal.
- Rewrote bloodysoles and bloody_spreader components, credits to Melbert
again for the former, while latter now makes more sense with its
interactions. Bloody soles no longer share blood DNA with your hands.
- Ported Melbert's bloody footprint sprites and bot-blood-spreading
functionality.
- Removed all species-side reagent interactions, instead they're handled
by said species' livers. (This previously included exotic blood
handling, thus the removal)
- Slightly optimized human rendering by removing inbetween overlay
holders for clothing when they're not needed.
- Blood-transmitted diseases will now get added to many more decals than
before.
- Cleaned up and partially refactored replica pods, fixed an issue where
monkeys/manipulators were unable to harvest mindless pods.
- Exotic bloodtype on species now automatically assigns their blood
reagent, without the need to assign them separately.
- Clown mobs now bleed (with colorful reagent instead of blood during
april fools), and so do vatbeasts (lizard blood)
- Implemented generic procs for handling bleeding checks, all sorts of
scanners now also correctly call your blood for what it is.
- Podpeople's guts are now lime-green like their organs, instead of
being weirdly greyish like their water-blood. (Their bleeding overlays
are still grey, as they're bleeding water)
- Slimepeople now can bleed. Their jelly is pale purple in color, but
their wound overlays copy their body color.
- Injecting/spraying/splashing/etc mob with a reagent preserves its
data, so you could theoretically recycle fine wines from someone's
bloodstream
- Fixed burdened chaplain's sect never actually giving a blessing when
applying effects, and giving a blessing when nothing can be healed.
Inverted check strikes again.

- Closes #91039

A lot of blood here has dried, visually the blood colors are almost
exactly the same as before either of the blood refactors.

![dreamseeker_BSP7FE9pRB](https://github.com/user-attachments/assets/45711fa0-ae65-4ec2-9e89-753fa7dd876f)

![dreamseeker_zyv9ssh5VN](https://github.com/user-attachments/assets/7b112854-b7e3-4bfe-b78b-199a55b5b051)
2025-06-05 19:47:01 -04:00
SmArtKar b4061f1800 [MDB IGNORE] Blood Refactor Chapter 2: Collector's Edition (#91054)
## About The Pull Request

Refactors most of blood handling code untouched by #90593 and completely
rewrites all blood decals, components and reagents.

- Blood types now have behavioral flags which allow them to control
where they leave decals/DNA/viruses. Oil no longer transfers DNA and
viruses with it, while podpeople water-blood doesn't leave visible
decals on turfs and items, but still can be picked up by DNA scanners.
- Multiple blood types have received unique handling - liquid
electricity blood now glows in the dark, oil trails are flammable and
lube ones are slippery. Oil blood can be restored with fuel, lube with
silicon and slime with stable plasma (as normal plasma already passively
regenerates their blood), instead of everything using iron. Saline
solution only supplements on iron-based blood and won't do anything to
help with bloodloss for species who rely on different blood types.
(Roundstart this applies only to Ethereals)
- All blood logic has been moved away from the blood reagent itself into
a blood element that is assigned to the blood reagent by default, and to
any reagent that's drawn from a mob as their "blood" (in
``transfer_blood_to``). This means that blood you draw from lizards will
be green and have lizard's blood description instead of mentioning red
blood cells, Ethereal "blood" will actually contain their DNA and genes,
etc.
- Refactored all blood decals. Blood states are no more, everything is
now handled via blood DNA. Credits to MrMelbert and Maplestation, as a
significant amount of code has been taken from
https://github.com/MrMelbert/MapleStationCode/pull/436 and many of his
followup PRs. Oil and xenomorph splatters are now subtypes of blood,
blood drying is now animated, blood trails now curve and can be
diagonal.
- Rewrote bloodysoles and bloody_spreader components, credits to Melbert
again for the former, while latter now makes more sense with its
interactions. Bloody soles no longer share blood DNA with your hands.
- Ported Melbert's bloody footprint sprites and bot-blood-spreading
functionality.
- Removed all species-side reagent interactions, instead they're handled
by said species' livers. (This previously included exotic blood
handling, thus the removal)
- Slightly optimized human rendering by removing inbetween overlay
holders for clothing when they're not needed.
- Blood-transmitted diseases will now get added to many more decals than
before.
- Cleaned up and partially refactored replica pods, fixed an issue where
monkeys/manipulators were unable to harvest mindless pods.
- Exotic bloodtype on species now automatically assigns their blood
reagent, without the need to assign them separately.
- Clown mobs now bleed (with colorful reagent instead of blood during
april fools), and so do vatbeasts (lizard blood)
- Implemented generic procs for handling bleeding checks, all sorts of
scanners now also correctly call your blood for what it is.
- Podpeople's guts are now lime-green like their organs, instead of
being weirdly greyish like their water-blood. (Their bleeding overlays
are still grey, as they're bleeding water)
- Slimepeople now can bleed. Their jelly is pale purple in color, but
their wound overlays copy their body color.
- Injecting/spraying/splashing/etc mob with a reagent preserves its
data, so you could theoretically recycle fine wines from someone's
bloodstream
- Fixed burdened chaplain's sect never actually giving a blessing when
applying effects, and giving a blessing when nothing can be healed.
Inverted check strikes again.

- Closes #91039 

#### Examples

A lot of blood here has dried, visually the blood colors are almost
exactly the same as before either of the blood refactors.


![dreamseeker_BSP7FE9pRB](https://github.com/user-attachments/assets/45711fa0-ae65-4ec2-9e89-753fa7dd876f)

![dreamseeker_zyv9ssh5VN](https://github.com/user-attachments/assets/7b112854-b7e3-4bfe-b78b-199a55b5b051)
2025-05-31 19:38:07 -05:00
Roxy 14a68d4011 Fix hard delete related to projectile-caused wounds (#91287)
## About The Pull Request

`apply_wound` passes a ref to the thing that caused the wound, so that
the name can be stored and visible when an autopsy is conducted on the
wounded. The problem is projectiles are `/obj/projectile`, not
`/obj/item/projectile`, so the else condition (which is there so if it's
already being passed a string `wound_source` it will just use that)
happens and a ref to the projectile itself is stored in the
`wound_source` var, there's no handling for cleaning this up because
it's an unintended behavior.

## Why It's Good For The Game

Hard del fix

## Changelog

No player facing changes
2025-05-24 22:06:50 -04:00
Roxy 245f453a43 Fix hard delete related to projectile-caused wounds (#91287)
## About The Pull Request

`apply_wound` passes a ref to the thing that caused the wound, so that
the name can be stored and visible when an autopsy is conducted on the
wounded. The problem is projectiles are `/obj/projectile`, not
`/obj/item/projectile`, so the else condition (which is there so if it's
already being passed a string `wound_source` it will just use that)
happens and a ref to the projectile itself is stored in the
`wound_source` var, there's no handling for cleaning this up because
it's an unintended behavior.

## Why It's Good For The Game

Hard del fix

## Changelog

No player facing changes
2025-05-25 03:12:56 +03:00
throwawayuseless e6ca30d009 Immunodeficiency Quirk 2: Localhost Boogaloo (#90937)
## About The Pull Request
Adds a new quirk, (-10 cost) called Immunodeficiency, and a new inverse
chem of spaceacillin, sepsisillin. Both cause the same effect. (Well,
the quirk version is permanent obviously) When affected by either of
these, viruses will progress faster and you will catch them more easily,
burns will necrotize faster and be harder to sanitize, and alien embryos
will gestate more quickly. These effects can be mitigated with
spaceacillin, but even while under the effects of spaceacillin, you'll
only be about on par with or slightly worse than a normal person, as
opposed to the blanket protection that spaceacillin normally provides.

Owners of the quirk will be provided with a bottle of 3 low dose (1
minute duration) spaceacillin pills to mitigate their condition, and a
sterile medical mask(the noninternals kind) for style and flavor.
## Why It's Good For The Game
More unique quirk options = good. Reasons to actually ask RP and
chemists for things = good. More inverse chems = good.
Also, the sepsisillin was too good an inverse name and effect to resist.
Sepsisillin also has some interesting use cases.

Example: Need a guy dead and work in medical? you could just stab him,
or... you offer him a coffee. Inside said coffee is 10u of sepsisillin
and the deadliest blood transmitted virus (to minimize collateral
damage) you can cook up. Watch as he drinks said coffee, feels fine, and
then 2 minutes later suddenly starts attempting to un-dock from his
lungs.

## Testing Images:

Spawns with mask and pills: 
 
![Screenshot 2025-04-30
181323](https://github.com/user-attachments/assets/6c8f3cd7-27f5-431c-adab-cfacf43b57c8)
![Screenshot 2025-04-30
180418](https://github.com/user-attachments/assets/ba3306ee-9d34-4d8a-9460-0bdc64b284d8)

Monkeyhuman with Fungal TB after 1 minute.
![Screenshot 2025-04-30
182920](https://github.com/user-attachments/assets/c3227d72-20a2-4ff2-87ae-5685c359170b)

Monkeyhuman with Fungal TB and Immunodeficiency after 1 minute.
![Screenshot 2025-04-30
182933](https://github.com/user-attachments/assets/08138108-143e-41d3-ac78-201bf62ff396)

## Changelog


🆑
add: Adds new immunodeficiency negative quirk, and sepsisillin, the
inverse of spaceacillin. Both have an immune system weakening effect,
mitigate-able with spaceacillin.
/🆑

---------

Co-authored-by: ThrowawayUseless <notarealemail@emailservice.fake>
2025-05-15 16:10:26 -04:00
throwawayuseless 54ea5b5333 Immunodeficiency Quirk 2: Localhost Boogaloo (#90937)
## About The Pull Request
Adds a new quirk, (-10 cost) called Immunodeficiency, and a new inverse
chem of spaceacillin, sepsisillin. Both cause the same effect. (Well,
the quirk version is permanent obviously) When affected by either of
these, viruses will progress faster and you will catch them more easily,
burns will necrotize faster and be harder to sanitize, and alien embryos
will gestate more quickly. These effects can be mitigated with
spaceacillin, but even while under the effects of spaceacillin, you'll
only be about on par with or slightly worse than a normal person, as
opposed to the blanket protection that spaceacillin normally provides.

Owners of the quirk will be provided with a bottle of 3 low dose (1
minute duration) spaceacillin pills to mitigate their condition, and a
sterile medical mask(the noninternals kind) for style and flavor.
## Why It's Good For The Game
More unique quirk options = good. Reasons to actually ask RP and
chemists for things = good. More inverse chems = good.
Also, the sepsisillin was too good an inverse name and effect to resist.
Sepsisillin also has some interesting use cases.

Example: Need a guy dead and work in medical? you could just stab him,
or... you offer him a coffee. Inside said coffee is 10u of sepsisillin
and the deadliest blood transmitted virus (to minimize collateral
damage) you can cook up. Watch as he drinks said coffee, feels fine, and
then 2 minutes later suddenly starts attempting to un-dock from his
lungs.

## Testing Images:

Spawns with mask and pills: 
 
![Screenshot 2025-04-30
181323](https://github.com/user-attachments/assets/6c8f3cd7-27f5-431c-adab-cfacf43b57c8)
![Screenshot 2025-04-30
180418](https://github.com/user-attachments/assets/ba3306ee-9d34-4d8a-9460-0bdc64b284d8)

Monkeyhuman with Fungal TB after 1 minute.
![Screenshot 2025-04-30
182920](https://github.com/user-attachments/assets/c3227d72-20a2-4ff2-87ae-5685c359170b)

Monkeyhuman with Fungal TB and Immunodeficiency after 1 minute.
![Screenshot 2025-04-30
182933](https://github.com/user-attachments/assets/08138108-143e-41d3-ac78-201bf62ff396)

## Changelog


🆑
add: Adds new immunodeficiency negative quirk, and sepsisillin, the
inverse of spaceacillin. Both have an immune system weakening effect,
mitigate-able with spaceacillin.
/🆑

---------

Co-authored-by: ThrowawayUseless <notarealemail@emailservice.fake>
2025-05-13 10:40:36 +12:00
Waterpig 753d8e5ba4 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-25-04a 2025-04-08 18:58:45 +02:00
MrMelbert 1406210b6e Improves the "Check mood" printout, reworks the "Check self" printout, minor embed changes (#89854)
## About The Pull Request

1. Reformats "Check Mood" 

Basically just cleaning it up.
- Moodlets are bullet pointed.
- Hunter is displayed here now.
- Quirks are displayed here now.
- It now tells you how drunk you feel.

Sample


![image](https://github.com/user-attachments/assets/1aac1180-1eed-45f7-9615-005eeecef8c8)

2. Reworks "Check self"

Big reworks done here.
- Organs now don't outright say "Your hear is hurty" "Your lugs are
hurty". Now they'll say something like, "Your chest feels tight" -
Unless you're self aware, then it will say "Your heart is hurty".
- Check self no longer reports wounds with 100% accuracy. You get an
approximate of what the wound is like - "Your chest has an open cut".
More severe wounds will still be bolded, though.

Sample 


![image](https://github.com/user-attachments/assets/3da6336c-63db-4298-9fcb-76748608c848)


![image](https://github.com/user-attachments/assets/6e797ef3-cb04-46cd-aa3c-520c9240953d)

3. Embed tweaks

Embeds can be hidden, and thus will only show up on health analyzers.
This means you can't rip them out by hand.
Right now only bullet shrapnel and explosion shrapnel is hidden.

## Why It's Good For The Game

1. Just some cleanup, largely. Stuff like quirks and hunger make more
sense when checking your mental rather than checking your body. Though
this might be weird for if mood is config-disabled, I might have to
revisit htat.

2. I always found that clicking on yourself and just getting a print out
of "Your liver's non-functional, your chest has a weeping avulsion, etc"
is pretty lame... it kind of diminishes diagnosis / doctor's job.
Ultimately, the goal of this is to open up a little more doctor gameplay
- primarily I think it'll allow for some fully roleplay moments, like
"Doc my chest hurts a lil" "You have 7 bullets and broken ribs bro"

3. Adds more punch to some embeds. Mostly for larp though.

## Changelog

🆑 Melbert
add: Your mood printout (clicking on the mood face) has been
reformatted, and should generally be cleaner.
add: Self examining was reworked, and overall gives you a lot less
perfect information, unless you are self-aware.
add: Bullet and grenade shrapnel is now hidden from examining - it's
skin deep. You can't rip them out with your hands, but hemostats /
wirecutters still suffice if you know they're there. Health analyzers
still pick them up too.
qol: Ghosts aren't notified about NPCs getting appendicitis 
/🆑
2025-03-15 05:51:06 +00:00
Majkl-J 9cb48d166c UPSTREAM -25-02 - Accidental double eye wounds 2025-02-20 00:29:04 -08:00
Majkl-J b6b8306fda Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-25-02a 2025-02-20 00:00:19 -08:00
MrMelbert 9deea854ec Fix regen mesh (#89223)
## About The Pull Request

Fixes #89007

The conditionals were messed up - Burn wound sanitation / flesh healing
heals the wound over time so it's not like these would reasonably drop
to zero while meshing them.

## Changelog

🆑 Melbert
fix: Regen meshes stop when they've done all they can again
/🆑
2025-01-26 19:04:09 +00:00
SmArtKar 7ddc30783a Adds better attack animations and alternate attack modes (#88418)
## About The Pull Request

This is the first PR in a series attempting to modernize our damage and
armor, both from a code and a gameplay perspective. This part implements
unique attack animations, adds alternate attack modes for items and
fixes some minor oversights.

Items now have unique attack animation based on their sharpness - sharp
items are now swung in an arc, while pointy items are thrust forward.
This change is ***purely visual***, this is not swing combat. (However,
this does assign icon rotation data to many items, which should help
swing combat later down the line).

Certain items like knives and swords now have secondary attacks - right
clicks will perform stabbing attacks instead of slashing for a chance to
leave piercing wounds, albeit with slightly lower damage - trying to
stick a katana through someone won't get you very far!

https://github.com/user-attachments/assets/1f92bbcd-9aa1-482f-bc26-5e84fe2a07e1

Turns out that spears acted as oversized knives this entire time, being
SHARP_EDGED instead of SHARP_POINTY - in order for their animations to
make sense, they're now once again pointy (according to comment,
originally they were made sharp because piercing wounds weren't very
threatening, which is no longer the case)

Another major change is that structure damage is now influenced by armor
penetration - I am not sure if this is intentional or not, but attacking
item's AP never applied to non-mob damage.

Additionally, also fixes an issue where attack verbs for you and
everyone else may differ.
2024-12-17 12:35:52 -06:00
MrMelbert 0c3316983f Makes wound treatment with medical stack items less jank (#88257) 2024-12-12 20:03:49 +01:00
MrMelbert 9007190a74 Audits a bunch of calls to receive_damage, replacing them with apply_damage (#88205)
## About The Pull Request

Looks through calls to `receive_damage` and replaces them with calls to
`apply_damage`

`receive_damage` is a gross to use internal proc that doesn't take into
account physiology (damage modifiers) or even update the mob's sprite
when taking damage

It should be avoided many uses - `apply_damage`, in fact, can take a
bodypart as a target, and is overall a lot easier and more ergonomic to
use.

"So what are valid uses of it?"
- Apply damage itself, and similar direct-damage procs 
- Ensuring you deal an exact amount of damage to a bodypart
- Damaging a limb with no owner

## Changelog

🆑 Melbert
refactor: A ton of things now use the more correct method of applying
damage to you. Which means they will correctly factor in damage
modifiers and are less likely to break your sprite. Some examples
include embedded objects jostling around, chiropractice, and tackling a
wall. Report any oddities, such as extreme damage or bodyparts being
wrongly affected.
fix: Having acid splashed on your face may now disfigure you and make
you bald, as it once did three years ago.
fix: Itchy heretic trauma now better checks if the bodypart is covered
or not before determining if you should itch.
fix: "Repair Puncture" logs no longer mistakenly report you are
"Incising burned flesh"
/🆑
2024-12-04 09:00:15 +13:00