-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into Add-envelopes
- Loading branch information
Showing
135 changed files
with
4,580 additions
and
284 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
Content.Server/Atmos/Components/MovedByPressureComponent.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Content.Server/Atmos/Piping/Other/Components/GasTesterComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Content.Shared.Atmos; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Content.Server.Atmos.Piping.Other.Components | ||
{ | ||
[RegisterComponent] | ||
public sealed partial class GasTesterComponent : Component | ||
{ | ||
[DataField("mixzero")] | ||
public GasMixture MixZero { get; set; } = new(); | ||
|
||
[DataField("mix-x")] | ||
public GasMixture MixX { get; set; } = new(); | ||
|
||
[DataField("mix-y")] | ||
public GasMixture MixY { get; set; } = new(); | ||
|
||
public GasMixture MixLocal; | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
Content.Server/Atmos/Piping/Other/EntitySystems/GasTesterSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using Content.Server.Atmos.EntitySystems; | ||
using Content.Server.Atmos.Piping.Components; | ||
using Content.Server.Atmos.Piping.Other.Components; | ||
using Content.Shared.Atmos; | ||
using JetBrains.Annotations; | ||
using Robust.Server.GameObjects; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Content.Server.Atmos.Piping.Other.EntitySystems | ||
{ | ||
[UsedImplicitly] | ||
public sealed class GasTesterSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!; | ||
[Dependency] private readonly TransformSystem _transformSystem = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<GasTesterComponent, AtmosDeviceUpdateEvent>(OnTesterUpdated); | ||
} | ||
|
||
private void OnTesterUpdated(Entity<GasTesterComponent> ent, ref AtmosDeviceUpdateEvent args) | ||
{ | ||
var (uid, tester) = ent; | ||
GasMixture? containingMixture = _atmosphereSystem.GetContainingMixture(uid); | ||
if (containingMixture == null) | ||
return; | ||
|
||
if (tester.MixLocal == null) | ||
{ | ||
Vector2i tilePos = _transformSystem.GetGridTilePositionOrDefault(uid); | ||
tester.MixLocal = tester.MixZero.Clone(); | ||
GasMixture mixXComp = tester.MixX.Clone(), | ||
mixYComp = tester.MixY.Clone(); | ||
mixXComp.Multiply(tilePos.X); | ||
mixYComp.Multiply(tilePos.Y); | ||
_atmosphereSystem.Merge(tester.MixLocal, mixXComp); | ||
_atmosphereSystem.Merge(tester.MixLocal, mixYComp); | ||
} | ||
|
||
containingMixture.Clear(); | ||
_atmosphereSystem.Merge(containingMixture, tester.MixLocal); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.