]> git.deb.at Git - rhonda/theotherroles.git/commitdiff
Version 2.2.1
authorEisbison <eisbison.creator@gmail.com>
Wed, 14 Apr 2021 17:19:51 +0000 (19:19 +0200)
committerEisbison <eisbison.creator@gmail.com>
Wed, 14 Apr 2021 17:19:51 +0000 (19:19 +0200)
14 files changed:
README.md
Source Code/Buttons.cs
Source Code/CredentialsPatch.cs
Source Code/Footprint.cs
Source Code/GameStartManagerPatch.cs
Source Code/Helpers.cs
Source Code/JackInTheBox.cs
Source Code/Main.cs
Source Code/MeetingPatch.cs
Source Code/PlayerControlPatch.cs
Source Code/RPC.cs
Source Code/TheOtherRoles.cs
Source Code/TheOtherRoles.csproj
Source Code/UsablesPatch.cs

index ec32fc3b36b86e85e1255a5da7f0f1039e786b4b..c243bb11f57ac5afdf7b3a7cd63a9a00eaff0a6b 100644 (file)
--- a/README.md
+++ b/README.md
@@ -46,6 +46,7 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein
 # Releases\r
 | Among Us - Version| Mod Version | Link |\r
 |----------|-------------|-----------------|\r
+| 2021.4.12s| v2.2.1| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.2.1/TheOtherRoles.zip)\r
 | 2021.4.12s| v2.2.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.2.0/TheOtherRoles.zip)\r
 | 2021.3.31.3s| v2.1.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.1.0/TheOtherRoles.zip)\r
 | 2021.3.31.3s| v2.0.1 beta| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.0.1/TheOtherRoles.zip)\r
@@ -65,6 +66,13 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein
 <details>\r
   <summary>Click to show the Changelog</summary>\r
 \r
+**Version 2.2.1**\r
+- Trickster: The vent button now has a custom texture. Fixed a bug where the Trickster could clip out of bounds when his box was close to a wall.\r
+- Fixed a bug where the Bad Child's kill button went on cooldown when someone else performed a kill\r
+- Fixed a few bugs with footprints, Seer souls and the Vampire delayed kill\r
+- Fixed a bug where the Child was banned for hacking (because of its reduced kill cooldown)\r
+- Improved the version handshake\r
+\r
 **Version 2.2.0**\r
 - **Works with the latest Among Us version (2021.4.12s)**\r
 - **Added support for 10+ player lobbies on custom servers:** Check the [Custom Servers and 10+ Players](#Custom-Servers-and-10+-Players) section. During meetings use the up/down keys, on vitals use the left/right keys.\r
index 3d4f6b89cbf1a0a04437dd232d52bac0382349d9..dd0ed07d7f96a8726f9efeadaeb24a6663b0aa50 100644 (file)
@@ -362,7 +362,7 @@ namespace TheOtherRoles
                             AmongUsClient.Instance.FinishRpcImmediately(writer);
                             RPCProcedure.vampireSetBitten(Vampire.bitten.PlayerId, 0);
 
-                            PlayerControl.LocalPlayer.StartCoroutine(Effects.DCHLMIDMBHG(Vampire.delay, new Action<float>((p) => { // Delayed action
+                            HudManager.CHNDKKBEIDG.StartCoroutine(Effects.DCHLMIDMBHG(Vampire.delay, new Action<float>((p) => { // Delayed action
                                 if (p == 1f) {
                                     if (Vampire.bitten != null && !Vampire.bitten.PPMOEEPBHJO.IAGJEKLJCCI && Helpers.handleMurderAttempt(Vampire.bitten)) {
                                         // Perform kill
index cdc0742886d0c9c28cdd4932bbd68bd4d2bea39f..490d3441dd15ce954f00c8d3f31b9c15e94b795b 100644 (file)
@@ -15,7 +15,7 @@ namespace TheOtherRoles
         {
             static void Postfix(VersionShower __instance) {
                 string spacer = new String('\n', 21);
-                string fullCredentials = $"<color=#FCCE03FF>TheOtherRoles</color> v{TheOtherRolesPlugin.Major}.{TheOtherRolesPlugin.Minor}.{TheOtherRolesPlugin.Patch}:\n- Modded by <color=#FCCE03FF>TheOtherRoles</color> and <color=#FFEB91FF>Thunderstorm584</color>\n- Balanced with <color=#FFEB91FF>Dhalucard</color>\n- Button design by <color=#FFEB91FF>Bavari</color>";
+                string fullCredentials = $"<color=#FCCE03FF>TheOtherRoles</color> v{TheOtherRolesPlugin.Major}.{TheOtherRolesPlugin.Minor}.{TheOtherRolesPlugin.Patch}:\n- Modded by <color=#FCCE03FF>Eisbison</color> and <color=#FFEB91FF>Thunderstorm584</color>\n- Balanced with <color=#FFEB91FF>Dhalucard</color>\n- Button design by <color=#FFEB91FF>Bavari</color>";
                 if (__instance.text.text.Contains(spacer))
                     __instance.text.text += "\n" + fullCredentials;
                 else
index 85246dcbbfc61e385fc9de8e6d7c2b5771427cd4..3aa7143dc59df7bb9b1debdfb05339d9cf974915 100644 (file)
@@ -47,7 +47,7 @@ namespace TheOtherRoles{
             footprint.SetActive(true);
             footprints.Add(this);
 
-            PlayerControl.LocalPlayer.StartCoroutine(Effects.DCHLMIDMBHG(footprintDuration, new Action<float>((p) => {
+            HudManager.CHNDKKBEIDG.StartCoroutine(Effects.DCHLMIDMBHG(footprintDuration, new Action<float>((p) => {
             Color c = color;
             if (!anonymousFootprints && owner != null) {
                 if (owner == Morphling.morphling && Morphling.morphTimer > 0 && Morphling.morphTarget?.PPMOEEPBHJO != null)
index 225c61e8f1baba2a0eb497478d9bf38d931bc0a7..36358524d9fc54235a39dab662966e7f32085a4e 100644 (file)
@@ -9,17 +9,15 @@ using Palette = BLMBFIODBKL;
 
 namespace TheOtherRoles {
     public class GameStartManagerPatch  {
-        public static Dictionary<byte, Tuple<byte, byte, byte>> playerVersions = new Dictionary<byte, Tuple<byte, byte, byte>>();
+        public static Dictionary<int, Tuple<byte, byte, byte>> playerVersions = new Dictionary<int, Tuple<byte, byte, byte>>();
         private static float timer = 600f;
         private static bool versionSent = false;
 
         [HarmonyPatch(typeof(GameStartManager), nameof(GameStartManager.Start))]
         public class GameStartManagerStartPatch {
             public static void Postfix() {
-                // Refresh version infos
-                playerVersions = new Dictionary<byte, Tuple<byte, byte, byte>>();
+                // Trigger version refresh
                 versionSent = false;
-
                 // Reset lobby countdown timer
                 timer = 600f; 
             }
@@ -43,25 +41,26 @@ namespace TheOtherRoles {
                     writer.Write(TheOtherRolesPlugin.Major);
                     writer.Write(TheOtherRolesPlugin.Minor);
                     writer.Write(TheOtherRolesPlugin.Patch);
-                    writer.Write(PlayerControl.LocalPlayer.PlayerId);
+                    writer.WritePacked(AmongUsClient.Instance.ClientId);
                     AmongUsClient.Instance.FinishRpcImmediately(writer);
-                    RPCProcedure.versionHandshake(TheOtherRolesPlugin.Major, TheOtherRolesPlugin.Minor, TheOtherRolesPlugin.Patch, PlayerControl.LocalPlayer.PlayerId);
+                    RPCProcedure.versionHandshake(TheOtherRolesPlugin.Major, TheOtherRolesPlugin.Minor, TheOtherRolesPlugin.Patch, AmongUsClient.Instance.ClientId);
                 }
 
                 // Host update with version handshake infos
                 if (AmongUsClient.Instance.HHBLOCGKFAB) {
                     bool blockStart = false;
                     string message = "";
-                    foreach (PlayerControl player in PlayerControl.AllPlayerControls) {
-                        var dummyComponent = player.GetComponent<DummyBehaviour>();
+                    foreach (InnerNet.ClientData client in AmongUsClient.Instance.allClients) {
+                        if (client.Character == null) continue;
+                        var dummyComponent = client.Character.GetComponent<DummyBehaviour>();
                         if (dummyComponent != null && dummyComponent.enabled)
                             continue;
-                        else if (!playerVersions.ContainsKey(player.PlayerId))  {
+                        else if (!playerVersions.ContainsKey(client.Id))  {
                             blockStart = true;
-                            message += $"<color=#FF0000FF>{player.PPMOEEPBHJO.PCLLABJCIPC} has an outdated or no version of The Other Roles\n</color>";
-                        } else if (playerVersions[player.PlayerId].Item1 != TheOtherRolesPlugin.Major || playerVersions[player.PlayerId].Item2 != TheOtherRolesPlugin.Minor || playerVersions[player.PlayerId].Item3 != TheOtherRolesPlugin.Patch) {
+                            message += $"<color=#FF0000FF>{client.Character.PPMOEEPBHJO.PCLLABJCIPC} has an outdated or no version of The Other Roles\n</color>";
+                        } else if (playerVersions[client.Id].Item1 != TheOtherRolesPlugin.Major || playerVersions[client.Id].Item2 != TheOtherRolesPlugin.Minor || playerVersions[client.Id].Item3 != TheOtherRolesPlugin.Patch) {
                             blockStart = true;
-                            message += $"<color=#FF0000FF>{player.PPMOEEPBHJO.PCLLABJCIPC} has an outdated version (v{playerVersions[player.PlayerId].Item1}.{playerVersions[player.PlayerId].Item2}.{playerVersions[player.PlayerId].Item3}) of The Other Roles\n</color>";
+                            message += $"<color=#FF0000FF>{client.Character.PPMOEEPBHJO.PCLLABJCIPC} has an outdated version (v{playerVersions[client.Id].Item1}.{playerVersions[client.Id].Item2}.{playerVersions[client.Id].Item3}) of The Other Roles\n</color>";
                         }
                     }
                     if (blockStart) {
@@ -97,11 +96,11 @@ namespace TheOtherRoles {
 
                 // Allow the start for this version to test the feature, blocking it with the next version
                 // if (AmongUsClient.Instance.HHBLOCGKFAB) {
-                //     uint hostVersion = Convert.ToUInt32(TheOtherRolesPlugin.Version.Replace(".", string.Empty));
-                //     foreach (PlayerControl player in PlayerControl.AllPlayerControls) {
-                //         var dummyComponent = player.GetComponent<DummyBehaviour>();
+                //     foreach (InnerNet.ClientData client in AmongUsClient.Instance.allClients) {
+                //         if (client.Character == null) continue;
+                //         var dummyComponent = client.Character.GetComponent<DummyBehaviour>();
                 //         if (dummyComponent != null && dummyComponent.enabled) continue;
-                //         if (!playerVersions.ContainsKey(player.PlayerId) || (playerVersions[player.PlayerId].Item1 != TheOtherRolesPlugin.Major || playerVersions[player.PlayerId].Item2 != TheOtherRolesPlugin.Minor || playerVersions[player.PlayerId].Item3 != TheOtherRolesPlugin.Patch))
+                //         if (!playerVersions.ContainsKey(client.Id) || (playerVersions[client.Id].Item1 != TheOtherRolesPlugin.Major || playerVersions[client.Id].Item2 != TheOtherRolesPlugin.Minor || playerVersions[client.Id].Item3 != TheOtherRolesPlugin.Patch))
                 //             continueStart = false;
                 //     }
                 // }
index abeb1c109d20ef11ed0e3c46cbaf9c033afd226e..ffb894a7ef978accdda0aff0110f62f7ee287f05 100644 (file)
@@ -170,7 +170,9 @@ namespace TheOtherRoles {
         }
 
         public static bool isCustomServer() {
-            return DestroyableSingleton<ServerManager>.CHNDKKBEIDG?.KEABFOHAECE == TheOtherRolesPlugin.Ip.Value;
+            if (DestroyableSingleton<ServerManager>.CHNDKKBEIDG == null) return false;
+            StringNames n = DestroyableSingleton<ServerManager>.CHNDKKBEIDG.HMIJGFFKBNN.TranslateName;
+            return n != StringNames.ServerNA && n != StringNames.ServerEU && n != StringNames.ServerAS;
         }
 
         public static string cs(Color c, string s) {
index 3e28d7bb033b41a246b627fc502337828b8813c7..8b379c906d73e12a32f44f74ff887f486dcfb0a5 100644 (file)
@@ -24,7 +24,7 @@ namespace TheOtherRoles{
         public JackInTheBox(Vector2 p) {
             gameObject = new GameObject("JackInTheBox");
             Vector3 position = new Vector3(p.x, p.y, PlayerControl.LocalPlayer.transform.position.z + 1f); 
-            
+            position += (Vector3)PlayerControl.LocalPlayer.Collider.offset; // add Player Collider offset as this gets subtracted again on Vent.DoMove
             // Create the marker
             gameObject.transform.position = position;
             var boxRenderer = gameObject.AddComponent<SpriteRenderer>();
index f0ee5ae394a6400676fce93dba36ec1360078260..996a591e13c65c635d7aa4e375b7f0d9bc0c26ed 100644 (file)
@@ -19,10 +19,10 @@ namespace TheOtherRoles
     public class TheOtherRolesPlugin : BasePlugin
     {
         public const string Id = "me.eisbison.theotherroles";
-        public const string Version = "2.2.0";
+        public const string Version = "2.2.1";
         public const byte Major = 2;
         public const byte Minor = 2;
-        public const byte Patch = 0;
+        public const byte Patch = 1;
 
         public Harmony Harmony { get; } = new Harmony(Id);
         public static TheOtherRolesPlugin Instance;
index 04bdd23ceb8d44504e5ec1188f2b9baea0fbb9a3..e4e3e848c16edadb226ff1476ef96367d164957e 100644 (file)
@@ -416,7 +416,7 @@ namespace TheOtherRoles
                         rend.sprite = Seer.getSoulSprite();
                         
                         if(Seer.limitSoulDuration) {
-                            PlayerControl.LocalPlayer.StartCoroutine(Effects.DCHLMIDMBHG(Seer.soulDuration, new Action<float>((p) => {
+                            HudManager.CHNDKKBEIDG.StartCoroutine(Effects.DCHLMIDMBHG(Seer.soulDuration, new Action<float>((p) => {
                                 if (rend != null) {
                                     var tmp = rend.color;
                                     tmp.a = Mathf.Clamp01(1 - p);
index 48f66ce25beb0ba75eb9ca01e5be74691e47b331..7b66e4513feda9bf907c3c7da24625ac5e13261a 100644 (file)
@@ -335,10 +335,19 @@ namespace TheOtherRoles {
         }
     }
     [HarmonyPatch(typeof(KillButtonManager), nameof(KillButtonManager.PerformKill))]
-    class PerformKillPatch
-    {
+    class PerformKillPatch {
         public static bool Prefix(KillButtonManager __instance) {
-            return Helpers.handleMurderAttempt(__instance.CurrentTarget);
+            if (__instance.isActiveAndEnabled && __instance.CurrentTarget && !__instance.isCoolingDown && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI && PlayerControl.LocalPlayer.POECPOEKKNO) { // Among Us default checks
+                if (Helpers.handleMurderAttempt(__instance.CurrentTarget)) { // Custom checks
+                    MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1);
+                    writer.Write(PlayerControl.LocalPlayer.PlayerId);
+                    writer.Write(__instance.CurrentTarget.PlayerId);
+                    AmongUsClient.Instance.FinishRpcImmediately(writer);
+                    RPCProcedure.uncheckedMurderPlayer(PlayerControl.LocalPlayer.PlayerId, __instance.CurrentTarget.PlayerId);
+                    __instance.SetTarget(null);
+                }
+                   }
+            return false;
         }
     }
 
@@ -448,7 +457,7 @@ namespace TheOtherRoles {
             if (Seer.deadBodyPositions != null) Seer.deadBodyPositions.Add(DGDGDKCCKHJ.transform.position);
 
             // Child set adapted kill cooldown
-            if (Child.child != null && PlayerControl.LocalPlayer == Child.child && Child.child.PPMOEEPBHJO.FDNMBJOAPFL) {
+            if (Child.child != null && PlayerControl.LocalPlayer == Child.child && Child.child.PPMOEEPBHJO.FDNMBJOAPFL && Child.child == __instance) {
                 var multiplier = Child.isGrownUp() ? 0.66f : 2f;
                 Child.child.SetKillTimer(PlayerControl.GameOptions.DGOPNLEEAAJ * multiplier);
             }
index e182f412595e45a469109cbac0c5e00c0a31fec7..d1e2861b6a805b0c2af73d9c16e6484e5dac7b3f 100644 (file)
@@ -59,6 +59,7 @@ namespace TheOtherRoles
         SetUncheckedColor,
         VersionHandshake,
         UseUncheckedVent,
+        UncheckedMurderPlayer,
 
         // Role functionality
 
@@ -217,10 +218,8 @@ namespace TheOtherRoles
             if (player != null) player.SetColor(colorId);
         }
 
-        public static void versionHandshake(byte major, byte minor, byte patch, byte playerId) {
-            if (AmongUsClient.Instance.HHBLOCGKFAB) { // If lobby host
-                GameStartManagerPatch.playerVersions[playerId] = new Tuple<byte, byte, byte>(major, minor, patch);
-            }
+        public static void versionHandshake(byte major, byte minor, byte patch, int clientId) {
+            GameStartManagerPatch.playerVersions[clientId] = new Tuple<byte, byte, byte>(major, minor, patch);
         }
 
         public static void useUncheckedVent(int ventId, byte playerId, byte isEnter) {
@@ -236,6 +235,12 @@ namespace TheOtherRoles
             player.MyPhysics.HandleRpc(isEnter != 0 ? (byte)19 : (byte)20, reader);
         }
 
+        public static void uncheckedMurderPlayer(byte sourceId, byte targetId) {
+            PlayerControl source = Helpers.playerById(sourceId);
+            PlayerControl target = Helpers.playerById(targetId);
+            if (source != null && target != null) source.MurderPlayer(target);
+        }
+
         // Role functionality
 
         public static void engineerFixLights() {
@@ -273,7 +278,7 @@ namespace TheOtherRoles
             }
             HudManager.CHNDKKBEIDG.FullScreen.color = new Color(0f, 0.5f, 0.8f, 0.3f);
             HudManager.CHNDKKBEIDG.FullScreen.enabled = true;
-            PlayerControl.LocalPlayer.StartCoroutine(Effects.DCHLMIDMBHG(TimeMaster.rewindTime / 2, new Action<float>((p) => {
+            HudManager.CHNDKKBEIDG.StartCoroutine(Effects.DCHLMIDMBHG(TimeMaster.rewindTime / 2, new Action<float>((p) => {
                 if (p == 1f) HudManager.CHNDKKBEIDG.FullScreen.enabled = false;
             })));
 
@@ -307,7 +312,7 @@ namespace TheOtherRoles
 
         public static void timeMasterShield() {
             TimeMaster.shieldActive = true;
-            PlayerControl.LocalPlayer.StartCoroutine(Effects.DCHLMIDMBHG(TimeMaster.shieldDuration, new Action<float>((p) => {
+            HudManager.CHNDKKBEIDG.StartCoroutine(Effects.DCHLMIDMBHG(TimeMaster.shieldDuration, new Action<float>((p) => {
                 if (p == 1f) TimeMaster.shieldActive = false;
             })));
         }
@@ -627,7 +632,7 @@ namespace TheOtherRoles
                     byte major = JIGFBHFFNFI.ReadByte();
                     byte minor = JIGFBHFFNFI.ReadByte();
                     byte patch = JIGFBHFFNFI.ReadByte();
-                    byte versionOwnerId = JIGFBHFFNFI.ReadByte();
+                    int versionOwnerId = JIGFBHFFNFI.ReadPackedInt32();
                     RPCProcedure.versionHandshake(major, minor, patch, versionOwnerId);
                     break;
                 case (byte)CustomRPC.UseUncheckedVent:
@@ -636,6 +641,11 @@ namespace TheOtherRoles
                     byte isEnter = JIGFBHFFNFI.ReadByte();
                     RPCProcedure.useUncheckedVent(ventId, ventingPlayer, isEnter);
                     break;
+                case (byte)CustomRPC.UncheckedMurderPlayer:
+                    byte source = JIGFBHFFNFI.ReadByte();
+                    byte target = JIGFBHFFNFI.ReadByte();
+                    RPCProcedure.uncheckedMurderPlayer(source, target);
+                    break;
 
                 // Role functionality
 
index 7a631349f17a5433ff02f393a551abf0950fa030..02177bd28be8350ec196e5f8f28764b8b3ffb49c 100644 (file)
@@ -709,17 +709,26 @@ namespace TheOtherRoles
 
         private static Sprite placeBoxButtonSprite;
         private static Sprite lightOutButtonSprite;
+        private static Sprite tricksterVentButtonSprite;
+
         public static Sprite getPlaceBoxButtonSprite() {
             if (placeBoxButtonSprite) return placeBoxButtonSprite;
             placeBoxButtonSprite = Helpers.loadSpriteFromResources("TheOtherRoles.Resources.PlaceJackInTheBoxButton.png", 115f);
             return placeBoxButtonSprite;
         }
+
         public static Sprite getLightsOutButtonSprite() {
             if (lightOutButtonSprite) return lightOutButtonSprite;
             lightOutButtonSprite = Helpers.loadSpriteFromResources("TheOtherRoles.Resources.LightsOutButton.png", 115f);
             return lightOutButtonSprite;
         }
 
+        public static Sprite getTricksterVentButtonSprite() {
+            if (tricksterVentButtonSprite) return tricksterVentButtonSprite;
+            tricksterVentButtonSprite = Helpers.loadSpriteFromResources("TheOtherRoles.Resources.TricksterVentButton.png", 115f);
+            return tricksterVentButtonSprite;
+        }
+
         public static void clearAndReload() {
             trickster = null;
             lightsOutTimer = 0f;
index c28ef65b878c7f37b1c34771472e7a939b14caf4..81fd962211abc56f8480cca576d271a43d600255 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
     <PropertyGroup>
         <TargetFramework>netstandard2.1</TargetFramework>
-        <Version>2.2.0</Version>
+        <Version>2.2.1</Version>
 
         <Description>TheOtherRoles</Description>
         <Authors>Eisbison</Authors>
@@ -33,6 +33,7 @@
         <EmbeddedResource Include="Resources\GarlicButton.png" />
         <EmbeddedResource Include="Resources\LighterButton.png" />
         <EmbeddedResource Include="Resources\EraserButton.png" />
+        <EmbeddedResource Include="Resources\TricksterVentButton.png" />
         <EmbeddedResource Include="Resources\Arrow.png" />
         <EmbeddedResource Include="Resources\Garlic.png" />
         <EmbeddedResource Include="Resources\GarlicBackground.png" />
index 1b7f715555d6096ac3050ad77caffdce388afaff..c2ad4645c2a7469765420445d180e84e076e4c6e 100644 (file)
@@ -101,12 +101,18 @@ namespace TheOtherRoles
     [HarmonyPatch(typeof(UseButtonManager), nameof(UseButtonManager.SetTarget))]
     class UseButtonSetTargetPatch {
         static void Postfix(UseButtonManager __instance) {
-            if (__instance.LHAKKAAOLLM != null) return;
+            // Trickster render special vent button
+            if (__instance.LHAKKAAOLLM != null && Trickster.trickster != null && Trickster.trickster == PlayerControl.LocalPlayer) {
+                Vent possibleVent =  __instance.LHAKKAAOLLM.TryCast<Vent>();
+                if (possibleVent?.gameObject != null && possibleVent.gameObject.name.StartsWith("JackInTheBoxVent_")) {
+                    __instance.UseButton.sprite = Trickster.getTricksterVentButtonSprite();
+                }
+            }
 
             // Mafia sabotage button render patch
             bool blockSabotageJanitor = (Janitor.janitor != null && Janitor.janitor == PlayerControl.LocalPlayer);
             bool blockSabotageMafioso = (Mafioso.mafioso != null && Mafioso.mafioso == PlayerControl.LocalPlayer && Godfather.godfather != null && !Godfather.godfather.PPMOEEPBHJO.IAGJEKLJCCI);
-            if (blockSabotageJanitor || blockSabotageMafioso) {
+            if (__instance.LHAKKAAOLLM == null && (blockSabotageJanitor || blockSabotageMafioso)) {
                 __instance.UseButton.sprite = DestroyableSingleton<TranslationController>.CHNDKKBEIDG.GetImage(ImageNames.UseButton);
                 __instance.UseButton.color = new Color(1f, 1f, 1f, 0.3f);
             }