2019-07-31 15:02:36 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using Content.Shared.GameObjects;
|
2019-04-15 21:11:38 -06:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2018-12-13 07:47:19 -06:00
|
|
|
|
|
|
|
|
|
|
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>
|
2019-07-31 15:02:36 +02:00
|
|
|
|
[RegisterComponent]
|
2018-12-13 07:47:19 -06:00
|
|
|
|
public class DamageableComponent : SharedDamageableComponent
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
|
public override string Name => "Damageable";
|
|
|
|
|
|
|
|
|
|
|
|
public Dictionary<DamageType, int> CurrentDamage = new Dictionary<DamageType, int>();
|
|
|
|
|
|
|
2019-04-13 00:46:27 -07:00
|
|
|
|
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
2018-12-13 07:47:19 -06:00
|
|
|
|
{
|
2019-04-13 00:46:27 -07:00
|
|
|
|
base.HandleComponentState(curState, nextState);
|
2018-12-13 07:47:19 -06:00
|
|
|
|
|
2019-11-13 17:37:46 -05:00
|
|
|
|
if(curState is DamageComponentState damagestate)
|
2018-12-13 07:47:19 -06:00
|
|
|
|
{
|
|
|
|
|
|
CurrentDamage = damagestate.CurrentDamage;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|