Commit Graph

398 Commits

Author SHA1 Message Date
Perry Fraser
002afe8056 Properly dispose of stale pipedata chunks for the atmos monitor (#38974) 2025-07-23 17:18:19 +02:00
Princess Cheeseballs
e85bc1bb8c Stunnable New Status and Cleanup (#38618)
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
2025-07-21 19:22:11 +02:00
ArtisticRoomba
76a7b31c1e Fix firelocks failing to drop fast enough (#38918) 2025-07-15 20:18:55 -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
Tayrtahn
75db49f9c0 Clean up all missing EntitySystem proxy method uses (#38353) 2025-06-26 16:50:49 -07:00
Tayrtahn
d61704df33 Convert AtmosphereSystem sound path strings to SoundSpecifiers (#38403)
* Convert AtmosphereSystem sound path strings to SoundSpecifiers

* Convert to SoundCollections
2025-06-17 22:52:11 +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
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
Centronias
9053c9692f Decouple Lights from Toggleable Visuals (and headphone music notes bugfix) (#35341)
* - Combine enum keys `ToggleableLightVisuals` and `ToggleVisuals` into `ToggleableVisuals`
- Rename `ToggleableLightVisualsComponent` to `ToggleableVisualsComponent` and `ToggleableLightVisualsSystem` to `ToggleableVisualsSystem`
  - (The `SpriteLayer` field on the component is now required because the old default of `light` doesn't make sense anymore)
- Make it so that `ToggleableVisualsComponent` works even when there's not a light attached to the entity
  - (Amazingly this seems to have only applied to  Headphones, but I can only imagine there are many other things people would like to do with simple toggleable visuals)
- Explicitly make `ItemTogglePointLightComponent`'s purpose to make `ToggleVisualsComponent` apply to `PointLightComponent`s on the same entity.
  - Add field `ToggleableVisualsColorModulatesLights`, which makes the `Color` appearance value of `ToggleableVisuals` modulate the color of lights on the same entity
  - Lots of prototype updates to uptake the above

* fix bad merge

* unbork robust

* blindly letting rider reformat stuff

* I guess I never cleaned up these imports at all
2025-05-30 19:53:56 -04:00
TemporalOroboros
f99d00cf5f Fix for obsolete method warning in AtmosphericsSystem (#37897)
* Make PryTile use Entity<T>
Converts the old parameters into an obsolete overload

* Make HandleDecompressionFloorRip use Entity<T>
Converts the old parameters into an obsolete overload

* Convert the one use to use Entity<T>

* Delete obsolete private methods
2025-05-28 11:16:54 +02:00
slarticodefast
fef4187995 Move PriceCalculationEvent and EstimatedPriceCalculationEvent to shared (#37782)
* moce PriceCalculationEvent to shared

* Update Content.Shared/Cargo/PriceCalculationEvent.cs

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>

---------

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
2025-05-24 19:36:38 +02:00
Krunklehorn
abec27737e AutomaticAtmosSystem uses MassDataChangedEvent, clarifies TileMassMultiplier (#37548)
* Initial commit, no tile changes, just mass

* Rename TileMassMultiplier to TileDensityMultiplier
2025-05-17 21:57:50 -04:00
metalgearsloth
fca7337bcf Fix tile-events returns (#37502)
* Fix tile-events returns

Should really be continues.

* More

* More optimisations
2025-05-16 14:22:20 +02:00
Tayrtahn
4dc1c4c3d6 Content changes for SetTiles change (#37229)
* Content changes for SetTiles change

* Retest with new engine changes

* Derp

* Update for new engine PR changes
2025-05-15 20:26:47 +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
ArtisticRoomba
ee201c6eb7 fix atmos grid markers (#37142)
* fix atmos grid markers

* 1984 CL
2025-05-03 09:11:31 +02: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
Leon Friedrich
e1c70882ef Fix NRE in GasTileOverlaySystem (#36793) 2025-04-21 15:06:54 +10:00
Kyle Tyo
2c54ec10c6 replace obsolete IsGrid calls with HasComp<MapGridComponent> (#36729)
* replace obsolete IsGrid calls with HasComp<MapGridComponent>

* remove IMapManager dependency

* well would you look at that

* just look at it
2025-04-20 14:14:58 +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
slarticodefast
50bbb1c101 predict IgnitionSourceComponent (#36310)
* PREDICTION

* comment

* don't overwrite event args

* totally not a web edit

* intn't
2025-04-06 17:54:47 -07:00
metalgearsloth
fa35c9623d Revert "Purge uses of TransformComponent.Anchored.set. Also adds parentheses." (#35332) 2025-02-21 00:12:12 +11:00
TemporalOroboros
a4001fba1b Purge uses of TransformComponent.Anchored.set. Also adds parentheses. (#34938) 2025-02-20 23:06:39 +11:00
slarticodefast
d171057680 UseInHandEvent cleanup (#35231) 2025-02-18 23:27:30 +11:00
ArtisticRoomba
75727db3a3 Add new freezer atmos devices and fix freezer fixgridatmos marker (#34991) 2025-02-12 18:32:18 +11:00
TemporalOroboros
08e5362f43 Purges uses of TransformComponent.WorldRotation (#34946) 2025-02-11 14:16:20 +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
drakewill-CRL
7cf04dcb20 Use archived gas mixture in gas exchange comparison (#32088)
The comparison for doing gas exchange used current and not archived
moles. This could lead to update order-dependent gas spreading effects.

To fix this, convert TileAtmosphere's MolesArchived and
TemperatureArchived to a AirArchived, and use that in the comparison
method.

---------

Co-authored-by: PraxisMapper <praxismapper@gmail.com>
Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
2024-09-29 22:14:07 -07:00
nikthechampiongr
a5840b925b Fix RA0032 (#32514) 2024-09-29 02:25:21 +02:00
Winkarst
c2a201d998 Make fire leave burnt decals on the tiles (#31939)
* Make fire leave burnt decals on the tiles

* License

* Yes

* Update

* Spelling error

* Prototypes reload support

* To array
2024-09-19 10:23:50 +10:00
TurboTracker
4b357a370b Removal of Maxcaps via cvar (#31437)
* Comment out gastank explosion trigger

* CVAR creation

* Blank line between method + toml update

* I fucking hate VistualStudio

* change bool logic into float

* cat dancing.gif

* Adjust some minor nits

* Update Content.Server/Atmos/EntitySystems/GasTankSystem.cs

Co-authored-by: Partmedia <kevinz5000@gmail.com>

* Un-hardcode unused initial cached CVar value

* Update Resources/ConfigPresets/WizardsDen/wizardsDen.toml

---------

Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2024-09-11 00:05:12 +02:00
Ilya246
447e9c247d fix flammable reagents deigniting you (#31930)
fix
2024-09-07 17:44:58 -06:00
Mervill
05d29c8479 Fix CS0642 - Possible mistaken empty statement (#31740) 2024-09-02 13:02:16 +02:00
deltanedas
608a179626 Add Vox atmosphere marker, vents, and air alarms 2024-08-24 14:21:59 -07:00
Mervill
c561ff1b4a Replace obsolete map function in AtmosphereSystem (#31252) 2024-08-20 23:30:46 -07: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
Nemanja
ce97225c2d Replace IClickAlert with events (#30728)
* Replace IAlertClick with events

* whoop

* eek!
2024-08-07 15:15:35 +10:00
Plykiya
a87efd7d01 Replace xform.WorldPosition with xformSystem method for Setting/Getting (#30029)
* GET WORLD POSITON, ROTATION

* Missing parentheses

* ui system depndency

* the issue

* Unused

* Let the function do the transform

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
2024-08-06 21:02:01 +10:00
Plykiya
b7aa97e203 Replace obsolete EntityCoordiates.InRange() with TransformSystem.InRange() (#29993)
* Replace EntityCoordiates.InRange() with TransformSystem.InRange()

* nullspace

* I figured it out

* man I have no clue how client side sutff works

* please have mercy

* remove RadiationPulseOverlay changes

* nullspace

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
2024-07-13 23:25:51 +02:00
Plykiya
c94c72785d Updates GasTankSystem and InternalsSystem to not use Component.Owner (#29934)
* blah, setup

* Updates GasTankSystem and InternalsSystem to not use Component.Owner

* squish the diff

* Fixa the rest

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
2024-07-12 21:44:45 +10:00
Nemanja
748e5831e8 Add moon boots (#29009) 2024-06-14 20:43:23 -07:00
Plykiya
dec1c281a8 Internals are kept on as long as any breathing tool is on (#28595) 2024-06-06 03:01:45 -04:00
Nemanja
a1a8f04036 Decouple interactions from hands, cleanup old events, add new fears (#28393)
* ok basic shit

* second part

* pretend it isn't real it can't hurt you.

* 👁️ 👁️

* shadowcommander review
2024-05-31 13:26:19 -07:00
Leon Friedrich
54337911d3 Only auto-enable internals when necessary (#28248)
* Only auto-enable internals when necessary

* Add toxic gas check

* Rename Any -> AnyPositive
2024-05-31 12:28:11 +10:00
metalgearsloth
962a1192bd Block gas analyzer updates if the UI doesn't open (#28376)
Fixes the gas analyzer UI coming up when used with a target.
2024-05-29 10:19:06 -08:00
Nemanja
44b93e68ee Prevent stacking pipes (#28308)
* prevent stacking pipes

* access

* notafet review

* notafet review pt. 2

* not the actual fix
2024-05-27 16:37:27 -06:00