Fix healing damage classes and damageable serialization and add test (#2727)

* Fix healing damage classes and damageable serialization and add test

* The fall of an empire

* Fix healPerType being -1 instead of 1
This commit is contained in:
DrSmugleaf
2020-12-11 02:09:43 +01:00
committed by GitHub
parent bb905c9628
commit adc972f9d3
7 changed files with 198 additions and 21 deletions

View File

@@ -70,6 +70,16 @@ namespace Content.Shared.GameObjects.Components.Damage
/// </returns>
bool TryGetDamage(DamageType type, out int damage);
/// <summary>
/// Gets the amount of damage of a class.
/// </summary>
/// <param name="class">The class to get the damage of.</param>
/// <param name="damage">The amount of damage of that class.</param>
/// <returns>
/// True if the given <see cref="@class"/> is supported, false otherwise.
/// </returns>
bool TryGetDamage(DamageClass @class, out int damage);
/// <summary>
/// Changes the specified <see cref="DamageType"/>, applying
/// resistance values only if it is damage.