WIP refactor v3

This commit is contained in:
2025-07-14 09:38:20 +02:00
parent ccaf44d50b
commit 43f66370f3
3 changed files with 38 additions and 41 deletions
+2 -11
View File
@@ -10,7 +10,6 @@ using LabApi.Events.Handlers;
using LabApi.Features.Permissions;
using LabApi.Features.Wrappers;
using MEC;
using Mirror;
using PlayerRoles;
using UnityEngine;
using LightSourceToy = LabApi.Features.Wrappers.LightSourceToy;
@@ -110,16 +109,6 @@ public class SerpentsHandManager
public static void PreSpawn(Player player)
{
player.SetRole(RoleTypeId.Tutorial, RoleChangeReason.RespawnMiniwave, RoleSpawnFlags.None);
const string customInfo = "<color=#32CD32>SerpentsHand</color>";
if (!Player.ValidateCustomInfo(customInfo, out var reason))
{
Logger.Error($"Invalid custom info for Serpents Hand: {reason}");
}
else
{
player.CustomInfo = customInfo;
player.InfoArea |= PlayerInfoArea.CustomInfo;
}
}
public IEnumerator<float> UpdateSerpentsHandHint()
@@ -244,6 +233,8 @@ public sealed class SerpentsHandConfig : CustomClassConfig
public const float BaseChance = 90f;
public readonly Vector3[] SpawnLocations = [new(0.22f, 300.96f, -0.31f), new(123.921f, 288.792f, 20.929f)];
public override string Color { get; init; } = "#32CD32";
public override string Name { get; init; } = "Serpents Hand";
}
public class SerpentsHandHandler : SimpleAddItemHandler