Adds generic damage visualizer to the game (#4893)

This commit is contained in:
Flipp Syder
2021-10-29 01:04:24 -07:00
committed by GitHub
parent 87701b50c6
commit 91b4ce6f24
67 changed files with 1021 additions and 117 deletions

View File

@@ -0,0 +1,26 @@
using System.Collections.Generic;
using Robust.Shared.GameObjects;
namespace Content.Client.Damage
{
// Stores all the data for a DamageVisualizer.
//
// Storing it inside of the AppearanceComponent's data
// dictionary was too messy, but at least we can
// store it in the entity itself as a separate,
// dynamically added component.
[RegisterComponent]
public class DamageVisualizerDataComponent : Component
{
public override string Name => "DamageVisualizerData";
public List<object> TargetLayerMapKeys = new();
public bool Disabled = false;
public bool Valid = true;
public int LastDamageThreshold = 0;
public Dictionary<object, bool> DisabledLayers = new();
public Dictionary<object, string> LayerMapKeyStates = new();
public Dictionary<string, int> LastThresholdPerGroup = new();
public string TopMostLayerKey = default!;
}
}