Adds shoddy death match system.
It barely even works but oh well.
This commit is contained in:
@@ -13,6 +13,8 @@ namespace Content.Server.GameObjects
|
||||
void EnterState(IEntity entity);
|
||||
|
||||
void ExitState(IEntity entity);
|
||||
|
||||
bool IsConscious { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -28,6 +30,8 @@ namespace Content.Server.GameObjects
|
||||
{
|
||||
}
|
||||
|
||||
public bool IsConscious => true;
|
||||
|
||||
bool IActionBlocker.CanInteract()
|
||||
{
|
||||
return true;
|
||||
@@ -57,6 +61,8 @@ namespace Content.Server.GameObjects
|
||||
{
|
||||
}
|
||||
|
||||
public bool IsConscious => false;
|
||||
|
||||
bool IActionBlocker.CanInteract()
|
||||
{
|
||||
return false;
|
||||
@@ -96,6 +102,8 @@ namespace Content.Server.GameObjects
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsConscious => false;
|
||||
|
||||
bool IActionBlocker.CanInteract()
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -112,6 +112,24 @@ namespace Content.Server.GameObjects
|
||||
CurrentDamageState.EnterState(Owner);
|
||||
|
||||
currentstate = threshold;
|
||||
|
||||
Owner.RaiseEvent(new MobDamageStateChangedMessage(this));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fired when <see cref="SpeciesComponent.CurrentDamageState"/> changes.
|
||||
/// </summary>
|
||||
public sealed class MobDamageStateChangedMessage : EntitySystemMessage
|
||||
{
|
||||
public MobDamageStateChangedMessage(SpeciesComponent species)
|
||||
{
|
||||
Species = species;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The species component that was changed.
|
||||
/// </summary>
|
||||
public SpeciesComponent Species { get; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user