diff --git a/AmongUsRevamped.cs b/AmongUsRevamped.cs index 3865cae..df90403 100644 --- a/AmongUsRevamped.cs +++ b/AmongUsRevamped.cs @@ -44,7 +44,7 @@ public partial class Main : BasePlugin public static bool HasArgumentException; public static string CredentialsText; - public const string ModVersion = "v1.9.0"; + public const string ModVersion = "v1.9.1"; public static float GameTimer; diff --git a/Modules/Utils.cs b/Modules/Utils.cs index 1bb582b..a7f5107 100644 --- a/Modules/Utils.cs +++ b/Modules/Utils.cs @@ -224,7 +224,6 @@ public static class Utils PlayerControlSetRolePatch.FirstAssign = true; PlayerControlSetRolePatch.manualSeekers.Clear(); - OnGameStartPatch.ScheduleExile = false; CoShowIntroPatch.IntroInitiated = false; } diff --git a/Patches/OnGameStartedPatch.cs b/Patches/OnGameStartedPatch.cs index 167873e..0350f4b 100644 --- a/Patches/OnGameStartedPatch.cs +++ b/Patches/OnGameStartedPatch.cs @@ -45,12 +45,6 @@ class PlayerControlSetRolePatch canOverrideRole = false; - if (Main.GM.Value && __instance.PlayerId == PlayerControl.LocalPlayer.PlayerId) - { - roleType = RoleTypes.Crewmate; - OnGameStartPatch.ScheduleExile = true; - } - if (Utils.isHideNSeek && Seekers.Count() == 0 && Options.NumSeekers.GetInt() > 0) { int seekersCount = Options.NumSeekers.GetInt(); @@ -115,7 +109,6 @@ class PlayerControlSetRolePatch { Seekers.Clear(); ProcessedPlayers.Clear(); - FirstAssign = false; Logger.Info("PCSRP successful", "RoleManaging"); } @@ -127,7 +120,6 @@ class PlayerControlSetRolePatch [HarmonyPatch(typeof(HudManager), nameof(HudManager.OnGameStart))] internal static class OnGameStartPatch { - public static bool ScheduleExile; public static void Postfix() { if (AmongUsClient.Instance.AmHost && Options.Gamemode.GetValue() == 1 && Options.SNSChatInGame.GetBool()) @@ -136,11 +128,11 @@ internal static class OnGameStartPatch if (MeetingHud.Instance != null) MeetingHud.Instance.RpcClose(); } - if (ScheduleExile) + if (Main.GM.Value) { Logger.Info($" Game Master Successful", "StartGame"); + PlayerControl.LocalPlayer.Exiled(); PlayerControl.LocalPlayer.RpcSetRole(RoleTypes.CrewmateGhost); - ScheduleExile = false; } foreach (var p in PlayerControl.AllPlayerControls) diff --git a/Patches/SabotagePatches.cs b/Patches/SabotagePatches.cs index 4ca3234..40283a4 100644 --- a/Patches/SabotagePatches.cs +++ b/Patches/SabotagePatches.cs @@ -43,7 +43,7 @@ public static class SabotageSystemTypeRepairDamagePatch Sabo == SystemTypes.Comms && Options.SNSDisableComms.GetBool() || Sabo == SystemTypes.HeliSabotage && Options.SNSDisableHeli.GetBool() || Sabo == SystemTypes.MushroomMixupSabotage && Options.SNSDisableMushroomMixup.GetBool() || - Sabo == SystemTypes.Laboratory && Options.DisableReactor.GetBool() && msgReader != null || + Sabo == SystemTypes.Laboratory && Options.SNSDisableReactor.GetBool() && msgReader != null || player.Data.IsDead && !Options.DeadImpostorsCanSabotage.GetBool()) { Logger.Info($" Sabotage {Sabo} by: {player.Data.PlayerName} was blocked", "SnSSabotageCheck"); diff --git a/README.md b/README.md index 91b1037..31dff89 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ **** ‎ -# 🎮 Features (v1.9.0): +# 🎮 Features (v1.9.1): ## ♠️ Client Side settings: - Game Master (Spectator) @@ -106,7 +106,6 @@ | /help | Show command help | | /l
/lastgame | Send last game info | | /r | Send current gamemode/roles description | -| /r {ability} | Send specific Ability info | | /0kc
/sns
/sp | Send respective gamemode description | | /ban {name} | Ban a player by name | | /kick {name} | Kick a player by name | @@ -121,6 +120,9 @@ | /s
/start | Start game countdown | | /vip
/moderator
/admin | Add a user to respective list by name | | /t {template} | Send a Template from Templates.txt | +| /seeker {name} | Manually adds someone as Seeker in HnS | +| /seekers | Shows manual Seeker list in HnS | +| /clearseekers | Clears manual Seeker list in HnS | ‎ **Credit to these mods and their developers for their code:**