Files
tbd-station-14/Content.Server/GameObjects/Components/Mobs/CombatModeComponent.cs
Pieter-Jan Briers 02d509fc5f Shitty combat mode & animations. (#367)
* Combat mode UI & targeting zones.

* Fix inventory hud positioning.

* Crappy attack animations.

* Import TG combat sounds

* More work on arcs.

* Implement hit sounds.

* Lunging, hit effects, some more stuff.
2019-09-26 22:32:32 +02:00

46 lines
1.2 KiB
C#

using Content.Shared.GameObjects.Components.Mobs;
using Robust.Shared.GameObjects;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Mobs
{
/// <summary>
/// Stores whether an entity is in "combat mode"
/// This is used to differentiate between regular item interactions or
/// using *everything* as a weapon.
/// </summary>
[RegisterComponent]
public sealed class CombatModeComponent : SharedCombatModeComponent
{
private bool _isInCombatMode;
private TargetingZone _activeZone;
[ViewVariables(VVAccess.ReadWrite)]
public bool IsInCombatMode
{
get => _isInCombatMode;
set
{
_isInCombatMode = value;
Dirty();
}
}
[ViewVariables(VVAccess.ReadWrite)]
public TargetingZone ActiveZone
{
get => _activeZone;
set
{
_activeZone = value;
Dirty();
}
}
public override ComponentState GetComponentState()
{
return new CombatModeComponentState(IsInCombatMode, ActiveZone);
}
}
}