Commit Graph

379 Commits

Author SHA1 Message Date
Leon Friedrich
888a3bda51 Atmos device performance improvements (#26493)
* Atmos device performance improvements

* AtmosDirection perf improvements

* Fix errors

* Add GasTileOverlayComponent arguments

* Make excite no longer invalidate a tile
2024-03-30 15:17:53 +11:00
Leon Friedrich
bb5ca720fc Split GasTileOverlaySystem update over two ticks (#26542)
Split GasTileOverlaySystem update over ticks
2024-03-30 13:34:55 +11:00
Jake Huxell
59e46aab93 Reduced Warning Count By 130 For Full Rebuilds (#26518)
* remove deprecated entity coordinate extension functions. Reduces warning count by approximately 50

* final toCoords Removed

* Remove all unused variables and dead code paths

* remove always true variable, should be a cvar or something instead

* remove superfluous variables from tests
2024-03-29 16:28:16 +11:00
Leon Friedrich
77e029d4ca Remove atmos method events (#26402)
* Remove HasAtmosphereMethodEvent

* Remove GetTileMixturesMethodEvent

* Remove GetTileMixtureMethodEvent

* Remove GetAdjacentTilesMethodEvent

* Add TileMixtureEnumerator

* Remove GetAdjacentTileMixturesMethodEvent

* Remove IsTileSpaceMethodEvent

* Remove HotspotExposeMethodEvent

* Remove pipe net method events

* Remove device method events

* Use Entity<T>

* Misc fixes

* A

* Theres probably a few more of these

* Fix other resolve errors
2024-03-28 13:22:19 +11:00
Leon Friedrich
fdb4a61487 Fix atmos NaN error (#26441)
* Fix atmos NAN error

* Remove redundant yaml entries
2024-03-26 15:44:56 +11:00
Tayrtahn
964c6d54ca Code cleanup: Purge obsoleted SharedPhysicsSystem methods (#26287)
Updated calls to SharedPhysicsSystem methods
2024-03-25 17:37:25 +11:00
Leon Friedrich
ec761114ea Run fixgridatmos for cargo & emergency shuttle (#26382)
Fix cargo & emergency shuttle
2024-03-25 03:17:56 +11:00
Leon Friedrich
18a35e7e83 Partial atmos refactor (#22521)
* Reduce atmos component queries

* Remove method events

* Cache airtight data

* Make MolesArchived nullable

* Fix airtight cache

* only get tile def once

* Immutable mixtures

* firelock queries

* misc

* misc cleanup

* Trim disconnected tiles

* Fix merge issues and bugs

* Why does the PR keep increasing in scope

* debug overlay

* Fix bugs

* Fix test, remove unused events

* Add setmapatmos command

* Fix overlays

* Add map check

* A

* Resolve conflicts with #26102

* Remove some obsolete methods
2024-03-24 03:34:56 +11:00
Tayrtahn
f4cb02fb0c Code cleanup: Purge calls to obsolete EntityCoordinates methods (#26292)
* Purge calls to obsolete EntityCoordinates methods

* Pizza defruited; rerun those tests!
2024-03-21 12:59:56 +11:00
Tayrtahn
4a83c36585 Code cleanup: Dirty(Comp) (#26238)
* Replaced uses of Dirty(Component) with Dirty(Uid, Component)
Modified some systems (notably pulling-related) to use uids.

* Missed a few

* Revert changes to pulling

* No
2024-03-19 23:27:02 -04:00
Pieter-Jan Briers
db81438d30 Fix barotrauma pressure protection (#26236)
Oops

In #26217 I re-organized the logic for the calculation. Part of that was moving the logic for GetFeltLowPressure and GetFeltHighPressure to be done before we actually check the hazard thresholds. What I didn't realize is that, with how our pressure protection is set up, these functions can return values so extreme they rebound into the other category.

For example, according to the math, when you're wearing a hardsuit in a low-pressure environment you have "felt" pressure of 1000 kPa. Yeah that's not right.

Now these functions clamp their result to OneAtmosphere, in the appropriate direction (101.3 kPa).

Fixes #26234
2024-03-18 17:46:31 +01:00
Pieter-Jan Briers
b5138b245e Fix barotrauma calculations
The math for our pressure damage (barotrauma) system is directly taken from TG. The constants are the same and the math is almost the same. However there are two errors.

1. Pressure damage started being applied within the WARNING bounds, rather than the HAZARD bounds. This means you started taking low pressure damage at 50 kPa instead of the intended 20 kPa, and also the HUD icon didn't show "danger" like it should even if you were already taking damage.

2. The calculations for high pressure damage were wrong. These are supposed to be linearly scaled, but the function was wrong so the scaling didn't actually work properly (especially when considering the fixed bounds above). This appears to be the case because the function was taken from an incorrect comment in the original source, rather than the real math.

Both of these issues are now fixed to match the TG behavior. Note that this somewhat nerfs pressure damage in non-extreme circumstances. e.g. a room at 40 kPa now gives NO pressure damage, whereas previously it would do full space damage.

The description of the pressure alerts is wrong for "low" severity, but I can't be arsed to fix that right now. Alerts don't have a way to change the description depending on severity...
2024-03-17 22:37:28 +01:00
LordCarve
7d275a4b5e Obsolete Logger cleanup for EntitySystems part 2 (#26159)
* Kill the static InRangeUnOccluded

* Adjusted 4 more EntitySystems that were missed.
2024-03-17 18:31:09 +11:00
LordCarve
aafe815122 Obsolete Logger cleanup for EntitySystems (#25941)
* Small obsolete Logger cleanup

* Fixed three EntitySystem logs that weren't doing it right.
2024-03-10 01:15:13 +01:00
metalgearsloth
a9502be29e Revert "Fix chat bubbles (#25643)" (#25645)
* Revert "Fix chat bubbles (#25643)"

This reverts commit 23d2c4d924.

* Revert "Fixes obsolete Transform warnings in Content. (#25256)"

This reverts commit f284b43ff6.
2024-02-28 00:51:20 +11:00
TemporalOroboros
f284b43ff6 Fixes obsolete Transform warnings in Content. (#25256)
* Fix TransformComponent.MapPosition warnings in Content.Client

* Fix TransformComponent.MapPosition warnings in Content.IntegrationTests

* Fix TransformComponent.MapPosition warnings in Content.Shared

* Fix TransformComponent.MapPosition warnings in Content.Server

* Fix TransformComponent.WorldPosition warnings in Content.Shared

* Fix TransformComponent.WorldPosition warnings in Content.Client
Excepts ClickableComponent b/c that needs to be ECS'd entirely later

* Fix TransformComponent.WorldPosition warnings in Content.Server

* Fix TransformComponent.WorldRotation warnings in Content.*

* Fix TransformComponent.MapPosition warnings I missed

* Fix TransformComponent.WorldMatrix warnings in Content.*

* Fix TransformComponent.InvWorldMatrix warnings in Content.*

* Fix TransformComponent.GetWorldPositionRotationMatrixWithInv warnings in Content.*

* Fix TransformComponent.GetWorldPositionRotationMatrix warnings in Content.*

* Fix TransformComponent.GetWorldPositionRotation warnings in Content.*

* Fix TransformComponent.Anchored.set warnings in Content.*

* Fix TransformComponent.Coordinates.set warnings in Content.*

* Fix TransformComponent.LocalPosition.set warnings in Content.*

* Fix TransformComponent.AttachToGridOrMap warnings in Content.*

* Fix TransformComponent.AttachParent warnings in Content.*

* Preempt TransformComponent.LocalRotation.set warnings in Content.Shared

* Preempt TransformComponent.LocalRotation.set warnings in Content.Client

* Preempt TransformComponent.LocalRotation.set warnings in Content.IntegrationTests

* Preempt TransformComponent.LocalRotation.set warnings in Content.Server

* Fix/Preempt the remaining obsolete TransformComponent properties/methods in Content.*

* ECS ClickableComponent

* Fix obsolete SharedTransformSystem methods in Content.*

* Fix ExplosionOverlay `SharedTransformSystem` dependency

* Maybe fix null eye position breaking tests

* MGS requested changes
2024-02-27 12:06:20 +11:00
LankLTE
407d4aed58 Diona Nymphs & Splitting (#24630)
* Porting & implementation

* Fix two stupid errors

* Human not humans

* fix audio path

* Fix test fails & update cooldown

* Work on reviews & test fail

* Rework nymph organ system.

* Make the nymph organs nospawn.

* IsDeadIC
2024-02-16 18:54:44 -08:00
Nemanja
8ed32a1e42 Add events for TemperatureProtection and PressureProtection (#25165) 2024-02-13 23:44:47 -08:00
Pieter-Jan Briers
68ce53ae17 Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper

Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe.

This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown.

* Fix a bunch of warnings

* More warning fixes

* Use new DateTime serializer to get rid of ISerializationHooks in changelog code.

* Get rid of some more ISerializationHooks for enums

* And a little more

* Apply suggestions from code review

Co-authored-by: 0x6273 <0x40@keemail.me>

---------

Co-authored-by: 0x6273 <0x40@keemail.me>
2024-02-13 16:48:39 -05:00
metalgearsloth
52808694e0 Remove obsolete transform call (#24217)
* Remove obsolete transform call

Shrimple PR also fixed bad flatpack call that would break on non-standard tilesizes.

* Update calls

* weh
2024-02-02 00:39:43 +11:00
Ed
498ad2d5d7 Lock Anomaly generator to research access (#24464)
* small patch

* fix

* remove garbage

* fix

* moved to shared events

* fix

* LocId

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-02-01 19:45:24 +11:00
metalgearsloth
a6ea8b210d Firestarter fixes (#24647)
* Firestarter fixes

- Actually networks the action.
- Namespace fixes.

* No networky for you
2024-02-01 00:01:52 +11:00
Pieter-Jan Briers
3e3cb10a96 Make some damage sources not cancel do afters (#24635)
- poison chemicals (HealthChange effect)
- being on fire
- guardians transferring damage to owner
2024-01-28 10:51:54 +11:00
Nemanja
c29896f505 fix radiators leaking heat into atmos blocked tiles (#24124)
* fix radiators leaking heat into atmos blocked tiles

* Fix the fix

Pointyhat to: emogarbage

* Remove unused imports

---------

Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
2024-01-16 18:58:04 +11:00
Pieter-Jan Briers
a6c9c36b68 Dependency update / fixes / skrungle bungle (#23745)
* Give .props files 2-space indents.

* Move to Central Package Management.

Allows us to store NuGet package versions all in one place. Yay!

* Update NuGet packages and fix code for changes.

Notable:

Changes to ILVerify.
Npgsql doesn't need hacks for inet anymore, now we need hacks to make the old code work with this new reality.
NUnit's analyzers are already complaining and I didn't even update it to 4.x yet.
TerraFX changed to GetLastSystemError so error handling had to be changed.
Buncha APIs have more NRT annotations.

* Remove dotnet-eng NuGet package source.

I genuinely don't know what this was for, and Central Package Management starts throwing warnings about it, so YEET.

* Remove Robust.Physics project.

Never used.

* Remove erroneous NVorbis reference.

Should be VorbisPizza and otherwise wasn't used.

* Sandbox fixes

* Remove unused unit test package references.

Castle.Core and NUnit.ConsoleRunner.

* Update NUnit to 4.0.1

This requires replacing all the old assertion methods because they removed them 🥲

* Oh so that's what dotnet-eng was used for. Yeah ok that makes sense.

* Add Robust.Analyzers.Test

* Update submodule

* commit to re-run CI
2024-01-12 23:22:01 +01:00
Arendian
6bf6994298 Incendiary projectiles and lava firestack reduction (#23479)
* Firestack reduction and FireStackOnHit added

* Slight lava tweak

* Remove component and tweaked incendiary pellets

* Incendiary grenade tweak

* Now ignites on projectile fixture or ignition fixture + incendiary grenade tweak

* flare shells now  ignite entities again

* Comment

* undo flare gun ignite
2024-01-08 00:41:42 -05:00
Kara
0ae3858b69 Examine prediction (#23565)
* Initial prediction

* new group handling

* groups for all examines that use multiple rn

* compile

* why was it doing this??

* handle newlines with sorting properly
2024-01-06 17:53:13 +11:00
metalgearsloth
a3516e60e7 Small adjustment for elookup api (#22447)
* Small adjustment for elookup api

* fix
2024-01-04 15:13:19 +11:00
AJCM-git
9c522c8b19 UseDelay + ItemCooldown merge (#22502) 2024-01-03 21:33:09 -04:00
Nemanja
cfb129c5a4 Buff heat and flame damage (#23238) 2023-12-30 16:28:00 -07:00
qwerltaz
2fe1164a03 flammable entities hotfix (#23113)
* flammable fix

* move air check and ignition to if statement
2023-12-28 18:28:15 -05:00
qwerltaz
3f91028395 Fix flammables air ignition (#23063)
* Fix welder ignition

* fix mobs on fire hotspot expose frequency

* fix shotgun pellets ignition

* ensure ignitionComp on flammable init

* \n

* Revert "ensure ignitionComp on flammable init"

This reverts commit 6915dcdc
2023-12-27 20:05:50 -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
Kara
bc1f8b0e40 Convert atmos device events to ref events (#22843) 2023-12-21 17:48:18 -08:00
qwerltaz
289aab768f Improve gas analyzer interface (#22779) 2023-12-20 09:56:57 -08:00
Leon Friedrich
41420346c3 Fix index out of range exception in atmosphere system (#22770) 2023-12-20 18:08:48 +11:00
Leon Friedrich
b1e12d03f1 Stop AtmosphereSystem from logging errors if an atmosphere gets deleted. (#22761)
Stop AtmosphereSystem from logging errors if a atmosphere gets deleted.
2023-12-20 11:57:29 +11:00
Leon Friedrich
10142c3a2e Rebalance fireaxe (#22731)
* Rebalance Fireaxe

* Nerf it a bit
2023-12-18 21:41:33 -05:00
Leon Friedrich
ca90a2819f Add more centcomm spawning logs (#22726) 2023-12-19 12:35:31 +11:00
Leon Friedrich
51115d3d38 Add atmos error log (#22696) 2023-12-18 18:37:13 +11:00
Leon Friedrich
68765a4753 Improve atmos debug overlay (#22520) 2023-12-15 14:18:00 -08:00
Leon Friedrich
477327f952 Atmos scaling cvar changes (#22501) 2023-12-15 14:02:21 -08:00
tgrkzus
bc925cb41c tanks only produce noise with sufficient valve pressure (#22401) 2023-12-15 02:56:17 -07: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
Vyacheslav Kovalevsky
5b55b9ce3b Add gas tanks throw damage (#20035)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-12-04 17:32:17 +11:00
metalgearsloth
7ada1c6674 Update content to new ParallelManager (#21813) 2023-11-29 11:00:12 +11:00