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

@@ -6,9 +6,8 @@ using Content.Server.Players;
using Content.Server.Suspicion;
using Content.Server.Suspicion.EntitySystems;
using Content.Server.Suspicion.Roles;
using Content.Shared;
using Content.Shared.CCVar;
using Content.Shared.MobState;
using Content.Shared.MobState.Components;
using Content.Shared.Sound;
using Robust.Server.Player;
using Robust.Shared.Audio;
@@ -90,7 +89,7 @@ namespace Content.Server.GameTicking.Rules
foreach (var playerSession in _playerManager.GetAllPlayers())
{
if (playerSession.AttachedEntity == null
|| !playerSession.AttachedEntity.TryGetComponent(out IMobStateComponent? mobState)
|| !playerSession.AttachedEntity.TryGetComponent(out MobStateComponent? mobState)
|| !playerSession.AttachedEntity.HasComponent<SuspicionRoleComponent>())
{
continue;