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