ECS Atmos Part 2: Moves a lot of Gas Mixture methods to AtmosphereSystem. (#4218)

This commit is contained in:
Vera Aguilera Puerto
2021-06-23 11:35:30 +02:00
committed by GitHub
parent e16c23a747
commit 263c9ef974
34 changed files with 461 additions and 464 deletions

View File

@@ -1,7 +1,9 @@
using System.Threading.Tasks;
using Content.Server.Atmos;
using Content.Server.Atmos.EntitySystems;
using Content.Shared.Atmos;
using NUnit.Framework;
using Robust.Shared.GameObjects;
namespace Content.IntegrationTests.Tests.Atmos
{
@@ -14,6 +16,10 @@ namespace Content.IntegrationTests.Tests.Atmos
{
var server = StartServerDummyTicker();
await server.WaitIdleAsync();
var atmosphereSystem = server.ResolveDependency<IEntitySystemManager>().GetEntitySystem<AtmosphereSystem>();
server.Assert(() =>
{
var a = new GasMixture(10f);
@@ -30,7 +36,7 @@ namespace Content.IntegrationTests.Tests.Atmos
Assert.That(b.TotalMoles, Is.EqualTo(50));
Assert.That(b.GetMoles(Gas.Nitrogen), Is.EqualTo(50));
b.Merge(a);
atmosphereSystem.Merge(b, a);
// b now has its contents and the contents of a
Assert.That(b.TotalMoles, Is.EqualTo(100));