Files
tbd-station-14/Content.Server/Interfaces/GameObjects/Components/Damage/IDamageableComponent.cs
DrSmugleaf 4a8ed41e3a Fix namespaces and optimize imports (#1651)
* Fix namespaces and optimize imports

* Cleanup fixes

* Merge conflict fixes

* Merge conflict fixes

* Merge conflict fixes
2020-08-13 14:40:27 +02:00

36 lines
1.6 KiB
C#

using System;
using Content.Server.GameObjects.Components.Damage;
using Content.Shared.GameObjects.Components.Damage;
using Robust.Shared.Interfaces.GameObjects;
namespace Content.Server.Interfaces.GameObjects.Components.Damage
{
public interface IDamageableComponent : IComponent
{
event EventHandler<DamageThresholdPassedEventArgs> DamageThresholdPassed;
ResistanceSet Resistances { get; }
/// <summary>
/// The function that handles receiving damage.
/// Converts damage via the resistance set then applies it
/// and informs components of thresholds passed as necessary.
/// </summary>
/// <param name="damageType">Type of damage being received.</param>
/// <param name="amount">Amount of damage being received.</param>
/// <param name="source">Entity that damaged this entity.</param>
/// <param name="sourceMob">Mob that damaged this entity.</param>
void TakeDamage(DamageType damageType, int amount, IEntity source, IEntity sourceMob);
/// <summary>
/// Handles receiving healing.
/// Converts healing via the resistance set then applies it
/// and informs components of thresholds passed as necessary.
/// </summary>
/// <param name="damageType">Type of healing being received.</param>
/// <param name="amount">Amount of healing being received.</param>
/// <param name="source">Entity that healed this entity.</param>
/// <param name="sourceMob">Mob that healed this entity.</param>
void TakeHealing(DamageType damageType, int amount, IEntity source, IEntity sourceMob);
}
}