Skip to content

Fixed a bug that artifact gas creation was not respecting the storage… - #548

Open
Sendir wants to merge 3 commits into
michaelchessall:persistence_testingfrom
Sendir:Gas_Spawning_Bug
Open

Fixed a bug that artifact gas creation was not respecting the storage…#548
Sendir wants to merge 3 commits into
michaelchessall:persistence_testingfrom
Sendir:Gas_Spawning_Bug

Conversation

@Sendir

@Sendir Sendir commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

About the PR

Artifact gas-creation effects (XAECreateGasComponent) now release their gas into the atmosphere they're actually enclosed in, instead of always dumping it onto the floor tile. If the artifact (or the player holding it) is sealed inside an airtight container — a locker, crate, cryopod, mech, etc. — the gas goes into that container's internal air. Only when out in the open does it release onto the tile and adjacent tiles as before.

Why / Balance

Previously, activating a gas-creating artifact while sealed inside a locker/crate leaked the gas straight through the container onto the surrounding tiles, ignoring the seal. Every other gas source (reagent effects, trigger effects) already respects container atmospheres via GetContainingMixture; this effect was the odd one out, writing directly to the tile. This makes artifact gas behave consistently with the rest of atmospherics and with player expectations — a sealed container should hold the gas until it's opened.

Technical details

XAECreateGasSystem.OnActivated now walks up the containment chain from the artifact (artifact → holder → container) and releases the gas into the first exposed mixture it finds (TryGetExposedMixture), which for an airtight EntityStorage is that container's Air. The walk is needed because the artifact is often nested (e.g. held by a player who is the one actually inside the crate), so the exposed mixture lives on an ancestor rather than the artifact itself. If no enclosing airtight mixture exists, it falls back to the original local-tile + adjacent-tile behavior unchanged.

Requirements

Breaking changes

None.

🆑

  • fix: Gas created by artifacts is now contained by the airtight locker, crate, or other storage it's activated inside, instead of leaking onto the floor.

DISCLAIMER

AI was used for the following

  • Writing the PR
  • Writing comments
  • Helping debug the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants