3611 Commits
Author SHA1 Message Date
1467508036 Teshari Specific Limb Damage States and Bloody Clothing (#6038)
## About The Pull Request
Teshari have long had to deal with ill-fitting overlays applied to them.
I have chosen to bite the bullet and do the labour by creating species
specific states for:
- bloody clothes
- damaged clothes
- body wounds
- bleeding animations

How it works is simple: if our icon override exists for our species, we
use it. If it doesn't exist, we default back to the original. What this
means is that future species overrides can be added without code
changes.

## Why It's Good For The Game
<img width="91" height="85" alt="image"
src="https://github.com/user-attachments/assets/30f1c91a-27aa-441e-9026-8d441855e7b9"
/>

This sucks! They look like they're wearing clown shoes for crying out
loud!


<img width="88" height="91" alt="image"
src="https://github.com/user-attachments/assets/0aa2febd-728b-4108-b64d-56173958cf27"
/>

This doesn't suck!

</details>

## Changelog

🆑 Robwo
fix: Teshari can now get properly bloody and bruised.
/🆑

---------

Co-authored-by: Alexis <catmc8565@gmail.com>
Co-authored-by: Waterpig <49160555+Maia-J@users.noreply.github.com>
2026-08-15 18:12:22 +02:00
Maia 8a01d69e7e Various upstream related fixes 2026-08-14 19:44:53 +02:00
Alexis 88e84645b1 Merge commit '6b52b564a50e4f3091470529c683587e5de15d49' into upstream-sync-7-22-2026 2026-07-22 13:39:09 -04:00
bf98195fda Ghosts can see more info on health scan (#96792)
## About The Pull Request

I have no idea how to word this so here's a list instead. 

1. Fixes #96445 by making it so that instead of healthscan code coming
up with cure text on the spot for viruses, advanced diseases have a
function that can generate cure text so you can use it in things other
than healthscanning.
2. Rewords a single letter var in medical kiosk code
3. As a result of 1, the code for disease state analyzers healthscanning
has been shortened because the cure text generating function only has to
be written once and not twice.
4. Health scans now have a power level instead of just being advanced or
basic. There is a new power level called super, and it's only available
to ghosts. Super scans can see all virus symptoms instead of just 3, and
the current stage of an alien embryo.
5. For some reason a bunch of healthscan code (like stuff from the eye
of god and health scanner mod module) were using 1 instead of
SCANMODE_VERBOSE (a define that equals 1 but is more readable) for the
scanmode. That's no longer the case.
6. A new health scanner, the super health scanner, that replaces the
advanced one in the box of debug tools.

<img width="620" height="223" alt="image"
src="https://github.com/user-attachments/assets/a0c5e56e-cf19-4db2-a2df-b72456123c50"
/>
<img width="73" height="65" alt="image"
src="https://github.com/user-attachments/assets/27f8c81b-4f89-455b-82fa-a0ecf94656cf"
/>

## Why It's Good For The Game

Ghosts should be able to see everything, I think

## Changelog

🆑
qol: Ghosts can see alien embryo stage and all virus symptoms when
health scanning
code: Health scanners now support multiple scan levels
fix: Fixes medical kiosks not being able to identify advanced disease
cures.
/🆑

---------

Co-authored-by: Fghj240 <fakeemail@notrealemail.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2026-07-17 00:07:13 +02:00
SmArtKarandGitHub 677f070995 Elevates (almost all) inventory variables from /carbon to /human (#96955)
## About The Pull Request

Moves all inventory slots but handcuffs/legcuffs (as those can be used
by xenos) from ``/carbon`` onto ``/human``, as xenos do not use any of
those inventory slots, only leaving them in use by humans. Their
presence on ``/carbon`` is an artifact of times when monkeys weren't
humans, and some of the slots had to be shared by all carbons.
In some places I've used ``get_item_by_slot`` rather than swapping
checks to ``ishuman`` for simplicity's sake, in some places it might not
be the most optimal solution but in cases like help act any other
solution would require a refactor of the whole (massive) proc.

## Why It's Good For The Game

Cleaner/more sensible code, one step closer to fully datumized
inventories.

## Changelog
🆑
refactor: Moved a lot of human-specific inventory code onto human mobs,
report if inventories break!
/🆑
2026-07-16 03:03:50 -07:00
6f362c7a03 Cyberhearts now use blood regeneration multiplier (#96970)
## About The Pull Request

#96129 forgot to change cyberhearts, probably since they're in a
different file. This makes them use the same code as everything else.

## Why It's Good For The Game

bugfix

## Changelog

🆑
fix: cyberheart blood regeneration properly scales with heart damage
/🆑

---------

Co-authored-by: Fghj240 <fakeemail@notrealemail.com>
2026-07-15 23:37:25 +02:00
0716e3fff4 Atmos refactor & speedup by utilizing BYOND 516 vector functions (#96448)
## About The Pull Request

### Summary
This PR changes internal structure of `/datum/gas_mixture`:
`gases[gas_id][MOLES]` refactored into `moles[gas_id]`,
`gases[gas_id][ARCHIVE]` into `moles_archive[gas_id]` and
`gases[gas_id][GAS_META]` into `gas_meta` static variable. This allows
us to use BYOND 516 vector functions for calculating total moles and
heat capacity. Also it simplifies some parts of the code, allowing us to
get rid of macros `ADD_GAS` and `ASSERT_GAS`. According to the profiler
`/turf/open/process_cell` time is reduced by ~20%.

### Details
`gas_mixture.gases` was a nested 2d-list with MOLES, ARCHIVE and
GAS_META for each gas_id. For example, to get gas moles you had to do
`gases[gas_id][MOLES]`. I've changed this structure to be as follows:
`moles[gas_id]` - moles for the gas, `moles_archive[gas_id]` - archived
version of moles, `gas_meta[KEY][gas_id]` - static var with meta
information for the gas.

Since I removed key GAS_META from the gases, `gas_meta` was moved to the
static variable and the order of keys in the array was changed from
`gas_meta[gas_id][META_KEY]' to 'gas_meta[META_KEY][gas_id]`. This was
done to allow using it in vector calculations (for example heat capacity
or fusion power). Static variable access is very fast and it is
considered as accessing a global in the bytecode.

Byond 516 introduced new vector functions: `values_sum`, `values_dot`
and others. These functions are very fast, but operate only on
associative lists. This allows us to change the way we calculate
total_moles and heat_capacity - very hot and heavily used functions.
`total_moles()` became just `values_sum(moles)`, and `heat_capacity` is
just a dot product: `values_dot(moles,
gas_meta[META_GAS_SPECIFIC_HEAT])`.

As a side bonus, since `moles` is just an associative list, you don't
really need old macros `ADD_GAS` and `ASSERT_GAS` - all they did was to
make a copy of a list[3] with default value [0, 0, gas_meta] for
specific gas. Now when you're adding gas you can just use `moles[gas_id]
+= amount` and when you query amount of gas you can just query the key
(for example `moles[/datum/gas/oxygen]`) if the key does not exist, it
returns null and works as 0 for all arithmetic and logic operations. For
example, old code would be `if (!air.gases[/datum/gas/oxygen] ||
air.gases[/datum/gas/oxygen][MOLES] < 1)` and now it is `if
(moles[/datum/gas/oxygen] < 1)`. This simplifies some parts of the code
and also speeds things up.

For the performance comparison I used Tracy profiler. I've done many
different tests, and they all show slightly different numbers, but
overall speedup for `process_cell` is about 20%. (-20% to average time
per call from ). My testing setup was as follows:
Load Icebox, drop 30/60/90 radius bomb in the middle of the bridge, set
code to blue, wait 10 minutes until the round ends.
Also I fixed random seed in the master controller and in the planetary
gas randomization so generated maps are the same between tests.
Althought it's not very realistic, it generates a lot of samples for the
`process_cell` (around ~3.5M per 10 minutes).
Another test I did was a plasmafire in an 8x8 space, on runtime station,
it showed (-24% time on process_cell).
Another test was a emagged holodeck burn test, it showed (-13% time)
As for other functions of gas_mixture: `total_moles`: -50%(2x speedup),
`heat_capacity`: -65%(3x speedup), `share`: -30%, `react`: -20%. Timings
of all those functions is in microseconds range and they are very hot
(call count is in the same order as process_cell)

<details><summary>Some pictures from profiler</summary>
<img width="569" height="642" alt="process_cell"
src="https://github.com/user-attachments/assets/76fa0c27-719d-485d-9bfc-859fef788999"
/>
<img width="572" height="315" alt="image"
src="https://github.com/user-attachments/assets/f68497e9-4db8-4a9c-b43f-ad04e6dc5cac"
/>
<img width="569" height="317" alt="image"
src="https://github.com/user-attachments/assets/d7249e7b-f344-47a6-8b39-1bab0521182d"
/>
<img width="541" height="316" alt="image"
src="https://github.com/user-attachments/assets/1bef71fd-533d-40fa-a85e-7a803ad322f7"
/>
<img width="519" height="409" alt="image"
src="https://github.com/user-attachments/assets/51165289-174e-403d-a09c-787dd9af136a"
/>
<img width="523" height="318" alt="image"
src="https://github.com/user-attachments/assets/fe4b1db0-17d8-47f9-8fd0-e2ecef2ee66a"
/>
</details>

<details><summary>Setting up a profiler</summary>
If you wanna to reproduce my results here is a list of steps

1. download: https://github.com/goonstation/byond-tracy-writer (this one
has offsets for my version 1677)
2. build the dll, drop in the tgstation/ folder
3. download rtracy https://github.com/Dimach/rtracy
4. download Tracy profiler (0.13.1) https://github.com/wolfpld/tracy
5. uncomment `#define USE_BYOND_TRACY` in `_compile_options.dm`
6. build tgstation
7. open dream daemon, run the desired test, after round end dream daemon
closes
8. navigate to tgstation/data/profiler, find the `123412341234.utracy`
file
9. run `rtracty 123412341234.utracy`
10. open tracy-profiler.exe, press Connect, save the profiler data
11. repeat steps 5-10 with another branch, save another profiler data
12. open tracy-profiler, open first data, press compare, open second
data
</details>

## Why It's Good For The Game

## Changelog
🆑
refactor: Atmos refactor & speedup by utilizing BYOND 516 vector
functions
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2026-07-14 20:34:31 -07:00
QuiteLiterallyAnythingandGitHub 9459c2d9d6 Adds charge checking interactions to ethereals (#96904)
## About The Pull Request
This PR adjusts the ethereal stomach equivalent (biological batteries)
such that they provide their charge whenever either they or their mob
owner get hit by a multitool. This is formatted in the exact same way as
seen when multitooling a cable. A tip of the round indicates that this
is possible.

Additionally, health analyzers will show stomach charge as well. While
coding this I made a couple of slight adjustments to the nearby blood
level formatting for spelling and a (sometimes) stray comma. In effect
this makes it go from displaying "Blood level: 100%, 560 cl, <ins>type:
O+</ins>" to "Blood level: 100%, 560 cl <ins>O+</ins>" (with the
underlining being a tooltip).
## Why It's Good For The Game
To my knowledge, there is currently no way to get the exact and
quantified charge of an ethereal. This makes it difficult for anyone
healing an ethereal to definitively tell whether toxins damage is from a
lack/excess of charge or some other source.

Aside from that, it's also just mildly comedic to be able to check the
charge of a living entity in the exact same way as a piece of insulated
copper.
## Changelog
🆑
add: Health analyzers now display ethereal charge.
add: It is also possible to check the charge of an ethereal (or their
stomach equivalent) with a multitool.
/🆑
2026-07-13 20:56:18 -06:00
GCWiiGeekandGitHub f1cb989f74 Adds a few more Ethereal colors, as well as Ethereal feminine torsos (MAXIMUM WOMAN ACTION) (#5936)
## About The Pull Request
This PR adds three more ethereal colors (Lavender Purple (the existing
purple is pink wtf), Dark Purple, and Burnt Charcoal) as well as
allowing ethereals to choose feminine torsos. Please view the pictures
under Proof Of Testing! (-:
## Why It's Good For The Game
Ethereals are already allowed to choose gendered pronouns and garments
(underwear), and Bubber lore removes the importance of Ethereals being
agender that was brought about upstream. The Bubber lore document refers
to their deity as Him. They have genders despite reproducing asexually.
It's beautiful.
Everyone deserves the chance to make cute ethereal chicks. Or so says I,
the person who quite likes cute ethereal chicks.
## Proof Of Testing
<details>
<summary>Screenshots/Videos</summary>
Previews work in the editor, I still point them to the male (old) torso
sprites.

<img width="864" height="280" alt="femalepreviews"
src="https://github.com/user-attachments/assets/b85eef73-6bcb-42f2-a8e9-e5242a251722"
/>
<img width="712" height="272" alt="colorpreviews"
src="https://github.com/user-attachments/assets/09185f5f-24d0-4dcd-8cb7-6003cc6a132a"
/>
</details>

## Changelog
🆑
add: Added feminine torso option for Ethereals
add: Added three new ethereal colors (Lavender Purple, Dark Purple, and
Burnt Charcoal)
/🆑
2026-07-12 11:00:04 -07:00
GhomandGitHub 54df8cab2d Moved a few monkeys features out of species code (+ updated a couple infusion organs) (#96735)
## About The Pull Request
Title. I'm moving a few monkey features away from the species and into
its bodyparts and organs. I plan on following up with another PR for the
various `ismonkey()` in the code, as these are necessary changes for a
niche thing I'm ultimately working on.

Also one carp organ and one stoat organ both had bits of code made
redundant by available traits. This takes care of them.
Also removed the passwindow_on/off and passtable_on/off procs. We can
just register the associated trait signals on init for living mobs (plus
they were being misused on non-mobs).

## Why It's Good For The Game
Less code associated directly to the species and more to its body parts
and organs, which is basically something we've been doing for a few
years ~~(also I need it for skeletonized monkeys)~~.

## Changelog
N/A
2026-07-11 21:51:39 +01:00
BurgerLUAandGitHub 9d924f93ba Temp TM only fix for lizard blinking issues. (#5792)
Upstream broke lizard blinking again and turned every lizard into a
pirate.

This PR just disables async blinking for lizards.
2026-07-11 11:13:30 -07:00
MrMelbertandGitHub 9b4a2e4493 Fix strong arm removal (#96891)
## About The Pull Request

Oops no subtraction

## Changelog

🆑 Melbert
fix: Fix strong arm removal 
/🆑
2026-07-09 20:55:41 -06:00
JacquerelandGitHub 2cf56ab1e1 Allows gorillas to kill themselves with items (#96736)
## About The Pull Request

This PR moves most of the code for using an item to commit suicide from
`human` to `living`, so that anything with hands can use what it is
holding to commit suicide.
This was surprisingly painless, as most `suicide_act` procs were already
written without the assumption that the person killing themselves was a
human even though they couldn't be anything else.

This might occasionally mean that in some cases (like drones) it may
reference anatomy that they don't have (like necks) but I think that's
not a big deal and don't worry about it.

## Why It's Good For The Game

It's funny.

## Changelog

🆑
balance: Anything with hands can now use the things it is holding to
commit suicide
/🆑
2026-07-09 16:55:53 +02:00
GhomandGitHub 62af5f7867 Delete unused bodypart sprites, reorganize bodyparts code (#96740)
## About The Pull Request
Removing unused sprites (mainly old golem subtypes and dupes). Also
moved alien and monkey body parts out of the generic `parts.dm` file and
into their own new files, while also renaming `parts.dm` to
`default_parts.dm`.

## Why It's Good For The Game
Tidying things up. Also prep work for the next small project.
2026-07-07 15:22:44 -05:00
MrMelbertandGitHub 53e2485925 Adds reverse operation for widen cavity / Fix bones acts as mend incision analog for limbs without skin (#96708) 2026-07-07 21:43:25 +02:00
e962965c1b Small fix to recent Posibrain changes (#5908)
## About The Pull Request

Quick PR to fix a oversight and a few bugs, thanks artur.

## Why It's Good For The Game

Oversight and bug fix = good

## Proof Of Testing

works on my machine

## Changelog

🆑
fix: Fixes your brain falling out as a synth when choosing circuit or
MMI
/🆑

---------

Co-authored-by: Artur Lang <24881678+Arturlang@users.noreply.github.com>
2026-07-07 12:03:46 +02:00
John WillardandGitHub 19dd73127c updates research notes (#96818)
## About The Pull Request

Updates research notes to take into account current rnd numbers

## Why It's Good For The Game

the forgotten research

## Changelog

🆑
spellcheck: Oldstation rnd notes now update properly when you mix them
together.
/🆑
2026-07-07 09:22:56 +02:00
GhomandGitHub 6eb2d1674a Implementing materials checks for techweb designs. (#96257)
## About The Pull Request
In similar fashion to what was done with crafting recipes last year,
this year it's time for techweb designs and printed items to be audited.
This is mostly just about consistency, we've a lot of items that can be
printed by protolathes, autolathes, circuit printers and techfab etc.
However they almost all (except most stacks, mainly) have custom
materials that do not match in one way or another with the materials
used by the design, which is what this PR is for.

"But items printed from lathes etc. already get the mats used to make
them." Yes, they do, however that isn't the case for items of the same
type that were spawned in some other way (cargo shuttle, space/maints
loot, mapped, admins), this create a subtle discrepancy. It isn't a huge
deal (in spite of the size of this PR, ton of designs), but given that I
have done something similar with crafting recipes before, I may as well
give it a second arc of some sort and bring things to completion. And
fix a few possible oversights.

TL;DR consistency and stuff

## Why It's Good For The Game
Consistency, unit test checks to make it harder not to be consistent in
the future. Still has a few TODOs like:

- [x] Fixed newly printed, fully charged RCDs costing less than the RCD
cartridges required to fully charge one. EDIT: I had to tweak the newly
added RDD as well because it suffered from the same fundamental issue.
- [x] Fixed plates being made of iron and yet shattering like ceramic
ones. A new subtype for metallic ones has been made.

## Changelog

🆑
refactor: Refactored a few things with techweb designs (the ones for
autolathes, protolathes, circuit printers, mechfabs etc.) to make sure
that the materials of items that can be made from these designs more
closely match the materials used to make them.
fix: Lizard fries no longer need a plate to be made, like all other
treats that used to require plates in a distant past.
balance: Tweaked the materials cost of RCD, RDD and RCD cartridges.
image: Oven trays now have a more metallic hue.
balance: Plates printed printed from lathes won't shatter like ceramic
ones, in virtue of them being made out of iron instead.
/🆑
2026-07-06 00:13:02 -07:00
RoxyandGitHub 8483e18877 Fix flaky hard delete on hearts (#96797)
## About The Pull Request

#96409 correctly identified the source of the problem, but failed to
resolve it because the timer is actually added during qdel, as part of
Destroy related organ movement. That means it's already past the point
where a delete_me timer would get removed.

## Why It's Good For The Game

Fixes #96458

## Changelog

N/A
2026-07-04 20:02:56 +02:00
RoxyandGitHub e2cf25470d Fix horns getting hidden in modsuits (#5891)
## About The Pull Request

Couple things going on here but basically boils down to the
`/datum/bodypart_overlay/mutant/horns/can_draw_on_bodypart` proc in
`_visual_organs.dm` blocking horns if outfit has `HIDEHAIR` flagged
which mods do, this is all fine and dandy but we have a specific
carve-out for mods because of the hardlight overlays they add, problem
is that the latter check was taking precedence over the carve-out
(`is_deely_bopper_hidden`). I commented out this check because
`is_deely_bopper_hidden` does everything it does and more, so we don't
need it. Also deleted a redundant skyrat override on
`/datum/bodypart_overlay/mutant/horns/can_draw_on_bodypart` because the
parent `/datum/bodypart_overlay/mutant/can_draw_on_bodypart` override
does the same thing.
## Why It's Good For The Game

Fixes #5631 

## Proof Of Testing
<details>
<summary>Screenshots/Videos</summary>

<img width="75" height="100" alt="image"
src="https://github.com/user-attachments/assets/e2939c50-39de-48de-8ffa-da648fa9df85"
/>

</details>

## Changelog
🆑
fix: fixed modsuits hiding horns
/🆑
2026-07-03 14:12:07 -04:00
6c30100e63 Adds a new cybernetic implant to the black market (#96744)
## About The Pull Request

Adds a new cybernetic implant, the nutriment pump implant plus plus
plus! Basically, it just makes you really fat.
<img width="410" height="404" alt="Screenshot 2026-07-01 013026"
src="https://github.com/user-attachments/assets/772c5cb6-d897-4a35-9492-3306ec43d526"
/>

It's a fairly common spawn on the black market. Also I fixed a small
typo I found related to spies scanning drones.

Nutrient pumps (in general) also have a new message instead of "you feel
less hungry" if the person they are feeding isn't currently hungry, but
that won't affect any other pump currently in the game. The black market
pump has the unique ability to bump someone's overeat duration by 40
seconds each time it ticks, which means once you reach completely
stuffed you'll become fat in around 10 seconds instead of 200.

Oh also I added a define for the overeat limit since I kinda needed one
to do the thing

## Why It's Good For The Game

I think it's funny.

## Changelog



🆑
add: Added a new cybernetic implant to the black market, the nutrient
implant pump plus plus plus
spellcheck: fixed a single typo in logs
/🆑

---------

Co-authored-by: Fghj240 <fakeemail@notrealemail.com>
2026-07-02 11:52:20 +02:00
MrMelbertandGitHub 62ad8d3520 Allows arbitrary/custom/"unlimited" bodypart overlay layers (#96684)
## About The Pull Request

`EXTERNAL_FRONT`, `EXTERNAL_ADJACENT`, and `EXTERNAL_BEHIND` are no
longer bitflags
Instead they are strings, that correspond to the sprite's icon state's
postfix ie `wings_FRONT` / `wings_ADJ`

Bodypart overlays now define their layers in terms of `postfix` to
`rendering layer`
For example wings are defined as:
```dm
	layers = list(
		EXTERNAL_FRONT = BODY_FRONT_LAYER,
		EXTERNAL_ADJACENT = BODY_ADJ_LAYER,
		EXTERNAL_BEHIND = BODY_BEHIND_LAYER,
	)
```
Which translates to
```dm
	layers = list(
		"FRONT" = 2.5,
		"ADJ" = 22.9,
		"BEHIND" = 32.2,
	)
```
## Why It's Good For The Game

What does this mean?

One, you are no longer constricted to the three existing layers when
adding a bodypart overlay. You can decide to put it on whatever layer
you need...
```dm
	layers = list(
		"FRONT" = 2.4, // I specifically need this to render above other front overlays!
	)
```

Two, you can easily add a new layer without needing to mess with core
bodypart code at all
```dm
	layers = list(
		"FRONT_HIGHER" = 2.4, // I need a special layer
		"FRONT" = 2.3, 
	)
```

Three, you don't have to use the `EXTERNAL_FRONT` `EXTERNAL_ADJACENT`
etc. at all if you don't want to. You can organize your layers however
you want...
```dm
	layers = list(
		// I can make my icon states `wings_top` and `wings_bottom` instead of `wings_FRONT` and `wings_BEHIND` to make it easier to parse
		"top" = BODY_ADJ_LAYER, 
		"bottom" = BODY_BEHIND_LAYER, 
	)
```

Ultimately, this makes it a ton easier to work with bodypart overlays,
as you no longer need to learn what FRONT/ADJ/BEHIND means. You can just
add your sprites and define your layers and you're done

## Changelog

🆑 Melbert
refactor: Surprise, a follow up refactor to species part rendering,
report any oddities with them (wings/snouts/tails/etc)
/🆑
2026-07-02 11:41:31 +02:00
92da873ec5 Positronic Brain Changes (#5764)
## About The Pull Request

This PR aims to change how positronic are handled and work, instead of
them being their standalone thing and you "dying" when its removed it
acts like a real positronic that you are confined to said positronic
even on gibbing, which can be moved from a cyborg to a synthetic shell
and back into said shell without much workarounds, RSD or anything else
annyoing, just as an example.

## Why It's Good For The Game

I think changing it to a behavior that is like a cyborgs positronic
makes overall more sense then the synthetics magically dying when their
positronic is removed, cyborgs can somehow exist and stay alive as a
positronic but synthetics cant?

## Proof Of Testing

Works on my machine

## Changelog

🆑
refactor: refactored how the synthetics brains work and behave
/🆑

---------

Co-authored-by: Artur Lang <24881678+Arturlang@users.noreply.github.com>
Co-authored-by: Mathilde <146444134+ibexgoetia@users.noreply.github.com>
2026-07-02 09:53:43 +02:00
a555903ef6 Adds defines for standard lung temperature limits (#96742)
## About The Pull Request

Lung temperature limits now have #defines and the two lungs that have
varying temperature limits now have them written as offsets of the
default. Nothing changes in terms of gameplay.

## Why It's Good For The Game

It's easier to read and consistent with how the rest of the code is,
like with max health of organs being written as regular max hp * 1.5
instead of 150.

Yes, I could've just done away with the whole level 1 2 and 3 thing and
made it so that lungs just had a heat limit multiplier or something to
make it even simpler but that would be a balance change.

## Changelog

🆑
code: added defines for lung temperature limits
/🆑

---------

Co-authored-by: Fghj240 <fakeemail@notrealemail.com>
2026-07-02 07:10:00 +02:00
cb87e54d93 Lung cleanup ft. minor suffocation tweak (#96659)
## About The Pull Request

### Notable changes

Before: When taking suffocation damage, 3 oxyloss damage is dealt, or
0.66 damage if below 0 health (soft crit threshold). If below 0 hp, and
you have `NOCRITDAMAGE`, gets nullified.
After: When taking suffocation damage, 3 oxyloss damage is dealt,
reduced if you had a partially successful breath (i.e. 75% of a breath =
0.25x damage) or are in soft crit or hard crit (0.22x less damage). If
in crit, and you have `NOCRITDAMAGE`, gets nullified.

Before: You skip 1 in every 4 breaths when your health is below 0 (soft
crit threshold), and skip every breath when your health is below -30
(hard crit threshold)
After: You skip 1 in every 4 breaths when in soft crit, and skip every
breath when in hard crit

Before: You don't heal from successful breaths when below 0 health (soft
crit threshold)
After: You don't heal from successful breaths when in soft or hard crit

### Other changes

- Removed `gasp` from losebreath processing, ie removed chance to gasp
twice in one tick when choking.
- Deletes `respiration_type`s
- Deletes `crit_stabilizing_reagent`
- Deletes species `breathid`, replaces it with `get_breath_type` that
checks the species' lungs

## Why It's Good For The Game

- There was a strange inconsistency where being in crit would
drastically reduce the amount of suffocation damage you were dealt, but
only if you were not breathing. If you were somehow breathing, you took
the full damage. I thought this was a little obtuse, so I wanted to
change it to be consistent: Being in crit is just a multiplier.

- Making them check for `stat` instead of `health` means they affect
people with `NO_SOFTCRIT` or `NO_HARDCRIT` nicer.

- See above.

- Really just to be cleaner, handle gasping in one place.

- I'm not sure why we have `respiration_type`. The only time they're
(practically) referred to is in reagent handling, but there are no
reagents that set it anything but `ALL`. All it does is make our oxyloss
handling made more complicated and harder to read for no purpose. So I
decided to axe it - I think anything special handing that should arise
should just have some bespoke checks instead.

- Nothing set this value to anything else. And guess what, if you
changed it, epinephrine still worked because it applies `NO_CRITDAMAGE`.

- Species de-hardcoding. Makes it easier to add new breath types. 


## Changelog

🆑 Melbert
balance: Suffocation damage is slightly more consistent now: You take 3
oxyloss per suffocation tick, reduced for partially successful breaths
and or if you are in crit. Alternatively, if you are in crit and you
have epinephrine/atropine in your system, it gets nullified entirely.
code: Cleaned up lungs a bit, particularly relating to abnormal lungs
like plasmamen or fish, report any oddities with them.
del: You no longer have a chance to gasp twice in one suffocation tick.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
2026-07-02 01:59:27 +00:00
MrMelbertandGitHub 6156e12e63 Fix emote overlays (#96714)
## About The Pull Request

I changed how `add_bodypart_overlay` works and then forgot to update its
return value

## Changelog

🆑 Melbert
fix: Fix emote overlays sticking
/🆑
2026-07-01 01:43:33 +02:00
Roxy a80c339b26 dont add this timer 2026-06-27 13:06:26 -04:00
MrMelbertandGitHub 21ea64aec5 Height and minor bodypart overlay refactor (#96570)
## About The Pull Request

### Main changes

Height is no longer applied in `apply_overlay`

There is now a proc titled `apply_height()` which is passed an
appearance and a body area, and handles either applying a filter or
adjusting the offset of the appearance up or down

`apply_height` is now called directly when applying item appearances
(ie, `update_worn_x`)
`apply_height` is also called directly in `get_limb_icon` (as height is
included in limb render keys).

### Other changes

Bodypart overlays were cleaned up a bit. You can now apply and remove
bodypart overlays directly with just the typepath, which is a bit more
convenient.

Bodypart textures were split into a separate type. Previously, textures
relied on insertion order to be "correctly" added (any bodypart overlays
added later would not be modified by the bodypart texture). Now

Fixed a bug with cybernetics while I was there. They reskin by changing
DMI so they needed to have their DMI included in their render keys.

## Why It's Good For The Game

This allows us to be more specific and less wasteful about applying
height filters and whatnot - We can now specify whether certain overlays
are offset or given a filter.

For example: In the past, horns and frills were filtered solely because
they were attached to the head and the head was filtered.
We couldn't independently say "Offsets the horns and frills, they don't
need filters".
But now, not only are we able to say "rather than filter the head, just
apply an offset", we can also say "horns and frills should be offset
rather than filtered".

TL;DR fixes the issue where horns or cat ears are cut off by height
filters, yippee.

## Changelog

🆑 Melbert
fix: Cybernetic reskinning should break less. 
fix: Horns and cat ears should be cut off less by height.
fix: Bodypart textures should apply more consistently. 
refactor: Mutant parts like moth wings, lizard tails, cat eats, etc.
have been refactored a tiny bit, report any oddities.
refactor: Bodypart textures were refactored a tiny bit, report any
oddities.
refactor: Refactored the way height works, report anything weird looking
things involving that.
/🆑
2026-06-27 10:28:43 +02:00
SmArtKarandGitHub ad36ae6a68 Fixes eye color overrides not working (#96624)
## About The Pull Request
#95781 broke eye color overrides by defaulting to eyes' own color, which
should instead be a fallback as eyes add their own color as a lowest
priority override to the mob.

Closes #96567 

## Changelog
🆑
fix: Fixed eye color effects not working
/🆑
2026-06-25 18:02:13 +02:00
Roxy de4c3b255d Merge branch 'master' of github.com:tgstation/tgstation into upstream-2026-06-23 2026-06-23 15:51:55 -04:00
LemonInTheDarkandGitHub 0bc1fc064f Fixes a destroy runtime (harddel source) off bodyparts (#96457)
## About The Pull Request

The macro calls Cut() which fails on null, which this can be cause it's
a lazylist.
2026-06-20 13:37:07 -05:00
ArturlangandGitHub bde2f58c72 pref for seethrough limbs (#5805)
## About The Pull Request
adds a pref for making limbs partially-seethrough, i kept options for
head and body as disabled prefs because why not
## Why It's Good For The Game
some people want this aspect of customization, could be extra useful for
slimepeople too, or holographic aspects, since it can be partial invis,
does not prevent their hitboxes from working since it's alpha changes
though
## Proof Of Testing
<img width="107" height="92" alt="image"
src="https://github.com/user-attachments/assets/a481771d-a632-469a-946b-602b6b03b93b"
/>

<img width="98" height="99" alt="image"
src="https://github.com/user-attachments/assets/c58f7329-a366-461d-a815-7cb687691e11"
/>

<img width="1100" height="790" alt="qfpaTFo0Bh"
src="https://github.com/user-attachments/assets/710ccb2b-fae4-4a8b-951e-d2bae4f141f1"
/>


## Changelog
🆑
add: pref for limb transparency
/🆑
2026-06-20 01:25:46 +02:00
Leland KembleandGitHub 1655df399f Being given a nonfunctional skeleton arm no longer disables both hands (#96542)
## About The Pull Request

Being given a fresh nonfunctional skeleton arm no longer disables both
hands, and also doesn't prevent two handed items from being used even
after it's fixed. Also, presumably the same problem with legs.

The problem is that these limbs are disabled in that the moment
`update_disabled()` is called they'll flip to disabled and stay there,
but they're not already set to disabled. `update_disabled()` is called
within `apply_ownership()` within `update_owner()` within
`add_bodypart()`. So, when a limb is replaced with the nonfunctional
skeleton arm, the following occurs:
- Initial limb torn off. Decrement `usable_arms`.
- `add_bodypart()` called, above chain goes down, `update_disabled()`
called, because the limb isn't already disabled, it officially disables
it and decrements `usable_arms` for a second time
- a few lines later, where new limbs are supposed to increment
`usable_arms`, it doesn't because it's now officially disabled
- now you can't do anything because `usable_arms` is 0. Even when you
get the limb fixed, usable_arms only increments once, so you're
permanently locked out of two-handed items.

Setting all these nonfunctional limbs to disabled at base prevents the
second decrement, fixing the problem.

## Why It's Good For The Game

having all of the organic tissue ripped off my arm all at once would
probably make me unable to use my hands for a while too, but our
spacemen are built stronger.

## Changelog
🆑

fix: Being given a nonfunctional skeleton arm no longer disables both
hands

/🆑
2026-06-17 22:47:28 +02:00
Okram0andGitHub 39be429815 Zombie buffs (#96387)
## About The Pull Request

Infectious zombies no longer suffer from mood, and have had their speed
increased moderately (Still slower than a spaceman, but no longer
agonizingly so). Also, they now have a large amount of stam resistance.

## Why It's Good For The Game

Every time I have seen zombies they die instantly against a crew with
even the slightest modicum of skill. They cannot infect anyone most of
the time due to crew powerwalking away and then they just get killed by
lasers or stunned and then killed with melee in perfect safety. Indeed
the only time I have seen zombies metastasize into an actual threat is
when an admin spawned several hordes of like 8 in maintenance and even
then they got only a minimal amount of victims for the amount of them (I
think only like 5 people died and most zombies got killed for most of
the waves).

In short, for what their supposed to be (An option for nukies or what a
tot is investing their entire supply of TC into) they are incredibly
underpowered unless you are doing something cheesy with them. (Xenobio
to make enough monkey zombies the server lags is a popular one).

These changes should make them an actual credible threat, and maybe sec
will actually have to pull out armory gear instead of just disabling a
zombie and harm batoning it to death.
2026-06-17 14:39:46 -05:00
aa0dc869bc misc master fixes, re-pulls (#5774)
fixing master issues after upstream merge

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: mcbalaam <104003807+mcbalaam@users.noreply.github.com>
2026-06-16 01:14:05 -04:00
AeriandGitHub 4f36062120 Ball Mittens: Expanded and Enhanced (#5664)
<img width="830" height="45" alt="image"
src="https://github.com/user-attachments/assets/dc76c74d-7a97-4cd7-ab91-df8ffefa392e"
/>

## About The Pull Request

**YOU!** [Have you ever wanted to be a strange, round, rubbery little
creature with absolutely no fine motor control? No? Well you should have
thought of that before you went to sleep somewhere which gave me the
AMPLE opportunity to slide my EXTRAORDINARY new creation right onto your
FORMER HANDS!](https://www.youtube.com/watch?v=OjdgFSoQ00w)

Introducing Ball Mittens and Latex Paw Mittens: inflatable latex gloves
that, once on, become your hands for the foreseeable future! Big
shoutout to **Onule** for the sprites!

Ball Mittens are now a new equip-able lewd item available in the loadout
(Toys > Lewd Toys) or found in the Lustwish vendor.

They can be reskinned mid-round into Latex Paw Mittens, which are ALSO
available directly as an _incredible_ loadout item in the Gloves tab
with full GAGS color customization across three extraordinary color
groups! All for only four easy payments of no money at all!

While wearing either variant, the wearer experiences a suite of
DELIGHTFUL fumble mechanics representing a meteoric rise above the old
versions which just meant you could do basically nothing!

Here's what they do:
- Item pickup requires getting down on your knees and wrestling with the
item for a variable delay, with a small chance of you struggling even
longer because of how hard it is.
- Inventory retrieval from pockets, ID slot, belt, suit storage, and
_many more_ has a brief delay to represent fishing it out of your
pockets with your clumsy mitts! NOTE: This functionality is limited by
core aspects of the game engine, certain items are not subject to this
delay such as any item which is a container including but not limited to
toolbelts, backpacks and more. I tried but eventually gave up.
- Clothing has an extended timer. Have you ever tried unbuttoning a
jacket with paws the size of your face?
- Machine and console interaction requires a 1.5-second delay (skipped
when in combat mode, where you are presumably STRIKING DOWN the EVIL
machine)!
- Self-removal takes a full minute via the resist key or clicking the
item in the HUD. I was thinking of just making it impossible to remove
them on your own outright, but I changed my mind, aren't I swell?
- Throwing has a 5% chance of the item simply tumbling to the floor
instead. I thought about monekying with strength or like half a dozen
other things which I scrapped in the prototype phase when I realized how
_VIOLENTLY ANNOYING_ they would get over time!
- Guns suffer a serious spread penalty! It's hard to use guns when your
beans won't even fit inside the trigger guard!
- Restraint escape time is tripled! How the hell do you escape handcuffs
with your bare hands, let alone paws?!
- Stripping other players is much harder, I think it speaks for itself,
you're a cat, have you ever seen a cat steal your shoes? Absurd!
- The items are fire-proof because they're supposed to play into the
fantasy of having paws so it'd be lame if they could be trivially burned
off you and you can also use insulated gloves on them to witness the
absolute peak of comedy in the form of a funny easter egg!
- Surgery on the wearer is not blocked in order to play into the fantasy
that you actually have paws, wow! The mittens are considered transparent
to surgical operations! This means you don't have to have your hands
ripped off to get arm surgery! This was **obscenely** challenging to
implement! This and the ability to add insulation are very small
concessions to make it not pure agony to play with these on as say, an
engineer. They are heavily outweighed by the downsides.
- Another player can strip them off normally. The OOC safeword removes
them instantly if you decide the fun really has to end! Remember that
this function exists boys and girls!
- The items make appropriate rubber squeaking sounds, play flavor
messages for the wearer, and have visible bystander messages so the
whole crew can enjoy the endless novelty afforded by your predicament.


Also since this changes the appearance of the Cat Gloves, I've decided
to just go ahead and add the light QOL functions to these too, they
don't provide any gameplay advantage whatsoever. Arguably they make your
life harder.

## Why It's Good For The Game

You have been granted a GIFT. A BLESSING. An entirely voluntary and
opt-in set of squishy latex paws that make everything slightly harder in
ways that are charming rather than punishing.
More seriously: this adds a significant level of functionality to an
item which is otherwise a dead end
It also adds SKINS which you can sell on the Steam Market for PENNIES ON
THE DOLLAR!†

What's more, many manhours have been expended testing these to get the
balance just right!

†Disclaimer, you cannot actually sell the skins 

Also I have already gotten approval from maintainers so I'm just writing
this for fun.

## Proof Of Testing

There are 30 to 50 copies of Tgstation.dmb in my recycle bin because I
meticulously compiled and tested every feature with every change to this
code that I made because I am **NOT GUILTY BY REASON OF INSANITY!** And
also I don't know how to use VSC. I think that's adequate and I don't
want to download OBS again. Oh and there are like a bajillion commits of
my dumb ass trying to fix this.

<img width="425" height="414" alt="image"
src="https://github.com/user-attachments/assets/806f4c6d-81ee-4143-be1c-91db94b6efdf"
/>
<img width="1626" height="832" alt="image"
src="https://github.com/user-attachments/assets/327581d2-e593-443a-8cde-053b7d0de80a"
/>
<img width="496" height="1177" alt="image"
src="https://github.com/user-attachments/assets/12fc408b-b2d1-43e5-b220-f207cac8ef1d"
/>



</details>

## Changelog
🆑
add: Added vast amounts of functionality to Ball Mittens, inflatable
latex gloves with fumble mechanics for item pickup, inventory retrieval,
clothing removal, machine interaction, and more !
add: Added Latex Paw Mittens, a GAGS-colorable paw-form variant
available in the Gloves loadout tab with full three-color customization!
image: Added GAGS sprite layers for Latex Paw Mittens
/🆑
2026-06-14 10:21:23 -04:00
TimandGitHub 087dd7aceb Add drill sound to surgical drill (#96413)
## About The Pull Request
The surgical drill used the circular saw sound when it should have used
the drill sound instead.

## Why It's Good For The Game
Better sound.

## Changelog
🆑
sound: Add drill sound to surgical drill
/🆑
2026-06-11 03:26:53 +02:00
mrmanlikesbtandGitHub 21c0b0ce97 Fixes flaky heart create & destroy run (#96409)
## About The Pull Request

The timer's callback was holding onto a reference

closes #96408

## Changelog

No user facing changes
2026-06-11 03:13:18 +02:00
orangesandGitHub 0c923e8214 Fix argument order and length confusion issue (#96405) 2026-06-10 23:19:57 +02:00
nevimer bb8b9aaaaf another code regression 2026-06-03 18:26:54 -04:00
shayoki f601a6ddaf Merge remote-tracking branch 'tgstation/master' into upstream-6-2-2026 2026-06-03 01:23:54 -05:00
69eaccdbb2 Cybernetic cat ears can no longer be restyled with flesh reshapers (#96263)
Co-authored-by: Fghj240 <fakeemail@notrealemail.com>
2026-06-02 17:43:07 +02:00
8eed335b94 Refactors inventory UI to be completely datum and vis_contents-based (#95998)
## About The Pull Request

Completely removes individual inventory UI handling from mob and HUD
code and moves it to slot datums.
``/datum/inventory_slot`` now is responsible for displaying items on the
player UI and does so through vis_contests as opposed to screen_loc -
which ensures that wide items will display properly rather than be
offset to the right.
Centralized, slot_id based handling allows us to significantly simplify
inventory and HUD code (see how many lines were removed) as you no
longer need to individually track all items for both the HUD owner and
the observer, and makes it easier for us to fully datumize inventory
handling in the future.

Also fixes a bug where observers would see players' storage UI and have
the items linger on-screen after its closed.

## Why It's Good For The Game

Makes working with inventories and HUDs easier, fixes visual issues with
wide items, I need this for human rendering refactors.

## Changelog
🆑
refactor: Refactors inventory UI to be completely datum and
vis_contents-based
fix: Observers should no longer see doubled up inventory UIs
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2026-05-31 14:27:23 -07:00
e68c1edad1 Streamlines Life() a little (#96215)
## About The Pull Request

Main changes

- `handle_mutations` is gone, DNA Injectors are now managed via a status
effect
- `handle_diseases` is gone, disease stages are just handled via life
signal
- `handle_bodyparts` is gone, it was unused and in the future any
implementations should use a life signal
- `spec_life` is gone, the main content of it is now in `human/Life`,
most children implementations now use life signal, zombie tongues now
handle zombie groans
- Life signal was split in two (pre and active)

Other changes

- DNA injector code was cleaned up considerably
- HARS now alerts admins when you inject someone else with it like
Monkey
- `COPY_DNA_SE` is no longer mistakenly unused (meaning stuff like
transformation sting no longer copies "active mutations")

## Why It's Good For The Game

Across the course of a full round we spend the same amount of time doing
literally nothing in life as we spend on handling human breathing.

Now in the context of a full round this is 8 seconds. Which in the grand
scheme of things, not a whole lot, but if we can get a tiny performance
gain from... not doing literally nothing (especially when we can do
these things cleaner with signals) that's a win in my book

## Changelog

🆑 Melbert
refactor: Refactored dna injectors (both the ones that change appearance
and activate mutations), report any oddities with them like failing to
revert your appearance or mutations not applying correctly
code: Ever so slightly changed how diseases tick, report any oddities
code: Ever so slightly changed how some species mechanics tick, like
golems and slimes, report any oddities
code: The code behind printing appearance modifying dna injectors from
genetics has changed, report any oddities
code: Some backend transformation sting code changed slightly, report
any oddities
code: Zombie "idle" groaning is now tied to the tongue rather than the
species itself
admin: Force-injecting someone with HARS give an admin alert, the same
as force-injecting someone with Monkey
fix: Several methods of copying DNA (including transformation sting)
mistakenly copied "active mutations", this has been fixed
/🆑

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2026-05-29 22:48:16 -06:00
TimandGitHub 6c14e428f9 Hearts now regenerate blood (#96129) 2026-05-29 08:31:18 +10:00
BloopandGitHub 34c8730069 Fixes runtime/ race condition with cyberimps (#96225) 2026-05-27 19:47:06 -04:00
AeriandGitHub 9036e5bd26 Protean surgery and also spellcheck I guess (#5683)
# About The Pull Request
Restores Protean self-surgery, which was broken by the TG surgery system
rework. The rework introduced required_bodytype gating on all mechanical
surgery operations and an OPERATION_SELF_OPERABLE flag requirement for
self-targeting. Protean limbs use BODYTYPE_NANO, which was never added
to any of these checks, leaving Proteans unable to access the synth
flavored surgery operations they're intended to have and locked out of
self-surgery entirely.

The fix adds BODYTYPE_NANO to the required_bodytype of all six
preparatory mechanical operations in operation_generic_mechanic.dm
(unscrew shell, open hatch, screw shell, prepare electronics,
unwrench/wrench endoskeleton) and to the two prosthetic organ/feature
manipulation operations in operation_organ_manip.dm.

Synths were already handled by a prior Nova edit that added
BODYTYPE_SYNTHETIC; this PR extends the same treatment to Proteans and
logs it with a Bubber Edit comment.

As a drive-by shooting fix, I also changed a persistent "Orginal" [sic]
typo in BUBBER/NOVA EDIT comments across six surgery operation files.
These were copied verbatim from the original Nova edit and propagated
into every subsequent edit comment in the directory.

# Why It's Good For The Game
Proteans are a Bubberstation-original species with self-surgery as
intended functionality. The TG surgery rework silently broke this
without any corresponding fix being applied downstream. A surgeon could
still operate on a Protean using organic surgical tools but this is
sub-optimal and annoying.

# Proof Of Testing
Spawned as Protean, laid down on a table, applied surgical drapes,
worked through the full mechanical surgery chain on myself. Do you
really need a screenshot of me laying on a table?


🆑
fix: Protean self-surgery now works correctly after the TG surgery
rework broke it
fix: Surgeons can now use mechanical tools on Proteans as intended,
consistent with Synth behaviour
spellcheck: Fixed "Orginal" typo in NOVA/BUBBER EDIT comments across six
surgery operation files
/🆑
2026-05-26 21:08:50 -04:00
FlufflesTheDogandGitHub e83d0cc4c6 Bugsquashing (#96204) 2026-05-26 09:08:36 -04:00
BloopandGitHub e85ebd7fdb Stops internal organs from triggering updates in prefs (#96203) 2026-05-25 20:57:38 -04:00
MrMelbertandGitHub 8c45d65c4a State based digi and snout bodyshape (#96030)
## About The Pull Request

Digi and snout bodyshape are added and removed if digi or snout is
hidden
There now also exists a digitigrade bodytype which is not removed if the
bodyshape his

Bodyshape is solely used for determining how the body is shaped for
rendering
Bodytype is used for checking stuff like "can digis wear shoes" 

This lets us clean up rendering code a bit, allowing us to pass around
bodyshape rather than needing to check our wearer for digi and whatnot

Digi itself is now a component for legs that tracks - on item equip or
unequip - if said items squish the legs.

## Why It's Good For The Game

Right now we do some super jank stuff like updating body every time we
update our jumpsuit which is obviously a bit wasteful
This should make things easier to manage and work with (and maybe more
performant?)

## Changelog
🆑 Melbert
refactor: Refactored how digitigrade and snouts render, report any
oddities with that
/🆑
2026-05-23 19:28:07 +02:00