diff --git a/src/BAUPlugin.ModInfo.cs b/src/BAUPlugin.ModInfo.cs index 696f546..d02c968 100644 --- a/src/BAUPlugin.ModInfo.cs +++ b/src/BAUPlugin.ModInfo.cs @@ -64,7 +64,7 @@ internal partial class BAUPlugin /// internal static string[] SupportedAmongUsVersions = [ - "2026.8.18" + "2026.9.29" ]; /// diff --git a/src/BetterAmongUs.csproj b/src/BetterAmongUs.csproj index 1dc25e9..3620d07 100644 --- a/src/BetterAmongUs.csproj +++ b/src/BetterAmongUs.csproj @@ -80,7 +80,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Patches/Gameplay/Options/LogicOptionsPatch.cs b/src/Patches/Gameplay/Options/LogicOptionsPatch.cs index 025fe9c..0e0037d 100644 --- a/src/Patches/Gameplay/Options/LogicOptionsPatch.cs +++ b/src/Patches/Gameplay/Options/LogicOptionsPatch.cs @@ -1,5 +1,4 @@ -using AmongUs.GameOptions; -using BetterAmongUs.Utilities; +using BetterAmongUs.Utilities; using HarmonyLib; namespace BetterAmongUs.Patches.Gameplay.Options; @@ -15,7 +14,7 @@ internal static class LogicOptionsPatch return; // Show anonymous votes when dead and not Guardian Angel - if (!PlayerControl.LocalPlayer.IsAlive() && !PlayerControl.LocalPlayer.Is(RoleTypes.GuardianAngel)) + if (!PlayerControl.LocalPlayer.IsAlive() && !PlayerControl.LocalPlayer.IsGhostRole()) { __result = false; } diff --git a/src/Patches/Gameplay/ZoomPatch.cs b/src/Patches/Gameplay/ZoomPatch.cs index 3835cc1..2f3d0c2 100644 --- a/src/Patches/Gameplay/ZoomPatch.cs +++ b/src/Patches/Gameplay/ZoomPatch.cs @@ -1,6 +1,5 @@ -using AmongUs.GameOptions; +using BetterAmongUs.Modules; using BetterAmongUs.Utilities; -using BetterAmongUs.Modules; using HarmonyLib; using UnityEngine; @@ -21,7 +20,7 @@ internal class ZoomPatch // - Not Guardian Angel AND // - Either not in gameplay OR player is dead bool canZoom = GameState.IsCanMove && - !PlayerControl.LocalPlayer.Is(RoleTypes.GuardianAngel) && + !PlayerControl.LocalPlayer.IsGhostRole() && (!GameState.IsInGamePlay || !PlayerControl.LocalPlayer.IsAlive()); // Should we reset zoom (when player was zooming but no longer can) diff --git a/src/Utilities/PlayerControlUtils.cs b/src/Utilities/PlayerControlUtils.cs index 709b281..49ee12d 100644 --- a/src/Utilities/PlayerControlUtils.cs +++ b/src/Utilities/PlayerControlUtils.cs @@ -468,7 +468,7 @@ internal static class PlayerControlUtils if (data == null) return false; - return data.RoleType == RoleTypes.GuardianAngel; + return data.RoleType is RoleTypes.GuardianAngel or RoleTypes.SpiritGuide; } /// diff --git a/src/Utilities/RoleUtils.cs b/src/Utilities/RoleUtils.cs index 2e134ab..a0ed5cf 100644 --- a/src/Utilities/RoleUtils.cs +++ b/src/Utilities/RoleUtils.cs @@ -114,7 +114,7 @@ internal static class RoleUtils return string.Empty; } - if (PlayerControl.LocalPlayer.Is(RoleTypes.GuardianAngel)) + if (PlayerControl.LocalPlayer.IsGhostRole()) { return string.Empty; } @@ -146,6 +146,7 @@ internal static class RoleUtils { { RoleTypes.CrewmateGhost, Colors.CrewmateBlue.ColorToHex() }, { RoleTypes.GuardianAngel, "#8cffff" }, + { RoleTypes.SpiritGuide, "#ff0066" }, { RoleTypes.Crewmate, Colors.CrewmateBlue.ColorToHex() }, { RoleTypes.Scientist, "#00d9d9" }, { RoleTypes.Engineer, "#8f8f8f" },