226 Commits

Author SHA1 Message Date
Nemanja
9f94f94cb6 Decouple GasPrototype IDs from Gas Enum (#41266)
* Remove final enum coupling from gas YAML

* Fix comment

* Fix test

* Apply suggestions from code review

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-11-21 20:12:13 +00:00
UpAndLeaves
c72c1c4f34 Move TileFireEvent to Shared (#41285)
* Move to shared

* cleanup

---------

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
2025-11-04 22:08:22 +00:00
ArtisticRoomba
91292522b5 DeltaPressure Predicted Examine (#41135)
* predicted examine

* atrociously satanic

* do it right this time

* deltafields aren't necessary

* Update Content.Server/Atmos/EntitySystems/AtmosphereSystem.DeltaPressure.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-10-27 11:00:37 +00:00
thetuerk
bb3fa43f1f Predict LungSystem (#40729)
* Initial edits of files
Untested yet. I would like to make sure all is accounted for before moving the files.

* trying my best

* Revert "trying my best"

This reverts commit 9aeece466df0169adec97e3947b061b54fd9b388.

* Revert "Initial edits of files"

This reverts commit 45c6e2343844b5fcafadbf2e5115fb2f241086a1.

* an actual meal

* Added networking to LungComponent.cs

* removed duplicate using

* moving GasRagents to SharedAtmosphereSystem.cs
2025-10-09 10:26:21 +00:00
slarticodefast
a38c6c1aca Revert "Add heat distortion shader for hot gases" (#40352) 2025-09-14 20:48:24 +02:00
Pieter-Jan Briers
0c97520276 Fix usages of TryIndex() (#39124)
* Fix usages of TryIndex()

Most usages of TryIndex() were using it incorrectly. Checking whether prototype IDs specified in prototypes actually existed before using them. This is not appropriate as it's just hiding bugs that should be getting caught by the YAML linter and other tools. (#39115)

This then resulted in TryIndex() getting modified to log errors (94f98073b0), which is incorrect as it causes false-positive errors in proper uses of the API: external data validation. (#39098)

This commit goes through and checks every call site of TryIndex() to see whether they were correct. Most call sites were replaced with the new Resolve(), which is suitable for these "defensive programming" use cases.

Fixes #39115

Breaking change: while doing this I noticed IdCardComponent and related systems were erroneously using ProtoId<AccessLevelPrototype> for job prototypes. This has been corrected.

* fix tests

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-09-09 18:17:56 +02:00
Nemanja
7dbe1b219c Improve Gas Yaml Serialization (#40070)
* Make yaml gas serialization cleaner

* fix exception

* fix validation code

* rudimentary test & permissive loading

* change it a bit

* Test fixes and adjustments
2025-09-04 20:48:46 +02:00
Quantum-cross
70ffc1eb5d Add heat distortion shader for hot gases (#39107) 2025-09-03 20:17:39 -07:00
M4rchy-S
6c154fb79e Moving FlammableComponent to Shared (#39870) 2025-08-24 13:46:23 -07:00
ArtisticRoomba
e996fb62f1 Revert "Fix bug with pipe color" (#39135) 2025-08-04 13:10:54 -07:00
Perry Fraser
6d50fb03d6 fix: auto-update mailing unit + gas canister UIs on state (#39289)
* fix: auto-update mailing unit + gas canister UIs

* fix: make FollowerComponent auto handle state

* refactor: kill AfterAutoHandleState for Follower

* flakeops
2025-08-04 18:26:52 +02:00
Pieter-Jan Briers
444180c20d Optimizations from server profile (#38290)
* Properly cache regexes in chat sanitization/accents

Wow I wonder if `new Regex()` has a cost to it *looks at server profile*.

* Avoid lag caused by Tippy command completions

CompletionHelper.PrototypeIDs explicitly says *not* to use it with EntityPrototype. Unsurprisingly, reporting a completion result for every entity prototype in the game is a *bad idea*.

* Add active count metrics to some high-load systems

Mover & NPCs

I suspect the thing that caused the Leviathan round to shit itself on performance is NPC spam in space or something. So let's verify that.

* Enable parallel processing on pow3r again

Originally disabled due to a theory of it causing bugs, it was re-enabled on Vulture, and I'm not aware of it having caused any issues there.

* Replace hashset with bitflags for AtmosMonitor alert types.

Allocating these hashsets was like 20% of the CPU of atmos, somehow.

* Cache HashSet used for space movement collider checks

Turns out this was a ton of server allocations. Huh.
2025-07-26 11:44:34 +02:00
Perry Fraser
002afe8056 Properly dispose of stale pipedata chunks for the atmos monitor (#38974) 2025-07-23 17:18:19 +02:00
IgorAnt028
41a175636b Fix bug with pipe color (#30645)
Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
2025-07-19 15:10:38 -07:00
ArtisticRoomba
f874459092 Pressure Relief Valve (#36708)
* initial system (this math is probably WRONG)

* General code cleanup and OnExamined support
(holy moly this code sucks)

* UICode and related events foundation
TODO:
- Actually write the XAML UI and the underlying system
- Un-shitcode the entire thing
- Actually test everything...

* Working UI code
TODO: Make predicted, as this certainly isn't predicted. Even though I said it was. It isn't.

* Remove one TODO for unshitcoding the examine code

* Add reminder
yea

* Make predicted (defenitely isn't)
(also defenitely isn't a copypaste from pressure pump code)

* It's predicted!
TODO:
- Give it snazzy predicted visuals!
- Have a different field for pressure entry, lest it gets bulldozed every UI update.

* Improve gas pressure relief valve UI
TODO: Reminder to reduce amount of dirties using deltafields

* Implement DirtyField prediction

* Entity<T> cleanup
A lot of Entity<T> conversions and lukewarm cleanup.

Also got caught copy pasting code in 4K UHD but it's not like you couldn't tell.

* More cleanup and comments

* Remove TODO comment on bulldozing window title

* """refactoring"""
- Move appearance out of shared and finally fix it. Pointless to predict appearance in this instance.
- More Entity<T> conversions because I like them.
- Move UI creation handling over entirely to the ActivatableUI system.
- Fix a hardcoded locale string (why????).

* Add visuals

* Revert debugging variable replacememt
yea

* Revert skissue

* Remove unused using directives and remove TODO

* Localize, cleanup, document

* Fix adminlogging discrepancy

* Add ability to construct, add guidebook entry

* Clear up comment

* Add guidebook tooltip to valve

* Convert GasPressureReliefValveBoundUserInterface declaration into primary constructor

* Adds more input handling and adds autofill on open

* Un-deepfry input validator shitcode
Genuinely what was I smoking

* improve visuals logic

* Refactor again
- Update math to the correct implementation
- Moved code that could be re-used in the future into a helper method under AtmosphereSystem.Gases.cs

* I'm sorry but I hate warnings

* Remove unused using directive in AtmosphereSystem.Gases.cs

* Review and cleanup

* Lukewarm UI glossup

* Maintainer for the upstream project btw

* Remove redundant state sets and messy logic

* Unduplicate valve updater code

* Redo UI (im sorry Slarti)

* run tests

* Test refactored UI messaging

* Second round of UI improvements
- God please find a way to improve this system. Feels bad.

* Update loop implementation

* Further predict UI

* Clear up SetToCurrentThreshold

* cleanup

* Update to master + pipe layers and bug fixes
want to run tests

* fixes

* Deploy rename pipebomb

* Documentation and requested changes

* Rename the method that wiggled away

* Undo rounding changes

* Fix comment

* Rename and cleanup

* Apply suggestions from code review

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-07-03 18:00:34 +02:00
Perry Fraser
a0544fdbf2 Make gas tank UI a bit more network-happy (#38184)
* fix: network gas tank output pressure

* fix: don't overwrite gas tank output pressure during editing
2025-06-21 11:06:49 +02:00
themias
19271e6bc9 Fix gas analyzer and anom scanner wrong state (#38285)
* Fix gas analyzer and anomaly scanner UI activation issue

* save

* fix comment

* milkalyzer
2025-06-12 14:16:07 -07:00
Perry Fraser
e09b7debe2 Fix some popup issues with pipe layer changes (#38244)
* fix: only show pipe layer popups to the user changing them

* fix: don't show pipe layer subfloor popup when not using a screwdriver

* fix: properly pass down user and used for serverside pipe layer changes

Technically this doesn't matter as the Shared codepath for this method
doesn't actually use these on the server: only the user is used for a
clientside popup. Still, will be good to have these for future changes
that might need them.
2025-06-11 22:31:48 -07:00
ArtisticRoomba
3726eb6e19 Bring back low pressure damage to its unnerfed value (#38196) 2025-06-09 17:05:48 -07:00
chromiumboy
45012cbe1d Layering for atmospheric pipes (#36124)
Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
2025-06-01 22:01:43 -07:00
Tayrtahn
721d224fd7 Cleanup some misc warnings (#37904)
* Fix warning CS8524 for TurretControllerWindow

* Fix warning CS0660 for AtmosAlarmThreshold
2025-05-28 12:45:38 -04:00
qwerltaz
b374d2468a air alarm panic wire snipping forces panic mode (#36439)
* air alarm panic wire snipping forces panic mode

* document

* ForcedMode is datafield

* switch to bool flag

* lock button when panic wire cut

* prevent manually individually changing scrubbers from siphon when panic wire is cut

* failure alert when wire snipped

* is Control

* remove double horizontalExpand

* Update Content.Server/Atmos/Monitor/Systems/AirAlarmSystem.cs

* Update Content.Server/Atmos/Monitor/Systems/AirAlarmSystem.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-05-14 22:39:47 +02:00
LaCumbiaDelCoronavirus
d6e998272f Change balancing of atmos gas tank bombs (#36780)
* i will put functionality in salt later

* la

* to 10
2025-05-14 21:49:57 +02:00
metalgearsloth
c09aa6039c Predict gas valves (#33836)
* Predict gas valves

* wawawewa

* Fix imports before I get yelled at

* soff
2025-05-14 20:06:37 +02:00
metalgearsloth
df2257cd92 Predict gasthermomachines (#33837)
* Predict gasthermomachines

* despawn

* smellby
2025-05-13 21:49:43 +10:00
Nemanja
942b2b4dcb Change atmos plaques to yaml (#37318)
* Change atmos plaques to yaml

* remove locale strings
2025-05-10 02:24:07 +02:00
UpAndLeaves
8cf6ca78cf Fire damage system fixes (#37241)
Fire fixes
2025-05-06 22:03:05 -04:00
metalgearsloth
bd69fc612a Predicted internals (#33800)
* Predicted gas pumps

I wanted to try out atmos and first thing I found.

* a

* Atmos device prediction

- Canisters
- Tanks
- Internals

AirMixes aren't predicted so nothing on that front but all the UIs should be a lot closer.

* Remove details range

* Gas tank prediction

* Even more sweeping changes

* Alerts

* rehg

* Popup fix

* Fix merge conflicts

* Fix

* Review
2025-05-02 18:22:29 +10:00
K-Dynamic
ea64d4d106 Atmos air (6500 kPa) marker (#37061)
* air GM atmosphere

* atmos fix air miner
2025-05-01 18:03:47 -04:00
lzk
4171c4e6d5 make scrubber widenet in panic mode (#37013) 2025-04-28 21:22:05 +02:00
metalgearsloth
72372dc77d Predict gas volume pumps (#33835)
* Predict gas volume pumps

* Also this one

* Review
2025-04-19 11:48:41 +10:00
lzk
b96fa3dcfa Fix space wind layer removal (#33888)
* Fix space wind layer removal

* apply review

* Update MovedByPressureComponent.cs

* remove this
2025-04-19 00:52:09 +02:00
Pieter-Jan Briers
843d79be5f Fire extinguishers can now extinguish items, including when held/worn (#36267)
* Fire extinguishers now put out candles

This did not actually require any changes to flammable or extinguishers directly, the only necessary changes were to make the collision actually work.

Vapor entities (also used for fire extinguishers) now have a collision layer, so they can hit items.

Added a new FlammableSetCollisionWake component to actually enable collision on candles while they are lit, because otherwise CollisionWake on entities gets in the way too.

* Extinguishing items is now relayed to held/worn items

This means held candles get extinguished too.

Involved moving the core logic of ExtinguishReaction into an event so that it can be relayed via the existing hand/inventory relay logic.

* Add helper functions for subscribing to relayed events.

Use these in FlammableSystem

* Make extinguishers work on cigarettes too

A bunch of renaming to make the rest of my code work with SmokableComponent

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2025-04-14 19:00:47 +10:00
Milon
92a3fd99ca Fix gas pressure pump prediction (#35865)
* ACTUALLY predict gas pumps

* generic fake

* aaaaaaaaaaaaa
2025-03-28 10:42:16 +11:00
Tayrtahn
86aa82f2b6 Cleanup: Remove redundant prototype name specifications (#35793)
* Remove redundant prototype name specifications

* These can stay
2025-03-19 19:30:31 +01:00
ArtisticRoomba
75727db3a3 Add new freezer atmos devices and fix freezer fixgridatmos marker (#34991) 2025-02-12 18:32:18 +11:00
metalgearsloth
ba1fd6c5f3 Make ReactionResults an array (#34967)
* Make ReactionResults an array

We're making the dictionaries fixed-size anyway.
Alternatively could use a frozendictionary but not sure on the perf difference. Worst case whoever adds another reactionresult makes a minor adjustment

* apply conventions

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-02-09 03:13:47 +01:00
Palladinium
001d61c6d5 Add air alarm admin logs (#33426) 2025-02-05 21:10:21 -08:00
ArtisticRoomba
98c606d760 Engineering guidebook megaupdate v2 (#33062)
Significantly updates the Engineering guidebook (more explicitly the Atmos section) to have a lot more relevant and useful information.

Right now engineering has been getting update after update with no real change to the relevant guidebook entry. This has lead to a lot of out of date information and bad practices being prevalent in the guidebook, something that pains me to read.
2025-01-27 11:42:27 -08:00
PJB3005
0e840d816a Make GasMixture enumerable
I noticed that enumerating gases is frequently done in an annoying way with Enum.GetValues. So I made it better. Now GasMixture is IEnumerable<(Gas gas, float moles)> and it just works.
2025-01-18 00:50:22 +01:00
chromiumboy
27e59d35fb Atmospheric network monitor (#32294)
* Updated to latest master version

* Added gas pipe analyzer

* Completed prototype

* Playing with UI display

* Refinement of the main UI

* Renamed gas pipe analyzer to gas pipe sensor

* Added focus network highlighting and map icons for gas pipe sensors

* Added construction graph for gas pipe sensor

* Improved efficiency of atmos pipe and focus pipe network data storage

* Added gas pipe sensor variants

* Fixed gas pipe sensor nav map icon not highlighting on focus

* Rendered pipe lines now get merged together

* Set up appearance handling for the gas pipe sensor, but setting the layers is bugged

* Gas pipe sensor lights turn off when the device is unpowered

* Renamed console

* The gas pipe sensor is now a pipe. Redistributed components between it and its assembly

* AtmosMonitors can now optionally monitor their internal pipe network instead of the surrounding atmosphere

* Massive code clean up

* Added delta states to handle pipe net updates, fixed entity deletion handling

* Nav map blip data has been replaced with prototypes

* Nav map blip fixes

* Nav map colors are now set by the console component

* Made the nav map more responsive to changes in focus

* Updated nav map icons

* Reverted unnecessary namespace changes

* Code tidy up

* Updated sprites and construction graph for gas pipe sensor

* Updated localization files

* Misc bug fixes

* Added missing comment

* Fixed issue with the circuit board for the monitor

* Embellished the background of the console network entries

* Updated console to account for PR #32273

* Removed gas pipe sensor

* Fixing merge conflict

* Update

* Addressing reviews part 1

* Addressing review part 2

* Addressing reviews part 3

* Removed unnecessary references

* Side panel values will be grayed out if there is no gas present in the pipe network

* Declaring colors at the start of some files

* Added a colored stripe to the side of the atmos network entries

* Fixed an issue with pipe sensor blip coloration

* Fixed delay that occurs when toggling gas sensors on/off
2024-12-17 04:53:17 +01:00
TGRCDev
89522e7144 Made anchor visuals generic (#33810)
Added a generic anchor visuals enum
2024-12-11 14:50:20 +01:00
metalgearsloth
9365e3a99b Predicted gas pumps (#33717)
* Predicted gas pumps

I wanted to try out atmos and first thing I found.

* a

* Remove details range
2024-12-07 14:39:52 +11:00
Ilya246
fd1f4a3929 lower frezon/n2o sale prices, make frezon take more trit (#32407)
* lower gas prices

* set trit ratio from 1:50 to 1:8
2024-09-26 14:46:17 +02:00
PotentiallyTom
d3ff4d5401 Makes it possible to disable the vent pressure lockout temporarily with a screwdriver (#31050)
* builds

* doesn't crash

* seems to work

* distance cap was dumb

* Requested changes

* can't find any issues from making the changes

* Check for anchor and minor optimisation

* Removed unnecessary usings

* Code less verbose and cleanup
2024-09-22 21:59:56 +02:00
Nemanja
e510504596 Hivelord mob (#31322)
* Hivelord

* make it longah
2024-09-11 09:52:27 -04:00
chromiumboy
63ba0f61ea Atmospheric alerts computer (#25938)
* Atmospheric alerts computer

* Moved components, restricted access to them

* Minor tweaks

* The screen will now turn off when the computer is not powered

* Bug fix

* Adjusted label

* Updated to latest master version
2024-09-04 21:13:17 -04:00
eoineoineoin
b0375f115c Remove client state from server AirAlarmComponent (#31236)
* Remove client state from server AirAlarmComponent

Send information for all connected devices, not just the ones for the
current tab, as attempting to limit this breaks multiple users viewing
the same UI.

Fixes #12842

* Send device data as a list, rather than a dictionary

---------

Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
2024-08-25 12:01:46 +10:00
Mervill
2e3365793c Greatly improve the usability of the Gas Analyzer. (#30763)
* greatly improve how the gas analyzer behaves

* don't close the analyzer when the object goes out of range

* cleanup

* always switch to the device tab when a new device is analyzed

* modern api part one

* modern api part 2

* modern api part three

* file scope namespace
2024-08-15 10:45:13 -04:00
Mervill
b8d10a3f5e Add verbose (client predicted!) examine text to Gas Miners (#30480)
* add verbose examine text to gas miners so their behaviour can be understood

* no need for these to be properties

* use an enum instead of two booleans for the miner state

* require the gas miner to be anchored in order to not be disabled

* xmldoc

* pr feedback

* file-scope namespace

* it's to late to hide my transgressions in a rebase

* turns out the normal examine distance is totally fine for this
2024-08-08 12:14:31 +10:00