feat: make buffer color hash seed configurable, bump to 0.1.0

This commit is contained in:
2026-07-31 07:31:33 +02:00
parent d1e62186e4
commit c383b4056c
3 changed files with 11 additions and 2 deletions
@@ -10,10 +10,13 @@ internal static class ClaimLinkVisualizerClient
private const int HighlightSlotId = 8341;
private static ICoreClientAPI capi = null!;
private static bool visible;
private static ClaimLinkVisualizerConfig config = null!;
internal static void Start(ICoreClientAPI api)
{
capi = api;
config = api.LoadModConfig<ClaimLinkVisualizerConfig>("claimlinkvisualizer.json") ?? new ClaimLinkVisualizerConfig();
api.StoreModConfig(config, "claimlinkvisualizer.json");
api.Network.RegisterChannel(ClaimLinkVisualizerModSystem.ChannelName)
.RegisterMessageType<ClaimLinkBufferRequest>()
@@ -82,7 +85,7 @@ internal static class ClaimLinkVisualizerClient
{
unchecked
{
uint h = (uint)groupId * 2654435761u;
uint h = (uint)groupId * config.ColorHashSeed;
int r = (byte)(h >> 16);
int g = (byte)(h >> 8);
int b = (byte)h;
@@ -0,0 +1,6 @@
namespace ClaimLinkVisualizer;
internal class ClaimLinkVisualizerConfig
{
public uint ColorHashSeed = 2654435761u;
}
+1 -1
View File
@@ -8,7 +8,7 @@
"anth64"
],
"description": "Visualizes ClaimLink buffer zones client-side.",
"version": "0.0.2",
"version": "0.1.0",
"dependencies": {
"game": "1.22.5"
}