Files
tbd-station-14/Content.Client/GameObjects/Components/DamageableComponent.cs
2019-07-31 15:07:54 +02:00

31 lines
992 B
C#

using System.Collections.Generic;
using Content.Shared.GameObjects;
using Robust.Shared.GameObjects;
namespace Content.Client.GameObjects
{
/// <summary>
/// Fuck I really hate doing this
/// TODO: make sure the client only gets damageable component on the clientside entity for its player mob
/// </summary>
[RegisterComponent]
public class DamageableComponent : SharedDamageableComponent
{
/// <inheritdoc />
public override string Name => "Damageable";
public Dictionary<DamageType, int> CurrentDamage = new Dictionary<DamageType, int>();
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
{
base.HandleComponentState(curState, nextState);
if(curState is DamageComponentState)
{
var damagestate = (DamageComponentState)curState;
CurrentDamage = damagestate.CurrentDamage;
}
}
}
}