ResistanceSet Yaml serialization (#1484)
* ResistanceSet serialization * DefaultResistanceSet * remove wall resistance * ResistanceSet ExposeData fix * Remove commented out code Co-authored-by: py01 <pyronetics01@gmail.com>
This commit is contained in:
@@ -34,7 +34,8 @@ namespace Content.Server.GameObjects
|
||||
public IReadOnlyDictionary<DamageType, int> CurrentDamage => _currentDamage;
|
||||
private Dictionary<DamageType, int> _currentDamage = new Dictionary<DamageType, int>();
|
||||
|
||||
Dictionary<DamageType, List<DamageThreshold>> Thresholds = new Dictionary<DamageType, List<DamageThreshold>>();
|
||||
[ViewVariables]
|
||||
public Dictionary<DamageType, List<DamageThreshold>> Thresholds = new Dictionary<DamageType, List<DamageThreshold>>();
|
||||
|
||||
public event EventHandler<DamageThresholdPassedEventArgs> DamageThresholdPassed;
|
||||
public event EventHandler<DamageEventArgs> Damaged;
|
||||
@@ -47,12 +48,7 @@ namespace Content.Server.GameObjects
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
|
||||
// TODO: Writing.
|
||||
serializer.DataReadFunction("resistanceset", "honk", name =>
|
||||
{
|
||||
Resistances = ResistanceSet.GetResistanceSet(name);
|
||||
});
|
||||
serializer.DataField(this, x => Resistances, "resistances", ResistanceSet.DefaultResistanceSet);
|
||||
}
|
||||
|
||||
public bool IsDead()
|
||||
|
||||
Reference in New Issue
Block a user