Add invulnerable damage flag, godmode and damage flag commands (#1949)

* Add invulnerable damage flag and commands

* Add serialization for damage flags

* Add godmode command
This commit is contained in:
DrSmugleaf
2020-08-30 11:16:47 +02:00
committed by GitHub
parent 72eb1fdc1c
commit a8aa088058
5 changed files with 335 additions and 0 deletions

View File

@@ -45,6 +45,30 @@ namespace Content.Shared.GameObjects.Components.Damage
/// </summary>
IReadOnlyDictionary<DamageType, int> DamageTypes { get; }
/// <summary>
/// The damage flags on this component.
/// </summary>
DamageFlag Flags { get; }
/// <summary>
/// Adds a flag to this component.
/// </summary>
/// <param name="flag">The flag to add.</param>
void AddFlag(DamageFlag flag);
/// <summary>
/// Checks whether or not this component has a specific flag.
/// </summary>
/// <param name="flag">The flag to check for.</param>
/// <returns>True if it has the flag, false otherwise.</returns>
bool HasFlag(DamageFlag flag);
/// <summary>
/// Removes a flag from this component.
/// </summary>
/// <param name="flag">The flag to remove.</param>
void RemoveFlag(DamageFlag flag);
/// <summary>
/// Gets the amount of damage of a type.
/// </summary>