Fix a bunch of warnings (#9528)
This commit is contained in:
@@ -2,6 +2,7 @@ using System.Linq;
|
||||
using Content.Shared.DragDrop;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.MobState.EntitySystems;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Map;
|
||||
@@ -15,6 +16,7 @@ namespace Content.Shared.Examine
|
||||
{
|
||||
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
|
||||
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
|
||||
[Dependency] protected readonly SharedMobStateSystem MobStateSystem = default!;
|
||||
|
||||
public const float MaxRaycastRange = 100;
|
||||
|
||||
@@ -43,8 +45,8 @@ namespace Content.Shared.Examine
|
||||
|
||||
public bool IsInDetailsRange(EntityUid examiner, EntityUid entity)
|
||||
{
|
||||
// check if the mob is in ciritcal or dead
|
||||
if (EntityManager.TryGetComponent(examiner, out MobStateComponent? mobState) && mobState.IsIncapacitated())
|
||||
// check if the mob is in critical or dead
|
||||
if (MobStateSystem.IsIncapacitated(examiner))
|
||||
return false;
|
||||
|
||||
if (!_interactionSystem.InRangeUnobstructed(examiner, entity, ExamineDetailsRange))
|
||||
@@ -94,9 +96,9 @@ namespace Content.Shared.Examine
|
||||
{
|
||||
if (Resolve(examiner, ref mobState, logMissing: false))
|
||||
{
|
||||
if (mobState.IsDead())
|
||||
if (MobStateSystem.IsDead(examiner, mobState))
|
||||
return DeadExamineRange;
|
||||
else if (mobState.IsCritical())
|
||||
else if (MobStateSystem.IsCritical(examiner, mobState))
|
||||
return CritExamineRange;
|
||||
}
|
||||
return ExamineRange;
|
||||
|
||||
Reference in New Issue
Block a user