* 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>
* 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>
* 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
* 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>
* Make yaml gas serialization cleaner
* fix exception
* fix validation code
* rudimentary test & permissive loading
* change it a bit
* Test fixes and adjustments
* fix: auto-update mailing unit + gas canister UIs
* fix: make FollowerComponent auto handle state
* refactor: kill AfterAutoHandleState for Follower
* flakeops
* 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.
* 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>
* 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.
* 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
* 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>
* 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>
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.
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.
* 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
* 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
* 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
* 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>
* 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
* 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