Commit Graph

1551 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 0b8678ec49 Removes RNG instakill from mech drills entirely (#96250) 2026-06-01 11:36:19 +10:00
Leland Kemble 9f2a531c33 The dead can't reach the pedals (#96161)
## About The Pull Request

Adds `isliving()` check on trying to put other people in the car and
upgrades the check for trying to put yourself in the car

## Why It's Good For The Game

fixes #96160

## Changelog
🆑

fix: The dead can't drive

/🆑
2026-05-21 19:45:32 -06: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
FinancialGoose e98cb75c57 Refactor gasmix mole change into a proc (#95327)
## About The Pull Request
Refactor the majority of the current gasmix mole change use cases into a
proc called adjust_gas which simply adds the designated mole count of
the species into the gas mix while also handling asserting the gas and
garbage_collect()
I also added adjust_multiple_gases and convert_gas() for modifying
multiple gases and within a gasmix

## Why It's Good For The Game
Lemon wanted this to be done as part of the air group refactor 

## Changelog

🆑
refactor: refactored majority of gas_mix mole change into adjust_gas()
proc
/🆑
2026-04-21 13:43:47 -07:00
SmArtKar c5caa88335 Makes ship in a bottle smaller and allows it to be bottled back up (#95748)
## About The Pull Request

Makes the dragon boat dropped from lavaland tendrils capable of being
bottled back up by alt clicking after a 2 second delay. This should give
it a semblance of a purpose and make it not a completely dead drop.
They've also been reduced in size from normal to small, allowing them to
be placed in pockets and boxes.

Also, boats no longer refer to their oars as keys in examine tooltips.

## Why It's Good For The Game

Ship in a bottle is possibly the worst drop from tendrils on-par with
book of babel, as its effectively a one-time use crossing tool since you
rarely need to cross lava in the exact same place you've left your boat.
These two changes should make it at least a bit viable if you get nasty
river generation and need to cross them frequently, and don't want to
use a raptor or upgrade a MODsuit.

## Changelog
🆑
balance: Ship from a bottle can now be bottled back up by alt-clicking
it
balance: Ship in a bottle can now be deployed by throwing it, and are a
small item instead of normal-sized
spellcheck: Boats no longer refer to oars as keys
/🆑
2026-04-19 23:52:46 +02:00
MrMelbert 4eadf5caf7 The big tooltype_act de-cargo-cult-ing (#95408)
## About The Pull Request

Removes a lot of cargo cult copypasta with
`default_deconstruction_screwdriver`, `default_deconstruction_crowbar`,
and to a lesser extent `default_pry_open` and
`default_change_direction_wrench`

ALL you gotta do now if you want your machine to have an openable panel
or be deconstructible with a crowbar is this
```dm
/obj/machinery/dish_drive/screwdriver_act(mob/living/user, obj/item/tool)
	return default_deconstruction_screwdriver(user, tool)

/obj/machinery/dish_drive/crowbar_act(mob/living/user, obj/item/tool)
	return default_deconstruction_crowbar(user, tool)
```

`default_deconstruction_screwdriver` no longer directly sets
`icon_state`, requiring the user pass in the open and closed icon
states. Now, it just calls `update_appearance`, and everything that once
passed the icon state now uses `base_icon_state` and
`update_icon_state`.

## Why It's Good For The Game

Many of these procs were terribly overcomplicated and difficult to work
with for what should be a relatively simple action

Streamlining it makes it easier for coders to understand and work with

## Changelog

🆑 Melbert
refactor: A majority of machines had their screwdriver/crowbar/wrench
interactions rewritten, report any oddities like being unable to open a
machine's panel or deconstruct a machine
/🆑
2026-04-14 19:46:24 -04:00
ElGitificador 071b9d2021 Deletes the misleading key request for the dragon lavaboat (#95708)
## About The Pull Request

seems like it was asking for a key since it was a subtype of
/obj/vehicle/ridden/lavaboat, so i set it s key_type to null

## Why It's Good For The Game

gbp pog. fixes #95634 

## Changelog
🆑

fix: Deleted the misleading key request for the dragon lavaboat

/🆑
2026-04-11 13:45:12 -04:00
Tsar-Salat 0917d44cc8 Audits and cleans up Trigger() parent calls (#95548)
## About The Pull Request

``/datum/action/proc/Trigger(mob/clicker, trigger_flags)`` has a lot of
children, many of which use mixed ``. = ..()`` or no parent calls at
all.


https://github.com/tgstation/tgstation/blob/d65ee47f6ebd0384d463a1f2a044c321ff2d912f/code/datums/actions/action.dm#L163-L170

This PR attempts to standardize all the children procs to call parent in
a uniform way, or cements that they *shouldnt* call parent for whatever
reason.
## Why It's Good For The Game

Base proc calls are important, yanno?

The base proc has the action button signals and availability proc on it,
so its technically possible for children procs of trigger() to have
check_flags enabled, but never blocked (i.e AB_CHECK_CONSCIOUS,
AB_CHECK_HANDS_BLOCKED).

Some children procs have IsAvailable on them, but its possible they can
be skipped over if a coder is not paying attention. This reduces that
risk.
2026-04-07 14:23:25 -05:00
MrMelbert bad46d8600 Walking in snow leaves snowprints, snowstorms clear them (#95569)
## About The Pull Request

<img width="444" height="318" alt="image"
src="https://github.com/user-attachments/assets/d2b21460-0b11-499a-b05e-33d3a9768e71"
/>

Walking through snow or sand leaves behind a trail of prints similar to
that of bloody footprints (they use the old sprites, in fact). Like
bloody footprints, you can examine them to get a hint at what left the
prints (shoe type or leg type if barefoot).

When weather comes through (snow storm or sand storm), all prints will
be cleared off. During a raging snow or sand storm, you won't leave
prints at all.

Snowprints can be filled with snow to remove them as well. 

Some equipment or effects will stop you from leaving snowprints (ski
shoes, ice shoes*, heretic's cloak of shadows). Also you obviously don't
leave prints if you're flying or crawling or riding something.

**We don't have snow shoes* 

## Why It's Good For The Game

Initially I made this as a cute little detail, but I realized it has far
reaching implications for play on Icebox (and many, many sandbox
applications)

On Icebox, any average joe can run into the wastes and become
untraceable, which makes it almost impossible to track down antagonists.
Snowprints... are a method for tracking people who run off into the
snow.

But you can play around it - You can make fake trails and retrace your
steps. You can wait for a snowstorm to clear your tracks. You can even
fill in your tracks with snow if you're patient. Alternatively,
acquiring snow shoes means you leave no trail... or you could learn to
fly, crawl through the snow, use a vehicle, so on.

If you're assigned to assassinate a miner, you can follow their
snowprint trail as they head into the wastes. However, this may only
works early in the round, as the caverns have no snowstorm to clear
prints - as miners come and go, it will become harder to follow trails.

Speaking of miners, they can follow their co-workers trail if they get
injured, or look for prints to see if a ruin has been looted. Similarly
if a crew member falls down to the mining layers, they could find a
miner's trail to follow it back to the station.

And If you're a paramedic and someone was wounded out in the wastes, you
might be able to find their trail to track them down. But you can't
dilly-dally, as the storm will wipe away any chance of that.

Ultimately I think a small detail like this has some big potential for
emergent gameplay which could be cool. My intent is not to affect
antagonists too negatively, so more tools to avoid leaving prints (snow
shoes) could be added.

## Changelog

🆑 Melbert
add: Walking in snow or sand leaves behind prints. You can examine the
turf to see what left the prints, like with bloodprints.
add: Snowstorms or sandstorms clear away any footprints left behind in
the snow or sand.
add: Some equipment or effects, like skis or snowshoes, prevent you from
leaving prints in the snow.
add: You can fill in snowprints with snow. 
/🆑
2026-04-03 15:32:09 +01:00
KingkumaArt 6b4cbaa39c Fixes mech energy guns draining 100x less than intended. (#95540) 2026-03-30 23:44:02 -04:00
Leland Kemble c8dfe14d8f Fixes being unable to put a horn in a clown car (#95506)
## About The Pull Request

Calls parent

## Why It's Good For The Game

fixes #95499
2026-03-25 16:29:15 -05:00
Y0SH1M4S73R 38c8884d3c Adds a boolean type to circuits (#95487)
## About The Pull Request

A substantial number of number circuit ports, input and output alike,
effectively act as boolean flags. That is, they are either input ports
that only care about whether the value is or is not zero, or they are
output ports that can only output zero or one. This PR adds a boolean
datatype, and converts all these ports to booleans.

Anything can be connected to a boolean input port, effectively setting
the port to the truthiness of the input. Booleans can be connected to
number and signal ports, as they all use numbers as their underlying
values.

## Why It's Good For The Game

Having a proper boolean datatype makes the affected ports a bit more
intuitive to compute with.

## Changelog

🆑
qol: Many circuit components have had ports that effectively act as
boolean inputs or outputs converted into a new boolean datatype.
/🆑

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
2026-03-23 17:57:33 -04:00
LemonInTheDark 9d14e327b5 Begins Improving Sparks/Flares Somewhat, Adds Animatable Light Overlays (#95362)
## About The Pull Request

[Adds a visual tick helper, integrates it into SSmove and
such](https://github.com/tgstation/tgstation/commit/e97035f9f74fad5c67c5bf19d8d5d3bb4bd476b4)

Basically, if we do "stuff" during verb time then the next chance
clients have to actually see it is on the next visual tick (rather then
the normal "this tick"). This is cause clients get their next frame
during maptick, and maptick runs before verbs.

We want to be able to handle this properly because if you say, create an
object and then move it on the same VISUAL tick (NOT game tick), it will
just teleport instead of playing out the move. I don't want this for
stuff like sparks, so we need a way to work around it.

[Moves most users of the _FAST flag to
_INSTANT](https://github.com/tgstation/tgstation/commit/6f96daac00519c69adc7554f52114798a65f3ad5)

These are the kids that don't immediately spawn something and the move
it, and we want to allow them to move actually as soon as possible
(important for stuff like space)

[Improves basic effect systems, makes their products delete when they
stop
moving](https://github.com/tgstation/tgstation/commit/172cb25d80ed34e1ec523172a1677fb524239fba)

Moves some stuff out to getters or vars so children can better decide
how long effects should last/how fast they should move. Uses this to
clean up weird dupe code used by explosions.

Makes all these effects delete on contact with something that stops
them. I'm doing this because an effect just hanging in the air looks
really really odd. Does have consequences for sparks that are already
moving at a wall though, might need a better way to handle that.

Makes all these effects use _FAST loops so they don't just hang in the
air for a second on spawn

Adds a setter proc on sparks for their duration, gonna use this to
improve their effects some

[Refactors overlay lights, adds support for animating their
images](https://github.com/tgstation/tgstation/commit/3ad0083cf2b536df51a6d93dca40eac20c1d62d1)

Implements light_render_source and relevant setters, this allows us to
replace the components of an overlay light with basically whatever we
want

Refactors overlay lighting to handle its images more consistently,
allowing us to hook into an image being modified

Combining the two of these will allow us to consistently copy a light's
image, modify it in some way, and then relay that modification back
down. Allowing us to animate it or do more advanced effects painlessly

Also, fixes ranges of 1 or less not rendering at all on initial set
(thank you kapu)

[In which I get fed up and add a macro helper for UID
generation](https://github.com/tgstation/tgstation/commit/aab48b03d407104d4f9cf9acb034494237def911)

[adds vv hooking for all existing lighting
vars](https://github.com/tgstation/tgstation/commit/b81c6200a0d74c36b440aa3f4c1f22c422090a2d)

[Upgrade effect system's dir picking to avoid duplicates when
possible](https://github.com/tgstation/tgstation/commit/18b622586b509c6be4c4bca4e3e7c175ad75fe91)

[Uses the technique described above to animate spark's lights out as
they
move](https://github.com/tgstation/tgstation/commit/67ba177982213799984a70e89536c5efb3d17e14)

This is a decently nice effect imo, it allows us to bump their power
(read, alpha) since it'll get animated away. I try to sync the animation
to the actual icon state's flow (it's 0.7s long). I also sped them up
somewhat to hopefully have a nicer looking effect? we'll see.

[Abstracts away intercepting overlay lights into a holder
datum](https://github.com/tgstation/tgstation/pull/95362/commits/b3f1fe74f2c3bab1d8912ab8a666bd05677ad032)

This should make it far easier to reuse this pattern!

[Fixes overlay lights flashing to double intensity when picked up off
the
ground](https://github.com/tgstation/tgstation/pull/95362/commits/1d83f2031fa2b33312b2aea4359c0c37c9d04ac7)

We needed to clear out their underlays BEFORE the animation

[Adds a flickering effect to flares and their
children](https://github.com/tgstation/tgstation/pull/95362/commits/b7a858e04a607c58b6c7fbe1476ffe2239e63bde)

I'm still not 100% happy with this, I was trying to avoid it feeling
like a heartbeat with random noise and I.. THINK it worked? it's
honestly quite hard to tell

[Adds the same flickering to lighters, welding tools and life
candles](https://github.com/tgstation/tgstation/pull/95362/commits/3ec44027e17835ae96702cec5f0b12d1f4deb32b)

Also, updated light candles to mirror the appearance of normal candles
and use overlay lighting

EDIT:
I realized while working on flares that I accidentally double applied
color, so if you saw the sparks animations before now it was different
(less vibrant). IDK if I like this better or worse but it is RIGHT and
that's what matters.

## Why It's Good For The Game

I got mad about how bad these looked, and this is a start at improving
them.
Also, adds a framework for more dynamic effects applied to overlay
lights (you could use this to apply a sort of "emergency rotating"
effect, or flicker/buzz for example).

<details>
 <summary>Before</summary>


https://github.com/user-attachments/assets/66437f27-ee3c-4f14-a7ee-4a1c3e68533a


https://github.com/user-attachments/assets/ed14fff8-a7eb-47fe-bab5-9a490ac96629

</details>

<details>
 <summary>After</summary>


https://github.com/user-attachments/assets/fb24ff2e-c745-42a5-8e11-c8a1eeef35a5


https://github.com/user-attachments/assets/fd8c2116-cb92-4fe6-ad3e-786a6538e52a

</details>

## Changelog
🆑
add: Reworks how sparks render. They're now a bit brighter, will fade
out as they move/if they hit something, will stack with each other less
and also won't start hang in the air on spawn.
add: Added a flickering effect to lighters, welding tools, flares,
torches and candles (since they're flames).
fix: Overlay based lights (think flashlights) will no longer flash to
double intensity while being picked up.
refactor: Reworked how some effects (explosion particles, sparks, some
reagent stuff) function, report any bugs!
/🆑
2026-03-20 14:48:57 +13:00
MrMelbert da64374423 Reverts "Add prosthetic limb" surgery to involve targeting limbs, rather than targeting chest. (Adds stumps) (#95252)
## About The Pull Request

- The `prosthetic replacement` surgical operation has been reverted to
be closer to how it used to work: The operation is done targeting the
limb that's missing

The change was made out of necessity, as surgical state was tied to
limbs - you had to operate on the chest to re-attach limbs because there
was no limb to operate on.

To circumvent that, I have done the unthinkable of adding stumps when
you are dismembered.

- Missing limbs are now represented as an invisible, un-removable,
un-interactable limb.

Making this change was not as difficult as originally anticipated, and
(at least surface level) seems to have broken very little.

Surprisingly little had to change to make this work. 

Direct accesses to `mob.bodyparts` was changed to `mob.get_bodyparts()`
with an optional `include_stumps` argument.
Similarly, `get_bodypart()` had an optional `include_stumps` added. 

This means we ultimately barely needed to change anything, and in fact,
some loops/checks were able to be streamlined.

## Why It's Good For The Game

- As mentioned, this change was out of necessity and was easily the
least intuitive part of the broader changes. Reverting it back to how it
used to work should make it far easier for people to pick up on, and
means we can cut out a bunch of bespoke instruction sets that I had to
include.

- The addition of stumps also adds a ton of future potential - code wise
it allows for stuff like better damage tracking (we can transfer damage
between limb <-> stump rather than limb <-> chest), and feature we can
do "fun" stuff like have stumps bleed on dismemberment that you can
bandage.

## Changelog

🆑 Melbert
del: "Add prosthetic limb" surgical operation has been reverted to be a
bit closer to how it used to work - you operate on the missing limb /
limb stump, rather than on the chest.
refactor: Missing limbs are now represented as limb stumps. In practice
this should change nothing (for now), as no features were rewritten to
make use of these besides surgery. Please report any oddities with
missing limbs, however.
/🆑
2026-03-20 14:32:41 +13:00
Cody Brittain 965c4a40a9 Add an equivalent to balloon_alert_to_viewers, but for hearing (#95376) 2026-03-17 17:28:27 -04:00
SmArtKar c3fdebbe4f Converts vehicles to use item_interaction/tool_acts (#95399)
## About The Pull Request

More attackby()s gone

## Changelog
🆑
refactor: Converted vehicles to use item_interaction/tool_acts
/🆑
2026-03-15 20:34:49 +00:00
MrMelbert 4fe16acd0b Minor shock() refactor (#95204)
## About The Pull Request

`shock` was copy pasted across a bunch of base types
I needed the behavior unified and it was fairly trivial to do 
So now we have `/obj/proc/shock` which all the old implementations call 

## Changelog

🆑 Melbert
refactor: Made some minor changes to how things like airlocks, vendors,
and autolathes shock you. Report any wierdness with that
/🆑
2026-02-24 21:12:59 -05:00
SmArtKar a3498fdcd7 Material Science 1: A bunch of math (#95090) 2026-02-22 16:53:51 +11:00
LemonInTheDark 546dc7fdfa Quarters camera chunk area, Implements better yielding to subsystem on update. (#94530)
## About The Pull Request

[cameras should actually show all of their
view](https://github.com/tgstation/tgstation/commit/a8ef0f3bd7f16e590b9fae193f645c6cb6255f8f)

Melb fucked up luminosity a bit (cries)

[Implements camera range as the deciding factor for who can see a
chunk](https://github.com/tgstation/tgstation/commit/bf4f9776dfce1c15e756ae1933a96ff0cff2dbf0)

This allows us to safely modify chunk size (which I do, down to 8, which
increases the actual cost involved in doing a full z update, but
decreases the cost per chunk significantly)

I use the range to macro optimize chunk New, we can safely use a
bounding box instead of multiple urange calls and get about 1/3 the
performance hit, even with a lower range (and thus 4x as many chunks)

Standard caching and such applies

[Fixes cameras not looking down
correctly](https://github.com/tgstation/tgstation/commit/99b23f25203f34f04c0f92bb7d191699b91a439a)

[Implements yielding support for individual
chunks](https://github.com/tgstation/tgstation/commit/bdd2d01106465b8498307c16f83e9dd90706652a)

This should functionally remove lagspikes from the cameras subsystem,
which just leaves the problem of ais flying around.

Much better tick obedience:


https://github.com/user-attachments/assets/607d61a4-ad96-450c-acdf-10da967ab49b

I tested this pr with #94522 to confirm that halving chunk sizes would
have a benefit, see below:

<img width="364" height="176" alt="image"
src="https://github.com/user-attachments/assets/19f3ae7f-408b-4da5-8e38-a691030138fe"
/>
<img width="462" height="195" alt="image"
src="https://github.com/user-attachments/assets/492b93bf-93ae-4227-9c6d-c5b2f0be9711"
/>
<img width="469" height="229" alt="image"
src="https://github.com/user-attachments/assets/dba92982-09e4-4c3a-96e2-15e1a299676b"
/>
<img width="444" height="233" alt="image"
src="https://github.com/user-attachments/assets/40b1e0dc-c03a-4acd-bba9-f1e4c68bffad"
/>

Things to note:
Mean cost of finding turfs goes from 2ms to 1ms
Max cost of finding turfs goes down by somewhere between 30% and 50%.

I'd call this worthwhile, even if total cost of updating has gone up
slightly.

[Properly manages the camera refs in
chunks](https://github.com/tgstation/tgstation/pull/94530/commits/00c97183ca83a91d95b9afcde70814c36a8f9a5e)

[00c9718](https://github.com/tgstation/tgstation/pull/94530/commits/00c97183ca83a91d95b9afcde70814c36a8f9a5e)

Turns out our solution for moving cameras in chunk code was to just...
NOT CARE!! This means any moving camera is going to cause hard deletes.

This was an issue during unit tests because of a stripping unit test. I
suspect it only showed up here because I reduced the chunk size so we
actually enter/leave a new set of chunks.

I fixed this by reworking things to use a "leaving/joining" pattern.

There's some other stuff here, mostly cleaning up old copypasta'd cruft
in the code adjacent to moving cameras. I also changed the cameras and
processing cameras alists back into lists, mostly for the sake of vv
ability this didn't actually break anything.

The harddel wasn't showing up because it was a number keyed alist, and
reference tracking isn't built to find those (yet, pr up)

## Why It's Good For The Game

I want AIs flying around to not cause massive lag spikes. That + the
camera subsystem are one of like 4 things that's causing reliable tidi
on live and it makes me upset.

## Changelog
🆑
fix: Cameras should work a little better (won't fail in the dark, will
display multiz correctly
refactor: Changed how static turf generation thinks about cameras.
Shouldn't break anything but it MIGHT so keep an eye out for that. The
chunks we use to divvy up the world for them are also 1/4th the area
now, which should make flying around as ai less lagsikey
/🆑

---------

Co-authored-by: Lucy <lucy@absolucy.moe>
2026-02-20 20:58:39 -05:00
MrMelbert ffca114cf4 Paddy overclocks when sirens are on (Cleans the blood from my hands) (#95075) 2026-02-21 10:13:08 +11: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
Leland Kemble c65634ba2f Disables opening blast doors & shutters by riding into them (#95102)
## About The Pull Request

Swaps the proc being called on doors in the riding component's
`vehicle_bump()` proc from `bumpopen()` to `Bumped()`, causing relevant
checks to be undergone, most importantly the check for
`can_open_with_hands`. Due to the way vehicles are bumped by their
drivers and thus cause their drivers' `last_bumped` to be set, the
riding component now tracks its own `vehicle_last_bumped` & resets its
occupants' `last_bumped` when bumping doors, given the vehicle is off
bump cooldown.

`vehicle/sealed` gets to keep `bumpopen()` because they give
`TRAIT_HANDS_BLOCKED`, but they check for `can_open_with_hands` now.

Additionally, just for consistency's sake, firelocks' previous
`bumpopen()` override has been removed and replaced with
`can_open_with_hands`.

## Why It's Good For The Game

fixes #95100

## Changelog
🆑

fix: Blast doors & shutters no longer inexplicably open when approached
on a mount

/🆑
2026-02-06 17:33:01 -05:00
MrMelbert e4f533111f Deafness is now solely tracked by trait (#95029)
## About The Pull Request

Deletes `can_hear`, replaces it with trait-checking deafness.

The only two non-trait sources of deafness (hardcrit and lacking ears)
were refactored into using the trait.

## Why It's Good For The Game

Many places inconsistently check for the deaf trait rather than use
can_hear which meant behavior was not consistent.
Some code would treat "do we lack ears?" as being deaf, some would not. 

This unifies all the behavior so being deaf means you're deaf
everywhere.

It also means we can now easily react to gaining and losing deafness via
signal, where before we could not react to it without hooking the trait,
organ remove, AND stat change. Which no one did, of course, because who
would ever think to do that?

## Changelog

🆑 Melbert
refactor: Refactored how deafness is tracked. Please report any weird
interactions with sounds, like messages or sfx being missing.
fix: Lacking ears and being in hard crit now consistently treats you as
"being deaf". This affects a few minor interactions like empath, the
jukebox, and sleeping.
/🆑
2026-02-05 20:19:56 -05:00
Y0SH1M4S73R 6f37db300b Gives non-standard nullrods the rest of the features common to regular null rods (#94980)
## About The Pull Request

Non-standard null-rods (the skateboard, bow, revolver, carpsie plush,
and eswords) did not receive all the common characteristics of regular
null rods in #93394. In particular, they were not given the
`UNIQUE_RENAME` obj flag, and they did not receive the ability to track
how many cultists they've crit/killed and be turned into cult weapons
when sacrificed. This PR corrects that by extracting the cult kill
tracking behavior to a component, while doing the following refactors to
ensure complete compatibility:

- Skateboard items now move themselves into the skateboard vehicle they
spawn on use, instead of deleting themselves. This was necessary for the
holy board to keep its custom name/desc and cultist kill count.
- Guns (which the bow technically is) will track cultists killed/crit
with bullets fired from them by a mob with a holy role.
- A signal can now be used for an item to provide an arbitrary response
when an offer rune underneath it is activated.

## Why It's Good For The Game

I just wanted the holy eswords to be renameable for chaplains to provide
plausible deniability for the possession of actual eswords, but after I
discovered this consistency issue, and felt the need to fix it.

## Changelog

🆑
fix: The holy energy swords and the carp-sie plushie can once again be
renamed
fix: The holy energy swords and the carp-sie plushie can once again be
sacrificed by cultists to spawn different weapons based on how many
unique cultists the chaplain has crit or killed with them
qol: The holy skateboard can be renamed like other null rod variants can
fix: Unusual null rod variants like the holy skateboard and bow can now
be sacrificed by cultists to spawn different weapons based on how many
unique cultists the chaplain has crit or killed with them. The bow and
the burdened chaplain's revolver, in particular, also count cultists
crit or killed by arrows/bullets fired from them by the chaplain.
/🆑
2026-02-03 22:23:20 -05:00
SmArtKar f58b8511f0 Refactors effect_system (#94999)
## About The Pull Request

This PR refactors ``effect_system``s to be a bit easier to use by
getting rid of ``set_up``, allowing ``attach()`` to be chained into
``start()`` and refactoring most direct system usages in our code to use
helper procs.

``set_up`` was unnecessary and only existed to allow ``New``'s behavior
to be fully overriden, which is not required if we split
sparks/lightning/steam into a new ``/datum/effect_system/basic`` subtype
which houses the effect spreading behavior. This allows us to roll all
logic from ``set_up`` into ``New`` and cut down on code complexity.
Chaining setup as ``system.attach(src).start()`` also helps a bit in
case no helper method exists

I've added ``do_chem_smoke`` and ``do_foam`` helpers, which respectively
allow chemical smoke or foam to be spawned easily without having to
manually create effect datums and reagent holders.

Also turns out we've had some nonfunctional effect systems which either
never set themselves up, or never started, so I fixed those while I was
at it (mostly by moving them to aforementioned helper procs)

## Why It's Good For The Game

Cleaner code, makes it significantly easier for users to work with. Also
most of our effect system usage was copypasta which was passing booleans
as numbers, while perfectly fine helper procs existed in our code.

## Changelog
🆑
refactor: Refactored sparks, foam, smoke, and other miscellaneous effect
systems.
refactor: Vapes now have consistent rigging with cigs using the new
system.
fix: Fixed some effects never working.
/🆑
2026-02-03 22:23:09 -05:00
John Willard aedc5bae7a allowed is now signals based instead of hardcoded slots (#94871)
## About The Pull Request

ID cards/MMI mech access/simple mob access/pAIs now use signals instead
of checking specific slots with mob checks. We do this through mob's
``get_access`` proc that collects all access a mob has with a
collect_access signal.

## Why It's Good For The Game

It looks cleaner and we no longer individually check `check_access` for
every single item that may have access. It's cleaner to put it all
together and check in one go with all the access we've got. This also
makes it easier to add items that hold access that aren't necessarily
IDs but you want to be able to open stuff with.

## Changelog

🆑
refactor: ID checking for access has been reworked, please make a bug
report if anything that's supposed to grant access is not working.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2026-01-16 14:16:22 -07:00
Leland Kemble a34f9fbaf4 Fixes vehicle keys not going into your hands when you take them out (#94762)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

`forceMove()` drops `inserted_key` so `put_in_hands()` quits because
it's been called with null. `forceMove()` is pointless anyway, because
`put_in_hands()` drops on the floor if it fails.

## Why It's Good For The Game

It's already supposed to work this way

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and its effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑

fix: Taking keys out of vehicles puts them in your hands if possible

/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2026-01-07 16:28:32 -07:00
Bloop 0190e64654 Converts simple rotation into a bespoke element (#94582)
## About The Pull Request

<img width="579" height="67" alt="image"
src="https://github.com/user-attachments/assets/d7a4427e-2a6e-44d3-94ba-c90a2d474984"
/>

Simple rotation components number in the 8-9k range per round, and each
contains a needless callback datum as well.

These do not need to hold any state and can be bespoke elements, and the
proc to do things post_rotation can just be a normal atom proc.

<details><summary>Still works as you'd expect, including items that have
flag requirements like the wrench</summary>


![dreamseeker_UhvaohsIYK](https://github.com/user-attachments/assets/a4bd6b3f-d502-4a11-852f-0b96472d688d)


![dreamseeker_fEwUfNQben](https://github.com/user-attachments/assets/62dca771-4622-4cb2-9105-7f3a7c73e15a)

</details>

## Why It's Good For The Game

Makes a heavily used element much more lightweight, saves a few mb of
memory.

## Changelog

🆑
refactor: simple rotation component has been refactored into an element
Please report any bugs to github.
/🆑
2025-12-25 10:32:41 +01:00
SyncIt21 fa9c98058f Refactors material components to regular datums (#94596)
## About The Pull Request
This was LONG overdue and its finally time. Refactors 2 components to
regular datums
- `/datum/component/material_container` -> `/datum/material_container`
- `/datum/component/remote_materials` -> `/datum/remote_materials`

Reduced memory overhead and stops misuse of component i.e. storing it in
a variable

## Changelog
🆑
refactor: refactored material container code to reduce memory overhead.
Report bugs on github
/🆑
2025-12-25 01:02:10 +01:00
Frenjo 17239b193c Adds the AI_COMPATIBLE flag to the Mauler exosuit (#94572)
## About The Pull Request

Just a very simple PR to fix an oversight where the Mauler exosuit
doesn't have the AI_COMPATIBLE flag, meaning as well as being unable to
be beaconed - which is intended - you also couldn't use an intellicard
to manually install an AI into it.
## Why It's Good For The Game

If a squad of nukies wants to shove an AI into their Mauler, then why
not? The base Marauder model which the Mauler is based on has AI
compatibility, so does the Seraph! Also brings parity with the Dark
Gygax which currently _can_ have an AI installed.
## Changelog
🆑
fix: Fixed the inability to shove an intellicarded AI into a Mauler-type
exosuit.
/🆑
2025-12-25 00:14:38 +01:00
SmArtKar cb643c9446 Fixes sheet ejection on mechfabs (#94480)
## About The Pull Request

Mechfabs weren't passing ID_DATA to the silo, preventing material
ejection. Also added ID_DATA to the ORM as to allow miners to be tracked
in the silo (if they insert ores by hand or by dragging a box next to
the ORM)

## Changelog
🆑
fix: Fixed sheet ejection on mechfabs
qol: Miner ORM deposits are now logged in the ore silo
/🆑
2025-12-16 22:01:22 -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
Geoengi 1561203950 Adds Effects to the Death of Customer Robots and Mech Wreckages (#94391)
## About The Pull Request

A first, small change so that robot customers and mech wreckages produce
robot debris upon being killed/destroyed, rather than simply deleting
themselves. Customers, in specific, will undergo a similar gibbing
process as real borgs: sparking and scattering robot debris without the
animation. Wreckages, instead, will make a large noise, shake the camera
of close people, and collapse into a single robot debris (as it was
already mostly destroyed by this point).

## Why It's Good For The Game

The destruction of these two entities is otherwise underwhelming when
they disappear into the aether with little fanfare. Also provides the
chef and janitor with another thing to get mad about when John Assistant
throws sharp sticks at the kitchen's customers.

## Changelog
🆑
add: Robot customers and mech wreckage destruction are messier. Bring a
mop!
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2025-12-12 19:07:45 -07:00
Tostah f8a190b337 Stomp Stomp Stomp (#94075)
## About The Pull Request


![ezgif-8a2574d82c46a44a](https://github.com/user-attachments/assets/d3f8c92e-9b4b-41c1-8400-d55224b81aef)

(the glass and grille being broken in a single hit is the change here)

- The Paddy and Ripley are the only mechs without enough force to
one-shot windows (they two-shot instead).

Reinforced plasma windows, plastitanium, basically any window except
basic reinforced (and weaker) takes a bit more to kill but not
substantially more.

## Why It's Good For The Game

If walls and reinforced walls can be beaten through in a single hit,
then surely that same mech will have no problems bashing through a glass
window.


## Changelog
🆑
Balance: increases mech damage to windows to feel more realistic
/🆑
2025-12-06 17:49:55 +11:00
MrMelbert 259ff2c889 Fix mech construction (#94281)
## About The Pull Request

Fixes #94280

Last minute changes always bite  

## Changelog

🆑 Melbert
fix: Fix mech construction 
/🆑
2025-12-03 17:39:07 -07:00
MrMelbert 0098ffca01 Makes it possible to add new mech construction steps without ruining everything (#94175)
## About The Pull Request

Currently mech construction icons correspond 1:1 with construction step

<img width="1357" height="349" alt="image"
src="https://github.com/user-attachments/assets/65763f51-776c-44a7-bc9e-b710db9342a1"
/>

This means if you want to add a new step in the middle of an existing
construction chain you are SOL and have to update everything manually

This suuuucks, and you will notice in the picture above that many states
*are identical*

So I have lightly refactored it:

- When steps are instantiated, it will automatically attempt to fill in
`icon_state`s according to the index in the list, as it does currently
- If the step specifies its own icon state, nothing happens, but index
goes up
- If the step specifies `skip_state`, it will neither set an icon state
nor increment the index

This means you can insert a step in the middle of an existing chain with
`skip_state = TRUE` if your state has no icon associated, OR you can
insert a step with `icon_state = "new_state", skip_state = TRUE` to add
your icon without needing to edit every existing icon

Now in an ideal world we get rid of this auto-setting system wholesale
and set bespoke icon states (`mecha_wires`, `mecha_internal_armor`,
etc). We would just define a step's `state = "wired"`, `state =
"armored"`, and so on. However, I feel like having the option of using
"default states" makes it easier during development.

Also I *could* go through and remove all the duplicate states and
replace them with `skip_state` instructions but I'm lazy. (Maybe I'll do
it anyways though)

Other changes

- Completing a construction step sends you a chat message about the next
step, so you don't have to examine the chassis to find out
- Changed around how the Phazon accepts its anomaly core

## Changelog

🆑 Melbert
refactor: Refactored how mech icons update mid-construction, report any
disappearing mechs please
fix: One of the Phazon's mid construction icons was not visible in the
past, now it is again. Yippee.
/🆑
2025-12-02 16:50:43 -07:00
Ghom 0b0c5ea91e Unit test material checks are now performed on all crafting recipes by default. All stack recipes now transfer mats to the results (#92620)
## About The Pull Request
Extends the part of the crafting unit test that ensures consistency
between the total mats of the components of a recipe (or rather, the
result of said recipe) and a generic instance of the same type as its
result, previously only implemented on food recipes.

## Why It's Good For The Game
This ensures a degree of consistency with the material composition of
various objects in the game. I couldn't do it in the original PR as that
one was too big already and it took months to get it merged, and have
the relative bugs fixed.

Currently a WIP as I slowly deal with the unit test reports.

## Changelog

🆑
refactor: Follow-up to the crafting/material refactor from months ago.
All objects crafted with stacks now inherit their mat composition (not
necessarily the effects and color) by default, while previously only a
few things like chair, sinks and toilets did. Report any object looking
or behaving weirdly as a result.
fix: The material composition of ammo boxes is no longer a 1/10 of what
it's supposed to be. It was a shitty hack to make it harder to recycle
empty ammo boxes. Instead, they lose materials as they're emptied now.
/🆑
2025-12-02 18:29:01 -05:00
tonty 8c45d4466c [MDB IGNORE] Cleans up AI core structure, un-spaghettis some AI code (#93873)
## About The Pull Request

The AI core structure now fully integrates item/tool interactions and no
longer uses attackby/take_damage overrides. Construction behaviour has
been isolated into its own file.

All handling relating to the AI core's status when shunted has been
turned into signals. For this reason, helper procs for managing core
link state have been made and integrated into the relevant users (APC
shunting, mech takeover). The AI core no longer references the remote AI
mob.

/obj/structure/ai_core/deactivated has been removed from code since it
had no function after refactoring. There was only a single instance of
it being used in a map, which has been replaced with a var edit.

There may be more things I changed, but I'm h
2025-12-02 12:38:51 -06:00
necromanceranne ac6c47f601 Several file changes just to make high frequency blade null rods block mechs, mech melee blocking finally implemented (#94089)
## About The Pull Request

High frequency blades, both null rod variant and admeme variant, can
block mech melee attacks. For the former, that is the only thing it can
block. Great if you're fighting a lot of mechs as a chaplain I guess.
And you're also really committed to the bit.

Weapons that were vibro subtypes are now claymore subtypes. The only
difference here is that they now have 30% block instead of 35% AP.

Null rod high frequency blades are now two-handed. This mostly
determines force changes (10 unwielded, 18 wielded), and mech attack
block chances.

Mech melee attacks respect block...assuming the blocking source can even
block the attack in the first place. Currently, the few sources that can
block/avoid mech attacks are;
- high frequency blades
- energy katanas
- Those staff nullrods (its a holy force field, iunno)
- wizard modsuit shield (and it will eat literally every single charge
it has to do that)
- Sleeping Carp evasion (and only at half the possible chance)
- CQC defense mode (themed as dodging the attack, and also halved)
- probably something I overlooked when I implemented OVERWHELMING_ATTACK
originally and have overlooked here as well.
 
Just think 'could this help avoid being hit by a road roller being
dropped on you' and go with your gut as to whether or not it is
appropriate if you spot something in the wild that seemingly can block a
mech.

## Why It's Good For The Game

> High Frequency Blade

I wanted to elevate the meme and that is as deep as this goes. Also I
wanted to make this two-handed, much like the true version.
The only thing it is lacking is the cool attack functionality, but I'll
be damned if I can get that to work in a sensible fashion for a crew
weapon...

> Vibro subtype

A lot less of these than I thought. And most of them seemed more
appropriate as claymore types anyway.

> Mech Block

I seeded this previously by making mech clamps respect block. I've now
come back to fully implement it in order to facilitate MGR memes.

For the most part, mechs should still enjoy being largely unblocked by
most sources, even from things like operative suit shields, and
certainly not from actual shields (which I've stripped the ability to
block the attack from entirely) and melee weapons.

The sources that can block them do so poorly. Or, in the case of the
high frequency blade, very well and that's pretty much the only thing it
IS good at blocking.

## Changelog
🆑
balance: High frequency blades (both null rod and admin versions) are
able to block melee attacks from mechs.
balance: High frequency blade null rods are now two-handed weapons.
balance: Mech melee attacks can be blocked or avoided by a few rare
sources.
/🆑
2025-12-02 01:13:58 -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
Fghj240 10d0496a02 You can inspect a mech's armor values like you can with body armor (#94193)
## About The Pull Request

Atomized from #94190 
<img width="372" height="406" alt="image"
src="https://github.com/user-attachments/assets/53cd3e28-d2bd-41b3-8c76-44bc16b115f7"
/>

Yes, it updates if you add armor plating.

## Why It's Good For The Game

All the stats are already in the game's code and wiki that anyone can
look up. You can also see what armor plates are there on examine, so why
not show the stats? Makes it way easier for everyone.

## Changelog

🆑
qol: Exosuits have a tag like body armor that shows their armor values
upon inspection
/🆑

Co-authored-by: Fghj240 <fakeemail@notrealemail.com>
2025-11-29 19:06:04 -07: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
SyncIt21 5fa1a936c9 Fixes mech HUD not updating without occupants (#93960)
## About The Pull Request
- Fixes #93951

## Changelog
🆑
fix: mech HUD always updates like when charged via inducer
/🆑
2025-11-19 03:03:38 +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
Aliceee2ch 8ee1cd2474 Makes EMP logs less bad (#93841)
## About The Pull Request

closes #93805

## Why It's Good For The Game

we actually have almost no emp logging at all lol, not even emp chem
reaction, so you barely can track potential griefer?

## Changelog

🆑
admin: EMP logs are improved, additionally chemical EMP reactions are
now logged.
/🆑
2025-11-09 14:46:10 +01:00
Roxy d84a87f668 Rewrites to fix compiler errors on 516.1670+ (#93801)
## About The Pull Request

Fixes all instances of numbers being used as assoc list keys in things
that aren't alists, either by turning them into alists or changing the
keys to something else. Also adds new macros to support creating global
alists, as a few global lists became alists. Most of these are pretty
simple and self-explanatory but
- The GLOB.huds one necessitated rewriting because code depended on it
being a non-assoc list, which it technically was because the defines it
used as keys were numbers so BYOND turned it into a regular list, most
of this was for loops through all the subtypes of
`/datum/atom_hud/data/diagnostic` of which there's only one, so I just
changed it to get that type directly by key
- NT Frontier used number indexes which it looped through for some
reason and also passed to TGUI, changed these to strings and adjusted
the TGUI to match, I tested this and it works fine

## Why It's Good For The Game

Makes the code compile, I couldn't test everything but I tried to check
all usages of affected vars to make sure they wouldn't break from being
switched to alists, a TM might be in order just to be sure nothing's
fucked

## Changelog
🆑
refactor: rewrote all cases of numbers being used as keys in non-alist
associative lists
/🆑
2025-11-08 14:19:55 -08:00
MrMelbert 5146cfd403 Moves camera update handling to background subsystem, (maybe) fixing lag (#92208)
## About The Pull Request

When a camera update is triggered, it is instead added to a queue on a
background subsystem

An AI entering a camera chunk which is queued to update will force the
update immediately (bypassing the queue)

While the root problem of this is, ultimately, not addressed...

<img width="554" height="58"
alt="467828777-eff3f0e5-49d6-4997-b4d7-05eff6432155"
src="https://github.com/user-attachments/assets/c2d6a5f5-d958-463e-959f-116bd0dab475"
/>

...the change will ultimately prevent update spam from consuming all of
the server's resources - instead allocating updates to the backburner in
times of high server stress (or on multi-z maps)

## Changelog

🆑 Melbert
refactor: Refactored the way camera updates are handled to hopefully
reduce some lag. Report any oddities
/🆑
2025-11-08 01:43:48 +01:00
Roxy d0ca474789 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-2025-11-05 2025-11-05 19:43:07 -05:00
arbuzik456 ac41c111f6 Mech equipment buttons DLC (#93664)
## About The Pull Request

Adds equipment action buttons for cargo module and fire extinguisher

YOU can access YOUR mech cargo module without using mech UI screen

simply press left click to unload first item OR right click to select
item to unload(comes in dat radial menu thing)
<img width="300" height="259" alt="riplaey"
src="https://github.com/user-attachments/assets/4469bfb9-ec64-4e71-b774-4b5e8aa964ce"
/>
also works for fatty if ANYONE cares about him
<img width="272" height="234" alt="fatty"
src="https://github.com/user-attachments/assets/ff6cf41a-ab7a-48fa-b490-8ce98448b647"
/>

My baby boy fire extinguisher mech module was untouched by original mech
action buttons PR so i had to do him right

left click to spluff, right click to refill

Also made so fire extinguisher now goes on all mechs because its more
usefull in combat scenario than for firefighting (3x3 slips??? yes
please!!!)

## Why It's Good For The Game

more action buttons bloat on screen less use of clanky UI

## Changelog
🆑
add: Added UI buttons for mech cargo module, left click to dispose first
item in the list and right click to select an item to drop.
add: Added UI button for mech fire extinguisher, left click to splash
and right click to refill.
balance: Mech fire extinguisher module now goes on any mech, combat
slips with a press of a button!
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-11-01 13:37:42 +01:00