add: Patchable items and frames

This commit is contained in:
h z
2025-03-04 11:58:14 +00:00
parent 684763f0cc
commit 93fbe0869b
18 changed files with 163 additions and 26 deletions

View File

@@ -0,0 +1,21 @@
namespace Polonium.Resources.FramePatches.Generic;
public abstract partial class DictionaryFramePatch<TKey, TValue> : FramePatch
{
public Dictionary<TKey, TValue> Updates { get; set; } = new ();
public Dictionary<TKey, TValue> Filter(HashSet<TKey> filter)
{
Dictionary<TKey, TValue> res = new();
foreach (TKey key in filter)
{
if (!Updates.ContainsKey(key))
continue;
res[key] = Updates[key];
}
return res;
}
}