From 4546fffe70fd914e2baae2f4d28a9195f31074c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Aguilera=20Puerto?= Date: Tue, 4 Aug 2020 15:42:24 +0200 Subject: [PATCH] Use IGridAtmosphereComponent interface in AtmosphereSystem --- .../GameObjects/EntitySystems/AtmosphereSystem.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Content.Server/GameObjects/EntitySystems/AtmosphereSystem.cs b/Content.Server/GameObjects/EntitySystems/AtmosphereSystem.cs index 80197df799..46d90d7640 100644 --- a/Content.Server/GameObjects/EntitySystems/AtmosphereSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/AtmosphereSystem.cs @@ -1,6 +1,7 @@ #nullable enable using System; using System.Collections.Generic; +using Content.Server.Atmos; using Content.Server.GameObjects.Components.Atmos; using JetBrains.Annotations; using Robust.Server.Interfaces.Timing; @@ -27,14 +28,14 @@ namespace Content.Server.GameObjects.EntitySystems base.Initialize(); _mapManager.TileChanged += OnTileChanged; - EntityQuery = new MultipleTypeEntityQuery(new List(){typeof(GridAtmosphereComponent)}); + EntityQuery = new MultipleTypeEntityQuery(new List(){typeof(IGridAtmosphereComponent)}); } - public GridAtmosphereComponent? GetGridAtmosphere(GridId gridId) + public IGridAtmosphereComponent? GetGridAtmosphere(GridId gridId) { var grid = _mapManager.GetGrid(gridId); var gridEnt = _entityManager.GetEntity(grid.GridEntityId); - return gridEnt.TryGetComponent(out GridAtmosphereComponent atmos) ? atmos : null; + return gridEnt.TryGetComponent(out IGridAtmosphereComponent atmos) ? atmos : null; } public override void Update(float frameTime) @@ -47,7 +48,7 @@ namespace Content.Server.GameObjects.EntitySystems if (_pauseManager.IsGridPaused(grid.GridIndex)) continue; - gridEnt.GetComponent().Update(frameTime); + gridEnt.GetComponent().Update(frameTime); } }