feat: add ClaimLinkConfig with configurable buffer size

This commit is contained in:
2026-07-26 12:07:46 +02:00
parent 0e0e4e0f74
commit 12219e6ef5
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
namespace ClaimLink;
internal class ClaimLinkConfig
{
public int BufferSize = 16;
}
+3
View File
@@ -13,6 +13,7 @@ public class ClaimLinkModSystem : ModSystem
internal static IGroupManager Groups = null!; internal static IGroupManager Groups = null!;
internal static IWorldAccessor World = null!; internal static IWorldAccessor World = null!;
internal static IPlayerDataManager PlayerData = null!; internal static IPlayerDataManager PlayerData = null!;
internal static ClaimLinkConfig Config = null!;
internal CommandListener? CmdListener; internal CommandListener? CmdListener;
internal GroupCommandListener? GroupCmdListener; internal GroupCommandListener? GroupCmdListener;
@@ -25,6 +26,8 @@ public class ClaimLinkModSystem : ModSystem
Groups = api.Groups; Groups = api.Groups;
Logger = api.Logger; Logger = api.Logger;
PlayerData = api.PlayerData; PlayerData = api.PlayerData;
Config = api.LoadModConfig<ClaimLinkConfig>("claimlink.json") ?? new ClaimLinkConfig();
api.StoreModConfig(Config, "claimlink.json");
Registry = new ClaimLinkRegistry(api.WorldManager.SaveGame); Registry = new ClaimLinkRegistry(api.WorldManager.SaveGame);
CmdListener = new CommandListener(); CmdListener = new CommandListener();