From cf2b23ad9e8f1e243b42f822784c922fe528927e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Aguilera=20Puerto?= Date: Tue, 20 Oct 2020 12:24:33 +0200 Subject: [PATCH] Fix server crash on startup --- Content.Server/GameObjects/EntitySystems/AtmosphereSystem.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Content.Server/GameObjects/EntitySystems/AtmosphereSystem.cs b/Content.Server/GameObjects/EntitySystems/AtmosphereSystem.cs index 5a83503e23..628b81dbae 100644 --- a/Content.Server/GameObjects/EntitySystems/AtmosphereSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/AtmosphereSystem.cs @@ -27,7 +27,6 @@ namespace Content.Server.GameObjects.EntitySystems [Dependency] private readonly IPrototypeManager _protoMan = default!; [Dependency] private readonly IMapManager _mapManager = default!; [Dependency] private readonly IPauseManager _pauseManager = default!; - [Dependency] private readonly IEventBus _eventBus = default!; private GasReactionPrototype[] _gasReactions = Array.Empty(); @@ -55,14 +54,14 @@ namespace Content.Server.GameObjects.EntitySystems _mapManager.TileChanged += OnTileChanged; // Required for airtight components. - _eventBus.SubscribeEvent(EventSource.Local, this, RotateEvent); + EntityManager.EventBus.SubscribeEvent(EventSource.Local, this, RotateEvent); } public override void Shutdown() { base.Shutdown(); - _eventBus.UnsubscribeEvent(EventSource.Local, this); + EntityManager.EventBus.UnsubscribeEvent(EventSource.Local, this); } private void RotateEvent(RotateEvent ev)