Files
crystall-punk-14/Content.Shared/MobState/IMobStateComponent.cs

51 lines
1.5 KiB
C#
Raw Normal View History

using System.Diagnostics.CodeAnalysis;
using Content.Shared.FixedPoint;
2021-06-09 22:19:39 +02:00
using Content.Shared.MobState.State;
using Robust.Shared.GameObjects;
2021-06-09 22:19:39 +02:00
namespace Content.Shared.MobState
{
public interface IMobStateComponent : IComponent
{
IMobState? CurrentState { get; }
bool IsAlive();
bool IsCritical();
bool IsDead();
bool IsIncapacitated();
(IMobState state, FixedPoint2 threshold)? GetEarliestIncapacitatedState(FixedPoint2 minimumDamage);
(IMobState state, FixedPoint2 threshold)? GetEarliestCriticalState(FixedPoint2 minimumDamage);
(IMobState state, FixedPoint2 threshold)? GetEarliestDeadState(FixedPoint2 minimumDamage);
(IMobState state, FixedPoint2 threshold)? GetPreviousCriticalState(FixedPoint2 maximumDamage);
bool TryGetEarliestIncapacitatedState(
FixedPoint2 minimumDamage,
[NotNullWhen(true)] out IMobState? state,
out FixedPoint2 threshold);
bool TryGetEarliestCriticalState(
FixedPoint2 minimumDamage,
[NotNullWhen(true)] out IMobState? state,
out FixedPoint2 threshold);
bool TryGetEarliestDeadState(
FixedPoint2 minimumDamage,
[NotNullWhen(true)] out IMobState? state,
out FixedPoint2 threshold);
bool TryGetPreviousCriticalState(
FixedPoint2 maximumDamage,
[NotNullWhen(true)] out IMobState? state,
out FixedPoint2 threshold);
void UpdateState(FixedPoint2 damage);
}
}