diff --git a/Content.Shared/GameObjects/EntitySystems/SubFloorHideSystem.cs b/Content.Shared/GameObjects/EntitySystems/SubFloorHideSystem.cs index be25aeea2e..22682f901a 100644 --- a/Content.Shared/GameObjects/EntitySystems/SubFloorHideSystem.cs +++ b/Content.Shared/GameObjects/EntitySystems/SubFloorHideSystem.cs @@ -53,10 +53,8 @@ namespace Content.Shared.GameObjects.EntitySystems _mapManager.GridChanged += MapManagerOnGridChanged; _mapManager.TileChanged += MapManagerOnTileChanged; - // TODO: Make this sane when EntityStarted becomes a directed event. - EntityManager.EntityStarted += OnEntityStarted; - - SubscribeLocalEvent(OnSubFloorTerminating); + SubscribeLocalEvent(OnSubFloorStarted); + SubscribeLocalEvent(OnSubFloorTerminating); SubscribeLocalEvent(OnSnapGridPositionChanged); } @@ -66,22 +64,14 @@ namespace Content.Shared.GameObjects.EntitySystems _mapManager.GridChanged -= MapManagerOnGridChanged; _mapManager.TileChanged -= MapManagerOnTileChanged; - - EntityManager.EntityStarted -= OnEntityStarted; - - UnsubscribeLocalEvent(OnSubFloorTerminating); - UnsubscribeLocalEvent(OnSnapGridPositionChanged); } - private void OnEntityStarted(object? sender, EntityUid uid) + private void OnSubFloorStarted(EntityUid uid, SubFloorHideComponent component, ComponentStartup _) { - if (ComponentManager.HasComponent(uid)) - { - UpdateEntity(uid); - } + UpdateEntity(uid); } - private void OnSubFloorTerminating(EntityUid uid, SubFloorHideComponent component, EntityTerminatingEvent args) + private void OnSubFloorTerminating(EntityUid uid, SubFloorHideComponent component, ComponentShutdown _) { UpdateEntity(uid); }