Remove IMobStateComponent (#5220)

This commit is contained in:
Javier Guardia Fernández
2021-11-08 15:11:58 +01:00
committed by GitHub
parent 4236551d86
commit f5b11d6af8
35 changed files with 84 additions and 144 deletions

View File

@@ -1,7 +1,7 @@
using System.Linq;
using Content.Server.Explosion;
using Content.Server.Pointing.Components;
using Content.Shared.MobState;
using Content.Shared.MobState.Components;
using Content.Shared.Pointing.Components;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
@@ -44,7 +44,7 @@ namespace Content.Server.Pointing.EntitySystems
var players = _playerManager
.GetPlayersInRange(transform.Coordinates, 15)
.Where(player => player.AttachedEntity != null && player.AttachedEntity.TryGetComponent(out IMobStateComponent? mobStateComponent) && !mobStateComponent.IsDead())
.Where(player => player.AttachedEntity != null && player.AttachedEntity.TryGetComponent(out MobStateComponent? mobStateComponent) && !mobStateComponent.IsDead())
.ToArray();
if (players.Length == 0)