This commit is contained in:
2026-04-25 23:37:10 +02:00
commit 19d6bd934a
476 changed files with 9198 additions and 0 deletions
@@ -0,0 +1,30 @@
using System.Collections.Generic;
namespace RPGCoreCommon.DynamicValues
{
public class DynamicValueSourceContext
{
private readonly Dictionary<string, object> _sources = new();
public void SetSource(string name, object source)
{
_sources.Remove(name.ToLower());
_sources.Add(name.ToLower(), source);
}
public void RemoveResource(string name)
{
_sources.Remove(name.ToLower());
}
public void RemoveSources()
{
_sources.Clear();
}
public bool TryGetSource(string name, out object source)
{
return _sources.TryGetValue(name.ToLower(), out source);
}
}
}