More generic implementation of enemies defeated count that relies on the EnemyLoreInfo name and puts that into a dictionary
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
[Meta, Id("stat_data")]
|
||||
public partial record StatData
|
||||
{
|
||||
[Save("enemies_defeated")]
|
||||
public Dictionary<string, int> EnemiesDefeated { get; set; } = [];
|
||||
|
||||
public int TotalEnemiesDefeated => EnemiesDefeated.Values.Sum();
|
||||
}
|
||||
Reference in New Issue
Block a user