## Mirror of PR #22521: [Partial atmos
refactor](https://github.com/space-wizards/space-station-14/pull/22521)
from <img src="https://avatars.githubusercontent.com/u/10567778?v=4"
alt="space-wizards" width="22"/>
[space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14)
###### `18a35e7e83b2b71ee84b054d44d9ed5e595dd618`
PR opened by <img
src="https://avatars.githubusercontent.com/u/60421075?v=4"
width="16"/><a href="https://github.com/ElectroJr"> ElectroJr</a> at
2023-12-15 03:45:42 UTC
---
PR changed 43 files with 891 additions and 635 deletions.
The PR had the following labels:
- Status: Needs Review
---
<details open="true"><summary><h1>Original Body</h1></summary>
> This PR reworks how some parts of atmos code work. Originally it was
just meant to be a performance and bugfix PR, but it has ballooned in
scope. I'm not sure about some of my changes largely because I'm not
sure if some things were an oversight or an intentional decision for
some reason.
>
> List of changes:
> - The `MolesArchived float[]` field is now read-only
> - It simply gets zeroed whenever the `GasMixture` is set to null
instead of constantly reallocating
> - Airtight query information is now cached in `TileAtmosphere`
> - This means that it should only iterate over anchored entities once
per update.
> - Previously an invalidated atmos tile would cause
`ProcessRevalidate()` to query airtight entities on the same tile six
times by calling a combination of `GridIsTileAirBlocked()`,
`NeedsVacuumFixing()`, and `GridIsTileAirBlocked()`. So this should help
significantly reduce component lookups & entity enumeration.
> - This does change some behaviour. In particular blocked directions
are now only updated if the tile was invalidated prior to the current
atmos-update, and will only ever be updated once per atmos-update.
> - AFAIK this only has an effect if the invalid tile processing is
deferred over multiple ticks, and I don't think it should cause any
issues?
> - Fixes a potential bug, where tiles might not dispose of their
excited group if their direction flags changed.
> - `MapAtmosphereComponent.Mixture` is now always immutable and no
longer nullable
> - I'm not sure why the mixture was nullable before? AFAICT the
component is meaningless if its null?
> - Space "gas" was always immutable, but there was nothing that
required planet atmospheres to be immutable. Requiring that it be
immutable gets rid of the constant gas mixture cloning.
> - I don't know if there was a reason for why they weren't immutable to
begin with.
> - Fixes lungs removing too much air from a gas mixture, resulting in
negative moles.
> - `GasMixture.Moles` is now `[Access]` restricted to the atmosphere
system.
> - This is to prevent people from improperly modifying the gas mixtures
(e.g., lungs), or accidentally modifying immutable mixtures.
> - Fixes an issue where non-grid atmosphere tiles would fail to update
their adjacent tiles, resulting in null reference exception spam
> - Fixes#21732
> - Fixes#21210 (probably)
> - Disconnected atmosphere tiles, i.e., tiles that aren't on or
adjacent to a grid tile, will now get removed from the tile set.
Previously the tile set would just always increase, with tiles never
getting removed.
> - Removes various redundant component and tile-definition queries.
> - Removes some method events in favour of just using methods.
> - Map-exposded tiles now get updated when a map's atmosphere changes
(or the grid moves across maps).
> - Adds a `setmapatmos` command for adding map-wide atmospheres.
> - Fixed (non-planet) map atmospheres rendering over grids.
>
> ## Media
>
> This PR also includes changes to the atmos debug overlay, though I've
also split that off into a separate PR to make reviewing easier
(#22520).
>
> Below is a video showing that atmos still seems to work, and that
trimming of disconnected tiles works:
>
>
https://github.com/space-wizards/space-station-14/assets/60421075/4da46992-19e6-4354-8ecd-3cd67be4d0ed
>
> For comparison, here is a video showing how current master works
(disconnected tiles never get removed):
>
>
https://github.com/space-wizards/space-station-14/assets/60421075/54590777-e11c-41dc-b49d-fd7e53bfeed7
>
> 🆑
> - fix: Fixed a bug where partially airtight entities (e.g., thin
windows or doors) could let air leak out into space.
>
</details>
Co-authored-by: SimpleStation14 <Unknown>
## Mirror of PR #26346: [Fix cross-grid spreader
behavior](https://github.com/space-wizards/space-station-14/pull/26346)
from <img src="https://avatars.githubusercontent.com/u/10567778?v=4"
alt="space-wizards" width="22"/>
[space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14)
###### `763d2bca9c3a9ffe1fcfceef1506238fa31d6afc`
PR opened by <img
src="https://avatars.githubusercontent.com/u/85356?v=4" width="16"/><a
href="https://github.com/Tayrtahn"> Tayrtahn</a> at 2024-03-22 20:20:50
UTC
---
PR changed 1 files with 1 additions and 1 deletions.
The PR had the following labels:
---
<details open="true"><summary><h1>Original Body</h1></summary>
> <!-- Please read these guidelines before opening your PR:
https://docs.spacestation14.io/en/getting-started/pr-guideline -->
> <!-- The text between the arrows are comments - they will not be
visible on your PR. -->
>
> ## About the PR
> <!-- What did you change in this PR? -->
> Kudzu should no longer be able to infinitely spread into itself when
traversing across grids.
>
> ## Why / Balance
> <!-- Why was it changed? Link any discussions or issues here. Please
discuss how this would affect game balance. -->
> Bug fix.
>
> ## Technical details
> <!-- If this is a code change, summarize at high level how your new
code works. This makes it easier to review. -->
> Passed the wrong grid UIDs with part of the cleanup of spreader
behavior. Now the right grid UIDs should be used.
>
> ## Media
> <!--
> PRs which make ingame changes (adding clothing, items, new features,
etc) are required to have media attached that showcase the changes.
> Small fixes/refactors are exempt.
> Any media may be used in SS14 progress reports, with clear credit
given.
>
> If you're unsure whether your PR will require media, ask a maintainer.
>
> Check the box below to confirm that you have in fact seen this (put an
X in the brackets, like [X]):
> -->
>
> - [ ] I have added screenshots/videos to this PR showcasing its
changes ingame, **or** this PR does not require an ingame showcase
>
> ## Breaking changes
> <!--
> List any breaking changes, including namespace, public
class/method/field changes, prototype renames; and provide instructions
for fixing them. This will be pasted in #codebase-changes.
> -->
>
> **Changelog**
> <!--
> Make players aware of new features and changes that could affect how
they play the game by adding a Changelog entry. Please read the
Changelog guidelines located at:
https://docs.spacestation14.io/en/getting-started/pr-guideline#changelog
> -->
>
> <!--
> Make sure to take this Changelog template out of the comment block in
order for it to show up.
> 🆑
> - add: Added fun!
> - remove: Removed fun!
> - tweak: Changed fun!
> - fix: Fixed fun!
> -->
>
</details>
Co-authored-by: SimpleStation14 <Unknown>
Also includes some (non critical) changes to the solution file to re-organize the Roslyn components.
(cherry picked from commit e00f74505c62310bd15aeaba8d6530f648397074)
* sans
* Papyrus
* add to game
* tweak stick
* fixes
* Update Resources/Prototypes/Entities/Objects/Misc/kudzu.yml
Co-authored-by: Kara <lunarautomaton6@gmail.com>
* Update Resources/Prototypes/Entities/Structures/Specific/Anomaly/anomalies.yml
Co-authored-by: Kara <lunarautomaton6@gmail.com>
---------
Co-authored-by: Kara <lunarautomaton6@gmail.com>
(cherry picked from commit b3b64e6cf29f313a9782fb95ae8727f907b1836a)
* Add some tests and fix some bugs
* Add more helper methods
* remove submodule
* fix merge
* also fix DirtyAll()
* poke
(cherry picked from commit 35ba42af9ccbbe41e8a3e59b30f2799ef8ca4b8d)