Initial Code

This commit is contained in:
Exil Productions
2025-11-11 03:10:52 +01:00
commit 74e53205f4
21 changed files with 2039 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
namespace VMM.ModRegistry.Settings
{
public class ModSettings
{
private readonly List<ISettingsElement> settings = new();
public void AddSetting(ISettingsElement newSetting)
{
settings.Add(newSetting);
}
public T GetSetting<T>(string name) where T : class, ISettingsElement
{
foreach (var setting in settings)
{
if(setting.Name == name && setting is T typed)
return typed;
}
return null;
}
public IEnumerable<ISettingsElement> GetAllSettings() => settings;
}
}