Urist's damage and health thing. (#10)

* Add prototype for temperature testing entity.

* Add Damageable, Destructible, Temperature. Add a prototype based on those.

* Works and cleaned up.

* Nerf
This commit is contained in:
Pieter-Jan Briers
2017-10-07 15:15:29 +02:00
committed by GitHub
parent 7597cd9172
commit 6f89d0672d
16 changed files with 618 additions and 34 deletions

View File

@@ -0,0 +1,30 @@
using Content.Server.GameObjects;
using SS14.Shared.Interfaces.GameObjects;
using System;
namespace Content.Server.Interfaces.GameObjects
{
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>
void TakeDamage(DamageType damageType, int amount);
/// <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 damage being received.</param>
/// <param name="amount">Amount of damage being received.</param>
void TakeHealing(DamageType damageType, int amount);
}
}