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:
@@ -58,14 +58,16 @@ namespace Content.Shared.Damage
|
||||
var classes = DamageClassExtensions.ToDictionary();
|
||||
|
||||
foreach (var @class in classes.Keys.ToList())
|
||||
foreach (var type in @class.ToTypes())
|
||||
{
|
||||
if (!types.TryGetValue(type, out var damage))
|
||||
foreach (var type in @class.ToTypes())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!types.TryGetValue(type, out var damage))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
classes[@class] += damage;
|
||||
classes[@class] += damage;
|
||||
}
|
||||
}
|
||||
|
||||
return classes;
|
||||
|
||||
Reference in New Issue
Block a user