]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Pressure Relief Valve (#36708)
authorArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
Thu, 3 Jul 2025 16:00:34 +0000 (09:00 -0700)
committerGitHub <noreply@github.com>
Thu, 3 Jul 2025 16:00:34 +0000 (18:00 +0200)
commitf874459092d1a0914b3c6ea59a7127d5a9c92d3b
tree9f0eae5da007e20c72bb58a8dea9429b1814b8c1
parent1bc3d37d40be0cab7378a00e40ba57bfd478b358
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>
32 files changed:
Content.Client/Atmos/EntitySystems/GasPressureRegulatorSystem.cs [new file with mode: 0644]
Content.Client/Atmos/UI/GasPressureRegulatorBoundUserInterface.cs [new file with mode: 0644]
Content.Client/Atmos/UI/GasPressureRegulatorWindow.xaml [new file with mode: 0644]
Content.Client/Atmos/UI/GasPressureRegulatorWindow.xaml.cs [new file with mode: 0644]
Content.Server/Atmos/EntitySystems/AtmosphereSystem.Gases.cs
Content.Server/Atmos/Piping/Binary/EntitySystems/GasPressureRegulatorSystem.cs [new file with mode: 0644]
Content.Shared/Atmos/EntitySystems/SharedGasPressureRegulatorSystem.cs [new file with mode: 0644]
Content.Shared/Atmos/Piping/Binary/Components/GasPressureRegulatorComponent.cs [new file with mode: 0644]
Content.Shared/Atmos/Piping/Binary/Components/SharedGasPressureRegulatorComponent.cs [new file with mode: 0644]
Content.Shared/Atmos/Piping/EnabledAtmosDeviceVisuals.cs
Resources/Locale/en-US/atmos/gas-pressure-regulator-system.ftl [new file with mode: 0644]
Resources/Locale/en-US/components/gas-pressure-regulator-component.ftl [new file with mode: 0644]
Resources/Locale/en-US/guidebook/guides.ftl
Resources/Prototypes/Entities/Structures/Piping/Atmospherics/binary.yml
Resources/Prototypes/Guidebook/engineering.yml
Resources/Prototypes/Recipes/Construction/Graphs/utilities/atmos_binary.yml
Resources/Prototypes/Recipes/Construction/utilities.yml
Resources/ServerInfo/Guidebook/Engineering/GasManipulation.xml
Resources/ServerInfo/Guidebook/Engineering/PressureRegulator.xml [new file with mode: 0644]
Resources/ServerInfo/Guidebook/Engineering/Valves.xml
Resources/Textures/Structures/Piping/Atmospherics/pump.rsi/meta.json
Resources/Textures/Structures/Piping/Atmospherics/pump.rsi/pumpPressure.png
Resources/Textures/Structures/Piping/Atmospherics/pump.rsi/pumpPressureRegulator.png [new file with mode: 0644]
Resources/Textures/Structures/Piping/Atmospherics/pump.rsi/pumpPressureRegulatorOn.png [new file with mode: 0644]
Resources/Textures/Structures/Piping/Atmospherics/pump_alt1.rsi/meta.json
Resources/Textures/Structures/Piping/Atmospherics/pump_alt1.rsi/pumpPressure.png
Resources/Textures/Structures/Piping/Atmospherics/pump_alt1.rsi/pumpPressureRegulator.png [new file with mode: 0644]
Resources/Textures/Structures/Piping/Atmospherics/pump_alt1.rsi/pumpPressureRegulatorOn.png [new file with mode: 0644]
Resources/Textures/Structures/Piping/Atmospherics/pump_alt2.rsi/meta.json
Resources/Textures/Structures/Piping/Atmospherics/pump_alt2.rsi/pumpPressure.png
Resources/Textures/Structures/Piping/Atmospherics/pump_alt2.rsi/pumpPressureRegulator.png [new file with mode: 0644]
Resources/Textures/Structures/Piping/Atmospherics/pump_alt2.rsi/pumpPressureRegulatorOn.png [new file with mode: 0644]