Commit Graph

26 Commits

Author SHA1 Message Date
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
Jezithyr
6869adfa78 Move GasMixture to shared (#27480)
* Moved GasMixture to shared

* Temp Fix for sandbox violation, idk why Array.Resize isn't working properly. It's already sandboxed.

* The most powerful webedit in history
2024-04-30 14:31:05 -07:00
Kara
ba88a9a022 Revert "Add YAML gas reactions (#22803)" (#22939)
This reverts commit 054321d2c2.

Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
2023-12-24 23:50:42 -07:00
Kevin Zheng
99d6aff7be Check for divide by near zero (#22876) 2023-12-22 17:10:33 -08:00
Kevin Zheng
054321d2c2 Add YAML gas reactions (#22803)
* Add YAML gas reactions

* Convert more reactions

* Use enum names

* Convert more names

* Add migration for MiasmaCanister

* Prevent reactants from going negative

* Fix energy conservation, lift energy calculation

* Fix comment

* Comment

* Add rate multiplier
2023-12-22 00:30:56 -07:00
Leon Friedrich
477327f952 Atmos scaling cvar changes (#22501) 2023-12-15 14:02:21 -08:00
Kevin Zheng
24629ad487 Fix heat capacity scaling (#22464)
* Correctly apply HeatScale

* Apply HeatScale on InitializeGases()

* Re-add conservative heat scaling and speedup
2023-12-13 21:38:58 -05:00
Kevin Zheng
405e569cd5 Split up atmos speedup from heat scaling (#22372) 2023-12-12 00:49:20 -07:00
Kevin Zheng
a2ed25ad03 Add atmos time compression (#21954)
Add atmos.speedup which is effectively a atmos-only time compression
CVar. This adjusts heat capacities and transfer rates to effectively
globally speed up the time constants of atmos.

This allows faster response to heating/cooling changes and faster
cleanups (by buffing scrubbers, pumps, and everything else) that is
tunable through one global time compression CVar.

It also achieves this without any thermodynamic unsoundness.
2023-12-11 15:59:47 -08:00
Kevin Zheng
db5dee6db3 Add radiators (#18728)
* Add radiators

* Limit heat transfer to fluid heat capacity

* Adjust datafield names

* Fix material arbitrage

* This code has been debugged, and so there are no more bugs. Debugging code is therefore unnecessary

* Adjust radiator layer subfloor visibility

* Cache CVars

* No default

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* Like and unsubscribe

* Fix CVar caching

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2023-08-06 02:21:05 -06:00
Visne
c6d3e4f3bd Fix warnings and code cleanup/fixes (#13570) 2023-01-19 13:56:45 +11:00
Vera Aguilera Puerto
aa9281d667 Refactors the AtmosphereSystem public-facing API to allow for multiple atmos backends. (#8134)
* Refactors the entirety of the AtmosphereSystem public-facing API to allow for multiple atmos backends.

* actually compiles

* Remove commented out code

* funny bracket

* Move archived moles, temperature from GasMixture to TileAtmosphere.

* WIP customizable map default mixture
still VERY buggy

* broken mess
aaaaaaaaaaaaa

* Fix lattice, etc not being considered space

* visualization for "IsSpace"

* help

* Update Content.Client/Atmos/Overlays/AtmosDebugOverlay.cs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* Holy SHIT it compiles AGAIN

* Fix AtmosDeviceSystem crash at shutdown

* Fix immutable tiles on map blueprints not being fixed by fixgridatmos/revalidate.

* Use space instead of gasmixture immutable for heat capacity calculations

* Remove all LINDA-specific code from GasMixture, move it to TileAtmosphere/AtmosphereSystem instead.

* Fix roundstart tiles not processing

* Update Content.Server/Atmos/Commands/SetTemperatureCommand.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

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

Changed Files tab is so large I can't commit both suggestions at once mfw

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

Co-authored-by: Moony <moonheart08@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2022-07-04 09:51:34 -05:00
Leon Friedrich
f5dfba9db4 Fix pipe net conservation laws (#8540) 2022-06-03 03:09:51 -07:00
wrexbe
bc68ac96dd Cleanup the namespaces (#8132) 2022-05-13 17:59:03 +10:00
mirrorcult
ec4d4688c7 Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
Leon Friedrich
706ac6af40 Revert "Revert "epic Respiration Rework"" (#6527) 2022-02-09 21:53:10 -07:00
Leon Friedrich
6e8c92d13e Revert "epic Respiration Rework" (#6524) 2022-02-07 18:13:14 +11:00
mirrorcult
4ae1c4e332 epic Respiration Rework (#6022) 2022-02-06 21:48:15 -07:00
Vera Aguilera Puerto
daef343c2c Fires now play a sound effect. (#6138) 2022-01-14 01:18:17 +11:00
Vera Aguilera Puerto
94fa6efefb Misc Atmos Improvements (#5613)
* Revert "Remove atmos archiving."

This reverts commit 7fa10bd17b.

* Explosive Depressurization now brings tiles down to TCMB.

* Tiles now specify heat capacity.

* Do not serialize archived gas mixture values.

* Remove bad idea

* dumb typo

* Space gas mixtures now have a harcoded heat capacity.
This is a bit of a hack, but rooms exposed to space now cool down properly when monstermos is disabled.
Huge thanks to @LemonInTheDark for helping me with this!

* Clean up heat capacity methods

* Better logging based on the original monstermos' logging

* Comment explosive depressurization hack better
2021-11-30 11:42:48 +01:00
Vera Aguilera Puerto
7fa10bd17b Remove atmos archiving. 2021-07-26 11:06:44 +02:00
Vera Aguilera Puerto
93acc565f0 Makes Airtight ECS. (#4351)
* Makes Airtight ECS.

* Remove atmos holdovers while at it!
2021-07-25 17:04:58 +10:00
Vera Aguilera Puerto
4112847142 ECS Atmos Part 5: Moves all logic from GridAtmosphereComponent to AtmosphereSystem. (#4331) 2021-07-23 11:09:01 +02:00
Vera Aguilera Puerto
d8e353742c Canister fixes and rework (#4266)
* Kills PipeNode ConnectToContainedEntities and EnvironmentalAir with fire.

* Reaction IGasMixtureHolder is nullable.

* Reworks canisters

* Adds PortablePipeNode and PortPipeNode, which connect to each other.
2021-07-12 10:00:50 +02:00
Vera Aguilera Puerto
263c9ef974 ECS Atmos Part 2: Moves a lot of Gas Mixture methods to AtmosphereSystem. (#4218) 2021-06-23 11:35:30 +02:00
Vera Aguilera Puerto
a2b737d945 Atmos pipe rework (#3833)
* Initial

* Cleanup a bunch of things

* some changes dunno

* RequireAnchored

* a

* stuff

* more work

* Lots of progress

* delete pipe visualizer

* a

* b

* pipenet and pipenode cleanup

* Fixes

* Adds GasValve

* Adds GasMiner

* Fix stuff, maybe?

* More fixes

* Ignored components on the client

* Adds thermomachine behavior, change a bunch of stuff

* Remove Anchored

* some work, but it's shitcode

* significantly more ECS

* ECS AtmosDevices

* Cleanup

* fix appearance

* when the pipe direction is sus

* Gas tanks and canisters

* pipe anchoring and stuff

* coding is my passion

* Unsafe pipes take longer to unanchor

* turns out we're no longer using eris canisters

* Gas canister inserted tank appearance, improvements

* Work on a bunch of appearances

* Scrubber appearance

* Reorganize AtmosphereSystem.Piping into a bunch of different systems

* Appearance for vent/scrubber/pump turns off when leaving atmosphere

* ThermoMachine appearance

* Cleanup gas tanks

* Remove passive gate unused imports

* remove old canister UI functionality

* PipeNode environment air, make everything use AssumeAir instead of merging manually

* a

* Reorganize atmos to follow new structure

* ?????

* Canister UI, restructure client

* Restructure shared

* Fix build tho

* listen, at least the canister UI works entirely...

* fix build : )

* Atmos device prototypes have names and descriptions

* gas canister ui slider doesn't jitter

* trinary prototypes

* sprite for miners

* ignore components

* fix YAML

* Fix port system doing useless thing

* Fix build

* fix thinking moment

* fix build again because

* canister direction

* pipenode is a word

* GasTank Air will throw on invalid states

* fix build....

* Unhardcode volume pump thresholds

* Volume pump and filter take time into account

* Rename Join/Leave atmosphere events to AtmosDeviceEnabled/Disabled Event

* Gas tank node volume is set by initial mixtuer

* I love node container
2021-06-19 13:25:05 +02:00