From: gendelo3 Date: Sat, 18 Jan 2025 18:03:54 +0000 (+0100) Subject: files for Update V4.7.0 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=4fdae9b71cb1e830fb5d80e8b380c243a45797a1;p=rhonda%2Ftheotherroles.git files for Update V4.7.0 --- diff --git a/README.md b/README.md index 7ac7ef6..162d39f 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Even more roles are coming soon. :) | [Cleaner](#cleaner) | [Swapper](#swapper) | [Thief](#thief) | [Invert](#invert) | | [Warlock](#warlock) | [Seer](#seer) | | [Chameleon](#chameleon) | | [Bounty Hunter](#bounty-hunter) | [Hacker](#hacker) | | [Shifter](#shifter) -| [Witch](#witch) | [Tracker](#tracker) | | | +| [Witch](#witch) | [Tracker](#tracker) | | [Armored](#armored) | | [Ninja](#ninja) | [Snitch](#snitch) | | | | [Bomber](#bomber) | [Spy](#spy) | | | | [Yo-Yo](#yoyo) | [Portalmaker](#portalmaker) | | | @@ -42,14 +42,16 @@ The [Role Assignment](#role-assignment) section explains how the roles are being # Releases | Among Us - Version| Mod Version | Link | |----------|-------------|-----------------| -| 2024.6.18s| v4.6.0| [Download](https://github.com/TheOtherRolesAU/TheOtherRoles/releases/download/v4.6.0/TheOtherRoles.zip) -| 2024.3.5s| v4.5.3| [Download](https://github.com/TheOtherRolesAU/TheOtherRoles/releases/download/v4.5.3/TheOtherRoles.zip) +| 2024.11.26| v4.7.0| [Download](https://github.com/TheOtherRolesAU/TheOtherRoles/releases/download/v4.7.0/TheOtherRoles.zip) +| 2024.6.18| v4.6.0| [Download](https://github.com/TheOtherRolesAU/TheOtherRoles/releases/download/v4.6.0/TheOtherRoles.zip) +
Click to show older versions | Among Us - Version| Mod Version | Link | |----------|-------------|-----------------| +| 2024.3.5s| v4.5.3| [Download](https://github.com/TheOtherRolesAU/TheOtherRoles/releases/download/v4.5.3/TheOtherRoles.zip) | 2024.3.5s| v4.5.2| [Download](https://github.com/TheOtherRolesAU/TheOtherRoles/releases/download/v4.5.2/TheOtherRoles.zip) | 2023.11.28s| v4.5.1| [Download](https://github.com/TheOtherRolesAU/TheOtherRoles/releases/download/v4.5.1/TheOtherRoles.zip) | 2023.11.28s| v4.5.0| [Download](https://github.com/TheOtherRolesAU/TheOtherRoles/releases/download/v4.5.0/TheOtherRoles.zip) @@ -133,9 +135,21 @@ The [Role Assignment](#role-assignment) section explains how the roles are being # Changelog
Click to show the Changelog + +**Version 4.7.0** +- Updated to Among Us version 2024.11.26 (Vanilla Updates) +- Added a new modifier, Armored. The first time the armored would die by an ordinary kill, they are protected by their Armor. (NesTT17 & Gendelo, idea by zFinnyX) +- Added the possibility to use the shift keys to (re-)join a lobby, if you just left a lobby or you have a lobby code copied to the clipboard. (twix & Gendelo) +- Added a setting to Guesser Mode: "Number Of Tasks Needed To Unlock Shooting For Crew Guesser" (NesTT17, idea by DracoL1ch & multiple other players) +- Fixed a bug with the Tracker's Proximity Meter - it now disappears after the meeting if the target is dead and no new target can be tracked. +- Fixed a bug with the "Fill Crewmates" option, where selecting a range for min/max neutral roles would often lead to players being plain crewmates without a role +- Fixed a bug where a passive lover death of a role that can suicide would sometimes give the medium incorrect info. +- Fixed a bug where the zoom out button would be shown to ghosts during meetings. +- Changed the way options are shown in the menu: Disabling an option (e.g. a role or modifier spawn chance) will now hide its depending sub-options again (like pre 4.6.0 with the old menu) +- Change: Significantly decreased the size of our mod by using compression. (Thanks to miniduikboat for giving us a gentle push) + - -** Version 4.6.0** +**Version 4.6.0** - Updated to Among Us version 2024.6.18 (Vanilla Update with new UI elements and many Server Side Changes) - Added a completely new UI for the Mod's Options, using the new Vanilla Design. - Added a button to switch gamemodes in the lobby @@ -145,7 +159,7 @@ The [Role Assignment](#role-assignment) section explains how the roles are being - Fixed a bug where guessing a player would sometimes not return the votes to the voters - Fixed a bug where the Lawyer would not properly die when guessing the client - Removed: Disabled Vanilla Servers for now, as the mod is incompatible with them in its / their current state. Thanks to Miniduikboat for making custom servers great again! -- Experimental: Advanded users can try to install the mod on the Windows Store Version of Among Us. No Support Provided! +- Experimental: Advanced users can try to install the mod on the Windows Store Version of Among Us. No Support Provided! **Version 4.5.3** @@ -929,13 +943,6 @@ You can configure: Please note, that if the configured option exceeds the available number of tasks of a map, the tasks will be limited to that number of tasks. \ Example: If you configure 4 common tasks on Airship crewmates will only receive 2 common tasks, as airship doesn't offer more than 2 common tasks. - -| Map | Common Tasks | Short Tasks | Long Tasks | -|----------|:-------------:|:-------------:|:-------------:| -| Skeld / Dleks | 2 | 19 | 8 -| Mira HQ | 2 | 13 | 11 -| Polus | 4 | 14 | 15 -| Airship | 2 | 23 | 15 ----------------------- ### Random Maps @@ -1019,7 +1026,8 @@ The Janitor is an Impostor who cannot kill, but they can hide dead bodies instea ## Morphling ### **Team: Impostors** -The Morphling is an Impostor which can additionally scan the appearance of a player. After an arbitrary time they can take on that appearance for 10s.\ +The Morphling is an Impostor which can additionally scan the appearance of a player.\ +After an arbitrary time they can take on that appearance for a set duration which can be changed in the options.\ \ **NOTE:** - They shrink to the size of the Mini when they copy its look. @@ -1319,6 +1327,7 @@ The Jester does not have any tasks. They win the game as a solo, if they get vot |----------|:-------------:| | Jester Spawn Chance | - | Jester Can Call Emergency Meeting | Option to disable the emergency button for the Jester +|Jester Has Impostor Vision | - ----------------------- ## Arsonist @@ -1332,7 +1341,7 @@ After dousing everyone alive the Arsonist can ignite all the players which resul | Name | Description | |----------|:-------------:| | Arsonist Spawn Chance | - -| Arsonist Countdown | - +| Arsonist Cooldown | - | Arsonist Douse Duration | The time it takes to douse a player ----------------------- @@ -1351,8 +1360,8 @@ The team Jackal enables multiple new outcomes of the game, listing some examples - The Crew could be eliminated, then the Team Jackal fight against the Impostors (The Crew can still make a task win in this scenario) The priority of the win conditions is the following: -1. Crewmate Mini lose by vote -2. Jester wins by vote +1. Jester wins by vote (even as Mini) +2. Crewmate Mini lose by vote 3. Arsonist win 4. Team Impostor wins by sabotage 5. Team Crew wins by tasks (also possible if the whole Crew is dead) @@ -1371,19 +1380,19 @@ If both Impostors and Jackals are in the game, the game continues even if all Cr ### Game Options | Name | Description |----------|:-------------:| -| Jackal Spawn Chance | - | -| Jackal/Sidekick Kill Cooldown | Kill cooldown | -| Jackal Create Sidekick Cooldown | Cooldown before a Sidekick can be created | -| Jackal can use vents | Yes/No | -| Jackal can sabotage Lights | Yes/No | -| Jackal can create a Sidekick | Yes/No | -| Sidekick gets promoted to Jackal on Jackal Death | Yes/No | -| Sidekick can kill | Yes/No | -| Sidekick can Vent | Yes/No | -| Jackal can sabotage Lights | Yes/No | -| Jackals promoted from Sidekick can create a Sidekick | Yes/No (to prevent the Jackal team from growing) | -| Jackals can make an Impostor to their Sidekick | Yes/No (to prevent a Jackal from turning an Impostor into a Sidekick, if they use the ability on an Impostor they see the Impostor as Sidekick, but the Impostor isn't converted to Sidekick. If this option is set to "No" Jackal and Sidekick can kill each other.) | -| Jackal and Sidekick have Impostor vision | - | +| Jackal Spawn Chance | - +| Jackal/Sidekick Kill Cooldown | Kill Cooldown +| Jackal Create Sidekick Cooldown | Cooldown before a Sidekick can be created +| Jackal Can Use Vents | Yes/No +| Jackal Can Sabotage Lights | Yes/No +| Jackal Can Create A Sidekick | Yes/No +| Sidekick Gets Promoted To Jackal On Jackal Death | Yes/No +| Sidekick Can Kill | Yes/No +| Sidekick Can Vent | Yes/No +| Sidekick Can Sabotage Lights | Yes/No +| Jackals Promoted From Sidekick Can Create A Sidekick | Yes/No (to prevent the Jackal team from growing) +| Jackals Can Make An Impostor To His Sidekick | Yes/No (to prevent a Jackal from turning an Impostor into a Sidekick, if they use the ability on an Impostor they see the Impostor as Sidekick, but the Impostor isn't converted to Sidekick. If this option is set to "No" Jackal and Sidekick can kill each other.) +| Jackal And Sidekick Have Impostor Vision | - ----------------------- ## Sidekick @@ -1400,9 +1409,9 @@ Upon the death of the Jackal (depending on the options), they might get promoted | Name | Description |----------|:-------------:| | Jackal/Sidekick Kill Cooldown | Uses the same kill cooldown setting as the Jackal | -| Sidekick gets promoted to Jackal on Jackal death | Yes/No | -| Sidekick can kill | Yes/No | -| Sidekick can use vents | Yes/No | +| Sidekick Gets Promoted To Jackal On Jackal Death | Yes/No | +| Sidekick Can Kill | Yes/No | +| Sidekick Can Use Vents | Yes/No | ----------------------- ## Vulture @@ -1536,7 +1545,6 @@ The Mayor has the option to vote with only one vote instead of two (via a button The Engineer (if alive) can fix a certain amount of sabotages per game from anywhere on the map.\ The Engineer can use vents.\ If the Engineer is inside a vent, depending on the options the members of the team Jackal/Impostors will see a blue outline around all vents on the map (in order to warn them).\ -Because of the vents the Engineer might not be able to start some tasks using the "Use" button, you can double-click on the tasks instead. **NOTE:** - The kill button of Impostors activates if they stand next to a vent where the Engineer is. They can also kill them there. No other action (e.g. Morphling sample, Shifter shift, ...) can affect players inside vents. @@ -1547,7 +1555,7 @@ Because of the vents the Engineer might not be able to start some tasks using th | Engineer Spawn Chance | - | Number Of Sabotage Fixes| - | Impostors See Vents Highlighted | - -| Jackal and Sidekick See Vents Highlighted | - +| Jackal And Sidekick See Vents Highlighted | - ----------------------- ## Sheriff @@ -1693,8 +1701,8 @@ The Swapper now has initial swap charges and can recharge those charges after co | Name | Description |----------|:-------------:| | Swapper Spawn Chance | - -| Swapper can call emergency meeting | Option to disable the emergency button for the Swapper -| Swapper can only swap others | Sets whether the Swapper can swap themself or not +| Swapper Can Call Emergency Meeting | Option to disable the emergency button for the Swapper +| Swapper Can Only Swap Others | Sets whether the Swapper can swap themself or not | Initial Swap Charges | - | Number Of Tasks Needed For Recharging | - ----------------------- @@ -1940,7 +1948,7 @@ If killed, the Bloody Modifier will leave a trail for x-seconds on their killer. |----------|:-------------:| | Bloody Spawn Chance | - | Bloody Quantity | - -| Trail duration | - +| Trail Duration | - ----------------------- ## Anti Teleport @@ -2035,7 +2043,7 @@ The vision will also be affected when lights out. |----------|:-------------:| | Sunglasses Spawn Chance | - | Sunglasses Quantity | - -| Vision with sunglasses | - +| Vision With Sunglasses | - ----------------------- ## Mini @@ -2140,6 +2148,22 @@ can only use them, if the previous player did not use them before) | Shifter Spawn Chance | - ----------------------- +## Armored + +The Armored is a Modifier that protects the player from the first shot that would have killed them. There can only be one Armored player per round. +\ +**NOTE:** +- Armored is only active during the round and does not protect from guesses or votes. +- Armored is applied after all other shields or protections, so that the Armor only breaks if the player would have otherwise died. +- If a killer tries to kill the Armored, they will see the Armor break with a nice animation. +- The Armored player has no indicator whatsoever if the Armor is still active, unless they break it (Warlock, Sheriff, Thief) + +### Game Options +| Name | Description +|----------|:-------------:| +| Armored Spawn Chance | - +----------------------- + # Gamemodes Gamemodes can be switched when creating a lobby or inside the lobby by using a command in the chat: `/gm `. Use the following gamemodes: `guess` or `gm`,`prophunt` or `ph`, `hidenseek` or `hns`. If `/gm` is used without argument or the argument can't be parsed, the lobby will switch to classic mode. @@ -2164,6 +2188,7 @@ Players can additionally have a modifier, if enabled (e.g. Medic Guesser Mini). | Guessers Can Have A Modifier | - | Guesser Number Of Shots | - | Guesser Can Shoot Multiple Times Per Meeting | - +| Number Of Tasks Needed To Unlock Shooting For Crew Guesser | - | Guesses Ignore The Medic Shield | - | Evil Guesser Can Guess The Spy | - | Guesser Can't Guess Snitch When Tasks Completed | - @@ -2250,7 +2275,7 @@ When a Prop dies, they will either join the Hunter team or die (setting). | Unstuck Duration | - | Kill Cooldown After Hit | - | Invisibility Duration | - | Hunter Vision | - | Reveal Prop Cooldown | - | Speedboost Enabled | - | Prop Vision | - | Reveal Prop Duration | - | Speedboost Cooldown | - -| | - | Reveal Time Punish | deducted from rem. timer | Speedboost Duration | - +| | - | Reveal Time Punish | Deducted from rem. timer | Speedboost Duration | - | | - | Hunter Admin Cooldown | - | Speedboost Ratio | Factor with which speed is multiplied | | - | Find Cooldown | - | | - | Find Duration | - diff --git a/TheOtherRoles/Buttons.cs b/TheOtherRoles/Buttons.cs index 7c56ec1..4884187 100644 --- a/TheOtherRoles/Buttons.cs +++ b/TheOtherRoles/Buttons.cs @@ -6,7 +6,6 @@ using static TheOtherRoles.TheOtherRoles; using TheOtherRoles.Objects; using System.Linq; using System.Collections.Generic; -using TheOtherRoles.Players; using TheOtherRoles.Utilities; using TheOtherRoles.CustomGameModes; using TheOtherRoles.Patches; @@ -209,10 +208,10 @@ namespace TheOtherRoles replacementHandcuffedButton.Timer = replacementHandcuffedButton.EffectDuration; replacementHandcuffedButton.actionButton.cooldownTimerText.color = new Color(0F, 0.8F, 0F); replacementHandcuffedButton.isEffectActive = true; - if (deputyHandcuffedButtons.ContainsKey(CachedPlayer.LocalPlayer.PlayerId)) - deputyHandcuffedButtons[CachedPlayer.LocalPlayer.PlayerId].Add(replacementHandcuffedButton); + if (deputyHandcuffedButtons.ContainsKey(PlayerControl.LocalPlayer.PlayerId)) + deputyHandcuffedButtons[PlayerControl.LocalPlayer.PlayerId].Add(replacementHandcuffedButton); else - deputyHandcuffedButtons.Add(CachedPlayer.LocalPlayer.PlayerId, new List { replacementHandcuffedButton }); + deputyHandcuffedButtons.Add(PlayerControl.LocalPlayer.PlayerId, new List { replacementHandcuffedButton }); } // Disables / Enables all Buttons (except the ones disabled in the Deputy class), and replaces them with new buttons. @@ -222,7 +221,7 @@ namespace TheOtherRoles deputyHandcuffedButtons = new Dictionary>(); return; } - if (handcuffed && !deputyHandcuffedButtons.ContainsKey(CachedPlayer.LocalPlayer.PlayerId)) + if (handcuffed && !deputyHandcuffedButtons.ContainsKey(PlayerControl.LocalPlayer.PlayerId)) { int maxI = CustomButton.buttons.Count; for (int i = 0; i < maxI; i++) @@ -244,19 +243,19 @@ namespace TheOtherRoles // Kill Button if enabled for the Role if (FastDestroyableSingleton.Instance.KillButton.isActiveAndEnabled) addReplacementHandcuffedButton(arsonistButton, CustomButton.ButtonPositions.upperRowRight, couldUse: () => { return FastDestroyableSingleton.Instance.KillButton.currentTarget != null; }); // Vent Button if enabled - if (CachedPlayer.LocalPlayer.PlayerControl.roleCanUseVents()) addReplacementHandcuffedButton(arsonistButton, CustomButton.ButtonPositions.upperRowCenter, couldUse: () => { return FastDestroyableSingleton.Instance.ImpostorVentButton.currentTarget != null; }); + if (PlayerControl.LocalPlayer.roleCanUseVents()) addReplacementHandcuffedButton(arsonistButton, CustomButton.ButtonPositions.upperRowCenter, couldUse: () => { return FastDestroyableSingleton.Instance.ImpostorVentButton.currentTarget != null; }); // Report Button - addReplacementHandcuffedButton(arsonistButton, (!CachedPlayer.LocalPlayer.Data.Role.IsImpostor) ? new Vector3(-1f, -0.06f, 0): CustomButton.ButtonPositions.lowerRowRight, () => { return FastDestroyableSingleton.Instance.ReportButton.graphic.color == Palette.EnabledColor; }); + addReplacementHandcuffedButton(arsonistButton, (!PlayerControl.LocalPlayer.Data.Role.IsImpostor) ? new Vector3(-1f, -0.06f, 0): CustomButton.ButtonPositions.lowerRowRight, () => { return FastDestroyableSingleton.Instance.ReportButton.graphic.color == Palette.EnabledColor; }); } - else if (!handcuffed && deputyHandcuffedButtons.ContainsKey(CachedPlayer.LocalPlayer.PlayerId)) // Reset to original. Disables the replacements, enables the original buttons. + else if (!handcuffed && deputyHandcuffedButtons.ContainsKey(PlayerControl.LocalPlayer.PlayerId)) // Reset to original. Disables the replacements, enables the original buttons. { - foreach (CustomButton replacementButton in deputyHandcuffedButtons[CachedPlayer.LocalPlayer.PlayerId]) + foreach (CustomButton replacementButton in deputyHandcuffedButtons[PlayerControl.LocalPlayer.PlayerId]) { replacementButton.HasButton = () => { return false; }; replacementButton.Update(); // To make it disappear properly. CustomButton.buttons.Remove(replacementButton); } - deputyHandcuffedButtons.Remove(CachedPlayer.LocalPlayer.PlayerId); + deputyHandcuffedButtons.Remove(PlayerControl.LocalPlayer.PlayerId); foreach (CustomButton button in CustomButton.buttons) { @@ -305,13 +304,13 @@ namespace TheOtherRoles engineerRepairButton = new CustomButton( () => { engineerRepairButton.Timer = 0f; - MessageWriter usedRepairWriter = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.EngineerUsedRepair, Hazel.SendOption.Reliable, -1); + MessageWriter usedRepairWriter = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.EngineerUsedRepair, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(usedRepairWriter); RPCProcedure.engineerUsedRepair(); SoundEffectsManager.play("engineerRepair"); - foreach (PlayerTask task in CachedPlayer.LocalPlayer.PlayerControl.myTasks.GetFastEnumerator()) { + foreach (PlayerTask task in PlayerControl.LocalPlayer.myTasks.GetFastEnumerator()) { if (task.TaskType == TaskTypes.FixLights) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.EngineerFixLights, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.EngineerFixLights, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.engineerFixLights(); } else if (task.TaskType == TaskTypes.RestoreOxy) { @@ -328,21 +327,21 @@ namespace TheOtherRoles MapUtilities.CachedShipStatus.RpcRepairSystem(SystemTypes.Reactor, 0 | 16); MapUtilities.CachedShipStatus.RpcRepairSystem(SystemTypes.Reactor, 1 | 16); } else if (SubmergedCompatibility.IsSubmerged && task.TaskType == SubmergedCompatibility.RetrieveOxygenMask) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.EngineerFixSubmergedOxygen, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.EngineerFixSubmergedOxygen, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.engineerFixSubmergedOxygen(); } } }, - () => { return Engineer.engineer != null && Engineer.engineer == CachedPlayer.LocalPlayer.PlayerControl && Engineer.remainingFixes > 0 && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return Engineer.engineer != null && Engineer.engineer == PlayerControl.LocalPlayer && Engineer.remainingFixes > 0 && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { bool sabotageActive = false; - foreach (PlayerTask task in CachedPlayer.LocalPlayer.PlayerControl.myTasks.GetFastEnumerator()) + foreach (PlayerTask task in PlayerControl.LocalPlayer.myTasks.GetFastEnumerator()) if (task.TaskType == TaskTypes.FixLights || task.TaskType == TaskTypes.RestoreOxy || task.TaskType == TaskTypes.ResetReactor || task.TaskType == TaskTypes.ResetSeismic || task.TaskType == TaskTypes.FixComms || task.TaskType == TaskTypes.StopCharles || SubmergedCompatibility.IsSubmerged && task.TaskType == SubmergedCompatibility.RetrieveOxygenMask) sabotageActive = true; - return sabotageActive && Engineer.remainingFixes > 0 && CachedPlayer.LocalPlayer.PlayerControl.CanMove; + return sabotageActive && Engineer.remainingFixes > 0 && PlayerControl.LocalPlayer.CanMove; }, () => {}, Engineer.getButtonSprite(), @@ -354,19 +353,19 @@ namespace TheOtherRoles // Janitor Clean janitorCleanButton = new CustomButton( () => { - foreach (Collider2D collider2D in Physics2D.OverlapCircleAll(CachedPlayer.LocalPlayer.PlayerControl.GetTruePosition(), CachedPlayer.LocalPlayer.PlayerControl.MaxReportDistance, Constants.PlayersOnlyMask)) { + foreach (Collider2D collider2D in Physics2D.OverlapCircleAll(PlayerControl.LocalPlayer.GetTruePosition(), PlayerControl.LocalPlayer.MaxReportDistance, Constants.PlayersOnlyMask)) { if (collider2D.tag == "DeadBody") { DeadBody component = collider2D.GetComponent(); if (component && !component.Reported) { - Vector2 truePosition = CachedPlayer.LocalPlayer.PlayerControl.GetTruePosition(); + Vector2 truePosition = PlayerControl.LocalPlayer.GetTruePosition(); Vector2 truePosition2 = component.TruePosition; - if (Vector2.Distance(truePosition2, truePosition) <= CachedPlayer.LocalPlayer.PlayerControl.MaxReportDistance && CachedPlayer.LocalPlayer.PlayerControl.CanMove && !PhysicsHelpers.AnythingBetween(truePosition, truePosition2, Constants.ShipAndObjectsMask, false)) + if (Vector2.Distance(truePosition2, truePosition) <= PlayerControl.LocalPlayer.MaxReportDistance && PlayerControl.LocalPlayer.CanMove && !PhysicsHelpers.AnythingBetween(truePosition, truePosition2, Constants.ShipAndObjectsMask, false)) { NetworkedPlayerInfo playerInfo = GameData.Instance.GetPlayerById(component.ParentId); - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.CleanBody, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.CleanBody, Hazel.SendOption.Reliable, -1); writer.Write(playerInfo.PlayerId); writer.Write(Janitor.janitor.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -380,8 +379,8 @@ namespace TheOtherRoles } } }, - () => { return Janitor.janitor != null && Janitor.janitor == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return __instance.ReportButton.graphic.color == Palette.EnabledColor && CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Janitor.janitor != null && Janitor.janitor == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return __instance.ReportButton.graphic.color == Palette.EnabledColor && PlayerControl.LocalPlayer.CanMove; }, () => { janitorCleanButton.Timer = janitorCleanButton.MaxTimer; }, Janitor.getButtonSprite(), CustomButton.ButtonPositions.upperRowLeft, @@ -404,10 +403,13 @@ namespace TheOtherRoles targetId = Sheriff.currentTarget.PlayerId; } else { - targetId = CachedPlayer.LocalPlayer.PlayerId; + targetId = PlayerControl.LocalPlayer.PlayerId; } - MessageWriter killWriter = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1); + // Armored sheriff shot doesnt kill if backfired + if (targetId == Sheriff.sheriff.PlayerId && Helpers.checkArmored(Sheriff.sheriff, true, true)) + return; + MessageWriter killWriter = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1); killWriter.Write(Sheriff.sheriff.Data.PlayerId); killWriter.Write(targetId); killWriter.Write(byte.MaxValue); @@ -418,8 +420,8 @@ namespace TheOtherRoles sheriffKillButton.Timer = sheriffKillButton.MaxTimer; Sheriff.currentTarget = null; }, - () => { return Sheriff.sheriff != null && Sheriff.sheriff == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return Sheriff.currentTarget && CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Sheriff.sheriff != null && Sheriff.sheriff == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return Sheriff.currentTarget && PlayerControl.LocalPlayer.CanMove; }, () => { sheriffKillButton.Timer = sheriffKillButton.MaxTimer;}, __instance.KillButton.graphic.sprite, CustomButton.ButtonPositions.upperRowRight, @@ -431,9 +433,9 @@ namespace TheOtherRoles deputyHandcuffButton = new CustomButton( () => { byte targetId = 0; - targetId = Sheriff.sheriff == CachedPlayer.LocalPlayer.PlayerControl ? Sheriff.currentTarget.PlayerId : Deputy.currentTarget.PlayerId; // If the deputy is now the sheriff, sheriffs target, else deputies target + targetId = Sheriff.sheriff == PlayerControl.LocalPlayer ? Sheriff.currentTarget.PlayerId : Deputy.currentTarget.PlayerId; // If the deputy is now the sheriff, sheriffs target, else deputies target - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.DeputyUsedHandcuffs, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.DeputyUsedHandcuffs, Hazel.SendOption.Reliable, -1); writer.Write(targetId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.deputyUsedHandcuffs(targetId); @@ -442,10 +444,10 @@ namespace TheOtherRoles SoundEffectsManager.play("deputyHandcuff"); }, - () => { return (Deputy.deputy != null && Deputy.deputy == CachedPlayer.LocalPlayer.PlayerControl || Sheriff.sheriff != null && Sheriff.sheriff == CachedPlayer.LocalPlayer.PlayerControl && Sheriff.sheriff == Sheriff.formerDeputy && Deputy.keepsHandcuffsOnPromotion) && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return (Deputy.deputy != null && Deputy.deputy == PlayerControl.LocalPlayer || Sheriff.sheriff != null && Sheriff.sheriff == PlayerControl.LocalPlayer && Sheriff.sheriff == Sheriff.formerDeputy && Deputy.keepsHandcuffsOnPromotion) && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { if (deputyButtonHandcuffsText != null) deputyButtonHandcuffsText.text = $"{Deputy.remainingHandcuffs}"; - return ((Deputy.deputy != null && Deputy.deputy == CachedPlayer.LocalPlayer.PlayerControl && Deputy.currentTarget || Sheriff.sheriff != null && Sheriff.sheriff == CachedPlayer.LocalPlayer.PlayerControl && Sheriff.sheriff == Sheriff.formerDeputy && Sheriff.currentTarget) && Deputy.remainingHandcuffs > 0 && CachedPlayer.LocalPlayer.PlayerControl.CanMove); + return ((Deputy.deputy != null && Deputy.deputy == PlayerControl.LocalPlayer && Deputy.currentTarget || Sheriff.sheriff != null && Sheriff.sheriff == PlayerControl.LocalPlayer && Sheriff.sheriff == Sheriff.formerDeputy && Sheriff.currentTarget) && Deputy.remainingHandcuffs > 0 && PlayerControl.LocalPlayer.CanMove); }, () => { deputyHandcuffButton.Timer = deputyHandcuffButton.MaxTimer; }, Deputy.getButtonSprite(), @@ -463,13 +465,13 @@ namespace TheOtherRoles // Time Master Rewind Time timeMasterShieldButton = new CustomButton( () => { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.TimeMasterShield, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.TimeMasterShield, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.timeMasterShield(); SoundEffectsManager.play("timemasterShield"); }, - () => { return TimeMaster.timeMaster != null && TimeMaster.timeMaster == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return TimeMaster.timeMaster != null && TimeMaster.timeMaster == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return PlayerControl.LocalPlayer.CanMove; }, () => { timeMasterShieldButton.Timer = timeMasterShieldButton.MaxTimer; timeMasterShieldButton.isEffectActive = false; @@ -493,7 +495,7 @@ namespace TheOtherRoles () => { medicShieldButton.Timer = 0f; - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, Medic.setShieldAfterMeeting ? (byte)CustomRPC.SetFutureShielded : (byte)CustomRPC.MedicSetShielded, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, Medic.setShieldAfterMeeting ? (byte)CustomRPC.SetFutureShielded : (byte)CustomRPC.MedicSetShielded, Hazel.SendOption.Reliable, -1); writer.Write(Medic.currentTarget.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); if (Medic.setShieldAfterMeeting) @@ -504,8 +506,8 @@ namespace TheOtherRoles SoundEffectsManager.play("medicShield"); }, - () => { return Medic.medic != null && Medic.medic == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return !Medic.usedShield && Medic.currentTarget && CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Medic.medic != null && Medic.medic == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return !Medic.usedShield && Medic.currentTarget && PlayerControl.LocalPlayer.CanMove; }, () => {}, Medic.getButtonSprite(), CustomButton.ButtonPositions.lowerRowRight, @@ -517,14 +519,14 @@ namespace TheOtherRoles // Shifter shift shifterShiftButton = new CustomButton( () => { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetFutureShifted, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetFutureShifted, Hazel.SendOption.Reliable, -1); writer.Write(Shifter.currentTarget.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.setFutureShifted(Shifter.currentTarget.PlayerId); SoundEffectsManager.play("shifterShift"); }, - () => { return Shifter.shifter != null && Shifter.shifter == CachedPlayer.LocalPlayer.PlayerControl && Shifter.futureShift == null && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return Shifter.currentTarget && Shifter.futureShift == null && CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Shifter.shifter != null && Shifter.shifter == PlayerControl.LocalPlayer && Shifter.futureShift == null && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return Shifter.currentTarget && Shifter.futureShift == null && PlayerControl.LocalPlayer.CanMove; }, () => { }, Shifter.getButtonSprite(), new Vector3(0, 1f, 0), @@ -538,7 +540,7 @@ namespace TheOtherRoles morphlingButton = new CustomButton( () => { if (Morphling.sampledTarget != null) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.MorphlingMorph, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.MorphlingMorph, Hazel.SendOption.Reliable, -1); writer.Write(Morphling.sampledTarget.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.morphlingMorph(Morphling.sampledTarget.PlayerId); @@ -555,8 +557,8 @@ namespace TheOtherRoles setButtonTargetDisplay(Morphling.sampledTarget, morphlingButton); } }, - () => { return Morphling.morphling != null && Morphling.morphling == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return (Morphling.currentTarget || Morphling.sampledTarget) && CachedPlayer.LocalPlayer.PlayerControl.CanMove && !Helpers.MushroomSabotageActive(); }, + () => { return Morphling.morphling != null && Morphling.morphling == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return (Morphling.currentTarget || Morphling.sampledTarget) && PlayerControl.LocalPlayer.CanMove && !Helpers.MushroomSabotageActive(); }, () => { morphlingButton.Timer = morphlingButton.MaxTimer; morphlingButton.Sprite = Morphling.getSampleSprite(); @@ -586,13 +588,13 @@ namespace TheOtherRoles // Camouflager camouflage camouflagerButton = new CustomButton( () => { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.CamouflagerCamouflage, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.CamouflagerCamouflage, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.camouflagerCamouflage(); SoundEffectsManager.play("morphlingMorph"); }, - () => { return Camouflager.camouflager != null && Camouflager.camouflager == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Camouflager.camouflager != null && Camouflager.camouflager == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return PlayerControl.LocalPlayer.CanMove; }, () => { camouflagerButton.Timer = camouflagerButton.MaxTimer; camouflagerButton.isEffectActive = false; @@ -616,7 +618,7 @@ namespace TheOtherRoles Hacker.hackerTimer = Hacker.duration; SoundEffectsManager.play("hackerHack"); }, - () => { return Hacker.hacker != null && Hacker.hacker == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return Hacker.hacker != null && Hacker.hacker == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { return true; }, () => { hackerButton.Timer = hackerButton.MaxTimer; @@ -639,11 +641,11 @@ namespace TheOtherRoles __instance.InitMap(); MapBehaviour.Instance.ShowCountOverlay(allowedToMove: true, showLivePlayerPosition: true, includeDeadBodies: true); } - if (Hacker.cantMove) CachedPlayer.LocalPlayer.PlayerControl.moveable = false; - CachedPlayer.LocalPlayer.NetTransform.Halt(); // Stop current movement + if (Hacker.cantMove) PlayerControl.LocalPlayer.moveable = false; + PlayerControl.LocalPlayer.NetTransform.Halt(); // Stop current movement Hacker.chargesAdminTable--; }, - () => { return Hacker.hacker != null && Hacker.hacker == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead;}, + () => { return Hacker.hacker != null && Hacker.hacker == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead;}, () => { if (hackerAdminTableChargesText != null) hackerAdminTableChargesText.text = $"{Hacker.chargesAdminTable} / {Hacker.toolsNumber}"; return Hacker.chargesAdminTable > 0; @@ -661,7 +663,7 @@ namespace TheOtherRoles 0f, () => { hackerAdminTableButton.Timer = hackerAdminTableButton.MaxTimer; - if (!hackerVitalsButton.isEffectActive) CachedPlayer.LocalPlayer.PlayerControl.moveable = true; + if (!hackerVitalsButton.isEffectActive) PlayerControl.LocalPlayer.moveable = true; if (MapBehaviour.Instance && MapBehaviour.Instance.isActiveAndEnabled) MapBehaviour.Instance.Close(); }, GameOptionsManager.Instance.currentNormalGameOptions.MapId == 3, @@ -697,12 +699,12 @@ namespace TheOtherRoles Hacker.doorLog.Begin(null); } - if (Hacker.cantMove) CachedPlayer.LocalPlayer.PlayerControl.moveable = false; - CachedPlayer.LocalPlayer.NetTransform.Halt(); // Stop current movement + if (Hacker.cantMove) PlayerControl.LocalPlayer.moveable = false; + PlayerControl.LocalPlayer.NetTransform.Halt(); // Stop current movement Hacker.chargesVitals--; }, - () => { return Hacker.hacker != null && Hacker.hacker == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead && GameOptionsManager.Instance.currentGameOptions.MapId != 0 && GameOptionsManager.Instance.currentNormalGameOptions.MapId != 3; }, + () => { return Hacker.hacker != null && Hacker.hacker == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead && GameOptionsManager.Instance.currentGameOptions.MapId != 0 && GameOptionsManager.Instance.currentNormalGameOptions.MapId != 3; }, () => { if (hackerVitalsChargesText != null) hackerVitalsChargesText.text = $"{Hacker.chargesVitals} / {Hacker.toolsNumber}"; hackerVitalsButton.actionButton.graphic.sprite = Helpers.isMira() ? Hacker.getLogSprite() : Hacker.getVitalsSprite(); @@ -722,7 +724,7 @@ namespace TheOtherRoles 0f, () => { hackerVitalsButton.Timer = hackerVitalsButton.MaxTimer; - if (!hackerAdminTableButton.isEffectActive) CachedPlayer.LocalPlayer.PlayerControl.moveable = true; + if (!hackerAdminTableButton.isEffectActive) PlayerControl.LocalPlayer.moveable = true; if (Minigame.Instance) { if (Helpers.isMira()) Hacker.doorLog.ForceClose(); else Hacker.vitals.ForceClose(); @@ -742,15 +744,16 @@ namespace TheOtherRoles // Tracker button trackerTrackPlayerButton = new CustomButton( () => { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.TrackerUsedTracker, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.TrackerUsedTracker, Hazel.SendOption.Reliable, -1); writer.Write(Tracker.currentTarget.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.trackerUsedTracker(Tracker.currentTarget.PlayerId); SoundEffectsManager.play("trackerTrackPlayer"); }, - () => { return Tracker.tracker != null && Tracker.tracker == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return CachedPlayer.LocalPlayer.PlayerControl.CanMove && Tracker.currentTarget != null && !Tracker.usedTracker; }, - () => { if(Tracker.resetTargetAfterMeeting) Tracker.resetTracked(); }, + () => { return Tracker.tracker != null && Tracker.tracker == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return PlayerControl.LocalPlayer.CanMove && Tracker.currentTarget != null && !Tracker.usedTracker; }, + () => { if (Tracker.resetTargetAfterMeeting) Tracker.resetTracked(); + else if (Tracker.currentTarget != null && Tracker.currentTarget.Data.IsDead) Tracker.currentTarget = null; }, Tracker.getButtonSprite(), CustomButton.ButtonPositions.lowerRowRight, __instance, @@ -760,8 +763,8 @@ namespace TheOtherRoles trackerTrackCorpsesButton = new CustomButton( () => { Tracker.corpsesTrackingTimer = Tracker.corpsesTrackingDuration; SoundEffectsManager.play("trackerTrackCorpses"); }, - () => { return Tracker.tracker != null && Tracker.tracker == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead && Tracker.canTrackCorpses; }, - () => { return CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Tracker.tracker != null && Tracker.tracker == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead && Tracker.canTrackCorpses; }, + () => { return PlayerControl.LocalPlayer.CanMove; }, () => { trackerTrackCorpsesButton.Timer = trackerTrackCorpsesButton.MaxTimer; trackerTrackCorpsesButton.isEffectActive = false; @@ -783,7 +786,7 @@ namespace TheOtherRoles MurderAttemptResult murder = Helpers.checkMuderAttempt(Vampire.vampire, Vampire.currentTarget); if (murder == MurderAttemptResult.PerformKill) { if (Vampire.targetNearGarlic) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1); writer.Write(Vampire.vampire.PlayerId); writer.Write(Vampire.currentTarget.PlayerId); writer.Write(Byte.MaxValue); @@ -795,7 +798,7 @@ namespace TheOtherRoles } else { Vampire.bitten = Vampire.currentTarget; // Notify players about bitten - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.VampireSetBitten, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.VampireSetBitten, Hazel.SendOption.Reliable, -1); writer.Write(Vampire.bitten.PlayerId); writer.Write((byte)0); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -807,8 +810,8 @@ namespace TheOtherRoles byte timer = (byte)vampireKillButton.Timer; if (timer != lastTimer) { lastTimer = timer; - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write((byte)RPCProcedure.GhostInfoTypes.VampireTimer); writer.Write(timer); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -818,7 +821,7 @@ namespace TheOtherRoles // Perform kill if possible and reset bitten (regardless whether the kill was successful or not) var res = Helpers.checkMurderAttemptAndKill(Vampire.vampire, Vampire.bitten, showAnimation: false); if (res == MurderAttemptResult.PerformKill) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.VampireSetBitten, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.VampireSetBitten, Hazel.SendOption.Reliable, -1); writer.Write(byte.MaxValue); writer.Write(byte.MaxValue); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -837,7 +840,7 @@ namespace TheOtherRoles vampireKillButton.HasEffect = false; } }, - () => { return Vampire.vampire != null && Vampire.vampire == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return Vampire.vampire != null && Vampire.vampire == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { if (Vampire.targetNearGarlic && Vampire.canKillNearGarlics) { vampireKillButton.actionButton.graphic.sprite = __instance.KillButton.graphic.sprite; @@ -847,7 +850,7 @@ namespace TheOtherRoles vampireKillButton.actionButton.graphic.sprite = Vampire.getButtonSprite(); vampireKillButton.showButtonText = false; } - return Vampire.currentTarget != null && CachedPlayer.LocalPlayer.PlayerControl.CanMove && (!Vampire.targetNearGarlic || Vampire.canKillNearGarlics); + return Vampire.currentTarget != null && PlayerControl.LocalPlayer.CanMove && (!Vampire.targetNearGarlic || Vampire.canKillNearGarlics); }, () => { vampireKillButton.Timer = vampireKillButton.MaxTimer; @@ -868,19 +871,19 @@ namespace TheOtherRoles garlicButton = new CustomButton( () => { Vampire.localPlacedGarlic = true; - var pos = CachedPlayer.LocalPlayer.transform.position; + var pos = PlayerControl.LocalPlayer.transform.position; byte[] buff = new byte[sizeof(float) * 2]; Buffer.BlockCopy(BitConverter.GetBytes(pos.x), 0, buff, 0*sizeof(float), sizeof(float)); Buffer.BlockCopy(BitConverter.GetBytes(pos.y), 0, buff, 1*sizeof(float), sizeof(float)); - MessageWriter writer = AmongUsClient.Instance.StartRpc(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.PlaceGarlic, Hazel.SendOption.Reliable); + MessageWriter writer = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.PlaceGarlic, Hazel.SendOption.Reliable); writer.WriteBytesAndSize(buff); writer.EndMessage(); RPCProcedure.placeGarlic(buff); SoundEffectsManager.play("garlic"); }, - () => { return !Vampire.localPlacedGarlic && !CachedPlayer.LocalPlayer.Data.IsDead && Vampire.garlicsActive && !HideNSeek.isHideNSeekGM && !PropHunt.isPropHuntGM; }, - () => { return CachedPlayer.LocalPlayer.PlayerControl.CanMove && !Vampire.localPlacedGarlic; }, + () => { return !Vampire.localPlacedGarlic && !PlayerControl.LocalPlayer.Data.IsDead && Vampire.garlicsActive && !HideNSeek.isHideNSeekGM && !PropHunt.isPropHuntGM; }, + () => { return PlayerControl.LocalPlayer.CanMove && !Vampire.localPlacedGarlic; }, () => { }, Vampire.getGarlicButtonSprite(), new Vector3(0, -0.06f, 0), @@ -893,19 +896,19 @@ namespace TheOtherRoles () => { portalmakerPlacePortalButton.Timer = portalmakerPlacePortalButton.MaxTimer; - var pos = CachedPlayer.LocalPlayer.transform.position; + var pos = PlayerControl.LocalPlayer.transform.position; byte[] buff = new byte[sizeof(float) * 2]; Buffer.BlockCopy(BitConverter.GetBytes(pos.x), 0, buff, 0 * sizeof(float), sizeof(float)); Buffer.BlockCopy(BitConverter.GetBytes(pos.y), 0, buff, 1 * sizeof(float), sizeof(float)); - MessageWriter writer = AmongUsClient.Instance.StartRpc(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.PlacePortal, Hazel.SendOption.Reliable); + MessageWriter writer = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.PlacePortal, Hazel.SendOption.Reliable); writer.WriteBytesAndSize(buff); writer.EndMessage(); RPCProcedure.placePortal(buff); SoundEffectsManager.play("tricksterPlaceBox"); }, - () => { return Portalmaker.portalmaker != null && Portalmaker.portalmaker == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead && Portal.secondPortal == null; }, - () => { return CachedPlayer.LocalPlayer.PlayerControl.CanMove && Portal.secondPortal == null; }, + () => { return Portalmaker.portalmaker != null && Portalmaker.portalmaker == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead && Portal.secondPortal == null; }, + () => { return PlayerControl.LocalPlayer.CanMove && Portal.secondPortal == null; }, () => { portalmakerPlacePortalButton.Timer = portalmakerPlacePortalButton.MaxTimer; }, Portalmaker.getPlacePortalButtonSprite(), CustomButton.ButtonPositions.lowerRowRight, @@ -916,47 +919,47 @@ namespace TheOtherRoles usePortalButton = new CustomButton( () => { bool didTeleport = false; - Vector3 exit = Portal.findExit(CachedPlayer.LocalPlayer.transform.position); - Vector3 entry = Portal.findEntry(CachedPlayer.LocalPlayer.transform.position); + Vector3 exit = Portal.findExit(PlayerControl.LocalPlayer.transform.position); + Vector3 entry = Portal.findEntry(PlayerControl.LocalPlayer.transform.position); - bool portalMakerSoloTeleport = !Portal.locationNearEntry(CachedPlayer.LocalPlayer.transform.position); + bool portalMakerSoloTeleport = !Portal.locationNearEntry(PlayerControl.LocalPlayer.transform.position); if (portalMakerSoloTeleport) { exit = Portal.firstPortal.portalGameObject.transform.position; - entry = CachedPlayer.LocalPlayer.transform.position; + entry = PlayerControl.LocalPlayer.transform.position; } - CachedPlayer.LocalPlayer.NetTransform.RpcSnapTo(entry); + PlayerControl.LocalPlayer.NetTransform.RpcSnapTo(entry); - if (!CachedPlayer.LocalPlayer.Data.IsDead) { // Ghosts can portal too, but non-blocking and only with a local animation - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.UsePortal, Hazel.SendOption.Reliable, -1); - writer.Write((byte)CachedPlayer.LocalPlayer.PlayerId); + if (!PlayerControl.LocalPlayer.Data.IsDead) { // Ghosts can portal too, but non-blocking and only with a local animation + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UsePortal, Hazel.SendOption.Reliable, -1); + writer.Write((byte)PlayerControl.LocalPlayer.PlayerId); writer.Write(portalMakerSoloTeleport ? (byte)1 : (byte)0); AmongUsClient.Instance.FinishRpcImmediately(writer); } - RPCProcedure.usePortal(CachedPlayer.LocalPlayer.PlayerId, portalMakerSoloTeleport ? (byte)1 : (byte)0); + RPCProcedure.usePortal(PlayerControl.LocalPlayer.PlayerId, portalMakerSoloTeleport ? (byte)1 : (byte)0); usePortalButton.Timer = usePortalButton.MaxTimer; portalmakerMoveToPortalButton.Timer = usePortalButton.MaxTimer; SoundEffectsManager.play("portalUse"); FastDestroyableSingleton.Instance.StartCoroutine(Effects.Lerp(Portal.teleportDuration, new Action((p) => { // Delayed action - CachedPlayer.LocalPlayer.PlayerControl.moveable = false; - CachedPlayer.LocalPlayer.NetTransform.Halt(); + PlayerControl.LocalPlayer.moveable = false; + PlayerControl.LocalPlayer.NetTransform.Halt(); if (p >= 0.5f && p <= 0.53f && !didTeleport && !MeetingHud.Instance) { if (SubmergedCompatibility.IsSubmerged) { SubmergedCompatibility.ChangeFloor(exit.y > -7); } - CachedPlayer.LocalPlayer.NetTransform.RpcSnapTo(exit); + PlayerControl.LocalPlayer.NetTransform.RpcSnapTo(exit); didTeleport = true; } if (p == 1f) { - CachedPlayer.LocalPlayer.PlayerControl.moveable = true; + PlayerControl.LocalPlayer.moveable = true; } }))); }, () => { - if (CachedPlayer.LocalPlayer.PlayerControl == Portalmaker.portalmaker && Portal.bothPlacedAndEnabled) - portalmakerButtonText1.text = Portal.locationNearEntry(CachedPlayer.LocalPlayer.transform.position) || !Portalmaker.canPortalFromAnywhere ? "" : "1. " + Portal.firstPortal.room; + if (PlayerControl.LocalPlayer == Portalmaker.portalmaker && Portal.bothPlacedAndEnabled) + portalmakerButtonText1.text = Portal.locationNearEntry(PlayerControl.LocalPlayer.transform.position) || !Portalmaker.canPortalFromAnywhere ? "" : "1. " + Portal.firstPortal.room; return Portal.bothPlacedAndEnabled; }, - () => { return CachedPlayer.LocalPlayer.PlayerControl.CanMove && (Portal.locationNearEntry(CachedPlayer.LocalPlayer.transform.position) || Portalmaker.canPortalFromAnywhere && CachedPlayer.LocalPlayer.PlayerControl == Portalmaker.portalmaker) && !Portal.isTeleporting; }, + () => { return PlayerControl.LocalPlayer.CanMove && (Portal.locationNearEntry(PlayerControl.LocalPlayer.transform.position) || Portalmaker.canPortalFromAnywhere && PlayerControl.LocalPlayer == Portalmaker.portalmaker) && !Portal.isTeleporting; }, () => { usePortalButton.Timer = usePortalButton.MaxTimer; }, Portalmaker.getUsePortalButtonSprite(), new Vector3(0.9f, -0.06f, 0), @@ -970,33 +973,33 @@ namespace TheOtherRoles bool didTeleport = false; Vector3 exit = Portal.secondPortal.portalGameObject.transform.position; - if (!CachedPlayer.LocalPlayer.Data.IsDead) { // Ghosts can portal too, but non-blocking and only with a local animation - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.UsePortal, Hazel.SendOption.Reliable, -1); - writer.Write((byte)CachedPlayer.LocalPlayer.PlayerId); + if (!PlayerControl.LocalPlayer.Data.IsDead) { // Ghosts can portal too, but non-blocking and only with a local animation + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UsePortal, Hazel.SendOption.Reliable, -1); + writer.Write((byte)PlayerControl.LocalPlayer.PlayerId); writer.Write((byte)2); AmongUsClient.Instance.FinishRpcImmediately(writer); } - RPCProcedure.usePortal(CachedPlayer.LocalPlayer.PlayerId, 2); + RPCProcedure.usePortal(PlayerControl.LocalPlayer.PlayerId, 2); usePortalButton.Timer = usePortalButton.MaxTimer; portalmakerMoveToPortalButton.Timer = usePortalButton.MaxTimer; SoundEffectsManager.play("portalUse"); FastDestroyableSingleton.Instance.StartCoroutine(Effects.Lerp(Portal.teleportDuration, new Action((p) => { // Delayed action - CachedPlayer.LocalPlayer.PlayerControl.moveable = false; - CachedPlayer.LocalPlayer.NetTransform.Halt(); + PlayerControl.LocalPlayer.moveable = false; + PlayerControl.LocalPlayer.NetTransform.Halt(); if (p >= 0.5f && p <= 0.53f && !didTeleport && !MeetingHud.Instance) { if (SubmergedCompatibility.IsSubmerged) { SubmergedCompatibility.ChangeFloor(exit.y > -7); } - CachedPlayer.LocalPlayer.NetTransform.RpcSnapTo(exit); + PlayerControl.LocalPlayer.NetTransform.RpcSnapTo(exit); didTeleport = true; } if (p == 1f) { - CachedPlayer.LocalPlayer.PlayerControl.moveable = true; + PlayerControl.LocalPlayer.moveable = true; } }))); }, - () => { return Portalmaker.canPortalFromAnywhere && Portal.bothPlacedAndEnabled && CachedPlayer.LocalPlayer.PlayerControl == Portalmaker.portalmaker; }, - () => { return CachedPlayer.LocalPlayer.PlayerControl.CanMove && !Portal.locationNearEntry(CachedPlayer.LocalPlayer.transform.position) && !Portal.isTeleporting; }, + () => { return Portalmaker.canPortalFromAnywhere && Portal.bothPlacedAndEnabled && PlayerControl.LocalPlayer == Portalmaker.portalmaker; }, + () => { return PlayerControl.LocalPlayer.CanMove && !Portal.locationNearEntry(PlayerControl.LocalPlayer.transform.position) && !Portal.isTeleporting; }, () => { portalmakerMoveToPortalButton.Timer = usePortalButton.MaxTimer; }, Portalmaker.getUsePortalButtonSprite(), new Vector3(0.9f, 1f, 0), @@ -1023,14 +1026,14 @@ namespace TheOtherRoles // Jackal Sidekick Button jackalSidekickButton = new CustomButton( () => { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.JackalCreatesSidekick, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.JackalCreatesSidekick, Hazel.SendOption.Reliable, -1); writer.Write(Jackal.currentTarget.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.jackalCreatesSidekick(Jackal.currentTarget.PlayerId); SoundEffectsManager.play("jackalSidekick"); }, - () => { return Jackal.canCreateSidekick && Jackal.jackal != null && Jackal.jackal == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return Jackal.canCreateSidekick && Jackal.currentTarget != null && CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Jackal.canCreateSidekick && Jackal.jackal != null && Jackal.jackal == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return Jackal.canCreateSidekick && Jackal.currentTarget != null && PlayerControl.LocalPlayer.CanMove; }, () => { jackalSidekickButton.Timer = jackalSidekickButton.MaxTimer;}, Jackal.getSidekickButtonSprite(), CustomButton.ButtonPositions.lowerRowCenter, @@ -1046,8 +1049,8 @@ namespace TheOtherRoles jackalKillButton.Timer = jackalKillButton.MaxTimer; Jackal.currentTarget = null; }, - () => { return Jackal.jackal != null && Jackal.jackal == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return Jackal.currentTarget && CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Jackal.jackal != null && Jackal.jackal == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return Jackal.currentTarget && PlayerControl.LocalPlayer.CanMove; }, () => { jackalKillButton.Timer = jackalKillButton.MaxTimer;}, __instance.KillButton.graphic.sprite, CustomButton.ButtonPositions.upperRowRight, @@ -1062,8 +1065,8 @@ namespace TheOtherRoles sidekickKillButton.Timer = sidekickKillButton.MaxTimer; Sidekick.currentTarget = null; }, - () => { return Sidekick.canKill && Sidekick.sidekick != null && Sidekick.sidekick == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return Sidekick.currentTarget && CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Sidekick.canKill && Sidekick.sidekick != null && Sidekick.sidekick == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return Sidekick.currentTarget && PlayerControl.LocalPlayer.CanMove; }, () => { sidekickKillButton.Timer = sidekickKillButton.MaxTimer;}, __instance.KillButton.graphic.sprite, CustomButton.ButtonPositions.upperRowRight, @@ -1074,10 +1077,11 @@ namespace TheOtherRoles jackalAndSidekickSabotageLightsButton = new CustomButton( () => { ShipStatus.Instance.RpcUpdateSystem(SystemTypes.Sabotage, (byte)SystemTypes.Electrical); + SoundEffectsManager.play("ligherLight"); }, () => { - return (Jackal.jackal != null && Jackal.jackal == CachedPlayer.LocalPlayer.PlayerControl && Jackal.canSabotageLights || - Sidekick.sidekick != null && Sidekick.sidekick == CachedPlayer.LocalPlayer.PlayerControl && Sidekick.canSabotageLights) && !CachedPlayer.LocalPlayer.Data.IsDead; + return (Jackal.jackal != null && Jackal.jackal == PlayerControl.LocalPlayer && Jackal.canSabotageLights || + Sidekick.sidekick != null && Sidekick.sidekick == PlayerControl.LocalPlayer && Sidekick.canSabotageLights) && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { if (Helpers.sabotageTimer() > jackalAndSidekickSabotageLightsButton.Timer || Helpers.sabotageActive()) @@ -1098,14 +1102,14 @@ namespace TheOtherRoles eraserButton.MaxTimer += 10; eraserButton.Timer = eraserButton.MaxTimer; - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetFutureErased, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetFutureErased, Hazel.SendOption.Reliable, -1); writer.Write(Eraser.currentTarget.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.setFutureErased(Eraser.currentTarget.PlayerId); SoundEffectsManager.play("eraserErase"); }, - () => { return Eraser.eraser != null && Eraser.eraser == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return CachedPlayer.LocalPlayer.PlayerControl.CanMove && Eraser.currentTarget != null; }, + () => { return Eraser.eraser != null && Eraser.eraser == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return PlayerControl.LocalPlayer.CanMove && Eraser.currentTarget != null; }, () => { eraserButton.Timer = eraserButton.MaxTimer;}, Eraser.getButtonSprite(), CustomButton.ButtonPositions.upperRowLeft, @@ -1117,19 +1121,19 @@ namespace TheOtherRoles () => { placeJackInTheBoxButton.Timer = placeJackInTheBoxButton.MaxTimer; - var pos = CachedPlayer.LocalPlayer.transform.position; + var pos = PlayerControl.LocalPlayer.transform.position; byte[] buff = new byte[sizeof(float) * 2]; Buffer.BlockCopy(BitConverter.GetBytes(pos.x), 0, buff, 0*sizeof(float), sizeof(float)); Buffer.BlockCopy(BitConverter.GetBytes(pos.y), 0, buff, 1*sizeof(float), sizeof(float)); - MessageWriter writer = AmongUsClient.Instance.StartRpc(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.PlaceJackInTheBox, Hazel.SendOption.Reliable); + MessageWriter writer = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.PlaceJackInTheBox, Hazel.SendOption.Reliable); writer.WriteBytesAndSize(buff); writer.EndMessage(); RPCProcedure.placeJackInTheBox(buff); SoundEffectsManager.play("tricksterPlaceBox"); }, - () => { return Trickster.trickster != null && Trickster.trickster == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead && !JackInTheBox.hasJackInTheBoxLimitReached(); }, - () => { return CachedPlayer.LocalPlayer.PlayerControl.CanMove && !JackInTheBox.hasJackInTheBoxLimitReached(); }, + () => { return Trickster.trickster != null && Trickster.trickster == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead && !JackInTheBox.hasJackInTheBoxLimitReached(); }, + () => { return PlayerControl.LocalPlayer.CanMove && !JackInTheBox.hasJackInTheBoxLimitReached(); }, () => { placeJackInTheBoxButton.Timer = placeJackInTheBoxButton.MaxTimer;}, Trickster.getPlaceBoxButtonSprite(), CustomButton.ButtonPositions.upperRowLeft, @@ -1139,14 +1143,14 @@ namespace TheOtherRoles lightsOutButton = new CustomButton( () => { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.LightsOut, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.LightsOut, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.lightsOut(); SoundEffectsManager.play("lighterLight"); }, - () => { return Trickster.trickster != null && Trickster.trickster == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead + () => { return Trickster.trickster != null && Trickster.trickster == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead && JackInTheBox.hasJackInTheBoxLimitReached() && JackInTheBox.boxesConvertedToVents; }, - () => { return CachedPlayer.LocalPlayer.PlayerControl.CanMove && JackInTheBox.hasJackInTheBoxLimitReached() && JackInTheBox.boxesConvertedToVents; }, + () => { return PlayerControl.LocalPlayer.CanMove && JackInTheBox.hasJackInTheBoxLimitReached() && JackInTheBox.boxesConvertedToVents; }, () => { lightsOutButton.Timer = lightsOutButton.MaxTimer; lightsOutButton.isEffectActive = false; @@ -1167,19 +1171,19 @@ namespace TheOtherRoles // Cleaner Clean cleanerCleanButton = new CustomButton( () => { - foreach (Collider2D collider2D in Physics2D.OverlapCircleAll(CachedPlayer.LocalPlayer.PlayerControl.GetTruePosition(), CachedPlayer.LocalPlayer.PlayerControl.MaxReportDistance, Constants.PlayersOnlyMask)) { + foreach (Collider2D collider2D in Physics2D.OverlapCircleAll(PlayerControl.LocalPlayer.GetTruePosition(), PlayerControl.LocalPlayer.MaxReportDistance, Constants.PlayersOnlyMask)) { if (collider2D.tag == "DeadBody") { DeadBody component = collider2D.GetComponent(); if (component && !component.Reported) { - Vector2 truePosition = CachedPlayer.LocalPlayer.PlayerControl.GetTruePosition(); + Vector2 truePosition = PlayerControl.LocalPlayer.GetTruePosition(); Vector2 truePosition2 = component.TruePosition; - if (Vector2.Distance(truePosition2, truePosition) <= CachedPlayer.LocalPlayer.PlayerControl.MaxReportDistance && CachedPlayer.LocalPlayer.PlayerControl.CanMove && !PhysicsHelpers.AnythingBetween(truePosition, truePosition2, Constants.ShipAndObjectsMask, false)) + if (Vector2.Distance(truePosition2, truePosition) <= PlayerControl.LocalPlayer.MaxReportDistance && PlayerControl.LocalPlayer.CanMove && !PhysicsHelpers.AnythingBetween(truePosition, truePosition2, Constants.ShipAndObjectsMask, false)) { NetworkedPlayerInfo playerInfo = GameData.Instance.GetPlayerById(component.ParentId); - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.CleanBody, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.CleanBody, Hazel.SendOption.Reliable, -1); writer.Write(playerInfo.PlayerId); writer.Write(Cleaner.cleaner.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -1193,8 +1197,8 @@ namespace TheOtherRoles } } }, - () => { return Cleaner.cleaner != null && Cleaner.cleaner == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return __instance.ReportButton.graphic.color == Palette.EnabledColor && CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Cleaner.cleaner != null && Cleaner.cleaner == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return __instance.ReportButton.graphic.color == Palette.EnabledColor && PlayerControl.LocalPlayer.CanMove; }, () => { cleanerCleanButton.Timer = cleanerCleanButton.MaxTimer; }, Cleaner.getButtonSprite(), CustomButton.ButtonPositions.upperRowLeft, @@ -1213,8 +1217,8 @@ namespace TheOtherRoles SoundEffectsManager.play("warlockCurse"); // Ghost Info - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write((byte)RPCProcedure.GhostInfoTypes.WarlockTarget); writer.Write(Warlock.curseVictim.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -1225,12 +1229,12 @@ namespace TheOtherRoles // If blanked or killed if(Warlock.rootTime > 0) { - AntiTeleport.position = CachedPlayer.LocalPlayer.transform.position; - CachedPlayer.LocalPlayer.PlayerControl.moveable = false; - CachedPlayer.LocalPlayer.NetTransform.Halt(); // Stop current movement so the warlock is not just running straight into the next object + AntiTeleport.position = PlayerControl.LocalPlayer.transform.position; + PlayerControl.LocalPlayer.moveable = false; + PlayerControl.LocalPlayer.NetTransform.Halt(); // Stop current movement so the warlock is not just running straight into the next object FastDestroyableSingleton.Instance.StartCoroutine(Effects.Lerp(Warlock.rootTime, new Action((p) => { // Delayed action if (p == 1f) { - CachedPlayer.LocalPlayer.PlayerControl.moveable = true; + PlayerControl.LocalPlayer.moveable = true; } }))); } @@ -1240,16 +1244,16 @@ namespace TheOtherRoles warlockCurseButton.Sprite = Warlock.getCurseButtonSprite(); Warlock.warlock.killTimer = warlockCurseButton.Timer = warlockCurseButton.MaxTimer; - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write((byte)RPCProcedure.GhostInfoTypes.WarlockTarget); writer.Write(Byte.MaxValue); // This will set it to null! AmongUsClient.Instance.FinishRpcImmediately(writer); } }, - () => { return Warlock.warlock != null && Warlock.warlock == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return ((Warlock.curseVictim == null && Warlock.currentTarget != null) || (Warlock.curseVictim != null && Warlock.curseVictimTarget != null)) && CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Warlock.warlock != null && Warlock.warlock == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return ((Warlock.curseVictim == null && Warlock.currentTarget != null) || (Warlock.curseVictim != null && Warlock.curseVictimTarget != null)) && PlayerControl.LocalPlayer.CanMove; }, () => { warlockCurseButton.Timer = warlockCurseButton.MaxTimer; warlockCurseButton.Sprite = Warlock.getCurseButtonSprite(); @@ -1266,19 +1270,19 @@ namespace TheOtherRoles securityGuardButton = new CustomButton( () => { if (SecurityGuard.ventTarget != null) { // Seal vent - MessageWriter writer = AmongUsClient.Instance.StartRpc(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SealVent, Hazel.SendOption.Reliable); + MessageWriter writer = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SealVent, Hazel.SendOption.Reliable); writer.WritePacked(SecurityGuard.ventTarget.Id); writer.EndMessage(); RPCProcedure.sealVent(SecurityGuard.ventTarget.Id); SecurityGuard.ventTarget = null; } else if (!Helpers.isMira() && !Helpers.isFungle() && !SubmergedCompatibility.IsSubmerged) { // Place camera if there's no vent and it's not MiraHQ or Submerged - var pos = CachedPlayer.LocalPlayer.transform.position; + var pos = PlayerControl.LocalPlayer.transform.position; byte[] buff = new byte[sizeof(float) * 2]; Buffer.BlockCopy(BitConverter.GetBytes(pos.x), 0, buff, 0*sizeof(float), sizeof(float)); Buffer.BlockCopy(BitConverter.GetBytes(pos.y), 0, buff, 1*sizeof(float), sizeof(float)); - MessageWriter writer = AmongUsClient.Instance.StartRpc(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.PlaceCamera, Hazel.SendOption.Reliable); + MessageWriter writer = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.PlaceCamera, Hazel.SendOption.Reliable); writer.WriteBytesAndSize(buff); writer.EndMessage(); RPCProcedure.placeCamera(buff); @@ -1286,14 +1290,14 @@ namespace TheOtherRoles SoundEffectsManager.play("securityGuardPlaceCam"); // Same sound used for both types (cam or vent)! securityGuardButton.Timer = securityGuardButton.MaxTimer; }, - () => { return SecurityGuard.securityGuard != null && SecurityGuard.securityGuard == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead && SecurityGuard.remainingScrews >= Mathf.Min(SecurityGuard.ventPrice, SecurityGuard.camPrice); }, + () => { return SecurityGuard.securityGuard != null && SecurityGuard.securityGuard == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead && SecurityGuard.remainingScrews >= Mathf.Min(SecurityGuard.ventPrice, SecurityGuard.camPrice); }, () => { securityGuardButton.actionButton.graphic.sprite = (SecurityGuard.ventTarget == null && !Helpers.isMira() && !Helpers.isFungle() && !SubmergedCompatibility.IsSubmerged) ? SecurityGuard.getPlaceCameraButtonSprite() : SecurityGuard.getCloseVentButtonSprite(); if (securityGuardButtonScrewsText != null) securityGuardButtonScrewsText.text = $"{SecurityGuard.remainingScrews}/{SecurityGuard.totalScrews}"; if (SecurityGuard.ventTarget != null) - return SecurityGuard.remainingScrews >= SecurityGuard.ventPrice && CachedPlayer.LocalPlayer.PlayerControl.CanMove; - return !Helpers.isMira() && !Helpers.isFungle() && !SubmergedCompatibility.IsSubmerged && SecurityGuard.remainingScrews >= SecurityGuard.camPrice && CachedPlayer.LocalPlayer.PlayerControl.CanMove; + return SecurityGuard.remainingScrews >= SecurityGuard.ventPrice && PlayerControl.LocalPlayer.CanMove; + return !Helpers.isMira() && !Helpers.isFungle() && !SubmergedCompatibility.IsSubmerged && SecurityGuard.remainingScrews >= SecurityGuard.camPrice && PlayerControl.LocalPlayer.CanMove; }, () => { securityGuardButton.Timer = securityGuardButton.MaxTimer; }, SecurityGuard.getPlaceCameraButtonSprite(), @@ -1335,18 +1339,18 @@ namespace TheOtherRoles } SecurityGuard.charges--; - if (SecurityGuard.cantMove) CachedPlayer.LocalPlayer.PlayerControl.moveable = false; - CachedPlayer.LocalPlayer.NetTransform.Halt(); // Stop current movement + if (SecurityGuard.cantMove) PlayerControl.LocalPlayer.moveable = false; + PlayerControl.LocalPlayer.NetTransform.Halt(); // Stop current movement }, () => { - return SecurityGuard.securityGuard != null && SecurityGuard.securityGuard == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead && SecurityGuard.remainingScrews < Mathf.Min(SecurityGuard.ventPrice, SecurityGuard.camPrice) + return SecurityGuard.securityGuard != null && SecurityGuard.securityGuard == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead && SecurityGuard.remainingScrews < Mathf.Min(SecurityGuard.ventPrice, SecurityGuard.camPrice) && !SubmergedCompatibility.IsSubmerged; }, () => { if (securityGuardChargesText != null) securityGuardChargesText.text = $"{SecurityGuard.charges} / {SecurityGuard.maxCharges}"; securityGuardCamButton.actionButton.graphic.sprite = Helpers.isMira() ? SecurityGuard.getLogSprite() : SecurityGuard.getCamSprite(); securityGuardCamButton.actionButton.OverrideText(Helpers.isMira() ? "DOORLOG" : "SECURITY"); - return CachedPlayer.LocalPlayer.PlayerControl.CanMove && SecurityGuard.charges > 0; + return PlayerControl.LocalPlayer.CanMove && SecurityGuard.charges > 0; }, () => { securityGuardCamButton.Timer = securityGuardCamButton.MaxTimer; @@ -1364,7 +1368,7 @@ namespace TheOtherRoles if (Minigame.Instance) { SecurityGuard.minigame.ForceClose(); } - CachedPlayer.LocalPlayer.PlayerControl.moveable = true; + PlayerControl.LocalPlayer.moveable = true; }, false, Helpers.isMira() ? "DOORLOG" : "SECURITY" @@ -1382,7 +1386,7 @@ namespace TheOtherRoles () => { bool dousedEveryoneAlive = Arsonist.dousedEveryoneAlive(); if (dousedEveryoneAlive) { - MessageWriter winWriter = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ArsonistWin, Hazel.SendOption.Reliable, -1); + MessageWriter winWriter = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ArsonistWin, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(winWriter); RPCProcedure.arsonistWin(); arsonistButton.HasEffect = false; @@ -1392,7 +1396,7 @@ namespace TheOtherRoles SoundEffectsManager.play("arsonistDouse"); } }, - () => { return Arsonist.arsonist != null && Arsonist.arsonist == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return Arsonist.arsonist != null && Arsonist.arsonist == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { bool dousedEveryoneAlive = Arsonist.dousedEveryoneAlive(); if (dousedEveryoneAlive) arsonistButton.actionButton.graphic.sprite = Arsonist.getIgniteSprite(); @@ -1403,7 +1407,7 @@ namespace TheOtherRoles arsonistButton.isEffectActive = false; } - return CachedPlayer.LocalPlayer.PlayerControl.CanMove && (dousedEveryoneAlive || Arsonist.currentTarget != null); + return PlayerControl.LocalPlayer.CanMove && (dousedEveryoneAlive || Arsonist.currentTarget != null); }, () => { arsonistButton.Timer = arsonistButton.MaxTimer; @@ -1428,8 +1432,8 @@ namespace TheOtherRoles } // Ghost Info - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write((byte)RPCProcedure.GhostInfoTypes.ArsonistDouse); writer.Write(Arsonist.douseTarget.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -1441,16 +1445,16 @@ namespace TheOtherRoles // Vulture Eat vultureEatButton = new CustomButton( () => { - foreach (Collider2D collider2D in Physics2D.OverlapCircleAll(CachedPlayer.LocalPlayer.PlayerControl.GetTruePosition(), CachedPlayer.LocalPlayer.PlayerControl.MaxReportDistance, Constants.PlayersOnlyMask)) { + foreach (Collider2D collider2D in Physics2D.OverlapCircleAll(PlayerControl.LocalPlayer.GetTruePosition(), PlayerControl.LocalPlayer.MaxReportDistance, Constants.PlayersOnlyMask)) { if (collider2D.tag == "DeadBody") { DeadBody component = collider2D.GetComponent(); if (component && !component.Reported) { - Vector2 truePosition = CachedPlayer.LocalPlayer.PlayerControl.GetTruePosition(); + Vector2 truePosition = PlayerControl.LocalPlayer.GetTruePosition(); Vector2 truePosition2 = component.TruePosition; - if (Vector2.Distance(truePosition2, truePosition) <= CachedPlayer.LocalPlayer.PlayerControl.MaxReportDistance && CachedPlayer.LocalPlayer.PlayerControl.CanMove && !PhysicsHelpers.AnythingBetween(truePosition, truePosition2, Constants.ShipAndObjectsMask, false)) { + if (Vector2.Distance(truePosition2, truePosition) <= PlayerControl.LocalPlayer.MaxReportDistance && PlayerControl.LocalPlayer.CanMove && !PhysicsHelpers.AnythingBetween(truePosition, truePosition2, Constants.ShipAndObjectsMask, false)) { NetworkedPlayerInfo playerInfo = GameData.Instance.GetPlayerById(component.ParentId); - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.CleanBody, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.CleanBody, Hazel.SendOption.Reliable, -1); writer.Write(playerInfo.PlayerId); writer.Write(Vulture.vulture.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -1464,8 +1468,8 @@ namespace TheOtherRoles } } }, - () => { return Vulture.vulture != null && Vulture.vulture == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return __instance.ReportButton.graphic.color == Palette.EnabledColor && CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Vulture.vulture != null && Vulture.vulture == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return __instance.ReportButton.graphic.color == Palette.EnabledColor && PlayerControl.LocalPlayer.CanMove; }, () => { vultureEatButton.Timer = vultureEatButton.MaxTimer; }, Vulture.getButtonSprite(), CustomButton.ButtonPositions.lowerRowCenter, @@ -1482,14 +1486,14 @@ namespace TheOtherRoles SoundEffectsManager.play("mediumAsk"); } }, - () => { return Medium.medium != null && Medium.medium == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return Medium.medium != null && Medium.medium == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { if (mediumButton.isEffectActive && Medium.target != Medium.soulTarget) { Medium.soulTarget = null; mediumButton.Timer = 0f; mediumButton.isEffectActive = false; } - return Medium.target != null && CachedPlayer.LocalPlayer.PlayerControl.CanMove; + return Medium.target != null && PlayerControl.LocalPlayer.CanMove; }, () => { mediumButton.Timer = mediumButton.MaxTimer; @@ -1505,11 +1509,11 @@ namespace TheOtherRoles () => { mediumButton.Timer = mediumButton.MaxTimer; if (Medium.target == null || Medium.target.player == null) return; - string msg = Medium.getInfo(Medium.target.player, Medium.target.killerIfExisting); - FastDestroyableSingleton.Instance.Chat.AddChat(CachedPlayer.LocalPlayer.PlayerControl, msg); + string msg = Medium.getInfo(Medium.target.player, Medium.target.killerIfExisting, Medium.target.deathReason); + FastDestroyableSingleton.Instance.Chat.AddChat(PlayerControl.LocalPlayer, msg); // Ghost Info - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); writer.Write(Medium.target.player.PlayerId); writer.Write((byte)RPCProcedure.GhostInfoTypes.MediumInfo); writer.Write(msg); @@ -1529,7 +1533,7 @@ namespace TheOtherRoles } foreach (SpriteRenderer rend in Medium.souls) { - float distance = Vector2.Distance(rend.transform.position, CachedPlayer.LocalPlayer.PlayerControl.GetTruePosition()); + float distance = Vector2.Distance(rend.transform.position, PlayerControl.LocalPlayer.GetTruePosition()); if (distance < closestDistance) { closestDistance = distance; target = rend; @@ -1555,7 +1559,7 @@ namespace TheOtherRoles pursuerButton = new CustomButton( () => { if (Pursuer.target != null) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetBlanked, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetBlanked, Hazel.SendOption.Reliable, -1); writer.Write(Pursuer.target.PlayerId); writer.Write(Byte.MaxValue); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -1569,11 +1573,11 @@ namespace TheOtherRoles } }, - () => { return Pursuer.pursuer != null && Pursuer.pursuer == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead && Pursuer.blanks < Pursuer.blanksNumber; }, + () => { return Pursuer.pursuer != null && Pursuer.pursuer == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead && Pursuer.blanks < Pursuer.blanksNumber; }, () => { if (pursuerButtonBlanksText != null) pursuerButtonBlanksText.text = $"{Pursuer.blanksNumber - Pursuer.blanks}"; - return Pursuer.blanksNumber > Pursuer.blanks && CachedPlayer.LocalPlayer.PlayerControl.CanMove && Pursuer.target != null; + return Pursuer.blanksNumber > Pursuer.blanks && PlayerControl.LocalPlayer.CanMove && Pursuer.target != null; }, () => { pursuerButton.Timer = pursuerButton.MaxTimer; }, Pursuer.getTargetSprite(), @@ -1598,14 +1602,14 @@ namespace TheOtherRoles SoundEffectsManager.play("witchSpell"); } }, - () => { return Witch.witch != null && Witch.witch == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return Witch.witch != null && Witch.witch == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { if (witchSpellButton.isEffectActive && Witch.spellCastingTarget != Witch.currentTarget) { Witch.spellCastingTarget = null; witchSpellButton.Timer = 0f; witchSpellButton.isEffectActive = false; } - return CachedPlayer.LocalPlayer.PlayerControl.CanMove && Witch.currentTarget != null; + return PlayerControl.LocalPlayer.CanMove && Witch.currentTarget != null; }, () => { witchSpellButton.Timer = witchSpellButton.MaxTimer; @@ -1622,7 +1626,7 @@ namespace TheOtherRoles if (Witch.spellCastingTarget == null) return; MurderAttemptResult attempt = Helpers.checkMuderAttempt(Witch.witch, Witch.spellCastingTarget); if (attempt == MurderAttemptResult.PerformKill) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetFutureSpelled, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetFutureSpelled, Hazel.SendOption.Reliable, -1); writer.Write(Witch.currentTarget.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.setFutureSpelled(Witch.currentTarget.PlayerId); @@ -1633,7 +1637,7 @@ namespace TheOtherRoles Patches.PlayerControlFixedUpdatePatch.miniCooldownUpdate(); // Modifies the MaxTimer if the witch is the mini witchSpellButton.Timer = witchSpellButton.MaxTimer; if (Witch.triggerBothCooldowns) { - float multiplier = (Mini.mini != null && CachedPlayer.LocalPlayer.PlayerControl == Mini.mini) ? (Mini.isGrownUp() ? 0.66f : 2f) : 1f; + float multiplier = (Mini.mini != null && PlayerControl.LocalPlayer == Mini.mini) ? (Mini.isGrownUp() ? 0.66f : 2f) : 1f; Witch.witch.killTimer = GameOptionsManager.Instance.currentNormalGameOptions.KillCooldown * multiplier; } } else { @@ -1652,32 +1656,32 @@ namespace TheOtherRoles MurderAttemptResult attempt = Helpers.checkMuderAttempt(Ninja.ninja, Ninja.ninjaMarked); if (attempt == MurderAttemptResult.PerformKill) { // Create first trace before killing - var pos = CachedPlayer.LocalPlayer.transform.position; + var pos = PlayerControl.LocalPlayer.transform.position; byte[] buff = new byte[sizeof(float) * 2]; Buffer.BlockCopy(BitConverter.GetBytes(pos.x), 0, buff, 0 * sizeof(float), sizeof(float)); Buffer.BlockCopy(BitConverter.GetBytes(pos.y), 0, buff, 1 * sizeof(float), sizeof(float)); - writer = AmongUsClient.Instance.StartRpc(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.PlaceNinjaTrace, Hazel.SendOption.Reliable); + writer = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.PlaceNinjaTrace, Hazel.SendOption.Reliable); writer.WriteBytesAndSize(buff); writer.EndMessage(); RPCProcedure.placeNinjaTrace(buff); - MessageWriter invisibleWriter = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetInvisible, Hazel.SendOption.Reliable, -1); + MessageWriter invisibleWriter = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetInvisible, Hazel.SendOption.Reliable, -1); invisibleWriter.Write(Ninja.ninja.PlayerId); invisibleWriter.Write(byte.MinValue); AmongUsClient.Instance.FinishRpcImmediately(invisibleWriter); RPCProcedure.setInvisible(Ninja.ninja.PlayerId, byte.MinValue); // Perform Kill - MessageWriter writer2 = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1); - writer2.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer2 = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1); + writer2.Write(PlayerControl.LocalPlayer.PlayerId); writer2.Write(Ninja.ninjaMarked.PlayerId); writer2.Write(byte.MaxValue); AmongUsClient.Instance.FinishRpcImmediately(writer2); if (SubmergedCompatibility.IsSubmerged) { SubmergedCompatibility.ChangeFloor(Ninja.ninjaMarked.transform.localPosition.y > -7); } - RPCProcedure.uncheckedMurderPlayer(CachedPlayer.LocalPlayer.PlayerId, Ninja.ninjaMarked.PlayerId, byte.MaxValue); + RPCProcedure.uncheckedMurderPlayer(PlayerControl.LocalPlayer.PlayerId, Ninja.ninjaMarked.PlayerId, byte.MaxValue); // Create Second trace after killing pos = Ninja.ninjaMarked.transform.position; @@ -1685,7 +1689,7 @@ namespace TheOtherRoles Buffer.BlockCopy(BitConverter.GetBytes(pos.x), 0, buff, 0 * sizeof(float), sizeof(float)); Buffer.BlockCopy(BitConverter.GetBytes(pos.y), 0, buff, 1 * sizeof(float), sizeof(float)); - MessageWriter writer3 = AmongUsClient.Instance.StartRpc(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.PlaceNinjaTrace, Hazel.SendOption.Reliable); + MessageWriter writer3 = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.PlaceNinjaTrace, Hazel.SendOption.Reliable); writer3.WriteBytesAndSize(buff); writer3.EndMessage(); RPCProcedure.placeNinjaTrace(buff); @@ -1706,17 +1710,17 @@ namespace TheOtherRoles SoundEffectsManager.play("warlockCurse"); // Ghost Info - writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write((byte)RPCProcedure.GhostInfoTypes.NinjaMarked); writer.Write(Ninja.ninjaMarked.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); } }, - () => { return Ninja.ninja != null && Ninja.ninja == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return Ninja.ninja != null && Ninja.ninja == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { // CouldUse ninjaButton.Sprite = Ninja.ninjaMarked != null ? Ninja.getKillButtonSprite() : Ninja.getMarkButtonSprite(); - return (Ninja.currentTarget != null || Ninja.ninjaMarked != null && !TransportationToolPatches.isUsingTransportation(Ninja.ninjaMarked)) && CachedPlayer.LocalPlayer.PlayerControl.CanMove; + return (Ninja.currentTarget != null || Ninja.ninjaMarked != null && !TransportationToolPatches.isUsingTransportation(Ninja.ninjaMarked)) && PlayerControl.LocalPlayer.CanMove; }, () => { // on meeting ends ninjaButton.Timer = ninjaButton.MaxTimer; @@ -1730,26 +1734,26 @@ namespace TheOtherRoles mayorMeetingButton = new CustomButton( () => { - CachedPlayer.LocalPlayer.NetTransform.Halt(); // Stop current movement + PlayerControl.LocalPlayer.NetTransform.Halt(); // Stop current movement Mayor.remoteMeetingsLeft--; Helpers.handleVampireBiteOnBodyReport(); // Manually call Vampire handling, since the CmdReportDeadBody Prefix won't be called - RPCProcedure.uncheckedCmdReportDeadBody(CachedPlayer.LocalPlayer.PlayerId, Byte.MaxValue); + RPCProcedure.uncheckedCmdReportDeadBody(PlayerControl.LocalPlayer.PlayerId, Byte.MaxValue); - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.UncheckedCmdReportDeadBody, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UncheckedCmdReportDeadBody, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write(Byte.MaxValue); AmongUsClient.Instance.FinishRpcImmediately(writer); mayorMeetingButton.Timer = 1f; }, - () => { return Mayor.mayor != null && Mayor.mayor == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead && Mayor.meetingButton; }, + () => { return Mayor.mayor != null && Mayor.mayor == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead && Mayor.meetingButton; }, () => { mayorMeetingButton.actionButton.OverrideText("Emergency ("+ Mayor.remoteMeetingsLeft + ")"); bool sabotageActive = false; - foreach (PlayerTask task in CachedPlayer.LocalPlayer.PlayerControl.myTasks.GetFastEnumerator()) + foreach (PlayerTask task in PlayerControl.LocalPlayer.myTasks.GetFastEnumerator()) if (task.TaskType == TaskTypes.FixLights || task.TaskType == TaskTypes.RestoreOxy || task.TaskType == TaskTypes.ResetReactor || task.TaskType == TaskTypes.ResetSeismic || task.TaskType == TaskTypes.FixComms || task.TaskType == TaskTypes.StopCharles || SubmergedCompatibility.IsSubmerged && task.TaskType == SubmergedCompatibility.RetrieveOxygenMask) sabotageActive = true; - return !sabotageActive && CachedPlayer.LocalPlayer.PlayerControl.CanMove && (Mayor.remoteMeetingsLeft > 0); + return !sabotageActive && PlayerControl.LocalPlayer.CanMove && (Mayor.remoteMeetingsLeft > 0); }, () => { mayorMeetingButton.Timer = mayorMeetingButton.MaxTimer; }, Mayor.getMeetingSprite(), @@ -1768,12 +1772,12 @@ namespace TheOtherRoles () => { - var pos = CachedPlayer.LocalPlayer.transform.position; + var pos = PlayerControl.LocalPlayer.transform.position; byte[] buff = new byte[sizeof(float) * 2]; Buffer.BlockCopy(BitConverter.GetBytes(pos.x), 0, buff, 0 * sizeof(float), sizeof(float)); Buffer.BlockCopy(BitConverter.GetBytes(pos.y), 0, buff, 1 * sizeof(float), sizeof(float)); - MessageWriter writer = AmongUsClient.Instance.StartRpc(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetTrap, Hazel.SendOption.Reliable); + MessageWriter writer = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetTrap, Hazel.SendOption.Reliable); writer.WriteBytesAndSize(buff); writer.EndMessage(); RPCProcedure.setTrap(buff); @@ -1781,10 +1785,10 @@ namespace TheOtherRoles SoundEffectsManager.play("trapperTrap"); trapperButton.Timer = trapperButton.MaxTimer; }, - () => { return Trapper.trapper != null && Trapper.trapper == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return Trapper.trapper != null && Trapper.trapper == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { if (trapperChargesText != null) trapperChargesText.text = $"{Trapper.charges} / {Trapper.maxCharges}"; - return CachedPlayer.LocalPlayer.PlayerControl.CanMove && Trapper.charges > 0; + return PlayerControl.LocalPlayer.CanMove && Trapper.charges > 0; }, () => { trapperButton.Timer = trapperButton.MaxTimer; }, Trapper.getButtonSprite(), @@ -1797,12 +1801,12 @@ namespace TheOtherRoles bomberButton = new CustomButton( () => { if (Helpers.checkMuderAttempt(Bomber.bomber, Bomber.bomber, ignoreMedic: true) != MurderAttemptResult.BlankKill) { - var pos = CachedPlayer.LocalPlayer.transform.position; + var pos = PlayerControl.LocalPlayer.transform.position; byte[] buff = new byte[sizeof(float) * 2]; Buffer.BlockCopy(BitConverter.GetBytes(pos.x), 0, buff, 0 * sizeof(float), sizeof(float)); Buffer.BlockCopy(BitConverter.GetBytes(pos.y), 0, buff, 1 * sizeof(float), sizeof(float)); - MessageWriter writer = AmongUsClient.Instance.StartRpc(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.PlaceBomb, Hazel.SendOption.Reliable); + MessageWriter writer = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.PlaceBomb, Hazel.SendOption.Reliable); writer.WriteBytesAndSize(buff); writer.EndMessage(); RPCProcedure.placeBomb(buff); @@ -1813,8 +1817,8 @@ namespace TheOtherRoles bomberButton.Timer = bomberButton.MaxTimer; Bomber.isPlanted = true; }, - () => { return Bomber.bomber != null && Bomber.bomber == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return CachedPlayer.LocalPlayer.PlayerControl.CanMove && !Bomber.isPlanted; }, + () => { return Bomber.bomber != null && Bomber.bomber == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return PlayerControl.LocalPlayer.CanMove && !Bomber.isPlanted; }, () => { bomberButton.Timer = bomberButton.MaxTimer; }, Bomber.getButtonSprite(), CustomButton.ButtonPositions.upperRowLeft, @@ -1838,13 +1842,13 @@ namespace TheOtherRoles defuseButton.PositionOffset = new Vector3(0f, 2f, 0f); else defuseButton.PositionOffset = new Vector3(0f, 1f, 0f); - return Bomber.bomb != null && Bomb.canDefuse && !CachedPlayer.LocalPlayer.Data.IsDead; }, + return Bomber.bomb != null && Bomb.canDefuse && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { if (defuseButton.isEffectActive && !Bomb.canDefuse) { defuseButton.Timer = 0f; defuseButton.isEffectActive = false; } - return CachedPlayer.LocalPlayer.PlayerControl.CanMove; + return PlayerControl.LocalPlayer.CanMove; }, () => { defuseButton.Timer = 0f; @@ -1857,7 +1861,7 @@ namespace TheOtherRoles true, Bomber.defuseDuration, () => { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.DefuseBomb, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.DefuseBomb, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.defuseBomb(); @@ -1879,7 +1883,7 @@ namespace TheOtherRoles if (Thief.suicideFlag) { // Suicide - MessageWriter writer2 = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1); + MessageWriter writer2 = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1); writer2.Write(thief.PlayerId); writer2.Write(thief.PlayerId); writer2.Write(0); @@ -1890,14 +1894,14 @@ namespace TheOtherRoles // Steal role if survived. if (!Thief.thief.Data.IsDead && result == MurderAttemptResult.PerformKill) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ThiefStealsRole, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ThiefStealsRole, Hazel.SendOption.Reliable, -1); writer.Write(target.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.thiefStealsRole(target.PlayerId); } // Kill the victim (after becoming their role - so that no win is triggered for other teams) if (result == MurderAttemptResult.PerformKill) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1); writer.Write(thief.PlayerId); writer.Write(target.PlayerId); writer.Write(byte.MaxValue); @@ -1905,8 +1909,8 @@ namespace TheOtherRoles RPCProcedure.uncheckedMurderPlayer(thief.PlayerId, target.PlayerId, byte.MaxValue); } }, - () => { return Thief.thief != null && CachedPlayer.LocalPlayer.PlayerControl == Thief.thief && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return Thief.currentTarget != null && CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Thief.thief != null && PlayerControl.LocalPlayer == Thief.thief && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return Thief.currentTarget != null && PlayerControl.LocalPlayer.CanMove; }, () => { thiefKillButton.Timer = thiefKillButton.MaxTimer; }, __instance.KillButton.graphic.sprite, CustomButton.ButtonPositions.upperRowRight, @@ -1925,13 +1929,13 @@ namespace TheOtherRoles // Yoyo button yoyoButton = new CustomButton( () => { - var pos = CachedPlayer.LocalPlayer.transform.position; + var pos = PlayerControl.LocalPlayer.transform.position; byte[] buff = new byte[sizeof(float) * 2]; Buffer.BlockCopy(BitConverter.GetBytes(pos.x), 0, buff, 0 * sizeof(float), sizeof(float)); Buffer.BlockCopy(BitConverter.GetBytes(pos.y), 0, buff, 1 * sizeof(float), sizeof(float)); if (Yoyo.markedLocation == null) { - MessageWriter writer = AmongUsClient.Instance.StartRpc(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.YoyoMarkLocation, Hazel.SendOption.Reliable); + MessageWriter writer = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.YoyoMarkLocation, Hazel.SendOption.Reliable); writer.WriteBytesAndSize(buff); writer.EndMessage(); RPCProcedure.yoyoMarkLocation(buff); @@ -1946,7 +1950,7 @@ namespace TheOtherRoles if (SubmergedCompatibility.IsSubmerged) { SubmergedCompatibility.ChangeFloor(exit.y > -7); } - MessageWriter writer = AmongUsClient.Instance.StartRpc(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.YoyoBlink, Hazel.SendOption.Reliable); + MessageWriter writer = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.YoyoBlink, Hazel.SendOption.Reliable); writer.Write(Byte.MaxValue); writer.WriteBytesAndSize(buff); writer.EndMessage(); @@ -1958,8 +1962,8 @@ namespace TheOtherRoles SoundEffectsManager.play("morphlingMorph"); } }, - () => { return Yoyo.yoyo != null && Yoyo.yoyo == CachedPlayer.LocalPlayer.PlayerControl && !CachedPlayer.LocalPlayer.Data.IsDead; }, - () => { return CachedPlayer.LocalPlayer.PlayerControl.CanMove; }, + () => { return Yoyo.yoyo != null && Yoyo.yoyo == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; }, + () => { return PlayerControl.LocalPlayer.CanMove; }, () => { if (Yoyo.markStaysOverMeeting) { yoyoButton.Timer = 10f; @@ -1988,7 +1992,7 @@ namespace TheOtherRoles } // jump back! - var pos = CachedPlayer.LocalPlayer.transform.position; + var pos = PlayerControl.LocalPlayer.transform.position; byte[] buff = new byte[sizeof(float) * 2]; Buffer.BlockCopy(BitConverter.GetBytes(pos.x), 0, buff, 0 * sizeof(float), sizeof(float)); Buffer.BlockCopy(BitConverter.GetBytes(pos.y), 0, buff, 1 * sizeof(float), sizeof(float)); @@ -1996,7 +2000,7 @@ namespace TheOtherRoles if (SubmergedCompatibility.IsSubmerged) { SubmergedCompatibility.ChangeFloor(exit.y > -7); } - MessageWriter writer = AmongUsClient.Instance.StartRpc(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.YoyoBlink, Hazel.SendOption.Reliable); + MessageWriter writer = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.YoyoBlink, Hazel.SendOption.Reliable); writer.Write((byte)0); writer.WriteBytesAndSize(buff); writer.EndMessage(); @@ -2024,7 +2028,7 @@ namespace TheOtherRoles MapBehaviour.Instance.ShowCountOverlay(allowedToMove: true, showLivePlayerPosition: true, includeDeadBodies: true); } }, - () => { return Yoyo.yoyo != null && Yoyo.yoyo == CachedPlayer.LocalPlayer.PlayerControl && Yoyo.hasAdminTable && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return Yoyo.yoyo != null && Yoyo.yoyo == PlayerControl.LocalPlayer && Yoyo.hasAdminTable && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { return true; }, @@ -2051,8 +2055,8 @@ namespace TheOtherRoles zoomOutButton = new CustomButton( () => { Helpers.toggleZoom(); }, - () => { if (CachedPlayer.LocalPlayer.PlayerControl == null || !CachedPlayer.LocalPlayer.Data.IsDead || (CachedPlayer.LocalPlayer.Data.Role.IsImpostor && !CustomOptionHolder.deadImpsBlockSabotage.getBool())) return false; - var (playerCompleted, playerTotal) = TasksHandler.taskInfo(CachedPlayer.LocalPlayer.Data); + () => { if (PlayerControl.LocalPlayer == null || !PlayerControl.LocalPlayer.Data.IsDead || (PlayerControl.LocalPlayer.Data.Role.IsImpostor && !CustomOptionHolder.deadImpsBlockSabotage.getBool())) return false; + var (playerCompleted, playerTotal) = TasksHandler.taskInfo(PlayerControl.LocalPlayer.Data); int numberOfLeftTasks = playerTotal - playerCompleted; return numberOfLeftTasks <= 0 || !CustomOptionHolder.finishTasksBeforeHauntingOrZoomingOut.getBool(); }, @@ -2068,15 +2072,15 @@ namespace TheOtherRoles hunterLighterButton = new CustomButton( () => { - Hunter.lightActive.Add(CachedPlayer.LocalPlayer.PlayerId); + Hunter.lightActive.Add(PlayerControl.LocalPlayer.PlayerId); SoundEffectsManager.play("lighterLight"); - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareTimer, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareTimer, Hazel.SendOption.Reliable, -1); writer.Write(Hunter.lightPunish); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.shareTimer(Hunter.lightPunish); }, - () => { return HideNSeek.isHunter() && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return HideNSeek.isHunter() && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { return true; }, () => { hunterLighterButton.Timer = 30f; @@ -2090,7 +2094,7 @@ namespace TheOtherRoles true, Hunter.lightDuration, () => { - Hunter.lightActive.Remove(CachedPlayer.LocalPlayer.PlayerId); + Hunter.lightActive.Remove(PlayerControl.LocalPlayer.PlayerId); hunterLighterButton.Timer = hunterLighterButton.MaxTimer; SoundEffectsManager.play("lighterLight"); } @@ -2104,14 +2108,14 @@ namespace TheOtherRoles MapBehaviour.Instance.ShowCountOverlay(allowedToMove: true, showLivePlayerPosition: true, includeDeadBodies: false); } - CachedPlayer.LocalPlayer.NetTransform.Halt(); // Stop current movement + PlayerControl.LocalPlayer.NetTransform.Halt(); // Stop current movement - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareTimer, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareTimer, Hazel.SendOption.Reliable, -1); writer.Write(Hunter.AdminPunish); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.shareTimer(Hunter.AdminPunish); }, - () => { return HideNSeek.isHunter() && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return HideNSeek.isHunter() && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { return true; }, () => { hunterAdminTableButton.Timer = hunterAdminTableButton.MaxTimer; @@ -2137,12 +2141,12 @@ namespace TheOtherRoles Hunter.arrowActive = true; SoundEffectsManager.play("trackerTrackPlayer"); - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareTimer, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareTimer, Hazel.SendOption.Reliable, -1); writer.Write(Hunter.ArrowPunish); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.shareTimer(Hunter.ArrowPunish); }, - () => { return HideNSeek.isHunter() && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return HideNSeek.isHunter() && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { return true; }, () => { hunterArrowButton.Timer = 30f; @@ -2164,18 +2168,18 @@ namespace TheOtherRoles huntedShieldButton = new CustomButton( () => { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.HuntedShield, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.HuntedShield, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); - RPCProcedure.huntedShield(CachedPlayer.LocalPlayer.PlayerId); + RPCProcedure.huntedShield(PlayerControl.LocalPlayer.PlayerId); SoundEffectsManager.play("timemasterShield"); Hunted.shieldCount--; }, - () => { return HideNSeek.isHunted() && !CachedPlayer.LocalPlayer.Data.IsDead; }, + () => { return HideNSeek.isHunted() && !PlayerControl.LocalPlayer.Data.IsDead; }, () => { if (huntedShieldCountText != null) huntedShieldCountText.text = $"{Hunted.shieldCount}"; - return CachedPlayer.LocalPlayer.PlayerControl.CanMove && Hunted.shieldCount > 0; + return PlayerControl.LocalPlayer.CanMove && Hunted.shieldCount > 0; }, () => { huntedShieldButton.Timer = huntedShieldButton.MaxTimer; @@ -2209,12 +2213,12 @@ namespace TheOtherRoles GameObject disguiseTarget = PropHunt.currentTarget; if (disguiseTarget != null) { player.transform.localScale = disguiseTarget.transform.lossyScale; - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetProp, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetProp, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write(disguiseTarget.gameObject.name); writer.Write(disguiseTarget.gameObject.transform.position.x); AmongUsClient.Instance.FinishRpcImmediately(writer); - RPCProcedure.propHuntSetProp(CachedPlayer.LocalPlayer.PlayerId, disguiseTarget.gameObject.name, disguiseTarget.gameObject.transform.position.x); + RPCProcedure.propHuntSetProp(PlayerControl.LocalPlayer.PlayerId, disguiseTarget.gameObject.name, disguiseTarget.gameObject.transform.position.x); SoundEffectsManager.play("morphlingMorph"); propDisguiseButton.Timer = 1f; } @@ -2265,7 +2269,7 @@ namespace TheOtherRoles var candidates = PlayerControl.AllPlayerControls.ToArray().Where(x => !x.Data.Role.IsImpostor && !x.Data.IsDead && !PropHunt.isCurrentlyRevealed.ContainsKey(x.PlayerId)).ToList(); var rng = new System.Random(); PlayerControl selectedPlayer = candidates[rng.Next(candidates.Count)]; - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetRevealed, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetRevealed, Hazel.SendOption.Reliable, -1); writer.Write(selectedPlayer.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.propHuntSetRevealed(selectedPlayer.PlayerId); @@ -2287,10 +2291,10 @@ namespace TheOtherRoles propHuntInvisButton = new CustomButton( () => { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.PropHuntSetInvis, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.PropHuntSetInvis, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); - RPCProcedure.propHuntSetInvis(CachedPlayer.LocalPlayer.PlayerId); + RPCProcedure.propHuntSetInvis(PlayerControl.LocalPlayer.PlayerId); SoundEffectsManager.play("morphlingMorph"); }, () => { return PropHunt.isPropHuntGM && !PlayerControl.LocalPlayer.Data.IsDead && !PlayerControl.LocalPlayer.Data.Role.IsImpostor && PropHunt.enableInvis; }, @@ -2311,10 +2315,10 @@ namespace TheOtherRoles propHuntSpeedboostButton = new CustomButton( () => { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.PropHuntSetSpeedboost, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.PropHuntSetSpeedboost, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); - RPCProcedure.propHuntSetSpeedboost(CachedPlayer.LocalPlayer.PlayerId); + RPCProcedure.propHuntSetSpeedboost(PlayerControl.LocalPlayer.PlayerId); SoundEffectsManager.play("timemasterShield"); }, () => { return PropHunt.isPropHuntGM && !PlayerControl.LocalPlayer.Data.IsDead && !PlayerControl.LocalPlayer.Data.Role.IsImpostor && PropHunt.enableSpeedboost; }, @@ -2341,7 +2345,7 @@ namespace TheOtherRoles MapBehaviour.Instance.ShowCountOverlay(allowedToMove: true, showLivePlayerPosition: true, includeDeadBodies: false); } - CachedPlayer.LocalPlayer.NetTransform.Halt(); // Stop current movement + PlayerControl.LocalPlayer.NetTransform.Halt(); // Stop current movement }, () => { return PropHunt.isPropHuntGM && !PlayerControl.LocalPlayer.Data.IsDead && PlayerControl.LocalPlayer.Data.Role.IsImpostor; }, () => { diff --git a/TheOtherRoles/CustomGameModes/GameModePatches.cs b/TheOtherRoles/CustomGameModes/GameModePatches.cs index 9aa18d6..b49c291 100644 --- a/TheOtherRoles/CustomGameModes/GameModePatches.cs +++ b/TheOtherRoles/CustomGameModes/GameModePatches.cs @@ -11,7 +11,6 @@ using UnityEngine; using static UnityEngine.UI.Button; using UnityEngine.Events; using Hazel; -using TheOtherRoles.Players; namespace TheOtherRoles.CustomGameModes { [HarmonyPatch] @@ -44,7 +43,7 @@ namespace TheOtherRoles.CustomGameModes { { TORMapOptions.gameMode = (CustomGamemodes)((int)(TORMapOptions.gameMode + 1) % Enum.GetNames(typeof(CustomGamemodes)).Length); __instance.StartCoroutine(Effects.Lerp(0.1f, new Action(p => { pButton.buttonText.text = Helpers.cs(Color.yellow, GameModeText.GetComponent().text); }))); - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGamemode, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGamemode, Hazel.SendOption.Reliable, -1); writer.Write((byte)TORMapOptions.gameMode); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.shareGamemode((byte)TORMapOptions.gameMode); diff --git a/TheOtherRoles/CustomGameModes/GuesserGM.cs b/TheOtherRoles/CustomGameModes/GuesserGM.cs index cc0c8cb..e349caa 100644 --- a/TheOtherRoles/CustomGameModes/GuesserGM.cs +++ b/TheOtherRoles/CustomGameModes/GuesserGM.cs @@ -8,6 +8,7 @@ namespace TheOtherRoles.CustomGameModes { public PlayerControl guesser = null; public int shots = Mathf.RoundToInt(CustomOptionHolder.guesserGamemodeNumberOfShots.getFloat()); + public int tasksToUnlock = Mathf.RoundToInt(CustomOptionHolder.guesserGamemodeCrewGuesserNumberOfTasks.getFloat()); public GuesserGM(PlayerControl player) { guesser = player; guessers.Add(this); @@ -26,6 +27,7 @@ namespace TheOtherRoles.CustomGameModes { if (g == null) return; g.guesser = null; g.shots = Mathf.RoundToInt(CustomOptionHolder.guesserGamemodeNumberOfShots.getFloat()); + g.tasksToUnlock = Mathf.RoundToInt(CustomOptionHolder.guesserGamemodeCrewGuesserNumberOfTasks.getFloat()); guessers.Remove(g); } diff --git a/TheOtherRoles/CustomGameModes/HideNSeekGM.cs b/TheOtherRoles/CustomGameModes/HideNSeekGM.cs index 0908fd3..e95e838 100644 --- a/TheOtherRoles/CustomGameModes/HideNSeekGM.cs +++ b/TheOtherRoles/CustomGameModes/HideNSeekGM.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using TheOtherRoles.Objects; -using TheOtherRoles.Players; using UnityEngine; namespace TheOtherRoles.CustomGameModes { @@ -22,17 +21,17 @@ namespace TheOtherRoles.CustomGameModes { public static float killCooldown = 10f; public static float hunterWaitingTime = 15f; public static bool isHunter() { - return isHideNSeekGM && CachedPlayer.LocalPlayer != null && CachedPlayer.LocalPlayer.Data.Role.IsImpostor; + return isHideNSeekGM && PlayerControl.LocalPlayer != null && PlayerControl.LocalPlayer.Data.Role.IsImpostor; } - public static List getHunters() { - List hunters = new List(CachedPlayer.AllPlayers); + public static List getHunters() { + List hunters = new List(PlayerControl.AllPlayerControls.ToArray()); hunters.RemoveAll(x => !x.Data.Role.IsImpostor); return hunters; } public static bool isHunted() { - return isHideNSeekGM && CachedPlayer.LocalPlayer != null && !CachedPlayer.LocalPlayer.Data.Role.IsImpostor; + return isHideNSeekGM && PlayerControl.LocalPlayer != null && !PlayerControl.LocalPlayer.Data.Role.IsImpostor; } public static void clearAndReload() { diff --git a/TheOtherRoles/CustomGameModes/PropHunt.cs b/TheOtherRoles/CustomGameModes/PropHunt.cs index 7d0aa06..346e978 100644 --- a/TheOtherRoles/CustomGameModes/PropHunt.cs +++ b/TheOtherRoles/CustomGameModes/PropHunt.cs @@ -7,11 +7,12 @@ using Reactor.Utilities.Extensions; using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; using TheOtherRoles.Patches; -using TheOtherRoles.Players; using TheOtherRoles.Utilities; using TMPro; using UnityEngine; +using UnityEngine.Video; using static TheOtherRoles.Snitch; using static UnityEngine.GraphicsBuffer; @@ -259,16 +260,19 @@ namespace TheOtherRoles.CustomGameModes { float dist = 55f; float dist2 = 15f; float curr = float.MaxValue; - foreach (PlayerControl playerControl in PlayerControl.AllPlayerControls.ToArray().Where(x => !x.Data.IsDead && (PlayerControl.LocalPlayer.Data.Role.IsImpostor ? !x.Data.Role.IsImpostor : x.Data.Role.IsImpostor))) { - if (invisPlayers.ContainsKey(playerControl.PlayerId)) continue; // Dont light up for invisible players - if (!(playerControl == null)) { - - float sqrMagnitude = (playerControl.transform.position - PlayerControl.LocalPlayer.transform.position).sqrMagnitude; - if (sqrMagnitude < dist && curr > sqrMagnitude) { - curr = sqrMagnitude; + try { + foreach (PlayerControl playerControl in PlayerControl.AllPlayerControls.ToArray().Where(x => !x.Data.IsDead && (PlayerControl.LocalPlayer.Data.Role.IsImpostor ? !x.Data.Role.IsImpostor : x.Data.Role.IsImpostor))) { + if (invisPlayers.ContainsKey(playerControl.PlayerId)) continue; // Dont light up for invisible players + if (!(playerControl == null)) { + + float sqrMagnitude = (playerControl.transform.position - PlayerControl.LocalPlayer.transform.position).sqrMagnitude; + if (sqrMagnitude < dist && curr > sqrMagnitude) { + curr = sqrMagnitude; + } } } } + catch { } float dangerLevel1 = Mathf.Clamp01((dist - curr) / (dist - dist2)); float dangerLevel2 = Mathf.Clamp01((dist2 - curr) / dist2); HudManager.Instance.DangerMeter.SetDangerValue(dangerLevel1, dangerLevel2); @@ -356,7 +360,7 @@ namespace TheOtherRoles.CustomGameModes { Collider2D bestCollider = null; float bestDist = 9999; if (whitelistedObjects == null || whitelistedObjects.Count == 0 || verbose) { - updateWhitelistedObjects(true); + updateWhitelistedObjects(verbose); } foreach (Collider2D collider in Physics2D.OverlapCircleAll(origin.transform.position, radius)) { if (verbose) { @@ -409,37 +413,49 @@ namespace TheOtherRoles.CustomGameModes { public static void IntroCutsceneDestroyPatch(IntroCutscene __instance) { if (!isPropHuntGM || !PlayerControl.LocalPlayer.Data.Role.IsImpostor) return; PlayerControl.LocalPlayer.moveable = false; - MessageWriter writer2 = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.PropHuntStartTimer, Hazel.SendOption.Reliable, -1); + MessageWriter writer2 = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.PropHuntStartTimer, Hazel.SendOption.Reliable, -1); writer2.Write(true); AmongUsClient.Instance.FinishRpcImmediately(writer2); RPCProcedure.propHuntStartTimer(true); - introObject = new GameObject("introrenderer"); - introObject.layer = HudManager.Instance.FullScreen.gameObject.layer; - introObject.transform.SetParent(HudManager.Instance.FullScreen.transform); - introObject.transform.localPosition = new Vector3(0, 0, -1f); - SpriteRenderer introRenderer = introObject.AddComponent(); - introObject.SetActive(true); - introRenderer.enabled = true; - int nFrames = 25 * (int)initialBlackoutTime + 10; - FastDestroyableSingleton.Instance.StartCoroutine(Effects.Lerp(initialBlackoutTime, new Action((p) => { + + + // Play mp4 video in Full Screen: + Assembly assembly = Assembly.GetExecutingAssembly(); + string[] resourceNames = assembly.GetManifestResourceNames(); + var resourceBundle = assembly.GetManifestResourceStream("TheOtherRoles.Resources.IntroAnimation.intro"); + var assetBundle = AssetBundle.LoadFromMemory(resourceBundle.ReadFully()); + VideoClip introVid = assetBundle.LoadAsset("Assets/Video/intro.webm"); + GameObject camera = GameObject.Find("Main Camera"); + var videoPlayer = camera.AddComponent(); + videoPlayer.playOnAwake = false; + videoPlayer.renderMode = UnityEngine.Video.VideoRenderMode.CameraNearPlane; + videoPlayer.targetCameraAlpha = 1F; + videoPlayer.source = VideoSource.VideoClip; + videoPlayer.clip = introVid; + videoPlayer.aspectRatio = VideoAspectRatio.FitVertically; + // Skip the first 100 frames. + videoPlayer.frame = (21 - (int)initialBlackoutTime) * 25; + videoPlayer.isLooping = false; + videoPlayer.Play(); + + + FastDestroyableSingleton.Instance.StartCoroutine(Effects.Lerp(initialBlackoutTime + 10f/25, new Action((p) => { if (p == 1f) { // start timer - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.PropHuntStartTimer, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.PropHuntStartTimer, Hazel.SendOption.Reliable, -1); writer.Write(false); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.propHuntStartTimer(); PlayerControl.LocalPlayer.moveable = true; HudManager.Instance.FullScreen.enabled = false; + videoPlayer.Destroy(); + assetBundle.Unload(false); introObject.Destroy(); } else { HudManager.Instance.FullScreen.enabled = true; HudManager.Instance.FullScreen.gameObject.SetActive(true); - HudManager.Instance.FullScreen.color = new Color(0, 0, 0, 1); - introRenderer.sprite?.Destroy(); - introRenderer.sprite = getIntroSprite(510 - nFrames + (int)(p * nFrames)); - Resources.UnloadUnusedAssets(); // Needed so that the last sprite gets unloaded } - }))); + }))); } [HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.FixedUpdate))] @@ -542,7 +558,7 @@ namespace TheOtherRoles.CustomGameModes { [HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.MurderPlayer))] [HarmonyPostfix] public static void MurderPlayerPostfix(PlayerControl __instance, [HarmonyArgument(0)] PlayerControl target) { - if (!PropHunt.isPropHuntGM || target != CachedPlayer.LocalPlayer.PlayerControl) return; + if (!PropHunt.isPropHuntGM || target != PlayerControl.LocalPlayer) return; try { target.NetTransform.RpcSnapTo(__instance.transform.position); } catch { } @@ -578,7 +594,7 @@ namespace TheOtherRoles.CustomGameModes { if (__instance.currentTarget == null) { PlayerControl.LocalPlayer.SetKillTimer(killCooldownMiss); } else { // There is a target, execute kill! - MurderAttemptResult res = Helpers.checkMurderAttemptAndKill(CachedPlayer.LocalPlayer.PlayerControl, __instance.currentTarget); + MurderAttemptResult res = Helpers.checkMurderAttemptAndKill(PlayerControl.LocalPlayer, __instance.currentTarget); __instance.SetTarget(null); PlayerControl.LocalPlayer.SetKillTimer(killCooldownHit); } diff --git a/TheOtherRoles/CustomOptionHolder.cs b/TheOtherRoles/CustomOptionHolder.cs index 0b1772e..2b13899 100644 --- a/TheOtherRoles/CustomOptionHolder.cs +++ b/TheOtherRoles/CustomOptionHolder.cs @@ -311,6 +311,8 @@ namespace TheOtherRoles { public static CustomOption modifierChameleonHoldDuration; public static CustomOption modifierChameleonFadeDuration; public static CustomOption modifierChameleonMinVisibility; + + public static CustomOption modifierArmored; public static CustomOption modifierShifter; @@ -345,6 +347,7 @@ namespace TheOtherRoles { public static CustomOption guesserGamemodeKillsThroughShield; public static CustomOption guesserGamemodeEvilCanKillSpy; public static CustomOption guesserGamemodeCantGuessSnitchIfTaksDone; + public static CustomOption guesserGamemodeCrewGuesserNumberOfTasks; public static CustomOption guesserGamemodeSidekickIsAlwaysGuesser; // Hide N Seek Gamemode @@ -730,23 +733,24 @@ namespace TheOtherRoles { modifierChameleonFadeDuration = CustomOption.Create(1093, Types.Modifier, "Fade Duration", 1f, 0.25f, 10f, 0.25f, modifierChameleon); modifierChameleonMinVisibility = CustomOption.Create(1094, Types.Modifier, "Minimum Visibility", new string[] { "0%", "10%", "20%", "30%", "40%", "50%" }, modifierChameleon); + modifierArmored = CustomOption.Create(1101, Types.Modifier, cs(Color.yellow, "Armored"), rates, null, true); + modifierShifter = CustomOption.Create(1100, Types.Modifier, cs(Color.yellow, "Shifter"), rates, null, true); // Guesser Gamemode (2000 - 2999) - guesserGamemodeCrewNumber = CustomOption.Create(2001, Types.Guesser, cs(Guesser.color, "Number of Crew Guessers"), 15f, 1f, 15f, 1f, null, true, heading: "Amount of Guessers"); - guesserGamemodeNeutralNumber = CustomOption.Create(2002, Types.Guesser, cs(Guesser.color, "Number of Neutral Guessers"), 15f, 1f, 15f, 1f, null); - guesserGamemodeImpNumber = CustomOption.Create(2003, Types.Guesser, cs(Guesser.color, "Number of Impostor Guessers"), 15f, 1f, 15f, 1f, null); + guesserGamemodeCrewNumber = CustomOption.Create(2001, Types.Guesser, cs(Guesser.color, "Number of Crew Guessers"), 15f, 0f, 15f, 1f, null, true, heading: "Amount of Guessers"); + guesserGamemodeNeutralNumber = CustomOption.Create(2002, Types.Guesser, cs(Guesser.color, "Number of Neutral Guessers"), 15f, 0f, 15f, 1f, null); + guesserGamemodeImpNumber = CustomOption.Create(2003, Types.Guesser, cs(Guesser.color, "Number of Impostor Guessers"), 15f, 0f, 15f, 1f, null); guesserForceJackalGuesser = CustomOption.Create(2007, Types.Guesser, "Force Jackal Guesser", false, null, true, heading: "Force Guessers"); guesserGamemodeSidekickIsAlwaysGuesser = CustomOption.Create(2012, Types.Guesser, "Sidekick Is Always Guesser", false, null); guesserForceThiefGuesser = CustomOption.Create(2011, Types.Guesser, "Force Thief Guesser", false, null); guesserGamemodeHaveModifier = CustomOption.Create(2004, Types.Guesser, "Guessers Can Have A Modifier", true, null, true, heading: "General Guesser Settings"); guesserGamemodeNumberOfShots = CustomOption.Create(2005, Types.Guesser, "Guesser Number Of Shots", 3f, 1f, 15f, 1f, null); guesserGamemodeHasMultipleShotsPerMeeting = CustomOption.Create(2006, Types.Guesser, "Guesser Can Shoot Multiple Times Per Meeting", false, null); + guesserGamemodeCrewGuesserNumberOfTasks = CustomOption.Create(2013, Types.Guesser, "Number Of Tasks Needed To Unlock Shooting\nFor Crew Guesser", 0f, 0f, 15f, 1f, null); guesserGamemodeKillsThroughShield = CustomOption.Create(2008, Types.Guesser, "Guesses Ignore The Medic Shield", true, null); guesserGamemodeEvilCanKillSpy = CustomOption.Create(2009, Types.Guesser, "Evil Guesser Can Guess The Spy", true, null); guesserGamemodeCantGuessSnitchIfTaksDone = CustomOption.Create(2010, Types.Guesser, "Guesser Can't Guess Snitch When Tasks Completed", true, null); - // Care: 2012 already taken! - // Hide N Seek Gamemode (3000 - 3999) hideNSeekMap = CustomOption.Create(3020, Types.HideNSeekMain, cs(Color.yellow, "Map"), new string[] { "The Skeld", "Mira", "Polus", "Airship", "Fungle", "Submerged", "LI Map"}, null, true, onChange: () => { int map = hideNSeekMap.selection; if (map >= 3) map++; GameOptionsManager.Instance.currentNormalGameOptions.MapId = (byte)map; }); diff --git a/TheOtherRoles/Helpers.cs b/TheOtherRoles/Helpers.cs index 5f58717..2e51993 100644 --- a/TheOtherRoles/Helpers.cs +++ b/TheOtherRoles/Helpers.cs @@ -9,7 +9,6 @@ using static TheOtherRoles.TheOtherRoles; using TheOtherRoles.Modules; using HarmonyLib; using Hazel; -using TheOtherRoles.Players; using TheOtherRoles.Utilities; using System.Threading.Tasks; using TheOtherRoles.CustomGameModes; @@ -85,8 +84,10 @@ namespace TheOtherRoles { return null; } + /* This function has been removed from TOR because we switched to assetbundles for compressed audio. leaving it here for reference - Gendelo public static AudioClip loadAudioClipFromResources(string path, string clipName = "UNNAMED_TOR_AUDIO_CLIP") { - // must be "raw (headerless) 2-channel signed 32 bit pcm (le)" (can e.g. use Audacity® to export) + + // must be "raw (headerless) 2-channel signed 32 bit pcm (le) 48kHz" (can e.g. use Audacity® to export ) try { Assembly assembly = Assembly.GetExecutingAssembly(); Stream stream = assembly.GetManifestResourceStream(path); @@ -109,11 +110,11 @@ namespace TheOtherRoles { } return null; - /* Usage example: - AudioClip exampleClip = Helpers.loadAudioClipFromResources("TheOtherRoles.Resources.exampleClip.raw"); - if (Constants.ShouldPlaySfx()) SoundManager.Instance.PlaySound(exampleClip, false, 0.8f); - */ - } + // Usage example: + //AudioClip exampleClip = Helpers.loadAudioClipFromResources("TheOtherRoles.Resources.exampleClip.raw"); + //if (Constants.ShouldPlaySfx()) SoundManager.Instance.PlaySound(exampleClip, false, 0.8f); + + }*/ public static string readTextFromResources(string path) { Assembly assembly = Assembly.GetExecutingAssembly(); @@ -130,7 +131,7 @@ namespace TheOtherRoles { public static PlayerControl playerById(byte id) { - foreach (PlayerControl player in CachedPlayer.AllPlayers) + foreach (PlayerControl player in PlayerControl.AllPlayerControls) if (player.PlayerId == id) return player; return null; @@ -139,7 +140,7 @@ namespace TheOtherRoles { public static Dictionary allPlayersById() { Dictionary res = new Dictionary(); - foreach (PlayerControl player in CachedPlayer.AllPlayers) + foreach (PlayerControl player in PlayerControl.AllPlayerControls) res.Add(player.PlayerId, player); return res; } @@ -147,7 +148,7 @@ namespace TheOtherRoles { public static void handleVampireBiteOnBodyReport() { // Murder the bitten player and reset bitten (regardless whether the kill was successful or not) Helpers.checkMurderAttemptAndKill(Vampire.vampire, Vampire.bitten, true, false); - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.VampireSetBitten, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.VampireSetBitten, Hazel.SendOption.Reliable, -1); writer.Write(byte.MaxValue); writer.Write(byte.MaxValue); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -229,7 +230,7 @@ namespace TheOtherRoles { } public static bool shouldShowGhostInfo() { - return CachedPlayer.LocalPlayer.PlayerControl != null && CachedPlayer.LocalPlayer.PlayerControl.Data.IsDead && TORMapOptions.ghostsSeeInformation || AmongUsClient.Instance.GameState == InnerNet.InnerNetClient.GameStates.Ended; + return PlayerControl.LocalPlayer != null && PlayerControl.LocalPlayer.Data.IsDead && TORMapOptions.ghostsSeeInformation || AmongUsClient.Instance.GameState == InnerNet.InnerNetClient.GameStates.Ended; } public static void clearAllTasks(this PlayerControl player) { @@ -274,7 +275,7 @@ namespace TheOtherRoles { } public static bool MushroomSabotageActive() { - return CachedPlayer.LocalPlayer.PlayerControl.myTasks.ToArray().Any((x) => x.TaskType == TaskTypes.MushroomMixupSabotage); + return PlayerControl.LocalPlayer.myTasks.ToArray().Any((x) => x.TaskType == TaskTypes.MushroomMixupSabotage); } @@ -367,7 +368,7 @@ namespace TheOtherRoles { target.RawSetColor(colorId); target.RawSetVisor(visorId, colorId); target.RawSetHat(hatId, colorId); - target.RawSetName(hidePlayerName(CachedPlayer.LocalPlayer.PlayerControl, target) ? "" : playerName); + target.RawSetName(hidePlayerName(PlayerControl.LocalPlayer, target) ? "" : playerName); SkinViewData nextSkin = null; @@ -440,9 +441,9 @@ namespace TheOtherRoles { else if (Thief.canUseVents && Thief.thief != null && Thief.thief == player) roleCouldUse = true; else if (player.Data?.Role != null && player.Data.Role.CanVent) { - if (Janitor.janitor != null && Janitor.janitor == CachedPlayer.LocalPlayer.PlayerControl) + if (Janitor.janitor != null && Janitor.janitor == PlayerControl.LocalPlayer) roleCouldUse = false; - else if (Mafioso.mafioso != null && Mafioso.mafioso == CachedPlayer.LocalPlayer.PlayerControl && Godfather.godfather != null && !Godfather.godfather.Data.IsDead) + else if (Mafioso.mafioso != null && Mafioso.mafioso == PlayerControl.LocalPlayer && Godfather.godfather != null && !Godfather.godfather.Data.IsDead) roleCouldUse = false; else roleCouldUse = true; @@ -450,9 +451,23 @@ namespace TheOtherRoles { return roleCouldUse; } + public static bool checkArmored(PlayerControl target, bool breakShield, bool showShield, bool additionalCondition = true) { + if (target != null && Armored.armored != null && Armored.armored == target && !Armored.isBrokenArmor && additionalCondition) { + if (breakShield) { + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.BreakArmor, Hazel.SendOption.Reliable, -1); + AmongUsClient.Instance.FinishRpcImmediately(writer); + RPCProcedure.breakArmor(); + } + if (showShield) { + target.ShowFailedMurder(); + } + return true; + } + return false; + } + public static MurderAttemptResult checkMuderAttempt(PlayerControl killer, PlayerControl target, bool blockRewind = false, bool ignoreBlank = false, bool ignoreIfKillerIsDead = false, bool ignoreMedic = false) { var targetRole = RoleInfo.getRoleInfoForPlayer(target, false).FirstOrDefault(); - // Modified vanilla checks if (AmongUsClient.Instance.IsGameOver) return MurderAttemptResult.SuppressKill; if (killer == null || killer.Data == null || (killer.Data.IsDead && !ignoreIfKillerIsDead) || killer.Data.Disconnected) return MurderAttemptResult.SuppressKill; // Allow non Impostor kills compared to vanilla code @@ -464,7 +479,7 @@ namespace TheOtherRoles { // Handle blank shot if (!ignoreBlank && Pursuer.blankedList.Any(x => x.PlayerId == killer.PlayerId)) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetBlanked, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetBlanked, Hazel.SendOption.Reliable, -1); writer.Write(killer.PlayerId); writer.Write((byte)0); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -499,10 +514,17 @@ namespace TheOtherRoles { // Thief if hit crew only kill if setting says so, but also kill the thief. else if (Thief.isFailedThiefKill(target, killer, targetRole)) { - Thief.suicideFlag = true; + if (!checkArmored(killer, true, true)) + Thief.suicideFlag = true; return MurderAttemptResult.SuppressKill; } + // Block Armored with armor kill + + else if (checkArmored(target, true, killer == PlayerControl.LocalPlayer, Sheriff.sheriff == null || killer.PlayerId != Sheriff.sheriff.PlayerId || isEvil(target) && Sheriff.canKillNeutrals || isKiller(target))) { + return MurderAttemptResult.BlankKill; + } + // Block hunted with time shield kill else if (Hunted.timeshieldActive.Contains(target.PlayerId)) { MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(killer.NetId, (byte)CustomRPC.HuntedRewindTime, Hazel.SendOption.Reliable, -1); @@ -520,7 +542,7 @@ namespace TheOtherRoles { } public static void MurderPlayer(PlayerControl killer, PlayerControl target, bool showAnimation) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1); writer.Write(killer.PlayerId); writer.Write(target.PlayerId); writer.Write(showAnimation ? Byte.MaxValue : 0); @@ -538,7 +560,7 @@ namespace TheOtherRoles { } else if (murder == MurderAttemptResult.DelayVampireKill) { HudManager.Instance.StartCoroutine(Effects.Lerp(10f, new Action((p) => { if (!TransportationToolPatches.isUsingTransportation(target) && Vampire.bitten != null) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.VampireSetBitten, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.VampireSetBitten, Hazel.SendOption.Reliable, -1); writer.Write(byte.MaxValue); writer.Write(byte.MaxValue); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -551,7 +573,7 @@ namespace TheOtherRoles { } public static void shareGameVersion() { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.VersionHandshake, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.VersionHandshake, Hazel.SendOption.Reliable, -1); writer.Write((byte)TheOtherRolesPlugin.Version.Major); writer.Write((byte)TheOtherRolesPlugin.Version.Minor); writer.Write((byte)TheOtherRolesPlugin.Version.Build); @@ -565,7 +587,7 @@ namespace TheOtherRoles { public static List getKillerTeamMembers(PlayerControl player) { List team = new List(); - foreach(PlayerControl p in CachedPlayer.AllPlayers) { + foreach(PlayerControl p in PlayerControl.AllPlayerControls) { if (player.Data.Role.IsImpostor && p.Data.Role.IsImpostor && player.PlayerId != p.PlayerId && team.All(x => x.PlayerId != p.PlayerId)) team.Add(p); else if (player == Jackal.jackal && p == Sidekick.sidekick) team.Add(p); else if (player == Sidekick.sidekick && p == Jackal.jackal) team.Add(p); diff --git a/TheOtherRoles/Main.cs b/TheOtherRoles/Main.cs index 066a0bf..a3a42d4 100644 --- a/TheOtherRoles/Main.cs +++ b/TheOtherRoles/Main.cs @@ -14,7 +14,6 @@ using System.Linq; using System; using UnityEngine; using TheOtherRoles.Modules; -using TheOtherRoles.Players; using TheOtherRoles.Utilities; using Il2CppSystem.Security.Cryptography; using Il2CppSystem.Text; @@ -33,7 +32,7 @@ namespace TheOtherRoles public class TheOtherRolesPlugin : BasePlugin { public const string Id = "me.eisbison.theotherroles"; - public const string VersionString = "4.6.0"; + public const string VersionString = "4.7.0"; public static uint betaDays = 0; // amount of days for the build to be usable (0 for infinite!) public static Version Version = Version.Parse(VersionString); @@ -118,6 +117,9 @@ namespace TheOtherRoles ServerManager.DefaultRegions = new Il2CppReferenceArray(new IRegionInfo[0]); UpdateRegions(); + // Reactor Credits (future use?) + // Reactor.Utilities.ReactorCredits.Register("TheOtherRoles", VersionString, betaDays > 0, location => location == Reactor.Utilities.ReactorCredits.Location.PingTracker); + DebugMode = Config.Bind("Custom", "Enable Debug Mode", "false"); Harmony.PatchAll(); @@ -189,7 +191,7 @@ namespace TheOtherRoles GameData.Instance.AddPlayer(playerControl, new InnerNet.ClientData(0)); AmongUsClient.Instance.Spawn(playerControl, -2, InnerNet.SpawnFlags.None); - playerControl.transform.position = CachedPlayer.LocalPlayer.transform.position; + playerControl.transform.position = PlayerControl.LocalPlayer.transform.position; playerControl.GetComponent().enabled = true; playerControl.NetTransform.enabled = false; playerControl.SetName(RandomString(10)); @@ -199,7 +201,7 @@ namespace TheOtherRoles // Terminate round if(Input.GetKeyDown(KeyCode.L)) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ForceEnd, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ForceEnd, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.forceEnd(); } diff --git a/TheOtherRoles/Modules/BepInExUpdater.cs b/TheOtherRoles/Modules/BepInExUpdater.cs index 4f994a7..ede68db 100644 --- a/TheOtherRoles/Modules/BepInExUpdater.cs +++ b/TheOtherRoles/Modules/BepInExUpdater.cs @@ -19,8 +19,8 @@ namespace TheOtherRoles.Modules; public class BepInExUpdater : MonoBehaviour { - public const string RequiredBepInExVersion = "6.0.0-be.692+851521cc126e4f9d841d2d9bfe857558f0395939"; - public const string BepInExDownloadURL = "https://builds.bepinex.dev/projects/bepinex_be/692/BepInEx-Unity.IL2CPP-win-x86-6.0.0-be.692%2B851521c.zip"; + public const string RequiredBepInExVersion = "6.0.0-be.697+53625800b86f6c68751445248260edf0b27a71c2"; + public const string BepInExDownloadURL = "https://builds.bepinex.dev/projects/bepinex_be/697/BepInEx-Unity.IL2CPP-win-x86-6.0.0-be.697%2B5362580.zip"; public static bool UpdateRequired => Paths.BepInExVersion.ToString() != RequiredBepInExVersion; public void Awake() diff --git a/TheOtherRoles/Modules/ChatCommands.cs b/TheOtherRoles/Modules/ChatCommands.cs index 331a913..96d8cf1 100644 --- a/TheOtherRoles/Modules/ChatCommands.cs +++ b/TheOtherRoles/Modules/ChatCommands.cs @@ -1,7 +1,6 @@ using System; using HarmonyLib; using System.Linq; -using TheOtherRoles.Players; using TheOtherRoles.Utilities; using Hazel; @@ -18,7 +17,7 @@ namespace TheOtherRoles.Modules { if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.GameStates.Started) { if (text.ToLower().StartsWith("/kick ")) { string playerName = text.Substring(6); - PlayerControl target = CachedPlayer.AllPlayers.FirstOrDefault(x => x.Data.PlayerName.Equals(playerName)); + PlayerControl target = PlayerControl.AllPlayerControls.ToArray().FirstOrDefault(x => x.Data.PlayerName.Equals(playerName)); if (target != null && AmongUsClient.Instance != null && AmongUsClient.Instance.CanBan()) { var client = AmongUsClient.Instance.GetClient(target.OwnerId); if (client != null) { @@ -28,7 +27,7 @@ namespace TheOtherRoles.Modules { } } else if (text.ToLower().StartsWith("/ban ")) { string playerName = text.Substring(5); - PlayerControl target = CachedPlayer.AllPlayers.FirstOrDefault(x => x.Data.PlayerName.Equals(playerName)); + PlayerControl target = PlayerControl.AllPlayerControls.ToArray().FirstOrDefault(x => x.Data.PlayerName.Equals(playerName)); if (target != null && AmongUsClient.Instance != null && AmongUsClient.Instance.CanBan()) { var client = AmongUsClient.Instance.GetClient(target.OwnerId); if (client != null) { @@ -49,13 +48,13 @@ namespace TheOtherRoles.Modules { // else its classic! if (AmongUsClient.Instance.AmHost) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGamemode, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGamemode, Hazel.SendOption.Reliable, -1); writer.Write((byte)TORMapOptions.gameMode); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.shareGamemode((byte)gameMode); RPCProcedure.shareGamemode((byte)TORMapOptions.gameMode); } else { - __instance.AddChat(CachedPlayer.LocalPlayer.PlayerControl, "Nice try, but you have to be the host to use this feature"); + __instance.AddChat(PlayerControl.LocalPlayer, "Nice try, but you have to be the host to use this feature"); } handled = true; } @@ -63,35 +62,35 @@ namespace TheOtherRoles.Modules { if (AmongUsClient.Instance.NetworkMode == NetworkModes.FreePlay) { if (text.ToLower().Equals("/murder")) { - CachedPlayer.LocalPlayer.PlayerControl.Exiled(); - FastDestroyableSingleton.Instance.KillOverlay.ShowKillAnimation(CachedPlayer.LocalPlayer.Data, CachedPlayer.LocalPlayer.Data); + PlayerControl.LocalPlayer.Exiled(); + FastDestroyableSingleton.Instance.KillOverlay.ShowKillAnimation(PlayerControl.LocalPlayer.Data, PlayerControl.LocalPlayer.Data); handled = true; } else if (text.ToLower().StartsWith("/color ")) { handled = true; int col; if (!Int32.TryParse(text.Substring(7), out col)) { - __instance.AddChat(CachedPlayer.LocalPlayer.PlayerControl, "Unable to parse color id\nUsage: /color {id}"); + __instance.AddChat(PlayerControl.LocalPlayer, "Unable to parse color id\nUsage: /color {id}"); } col = Math.Clamp(col, 0, Palette.PlayerColors.Length - 1); - CachedPlayer.LocalPlayer.PlayerControl.SetColor(col); - __instance.AddChat(CachedPlayer.LocalPlayer.PlayerControl, "Changed color succesfully");; + PlayerControl.LocalPlayer.SetColor(col); + __instance.AddChat(PlayerControl.LocalPlayer, "Changed color succesfully");; } } - if (text.ToLower().StartsWith("/tp ") && CachedPlayer.LocalPlayer.Data.IsDead) { + if (text.ToLower().StartsWith("/tp ") && PlayerControl.LocalPlayer.Data.IsDead) { string playerName = text.Substring(4).ToLower(); - PlayerControl target = CachedPlayer.AllPlayers.FirstOrDefault(x => x.Data.PlayerName.ToLower().Equals(playerName)); + PlayerControl target = PlayerControl.AllPlayerControls.ToArray().FirstOrDefault(x => x.Data.PlayerName.ToLower().Equals(playerName)); if (target != null) { - CachedPlayer.LocalPlayer.transform.position = target.transform.position; + PlayerControl.LocalPlayer.transform.position = target.transform.position; handled = true; } } if (text.ToLower().StartsWith("/role")) { - RoleInfo localRole = RoleInfo.getRoleInfoForPlayer(CachedPlayer.LocalPlayer.PlayerControl, false).FirstOrDefault(); + RoleInfo localRole = RoleInfo.getRoleInfoForPlayer(PlayerControl.LocalPlayer, false).FirstOrDefault(); if (localRole != RoleInfo.impostor && localRole != RoleInfo.crewmate) { string info = RoleInfo.GetRoleDescription(localRole); - __instance.AddChat(CachedPlayer.LocalPlayer.PlayerControl, info); + __instance.AddChat(PlayerControl.LocalPlayer, info); handled = true; } } @@ -106,7 +105,7 @@ namespace TheOtherRoles.Modules { [HarmonyPatch(typeof(HudManager), nameof(HudManager.Update))] public static class EnableChat { public static void Postfix(HudManager __instance) { - if (!__instance.Chat.isActiveAndEnabled && (AmongUsClient.Instance.NetworkMode == NetworkModes.FreePlay || (CachedPlayer.LocalPlayer.PlayerControl.isLover() && Lovers.enableChat))) + if (!__instance.Chat.isActiveAndEnabled && (AmongUsClient.Instance.NetworkMode == NetworkModes.FreePlay || (PlayerControl.LocalPlayer.isLover() && Lovers.enableChat))) __instance.Chat.SetVisible(true); } } @@ -115,7 +114,7 @@ namespace TheOtherRoles.Modules { public static class SetBubbleName { public static void Postfix(ChatBubble __instance, [HarmonyArgument(0)] string playerName) { PlayerControl sourcePlayer = PlayerControl.AllPlayerControls.ToArray().ToList().FirstOrDefault(x => x.Data != null && x.Data.PlayerName.Equals(playerName)); - if (sourcePlayer != null && CachedPlayer.LocalPlayer != null && CachedPlayer.LocalPlayer.Data?.Role?.IsImpostor == true && (Spy.spy != null && sourcePlayer.PlayerId == Spy.spy.PlayerId || Sidekick.sidekick != null && Sidekick.wasTeamRed && sourcePlayer.PlayerId == Sidekick.sidekick.PlayerId || Jackal.jackal != null && Jackal.wasTeamRed && sourcePlayer.PlayerId == Jackal.jackal.PlayerId) && __instance != null) __instance.NameText.color = Palette.ImpostorRed; + if (sourcePlayer != null && PlayerControl.LocalPlayer != null && PlayerControl.LocalPlayer.Data?.Role?.IsImpostor == true && (Spy.spy != null && sourcePlayer.PlayerId == Spy.spy.PlayerId || Sidekick.sidekick != null && Sidekick.wasTeamRed && sourcePlayer.PlayerId == Sidekick.sidekick.PlayerId || Jackal.jackal != null && Jackal.wasTeamRed && sourcePlayer.PlayerId == Jackal.jackal.PlayerId) && __instance != null) __instance.NameText.color = Palette.ImpostorRed; } } @@ -124,8 +123,8 @@ namespace TheOtherRoles.Modules { public static bool Prefix(ChatController __instance, [HarmonyArgument(0)] PlayerControl sourcePlayer) { if (__instance != FastDestroyableSingleton.Instance.Chat) return true; - PlayerControl localPlayer = CachedPlayer.LocalPlayer.PlayerControl; - return localPlayer == null || (MeetingHud.Instance != null || LobbyBehaviour.Instance != null || (localPlayer.Data.IsDead || localPlayer.isLover() && Lovers.enableChat) || (int)sourcePlayer.PlayerId == (int)CachedPlayer.LocalPlayer.PlayerId); + PlayerControl localPlayer = PlayerControl.LocalPlayer; + return localPlayer == null || (MeetingHud.Instance != null || LobbyBehaviour.Instance != null || (localPlayer.Data.IsDead || localPlayer.isLover() && Lovers.enableChat) || (int)sourcePlayer.PlayerId == (int)PlayerControl.LocalPlayer.PlayerId); } } diff --git a/TheOtherRoles/Modules/CustomOptions.cs b/TheOtherRoles/Modules/CustomOptions.cs index dd5b4bd..cdbf309 100644 --- a/TheOtherRoles/Modules/CustomOptions.cs +++ b/TheOtherRoles/Modules/CustomOptions.cs @@ -8,7 +8,6 @@ using HarmonyLib; using Hazel; using System.Reflection; using System.Text; -using TheOtherRoles.Players; using TheOtherRoles.Utilities; using static TheOtherRoles.TheOtherRoles; using static TheOtherRoles.CustomOption; @@ -18,6 +17,9 @@ using BepInEx.Unity.IL2CPP; using BepInEx; using static ShipStatus; using TMPro; +using Rewired.Utils.Platforms.Windows; +using static Il2CppSystem.Xml.Schema.FacetsChecker.FacetsCompiler; +using TheOtherRoles; namespace TheOtherRoles { public class CustomOption { @@ -128,7 +130,7 @@ namespace TheOtherRoles { public static void ShareOptionChange(uint optionId) { var option = options.FirstOrDefault(x => x.id == optionId); if (option == null) return; - var writer = AmongUsClient.Instance!.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareOptions, SendOption.Reliable, -1); + var writer = AmongUsClient.Instance!.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareOptions, SendOption.Reliable, -1); writer.Write((byte)1); writer.WritePacked((uint)option.id); writer.WritePacked(Convert.ToUInt32(option.selection)); @@ -136,12 +138,12 @@ namespace TheOtherRoles { } public static void ShareOptionSelections() { - if (CachedPlayer.AllPlayers.Count <= 1 || AmongUsClient.Instance!.AmHost == false && CachedPlayer.LocalPlayer.PlayerControl == null) return; + if (PlayerControl.AllPlayerControls.Count <= 1 || AmongUsClient.Instance!.AmHost == false && PlayerControl.LocalPlayer == null) return; var optionsList = new List(CustomOption.options); while (optionsList.Any()) { byte amount = (byte) Math.Min(optionsList.Count, 200); // takes less than 3 bytes per option on average - var writer = AmongUsClient.Instance!.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareOptions, SendOption.Reliable, -1); + var writer = AmongUsClient.Instance!.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareOptions, SendOption.Reliable, -1); writer.Write(amount); for (int i = 0; i < amount; i++) { @@ -178,6 +180,7 @@ namespace TheOtherRoles { if (AmongUsClient.Instance?.AmClient == true && notifyUsers && selection != newSelection) { DestroyableSingleton.Instance.Notifier.AddSettingsChangeMessage((StringNames)(this.id + 6000), selections[newSelection].ToString(), false); try { + selection = newSelection; if (GameStartManager.Instance != null && GameStartManager.Instance.LobbyInfoPane != null && GameStartManager.Instance.LobbyInfoPane.LobbyViewSettingsPane != null && GameStartManager.Instance.LobbyInfoPane.LobbyViewSettingsPane.gameObject.activeSelf) { LobbyViewSettingsPaneChangeTabPatch.Postfix(GameStartManager.Instance.LobbyInfoPane.LobbyViewSettingsPane, GameStartManager.Instance.LobbyInfoPane.LobbyViewSettingsPane.currentTab); } @@ -187,10 +190,18 @@ namespace TheOtherRoles { try { if (onChange != null) onChange(); } catch { } + if (AmongUsClient.Instance?.AmHost == true) { + var currentTab = GameOptionsMenuStartPatch.currentTabs.FirstOrDefault(x => x.active).GetComponent(); + if (currentTab != null) { + var optionType = options.First(x => x.optionBehaviour == currentTab.Children[0]).type; + GameOptionsMenuStartPatch.updateGameOptionsMenu(optionType, currentTab); + } + } + if (optionBehaviour != null && optionBehaviour is StringOption stringOption) { stringOption.oldValue = stringOption.Value = selection; stringOption.ValueText.text = selections[selection].ToString(); - if (AmongUsClient.Instance?.AmHost == true && CachedPlayer.LocalPlayer.PlayerControl) { + if (AmongUsClient.Instance?.AmHost == true && PlayerControl.LocalPlayer) { if (id == 0 && selection != preset) { switchPreset(selection); // Switch presets ShareOptionSelections(); @@ -469,7 +480,9 @@ namespace TheOtherRoles { __instance.settingsInfo.Add(categoryHeaderMasked.gameObject); num -= 0.85f; i = 0; - } + } else if (option.parent != null && (option.parent.selection == 0 || option.parent.parent != null && option.parent.parent.selection == 0)) continue; // Hides options, for which the parent is disabled! + if (option == CustomOptionHolder.crewmateRolesCountMax || option == CustomOptionHolder.neutralRolesCountMax || option == CustomOptionHolder.impostorRolesCountMax || option == CustomOptionHolder.modifiersCountMax || option == CustomOptionHolder.crewmateRolesFill) + continue; ViewSettingsInfoPanel viewSettingsInfoPanel = UnityEngine.Object.Instantiate(__instance.infoPanelOrigin); viewSettingsInfoPanel.transform.SetParent(__instance.settingsContainer); @@ -486,8 +499,9 @@ namespace TheOtherRoles { } viewSettingsInfoPanel.transform.localPosition = new Vector3(num2, num, -2f); int value = option.getSelection(); - viewSettingsInfoPanel.SetInfo(StringNames.ImpostorsCategory, option.selections[value].ToString(), 61); - viewSettingsInfoPanel.titleText.text = option.name; + var settingTuple = handleSpecialOptionsView(option, option.name, option.selections[value].ToString()); + viewSettingsInfoPanel.SetInfo(StringNames.ImpostorsCategory, settingTuple.Item2, 61); + viewSettingsInfoPanel.titleText.text = settingTuple.Item1; if (option.isHeader && (int)optionType != 99 && option.heading == "" && (option.type == CustomOptionType.Neutral || option.type == CustomOptionType.Crewmate || option.type == CustomOptionType.Impostor || option.type == CustomOptionType.Modifier)) { viewSettingsInfoPanel.titleText.text = "Spawn Chance"; } @@ -506,6 +520,53 @@ namespace TheOtherRoles { } + private static Tuple handleSpecialOptionsView(CustomOption option, string defaultString, string defaultVal) { + string name = defaultString; + string val = defaultVal; + if (option == CustomOptionHolder.crewmateRolesCountMin) { + val = ""; + name = "Crewmate Roles"; + var min = CustomOptionHolder.crewmateRolesCountMin.getSelection(); + var max = CustomOptionHolder.crewmateRolesCountMax.getSelection(); + if (CustomOptionHolder.crewmateRolesFill.getBool()) { + var crewCount = PlayerControl.AllPlayerControls.Count - GameOptionsManager.Instance.currentGameOptions.NumImpostors; + int minNeutral = CustomOptionHolder.neutralRolesCountMin.getSelection(); + int maxNeutral = CustomOptionHolder.neutralRolesCountMax.getSelection(); + if (minNeutral > maxNeutral) minNeutral = maxNeutral; + min = crewCount - maxNeutral; + max = crewCount - minNeutral; + if (min < 0) min = 0; + if (max < 0) max = 0; + val = "Fill: "; + } + if (min > max) min = max; + val += (min == max) ? $"{max}" : $"{min} - {max}"; + } + if (option == CustomOptionHolder.neutralRolesCountMin) { + name = "Neutral Roles"; + var min = CustomOptionHolder.neutralRolesCountMin.getSelection(); + var max = CustomOptionHolder.neutralRolesCountMax.getSelection(); + if (min > max) min = max; + val = (min == max) ? $"{max}" : $"{min} - {max}"; + } + if (option == CustomOptionHolder.impostorRolesCountMin) { + name = "Impostor Roles"; + var min = CustomOptionHolder.impostorRolesCountMin.getSelection(); + var max = CustomOptionHolder.impostorRolesCountMax.getSelection(); + if (max > GameOptionsManager.Instance.currentGameOptions.NumImpostors) max = GameOptionsManager.Instance.currentGameOptions.NumImpostors; + if (min > max) min = max; + val = (min == max) ? $"{max}" : $"{min} - {max}"; + } + if (option == CustomOptionHolder.modifiersCountMin) { + name = "Modifiers"; + var min = CustomOptionHolder.modifiersCountMin.getSelection(); + var max = CustomOptionHolder.modifiersCountMax.getSelection(); + if (min > max) min = max; + val = (min == max) ? $"{max}" : $"{min} - {max}"; + } + return new(name, val); + } + public static void createSettingTabs(LobbyViewSettingsPane __instance) { // Handle different gamemodes and tabs needed therein. int next = 3; @@ -640,7 +701,7 @@ namespace TheOtherRoles { categoryHeaderMasked.transform.localScale = Vector3.one * 0.63f; categoryHeaderMasked.transform.localPosition = new Vector3(-0.903f, num, -2f); num -= 0.63f; - } + } else if (option.parent != null && (option.parent.selection == 0 || option.parent.parent != null && option.parent.parent.selection == 0)) continue; // Hides options, for which the parent is disabled! OptionBehaviour optionBehaviour = UnityEngine.Object.Instantiate(menu.stringOptionOrigin, Vector3.zero, Quaternion.identity, menu.settingsContainer); optionBehaviour.transform.localPosition = new Vector3(0.952f, num, -2f); optionBehaviour.SetClickMask(menu.ButtonClickMask); @@ -722,6 +783,14 @@ namespace TheOtherRoles { torSettingsTab.name = settingName; var torSettingsGOM = torSettingsTab.GetComponent(); + + updateGameOptionsMenu(optionType, torSettingsGOM); + + currentTabs.Add(torSettingsTab); + torSettingsTab.SetActive(false); + } + + public static void updateGameOptionsMenu(CustomOptionType optionType, GameOptionsMenu torSettingsGOM) { foreach (var child in torSettingsGOM.Children) { child.Destroy(); } @@ -731,9 +800,6 @@ namespace TheOtherRoles { if (TORMapOptions.gameMode == CustomGamemodes.Guesser) // Exclude guesser options in neutral mode relevantOptions = relevantOptions.Where(x => !(new List { 310, 311, 312, 313, 314, 315, 316, 317, 318 }).Contains(x.id)).ToList(); createSettings(torSettingsGOM, relevantOptions); - - currentTabs.Add(torSettingsTab); - torSettingsTab.SetActive(false); } private static void createSettingTabs(GameSettingMenu __instance) { @@ -1136,6 +1202,14 @@ namespace TheOtherRoles { GameOptionsData.KillDistances = new(new float[] { 0.5f, 1f, 1.8f, 2.5f }); GameOptionsData.KillDistanceStrings = new(new string[] { "Very Short", "Short", "Medium", "Long" }); } + + [HarmonyPatch(typeof(StringGameSetting), nameof(StringGameSetting.GetValueString))] + [HarmonyPrefix] + public static bool AjdustStringForViewPanel(StringGameSetting __instance, float value, ref string __result) { + if (__instance.OptionName != Int32OptionNames.KillDistance) return true; + __result = GameOptionsData.KillDistanceStrings[(int)value]; + return false; + } } [HarmonyPatch(typeof(KeyboardJoystick), nameof(KeyboardJoystick.Update))] @@ -1219,7 +1293,7 @@ namespace TheOtherRoles { Scroller.ContentYBounds = new FloatRange(MinY, maxY); // Prevent scrolling when the player is interacting with a menu - if (CachedPlayer.LocalPlayer?.PlayerControl.CanMove != true) { + if (PlayerControl.LocalPlayer.CanMove != true) { GameSettings.transform.localPosition = LastPosition; return; @@ -1357,9 +1431,9 @@ namespace TheOtherRoles { toggleZoomButton.OnClick.RemoveAllListeners(); toggleZoomButton.OnClick.AddListener((Action)(() => Helpers.toggleZoom())); } - var (playerCompleted, playerTotal) = TasksHandler.taskInfo(CachedPlayer.LocalPlayer.Data); + var (playerCompleted, playerTotal) = TasksHandler.taskInfo(PlayerControl.LocalPlayer.Data); int numberOfLeftTasks = playerTotal - playerCompleted; - bool zoomButtonActive = !(CachedPlayer.LocalPlayer.PlayerControl == null || !CachedPlayer.LocalPlayer.Data.IsDead || (CachedPlayer.LocalPlayer.Data.Role.IsImpostor && !CustomOptionHolder.deadImpsBlockSabotage.getBool())); + bool zoomButtonActive = !(PlayerControl.LocalPlayer == null || !PlayerControl.LocalPlayer.Data.IsDead || (PlayerControl.LocalPlayer.Data.Role.IsImpostor && !CustomOptionHolder.deadImpsBlockSabotage.getBool()) || MeetingHud.Instance); zoomButtonActive &= numberOfLeftTasks <= 0 || !CustomOptionHolder.finishTasksBeforeHauntingOrZoomingOut.getBool(); toggleZoomButtonObject.SetActive(zoomButtonActive); var posOffset = Helpers.zoomOutStatus ? new Vector3(-1.27f, -7.92f, -52f) : new Vector3(0, -1.6f, -52f); diff --git a/TheOtherRoles/Modules/DynamicLobbies.cs b/TheOtherRoles/Modules/DynamicLobbies.cs index cabb5ee..36509ca 100644 --- a/TheOtherRoles/Modules/DynamicLobbies.cs +++ b/TheOtherRoles/Modules/DynamicLobbies.cs @@ -4,7 +4,7 @@ using AmongUs.GameOptions; using HarmonyLib; using Hazel; using InnerNet; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; namespace TheOtherRoles.Modules { @@ -21,16 +21,16 @@ namespace TheOtherRoles.Modules { if (AmongUsClient.Instance.AmHost && AmongUsClient.Instance.CanBan()) { // checking both just cause handled = true; if (!Int32.TryParse(text.Substring(6), out LobbyLimit)) { - __instance.AddChat(CachedPlayer.LocalPlayer.PlayerControl, "Invalid Size\nUsage: /size {amount}"); + __instance.AddChat(PlayerControl.LocalPlayer, "Invalid Size\nUsage: /size {amount}"); } else { LobbyLimit = Math.Clamp(LobbyLimit, 4, 15); if (LobbyLimit != GameOptionsManager.Instance.currentNormalGameOptions.MaxPlayers) { GameOptionsManager.Instance.currentNormalGameOptions.MaxPlayers = LobbyLimit; FastDestroyableSingleton.Instance.LastPlayerCount = LobbyLimit; - CachedPlayer.LocalPlayer.PlayerControl.RpcSyncSettings(GameOptionsManager.Instance.gameOptionsFactory.ToBytes(GameOptionsManager.Instance.currentGameOptions, false)); // TODO Maybe simpler?? - __instance.AddChat(CachedPlayer.LocalPlayer.PlayerControl, $"Lobby Size changed to {LobbyLimit} players"); + PlayerControl.LocalPlayer.RpcSyncSettings(GameOptionsManager.Instance.gameOptionsFactory.ToBytes(GameOptionsManager.Instance.currentGameOptions, false)); // TODO Maybe simpler?? + __instance.AddChat(PlayerControl.LocalPlayer, $"Lobby Size changed to {LobbyLimit} players"); } else { - __instance.AddChat(CachedPlayer.LocalPlayer.PlayerControl, $"Lobby Size is already {LobbyLimit}"); + __instance.AddChat(PlayerControl.LocalPlayer, $"Lobby Size is already {LobbyLimit}"); } } } diff --git a/TheOtherRoles/Objects/Bomb.cs b/TheOtherRoles/Objects/Bomb.cs index 69708f4..f881162 100644 --- a/TheOtherRoles/Objects/Bomb.cs +++ b/TheOtherRoles/Objects/Bomb.cs @@ -2,7 +2,6 @@ using Hazel; using System; using System.Collections.Generic; using System.Linq; -using TheOtherRoles.Players; using TheOtherRoles.Utilities; using UnityEngine; @@ -51,7 +50,7 @@ namespace TheOtherRoles.Objects { bomb.SetActive(false); background.SetActive(false); - if (CachedPlayer.LocalPlayer.PlayerControl == Bomber.bomber) { + if (PlayerControl.LocalPlayer == Bomber.bomber) { bomb.SetActive(true); } Bomber.bomb = this; @@ -82,18 +81,18 @@ namespace TheOtherRoles.Objects { if (b == null) return; if (Bomber.bomber != null) { var position = b.bomb.transform.position; - var distance = Vector2.Distance(position, CachedPlayer.LocalPlayer.transform.position); // every player only checks that for their own client (desynct with positions sucks) - if (distance < Bomber.destructionRange && !CachedPlayer.LocalPlayer.Data.IsDead) { - Helpers.checkMurderAttemptAndKill(Bomber.bomber, CachedPlayer.LocalPlayer.PlayerControl, false, false, true, true); + var distance = Vector2.Distance(position, PlayerControl.LocalPlayer.transform.position); // every player only checks that for their own client (desynct with positions sucks) + if (distance < Bomber.destructionRange && !PlayerControl.LocalPlayer.Data.IsDead) { + Helpers.checkMurderAttemptAndKill(Bomber.bomber, PlayerControl.LocalPlayer, false, false, true, true); - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write((byte)RPCProcedure.GhostInfoTypes.DeathReasonAndKiller); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write((byte)DeadPlayer.CustomDeathReason.Bomb); writer.Write(Bomber.bomber.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); - GameHistory.overrideDeathReasonAndKiller(CachedPlayer.LocalPlayer, DeadPlayer.CustomDeathReason.Bomb, killer: Bomber.bomber); + GameHistory.overrideDeathReasonAndKiller(PlayerControl.LocalPlayer, DeadPlayer.CustomDeathReason.Bomb, killer: Bomber.bomber); } SoundEffectsManager.playAtPosition("bombExplosion", position, range: Bomber.hearRange) ; } @@ -113,7 +112,7 @@ namespace TheOtherRoles.Objects { Bomber.clearBomb(); } - if (Vector2.Distance(CachedPlayer.LocalPlayer.PlayerControl.GetTruePosition(), Bomber.bomb.bomb.transform.position) > 1f) canDefuse = false; + if (Vector2.Distance(PlayerControl.LocalPlayer.GetTruePosition(), Bomber.bomb.bomb.transform.position) > 1f) canDefuse = false; else canDefuse = true; } diff --git a/TheOtherRoles/Objects/CustomButton.cs b/TheOtherRoles/Objects/CustomButton.cs index 525f463..ce4d85a 100644 --- a/TheOtherRoles/Objects/CustomButton.cs +++ b/TheOtherRoles/Objects/CustomButton.cs @@ -1,7 +1,6 @@ using Il2CppSystem.Runtime.ExceptionServices; using System; using System.Collections.Generic; -using TheOtherRoles.Players; using TMPro; using UnityEngine; using UnityEngine.UI; @@ -89,7 +88,7 @@ namespace TheOtherRoles.Objects { this.OnClick(); // Deputy skip onClickEvent if handcuffed - if (Deputy.handcuffedKnows.ContainsKey(CachedPlayer.LocalPlayer.PlayerId) && Deputy.handcuffedKnows[CachedPlayer.LocalPlayer.PlayerId] > 0f) return; + if (Deputy.handcuffedKnows.ContainsKey(PlayerControl.LocalPlayer.PlayerId) && Deputy.handcuffedKnows[PlayerControl.LocalPlayer.PlayerId] > 0f) return; if (this.HasEffect && !this.isEffectActive) { this.DeputyTimer = this.EffectDuration; @@ -161,8 +160,8 @@ namespace TheOtherRoles.Objects { public void Update() { - var localPlayer = CachedPlayer.LocalPlayer; - var moveable = localPlayer.PlayerControl.moveable; + var localPlayer = PlayerControl.LocalPlayer; + var moveable = localPlayer.moveable; if (localPlayer.Data == null || MeetingHud.Instance || ExileController.Instance || !HasButton()) { setActive(false); @@ -173,7 +172,7 @@ namespace TheOtherRoles.Objects { if (DeputyTimer >= 0) { // This had to be reordered, so that the handcuffs do not stop the underlying timers from running if (HasEffect && isEffectActive) DeputyTimer -= Time.deltaTime; - else if (!localPlayer.PlayerControl.inVent && moveable) + else if (!localPlayer.inVent && moveable) DeputyTimer -= Time.deltaTime; } @@ -214,7 +213,7 @@ namespace TheOtherRoles.Objects { if (Timer >= 0) { if (HasEffect && isEffectActive) Timer -= Time.deltaTime; - else if (!localPlayer.PlayerControl.inVent && moveable) + else if (!localPlayer.inVent && moveable) Timer -= Time.deltaTime; } diff --git a/TheOtherRoles/Objects/Footprint.cs b/TheOtherRoles/Objects/Footprint.cs index 88faa78..faf870f 100644 --- a/TheOtherRoles/Objects/Footprint.cs +++ b/TheOtherRoles/Objects/Footprint.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; -using TheOtherRoles.Players; using TheOtherRoles.Utilities; using UnityEngine; using static TheOtherRoles.TheOtherRoles; diff --git a/TheOtherRoles/Objects/JackInTheBox.cs b/TheOtherRoles/Objects/JackInTheBox.cs index e44ba28..9781c9e 100644 --- a/TheOtherRoles/Objects/JackInTheBox.cs +++ b/TheOtherRoles/Objects/JackInTheBox.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using UnityEngine; using System.Linq; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using Reactor.Utilities.Extensions; @@ -43,7 +43,7 @@ namespace TheOtherRoles.Objects { gameObject = new GameObject("JackInTheBox"){layer = 11}; gameObject.AddSubmergedComponent(SubmergedCompatibility.Classes.ElevatorMover); Vector3 position = new Vector3(p.x, p.y, p.y/1000f + 0.01f); - position += (Vector3)CachedPlayer.LocalPlayer.PlayerControl.Collider.offset; // Add collider offset that DoMove moves the player up at a valid position + position += (Vector3)PlayerControl.LocalPlayer.Collider.offset; // Add collider offset that DoMove moves the player up at a valid position // Create the marker gameObject.transform.position = position; boxRenderer = gameObject.AddComponent(); @@ -79,7 +79,7 @@ namespace TheOtherRoles.Objects { vent.name = "JackInTheBoxVent_" + vent.Id; // Only render the box for the Trickster and for Ghosts - var showBoxToLocalPlayer = CachedPlayer.LocalPlayer.PlayerControl == Trickster.trickster || PlayerControl.LocalPlayer.Data.IsDead; + var showBoxToLocalPlayer = PlayerControl.LocalPlayer == Trickster.trickster || PlayerControl.LocalPlayer.Data.IsDead; gameObject.SetActive(showBoxToLocalPlayer); AllJackInTheBoxes.Add(this); @@ -88,7 +88,7 @@ namespace TheOtherRoles.Objects { public static void UpdateStates() { if (boxesConvertedToVents == true) return; foreach (var box in AllJackInTheBoxes) { - var showBoxToLocalPlayer = CachedPlayer.LocalPlayer.PlayerControl == Trickster.trickster || PlayerControl.LocalPlayer.Data.IsDead; + var showBoxToLocalPlayer = PlayerControl.LocalPlayer == Trickster.trickster || PlayerControl.LocalPlayer.Data.IsDead; box.gameObject.SetActive(showBoxToLocalPlayer); } } diff --git a/TheOtherRoles/Objects/NinjaTrace.cs b/TheOtherRoles/Objects/NinjaTrace.cs index 8194739..fcdfce9 100644 --- a/TheOtherRoles/Objects/NinjaTrace.cs +++ b/TheOtherRoles/Objects/NinjaTrace.cs @@ -20,7 +20,7 @@ namespace TheOtherRoles.Objects { public NinjaTrace(Vector2 p, float duration=1f) { trace = new GameObject("NinjaTrace"); trace.AddSubmergedComponent(SubmergedCompatibility.Classes.ElevatorMover); - //Vector3 position = new Vector3(p.x, p.y, CachedPlayer.LocalPlayer.transform.localPosition.z + 0.001f); // just behind player + //Vector3 position = new Vector3(p.x, p.y, PlayerControl.LocalPlayer.transform.localPosition.z + 0.001f); // just behind player Vector3 position = new Vector3(p.x, p.y, p.y / 1000f + 0.01f); trace.transform.position = position; trace.transform.localPosition = position; diff --git a/TheOtherRoles/Objects/Portal.cs b/TheOtherRoles/Objects/Portal.cs index a512a32..11fa4b4 100644 --- a/TheOtherRoles/Objects/Portal.cs +++ b/TheOtherRoles/Objects/Portal.cs @@ -1,7 +1,7 @@ using System; using UnityEngine; using System.Collections.Generic; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using static TheOtherRoles.TheOtherRoles; @@ -82,7 +82,7 @@ namespace TheOtherRoles.Objects { public Portal(Vector2 p) { portalGameObject = new GameObject("Portal"){ layer = 11 }; - //Vector3 position = new Vector3(p.x, p.y, CachedPlayer.LocalPlayer.transform.position.z + 1f); + //Vector3 position = new Vector3(p.x, p.y, PlayerControl.LocalPlayer.transform.position.z + 1f); Vector3 position = new Vector3(p.x, p.y, p.y / 1000f + 0.01f); // Create the portal @@ -100,7 +100,7 @@ namespace TheOtherRoles.Objects { animationFgRenderer.material = FastDestroyableSingleton.Instance.PlayerMaterial; // Only render the inactive portals for the Portalmaker - bool playerIsPortalmaker = CachedPlayer.LocalPlayer.PlayerControl == TheOtherRoles.Portalmaker.portalmaker; + bool playerIsPortalmaker = PlayerControl.LocalPlayer == TheOtherRoles.Portalmaker.portalmaker; portalGameObject.SetActive(playerIsPortalmaker); portalFgAnimationGameObject.SetActive(true); diff --git a/TheOtherRoles/Objects/Silhouette.cs b/TheOtherRoles/Objects/Silhouette.cs index 7d2cfaa..b104648 100644 --- a/TheOtherRoles/Objects/Silhouette.cs +++ b/TheOtherRoles/Objects/Silhouette.cs @@ -34,7 +34,7 @@ namespace TheOtherRoles.Objects { this.visibleForEveryOne = visibleForEveryOne; gameObject = new GameObject("Silhouette"); gameObject.AddSubmergedComponent(SubmergedCompatibility.Classes.ElevatorMover); - //Vector3 position = new Vector3(p.x, p.y, CachedPlayer.LocalPlayer.transform.localPosition.z + 0.001f); // just behind player + //Vector3 position = new Vector3(p.x, p.y, PlayerControl.LocalPlayer.transform.localPosition.z + 0.001f); // just behind player Vector3 position = new Vector3(p.x, p.y, p.y / 1000f + 0.01f); gameObject.transform.position = position; gameObject.transform.localPosition = position; diff --git a/TheOtherRoles/Objects/Trap.cs b/TheOtherRoles/Objects/Trap.cs index e8ce265..d613388 100644 --- a/TheOtherRoles/Objects/Trap.cs +++ b/TheOtherRoles/Objects/Trap.cs @@ -2,7 +2,6 @@ using Hazel; using System; using System.Collections.Generic; using System.Linq; -using TheOtherRoles.Players; using TheOtherRoles.Utilities; using UnityEngine; @@ -38,7 +37,7 @@ namespace TheOtherRoles.Objects { var trapRenderer = trap.AddComponent(); trapRenderer.sprite = getTrapSprite(); trap.SetActive(false); - if (CachedPlayer.LocalPlayer.PlayerId == Trapper.trapper.PlayerId) trap.SetActive(true); + if (PlayerControl.LocalPlayer.PlayerId == Trapper.trapper.PlayerId) trap.SetActive(true); trapRenderer.color = Color.white * new Vector4(1, 1, 1, 0.5f); this.instanceId = ++instanceCounter; traps.Add(this); @@ -75,11 +74,11 @@ namespace TheOtherRoles.Objects { Trap t = traps.FirstOrDefault(x => x.instanceId == (int)trapId); PlayerControl player = Helpers.playerById(playerId); if (Trapper.trapper == null || t == null || player == null) return; - bool localIsTrapper = CachedPlayer.LocalPlayer.PlayerId == Trapper.trapper.PlayerId; + bool localIsTrapper = PlayerControl.LocalPlayer.PlayerId == Trapper.trapper.PlayerId; if (!trapPlayerIdMap.ContainsKey(playerId)) trapPlayerIdMap.Add(playerId, t); t.usedCount ++; t.triggerable = false; - if (playerId == CachedPlayer.LocalPlayer.PlayerId || playerId == Trapper.trapper.PlayerId) { + if (playerId == PlayerControl.LocalPlayer.PlayerId || playerId == Trapper.trapper.PlayerId) { t.trap.SetActive(true); SoundEffectsManager.play("trapperTrap"); } @@ -108,7 +107,7 @@ namespace TheOtherRoles.Objects { public static void Update() { if (Trapper.trapper == null) return; - CachedPlayer player = CachedPlayer.LocalPlayer; + var player = PlayerControl.LocalPlayer; Vent vent = MapUtilities.CachedShipStatus.AllVents[0]; float closestDistance = float.MaxValue; @@ -117,16 +116,16 @@ namespace TheOtherRoles.Objects { Trap target = null; foreach (Trap trap in traps) { if (trap.arrow.arrow.active) trap.arrow.Update(); - if (trap.revealed || !trap.triggerable || trap.trappedPlayer.Contains(player.PlayerControl)) continue; - if (player.PlayerControl.inVent || !player.PlayerControl.CanMove) continue; - float distance = Vector2.Distance(trap.trap.transform.position, player.PlayerControl.GetTruePosition()); + if (trap.revealed || !trap.triggerable || trap.trappedPlayer.Contains(player)) continue; + if (player.inVent || !player.CanMove) continue; + float distance = Vector2.Distance(trap.trap.transform.position, player.GetTruePosition()); if (distance <= ud && distance < closestDistance) { closestDistance = distance; target = trap; } } if (target != null && player.PlayerId != Trapper.trapper.PlayerId && !player.Data.IsDead) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.TriggerTrap, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.TriggerTrap, Hazel.SendOption.Reliable, -1); writer.Write(player.PlayerId); writer.Write(target.instanceId); AmongUsClient.Instance.FinishRpcImmediately(writer); diff --git a/TheOtherRoles/Patches/CredentialsPatch.cs b/TheOtherRoles/Patches/CredentialsPatch.cs index bc252ff..778e86a 100644 --- a/TheOtherRoles/Patches/CredentialsPatch.cs +++ b/TheOtherRoles/Patches/CredentialsPatch.cs @@ -6,7 +6,6 @@ using System.Net.Http; using System.Threading.Tasks; using TheOtherRoles; using TheOtherRoles.CustomGameModes; -using TheOtherRoles.Players; using TheOtherRoles.Utilities; using TMPro; using UnityEngine; diff --git a/TheOtherRoles/Patches/DangerMeterPatch.cs b/TheOtherRoles/Patches/DangerMeterPatch.cs index c3f041e..7f8d275 100644 --- a/TheOtherRoles/Patches/DangerMeterPatch.cs +++ b/TheOtherRoles/Patches/DangerMeterPatch.cs @@ -1,5 +1,5 @@ using HarmonyLib; -using TheOtherRoles.Players; + using UnityEngine; namespace TheOtherRoles.Patches { @@ -12,7 +12,7 @@ namespace TheOtherRoles.Patches { [HarmonyPrefix] public static void Prefix(DangerMeter __instance, ref Color color) { - if (CachedPlayer.LocalPlayer.PlayerControl != Tracker.tracker) return; + if (PlayerControl.LocalPlayer != Tracker.tracker) return; if (__instance == HudManager.Instance.DangerMeter) return; color = color.SetAlpha(0.5f); diff --git a/TheOtherRoles/Patches/EndGamePatch.cs b/TheOtherRoles/Patches/EndGamePatch.cs index 485c621..ac3c131 100644 --- a/TheOtherRoles/Patches/EndGamePatch.cs +++ b/TheOtherRoles/Patches/EndGamePatch.cs @@ -6,9 +6,10 @@ using UnityEngine; using System.Linq; using System; using System.Text; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using TheOtherRoles.CustomGameModes; +using LibCpp2IL.Elf; namespace TheOtherRoles.Patches { enum CustomGameOverReason { @@ -63,8 +64,8 @@ namespace TheOtherRoles.Patches { [HarmonyPatch(typeof(AmongUsClient), nameof(AmongUsClient.OnGameEnd))] - public class OnGameEndPatch { - private static GameOverReason gameOverReason; + public static class OnGameEndPatch { + public static GameOverReason gameOverReason = GameOverReason.HumansByTask; public static void Prefix(AmongUsClient __instance, [HarmonyArgument(0)]ref EndGameResult endGameResult) { gameOverReason = endGameResult.GameOverReason; if ((int)endGameResult.GameOverReason >= 10) endGameResult.GameOverReason = GameOverReason.ImpostorByKill; @@ -76,7 +77,7 @@ namespace TheOtherRoles.Patches { public static void Postfix(AmongUsClient __instance, [HarmonyArgument(0)]ref EndGameResult endGameResult) { AdditionalTempData.clear(); - foreach(var playerControl in CachedPlayer.AllPlayers) { + foreach(var playerControl in PlayerControl.AllPlayerControls) { var roles = RoleInfo.getRoleInfoForPlayer(playerControl); var (tasksCompleted, tasksTotal) = TasksHandler.taskInfo(playerControl.Data); bool isGuesser = HandleGuesser.isGuesserGm && HandleGuesser.isGuesser(playerControl.PlayerId); @@ -123,7 +124,7 @@ namespace TheOtherRoles.Patches { CachedPlayerData wpd = new CachedPlayerData(Mini.mini.Data); wpd.IsYou = false; // If "no one is the Mini", it will display the Mini, but also show defeat to everyone EndGameResult.CachedWinners.Add(wpd); - AdditionalTempData.winCondition = WinCondition.MiniLose; + AdditionalTempData.winCondition = WinCondition.MiniLose; } // Jester win @@ -164,7 +165,7 @@ namespace TheOtherRoles.Patches { if (!Lovers.existingWithKiller()) { AdditionalTempData.winCondition = WinCondition.LoversTeamWin; EndGameResult.CachedWinners = new Il2CppSystem.Collections.Generic.List(); - foreach (PlayerControl p in CachedPlayer.AllPlayers) { + foreach (PlayerControl p in PlayerControl.AllPlayerControls) { if (p == null) continue; if (p == Lovers.lover1 || p == Lovers.lover2) EndGameResult.CachedWinners.Add(new CachedPlayerData(p.Data)); @@ -182,24 +183,24 @@ namespace TheOtherRoles.Patches { EndGameResult.CachedWinners.Add(new CachedPlayerData(Lovers.lover2.Data)); } } - + // Jackal win condition (should be implemented using a proper GameOverReason in the future) else if (teamJackalWin) { // Jackal wins if nobody except jackal is alive AdditionalTempData.winCondition = WinCondition.JackalWin; EndGameResult.CachedWinners = new Il2CppSystem.Collections.Generic.List(); CachedPlayerData wpd = new CachedPlayerData(Jackal.jackal.Data); - wpd.IsImpostor = false; + wpd.IsImpostor = false; EndGameResult.CachedWinners.Add(wpd); // If there is a sidekick. The sidekick also wins if (Sidekick.sidekick != null) { CachedPlayerData wpdSidekick = new CachedPlayerData(Sidekick.sidekick.Data); - wpdSidekick.IsImpostor = false; + wpdSidekick.IsImpostor = false; EndGameResult.CachedWinners.Add(wpdSidekick); } - foreach(var player in Jackal.formerJackals) { + foreach (var player in Jackal.formerJackals) { CachedPlayerData wpdFormerJackal = new CachedPlayerData(player.Data); - wpdFormerJackal.IsImpostor = false; + wpdFormerJackal.IsImpostor = false; EndGameResult.CachedWinners.Add(wpdFormerJackal); } } @@ -292,36 +293,60 @@ namespace TheOtherRoles.Patches { if (AdditionalTempData.winCondition == WinCondition.JesterWin) { textRenderer.text = "Jester Wins"; textRenderer.color = Jester.color; - } - else if (AdditionalTempData.winCondition == WinCondition.ArsonistWin) { + } else if (AdditionalTempData.winCondition == WinCondition.ArsonistWin) { textRenderer.text = "Arsonist Wins"; textRenderer.color = Arsonist.color; - } - else if (AdditionalTempData.winCondition == WinCondition.VultureWin) { + } else if (AdditionalTempData.winCondition == WinCondition.VultureWin) { textRenderer.text = "Vulture Wins"; textRenderer.color = Vulture.color; - } - else if (AdditionalTempData.winCondition == WinCondition.ProsecutorWin) { + } else if (AdditionalTempData.winCondition == WinCondition.ProsecutorWin) { textRenderer.text = "Prosecutor Wins"; textRenderer.color = Lawyer.color; - } - else if (AdditionalTempData.winCondition == WinCondition.LoversTeamWin) { + } else if (AdditionalTempData.winCondition == WinCondition.LoversTeamWin) { textRenderer.text = "Lovers And Crewmates Win"; textRenderer.color = Lovers.color; __instance.BackgroundBar.material.SetColor("_Color", Lovers.color); - } - else if (AdditionalTempData.winCondition == WinCondition.LoversSoloWin) { + } else if (AdditionalTempData.winCondition == WinCondition.LoversSoloWin) { textRenderer.text = "Lovers Win"; textRenderer.color = Lovers.color; __instance.BackgroundBar.material.SetColor("_Color", Lovers.color); - } - else if (AdditionalTempData.winCondition == WinCondition.JackalWin) { + } else if (AdditionalTempData.winCondition == WinCondition.JackalWin) { textRenderer.text = "Team Jackal Wins"; textRenderer.color = Jackal.color; - } - else if (AdditionalTempData.winCondition == WinCondition.MiniLose) { + } else if (AdditionalTempData.winCondition == WinCondition.MiniLose) { textRenderer.text = "Mini died"; textRenderer.color = Mini.color; + } else if (AdditionalTempData.winCondition == WinCondition.Default) { + switch (OnGameEndPatch.gameOverReason) { + case GameOverReason.ImpostorDisconnect: + textRenderer.text = "Last Crewmate Disconnected"; + textRenderer.color = Color.red; + break; + case GameOverReason.ImpostorByKill: + textRenderer.text = "Impostors Win - By Kill"; + textRenderer.color = Color.red; + break; + case GameOverReason.ImpostorBySabotage: + textRenderer.text = "Impostors Win - By Sabotage"; + textRenderer.color = Color.red; + break; + case GameOverReason.ImpostorByVote: + textRenderer.text = "Impostors Win - By Vote, Guess or DC"; + textRenderer.color = Color.red; + break; + case GameOverReason.HumansByTask: + textRenderer.text = "Crew Wins - Taskwin"; + textRenderer.color = Color.white; + break; + case GameOverReason.HumansDisconnect: + textRenderer.text = "Crew Wins - No Evil Killers Left"; + textRenderer.color = Color.white; + break; + case GameOverReason.HumansByVote: + textRenderer.text = "Crew Wins - No Evil Killers Left"; + textRenderer.color = Color.white; + break; + } } foreach (WinCondition cond in AdditionalTempData.additionalWinConditions) { diff --git a/TheOtherRoles/Patches/ExileControllerPatch.cs b/TheOtherRoles/Patches/ExileControllerPatch.cs index 12b1ea2..5ff9fb3 100644 --- a/TheOtherRoles/Patches/ExileControllerPatch.cs +++ b/TheOtherRoles/Patches/ExileControllerPatch.cs @@ -5,7 +5,7 @@ using System.Linq; using static TheOtherRoles.TheOtherRoles; using TheOtherRoles.Objects; using System; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using UnityEngine; @@ -13,13 +13,11 @@ namespace TheOtherRoles.Patches { [HarmonyPatch(typeof(ExileController), nameof(ExileController.Begin))] [HarmonyPriority(Priority.First)] class ExileControllerBeginPatch { - public static NetworkedPlayerInfo lastExiled; - public static void Prefix(ExileController __instance, [HarmonyArgument(0)]ref NetworkedPlayerInfo exiled, [HarmonyArgument(1)]bool tie) { - lastExiled = exiled; + public static void Prefix(ExileController __instance, [HarmonyArgument(0)]ref NetworkedPlayerInfo exiled) { // Medic shield if (Medic.medic != null && AmongUsClient.Instance.AmHost && Medic.futureShielded != null && !Medic.medic.Data.IsDead) { // We need to send the RPC from the host here, to make sure that the order of shifting and setting the shield is correct(for that reason the futureShifted and futureShielded are being synced) - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.MedicSetShielded, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.MedicSetShielded, Hazel.SendOption.Reliable, -1); writer.Write(Medic.futureShielded.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.medicSetShielded(Medic.futureShielded.PlayerId); @@ -28,7 +26,7 @@ namespace TheOtherRoles.Patches { // Shifter shift if (Shifter.shifter != null && AmongUsClient.Instance.AmHost && Shifter.futureShift != null) { // We need to send the RPC from the host here, to make sure that the order of shifting and erasing is correct (for that reason the futureShifted and futureErased are being synced) - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShifterShift, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShifterShift, Hazel.SendOption.Reliable, -1); writer.Write(Shifter.futureShift.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.shifterShift(Shifter.futureShift.PlayerId); @@ -38,7 +36,7 @@ namespace TheOtherRoles.Patches { // Eraser erase if (Eraser.eraser != null && AmongUsClient.Instance.AmHost && Eraser.futureErased != null) { // We need to send the RPC from the host here, to make sure that the order of shifting and erasing is correct (for that reason the futureShifted and futureErased are being synced) foreach (PlayerControl target in Eraser.futureErased) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ErasePlayerRoles, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ErasePlayerRoles, Hazel.SendOption.Reliable, -1); writer.Write(target.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.erasePlayerRoles(target.PlayerId); @@ -66,17 +64,17 @@ namespace TheOtherRoles.Patches { if (exiled != null && Lawyer.lawyer != null && (target == Lawyer.lawyer || target == Lovers.otherLover(Lawyer.lawyer)) && Lawyer.target != null && Lawyer.isProsecutor && Lawyer.target.PlayerId == exiled.PlayerId) continue; if (target == Lawyer.target && Lawyer.lawyer != null) { - MessageWriter writer2 = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.LawyerPromotesToPursuer, Hazel.SendOption.Reliable, -1); + MessageWriter writer2 = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.LawyerPromotesToPursuer, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer2); RPCProcedure.lawyerPromotesToPursuer(); } - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.UncheckedExilePlayer, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UncheckedExilePlayer, Hazel.SendOption.Reliable, -1); writer.Write(target.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.uncheckedExilePlayer(target.PlayerId); - MessageWriter writer3 = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); - writer3.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer3 = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); + writer3.Write(PlayerControl.LocalPlayer.PlayerId); writer3.Write((byte)RPCProcedure.GhostInfoTypes.DeathReasonAndKiller); writer3.Write(target.PlayerId); writer3.Write((byte)DeadPlayer.CustomDeathReason.WitchExile); @@ -128,14 +126,16 @@ namespace TheOtherRoles.Patches { [HarmonyPatch(typeof(ExileController), nameof(ExileController.WrapUp))] class BaseExileControllerPatch { public static void Postfix(ExileController __instance) { - WrapUpPostfix(__instance.exiled); + NetworkedPlayerInfo networkedPlayer = __instance.initData.networkedPlayer; + WrapUpPostfix((networkedPlayer != null) ? networkedPlayer.Object : null); } } [HarmonyPatch(typeof(AirshipExileController), nameof(AirshipExileController.WrapUpAndSpawn))] class AirshipExileControllerPatch { public static void Postfix(AirshipExileController __instance) { - WrapUpPostfix(__instance.exiled); + NetworkedPlayerInfo networkedPlayer = __instance.initData.networkedPlayer; + WrapUpPostfix((networkedPlayer != null) ? networkedPlayer.Object : null); } } @@ -151,14 +151,14 @@ namespace TheOtherRoles.Patches { // submerged if (!SubmergedCompatibility.IsSubmerged) return; if (obj.name.Contains("ExileCutscene")) { - WrapUpPostfix(ExileControllerBeginPatch.lastExiled); + WrapUpPostfix(obj.GetComponent().initData.networkedPlayer?.Object); } else if (obj.name.Contains("SpawnInMinigame")) { AntiTeleport.setPosition(); Chameleon.lastMoved.Clear(); } } - static void WrapUpPostfix(NetworkedPlayerInfo exiled) { + static void WrapUpPostfix(PlayerControl exiled) { // Prosecutor win condition if (exiled != null && Lawyer.lawyer != null && Lawyer.target != null && Lawyer.isProsecutor && Lawyer.target.PlayerId == exiled.PlayerId && !Lawyer.lawyer.Data.IsDead) Lawyer.triggerProsecutorWin = true; @@ -177,13 +177,13 @@ namespace TheOtherRoles.Patches { CustomButton.MeetingEndedUpdate(); // Mini set adapted cooldown - if (Mini.mini != null && CachedPlayer.LocalPlayer.PlayerControl == Mini.mini && Mini.mini.Data.Role.IsImpostor) { + if (Mini.mini != null && PlayerControl.LocalPlayer == Mini.mini && Mini.mini.Data.Role.IsImpostor) { var multiplier = Mini.isGrownUp() ? 0.66f : 2f; Mini.mini.SetKillTimer(GameOptionsManager.Instance.currentNormalGameOptions.KillCooldown * multiplier); } // Seer spawn souls - if (Seer.deadBodyPositions != null && Seer.seer != null && CachedPlayer.LocalPlayer.PlayerControl == Seer.seer && (Seer.mode == 0 || Seer.mode == 2)) { + if (Seer.deadBodyPositions != null && Seer.seer != null && PlayerControl.LocalPlayer == Seer.seer && (Seer.mode == 0 || Seer.mode == 2)) { foreach (Vector3 pos in Seer.deadBodyPositions) { GameObject soul = new GameObject(); //soul.transform.position = pos; @@ -211,11 +211,11 @@ namespace TheOtherRoles.Patches { Tracker.deadBodyPositions = new List(); // Arsonist deactivate dead poolable players - if (Arsonist.arsonist != null && Arsonist.arsonist == CachedPlayer.LocalPlayer.PlayerControl) { + if (Arsonist.arsonist != null && Arsonist.arsonist == PlayerControl.LocalPlayer) { int visibleCounter = 0; Vector3 newBottomLeft = IntroCutsceneOnDestroyPatch.bottomLeft; var BottomLeft = newBottomLeft + new Vector3(-0.25f, -0.25f, 0); - foreach (PlayerControl p in CachedPlayer.AllPlayers) { + foreach (PlayerControl p in PlayerControl.AllPlayerControls) { if (!TORMapOptions.playerIcons.ContainsKey(p.PlayerId)) continue; if (p.Data.IsDead || p.Data.Disconnected) { TORMapOptions.playerIcons[p.PlayerId].gameObject.SetActive(false); @@ -233,11 +233,11 @@ namespace TheOtherRoles.Patches { } // Force Bounty Hunter Bounty Update - if (BountyHunter.bountyHunter != null && BountyHunter.bountyHunter == CachedPlayer.LocalPlayer.PlayerControl) + if (BountyHunter.bountyHunter != null && BountyHunter.bountyHunter == PlayerControl.LocalPlayer) BountyHunter.bountyUpdateTimer = 0f; // Medium spawn souls - if (Medium.medium != null && CachedPlayer.LocalPlayer.PlayerControl == Medium.medium) { + if (Medium.medium != null && PlayerControl.LocalPlayer == Medium.medium) { if (Medium.souls != null) { foreach (SpriteRenderer sr in Medium.souls) UnityEngine.Object.Destroy(sr.gameObject); Medium.souls = new List(); @@ -289,8 +289,8 @@ namespace TheOtherRoles.Patches { class ExileControllerMessagePatch { static void Postfix(ref string __result, [HarmonyArgument(0)]StringNames id) { try { - if (ExileController.Instance != null && ExileController.Instance.exiled != null) { - PlayerControl player = Helpers.playerById(ExileController.Instance.exiled.Object.PlayerId); + if (ExileController.Instance != null && ExileController.Instance.initData != null) { + PlayerControl player = ExileController.Instance.initData.networkedPlayer.Object; if (player == null) return; // Exile role text if (id == StringNames.ExileTextPN || id == StringNames.ExileTextSN || id == StringNames.ExileTextPP || id == StringNames.ExileTextSP) { diff --git a/TheOtherRoles/Patches/GameStartManagerPatch.cs b/TheOtherRoles/Patches/GameStartManagerPatch.cs index afe8f4b..1e0b3c6 100644 --- a/TheOtherRoles/Patches/GameStartManagerPatch.cs +++ b/TheOtherRoles/Patches/GameStartManagerPatch.cs @@ -5,7 +5,7 @@ using System.Reflection; using System.Collections.Generic; using Hazel; using System; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using System.Linq; using Reactor.Utilities.Extensions; @@ -21,7 +21,7 @@ namespace TheOtherRoles.Patches { [HarmonyPatch(typeof(AmongUsClient), nameof(AmongUsClient.OnPlayerJoined))] public class AmongUsClientOnPlayerJoinedPatch { public static void Postfix(AmongUsClient __instance) { - if (CachedPlayer.LocalPlayer != null) { + if (PlayerControl.LocalPlayer != null) { Helpers.shareGameVersion(); } GameStartManagerUpdatePatch.sendGamemode = true; @@ -59,7 +59,7 @@ namespace TheOtherRoles.Patches { } public static void Postfix(GameStartManager __instance) { - // Send version as soon as CachedPlayer.LocalPlayer.PlayerControl exists + // Send version as soon as PlayerControl.LocalPlayer exists if (PlayerControl.LocalPlayer != null && !versionSent) { versionSent = true; Helpers.shareGameVersion(); @@ -109,7 +109,7 @@ namespace TheOtherRoles.Patches { copiedStartButton?.Destroy(); // Make starting info available to clients: if (startingTimer <= 0 && __instance.startState == GameStartManager.StartingStates.Countdown) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetGameStarting, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetGameStarting, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.setGameStarting(); // Activate Stop-Button @@ -180,7 +180,7 @@ namespace TheOtherRoles.Patches { PassiveButton startButtonPassiveButton = copiedStartButton.GetComponent(); void StopStartFunc() { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.StopStart, Hazel.SendOption.Reliable, AmongUsClient.Instance.HostId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.StopStart, Hazel.SendOption.Reliable, AmongUsClient.Instance.HostId); writer.Write(PlayerControl.LocalPlayer.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); copiedStartButton.Destroy(); @@ -209,8 +209,8 @@ namespace TheOtherRoles.Patches { if (!AmongUsClient.Instance) return; - if (AmongUsClient.Instance.AmHost && sendGamemode && CachedPlayer.LocalPlayer != null) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGamemode, Hazel.SendOption.Reliable, -1); + if (AmongUsClient.Instance.AmHost && sendGamemode && PlayerControl.LocalPlayer != null) { + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGamemode, Hazel.SendOption.Reliable, -1); writer.Write((byte) TORMapOptions.gameMode); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.shareGamemode((byte) TORMapOptions.gameMode); @@ -249,7 +249,7 @@ namespace TheOtherRoles.Patches { if (TORMapOptions.gameMode == CustomGamemodes.HideNSeek) mapId = (byte)CustomOptionHolder.hideNSeekMap.getSelection(); else if (TORMapOptions.gameMode == CustomGamemodes.PropHunt) mapId = (byte)CustomOptionHolder.propHuntMap.getSelection(); if (mapId >= 3) mapId++; - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.DynamicMapOption, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.DynamicMapOption, Hazel.SendOption.Reliable, -1); writer.Write(mapId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.dynamicMapOption(mapId); @@ -300,7 +300,7 @@ namespace TheOtherRoles.Patches { } if (chosenMapId >= 3) chosenMapId++; // Skip dlekS - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.DynamicMapOption, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.DynamicMapOption, Hazel.SendOption.Reliable, -1); writer.Write(chosenMapId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.dynamicMapOption(chosenMapId); diff --git a/TheOtherRoles/Patches/HauntMenuMinigamePatch.cs b/TheOtherRoles/Patches/HauntMenuMinigamePatch.cs index 7837d79..9e2eed6 100644 --- a/TheOtherRoles/Patches/HauntMenuMinigamePatch.cs +++ b/TheOtherRoles/Patches/HauntMenuMinigamePatch.cs @@ -2,7 +2,7 @@ using AmongUs.GameOptions; using System.Collections.Generic; using System.Linq; -using TheOtherRoles.Players; + using System; using TheOtherRoles.CustomGameModes; @@ -64,7 +64,7 @@ namespace TheOtherRoles.Patches { [HarmonyPatch(typeof(HauntMenuMinigame), nameof(HauntMenuMinigame.FixedUpdate))] public static void UpdatePostfix(HauntMenuMinigame __instance) { if (GameOptionsManager.Instance.currentGameOptions.GameMode != GameModes.Normal) return; - if (CachedPlayer.LocalPlayer.Data.Role.IsImpostor && Vampire.vampire != CachedPlayer.LocalPlayer.PlayerControl) + if (PlayerControl.LocalPlayer.Data.Role.IsImpostor && Vampire.vampire != PlayerControl.LocalPlayer) __instance.gameObject.transform.localPosition = new UnityEngine.Vector3(-6f, -1.1f, __instance.gameObject.transform.localPosition.z); return; } @@ -73,9 +73,9 @@ namespace TheOtherRoles.Patches { [HarmonyPatch(typeof(AbilityButton), nameof(AbilityButton.Update))] public static void showOrHideAbilityButtonPostfix(AbilityButton __instance) { bool isGameMode = GameOptionsManager.Instance.currentGameOptions.GameMode == GameModes.HideNSeek || PropHunt.isPropHuntGM || HideNSeek.isHideNSeekGM; - if (CachedPlayer.LocalPlayer.Data.IsDead && (CustomOptionHolder.finishTasksBeforeHauntingOrZoomingOut.getBool() || isGameMode)) { + if (PlayerControl.LocalPlayer.Data.IsDead && (CustomOptionHolder.finishTasksBeforeHauntingOrZoomingOut.getBool() || isGameMode)) { // player has haunt button. - var (playerCompleted, playerTotal) = TasksHandler.taskInfo(CachedPlayer.LocalPlayer.Data); + var (playerCompleted, playerTotal) = TasksHandler.taskInfo(PlayerControl.LocalPlayer.Data); int numberOfLeftTasks = playerTotal - playerCompleted; if (numberOfLeftTasks <= 0 || isGameMode) __instance.Show(); diff --git a/TheOtherRoles/Patches/IntroPatch.cs b/TheOtherRoles/Patches/IntroPatch.cs index e2bb767..cbf12f4 100644 --- a/TheOtherRoles/Patches/IntroPatch.cs +++ b/TheOtherRoles/Patches/IntroPatch.cs @@ -5,7 +5,7 @@ using UnityEngine; using System.Collections.Generic; using System.Linq; using Hazel; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using TheOtherRoles.CustomGameModes; @@ -19,14 +19,14 @@ namespace TheOtherRoles.Patches { // Generate and initialize player icons int playerCounter = 0; int hideNSeekCounter = 0; - if (CachedPlayer.LocalPlayer != null && FastDestroyableSingleton.Instance != null) { + if (PlayerControl.LocalPlayer != null && FastDestroyableSingleton.Instance != null) { float aspect = Camera.main.aspect; float safeOrthographicSize = CameraSafeArea.GetSafeOrthographicSize(Camera.main); float xpos = 1.75f - safeOrthographicSize * aspect * 1.70f; float ypos = 0.15f - safeOrthographicSize * 1.7f; bottomLeft = new Vector3(xpos / 2, ypos/2, -61f); - foreach (PlayerControl p in CachedPlayer.AllPlayers) { + foreach (PlayerControl p in PlayerControl.AllPlayerControls) { NetworkedPlayerInfo data = p.Data; PoolablePlayer player = UnityEngine.Object.Instantiate(__instance.PlayerPrefab, FastDestroyableSingleton.Instance.transform); playerPrefab = __instance.PlayerPrefab; @@ -39,7 +39,7 @@ namespace TheOtherRoles.Patches { TORMapOptions.playerIcons[p.PlayerId] = player; player.gameObject.SetActive(false); - if (CachedPlayer.LocalPlayer.PlayerControl == Arsonist.arsonist && p != Arsonist.arsonist) { + if (PlayerControl.LocalPlayer == Arsonist.arsonist && p != Arsonist.arsonist) { player.transform.localPosition = bottomLeft + new Vector3(-0.25f, -0.25f, 0) + Vector3.right * playerCounter++ * 0.35f; player.transform.localScale = Vector3.one * 0.2f; player.setSemiTransparent(true); @@ -73,7 +73,7 @@ namespace TheOtherRoles.Patches { } // Force Bounty Hunter to load a new Bounty when the Intro is over - if (BountyHunter.bounty != null && CachedPlayer.LocalPlayer.PlayerControl == BountyHunter.bountyHunter) { + if (BountyHunter.bounty != null && PlayerControl.LocalPlayer == BountyHunter.bountyHunter) { BountyHunter.bountyUpdateTimer = 0f; if (FastDestroyableSingleton.Instance != null) { BountyHunter.cooldownText = UnityEngine.Object.Instantiate(FastDestroyableSingleton.Instance.KillButton.cooldownTimerText, FastDestroyableSingleton.Instance.transform); @@ -91,7 +91,7 @@ namespace TheOtherRoles.Patches { if (AmongUsClient.Instance.AmHost && TORMapOptions.shieldFirstKill && TORMapOptions.firstKillName != "" && !HideNSeek.isHideNSeekGM && !PropHunt.isPropHuntGM) { PlayerControl target = PlayerControl.AllPlayerControls.ToArray().ToList().FirstOrDefault(x => x.Data.PlayerName.Equals(TORMapOptions.firstKillName)); if (target != null) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetFirstKill, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetFirstKill, Hazel.SendOption.Reliable, -1); writer.Write(target.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.setFirstKill(target.PlayerId); @@ -152,19 +152,19 @@ namespace TheOtherRoles.Patches { class IntroPatch { public static void setupIntroTeamIcons(IntroCutscene __instance, ref Il2CppSystem.Collections.Generic.List yourTeam) { // Intro solo teams - if (Helpers.isNeutral(CachedPlayer.LocalPlayer.PlayerControl)) { + if (Helpers.isNeutral(PlayerControl.LocalPlayer)) { var soloTeam = new Il2CppSystem.Collections.Generic.List(); - soloTeam.Add(CachedPlayer.LocalPlayer.PlayerControl); + soloTeam.Add(PlayerControl.LocalPlayer); yourTeam = soloTeam; } // Add the Spy to the Impostor team (for the Impostors) - if (Spy.spy != null && CachedPlayer.LocalPlayer.Data.Role.IsImpostor) { + if (Spy.spy != null && PlayerControl.LocalPlayer.Data.Role.IsImpostor) { List players = PlayerControl.AllPlayerControls.ToArray().ToList().OrderBy(x => Guid.NewGuid()).ToList(); var fakeImpostorTeam = new Il2CppSystem.Collections.Generic.List(); // The local player always has to be the first one in the list (to be displayed in the center) - fakeImpostorTeam.Add(CachedPlayer.LocalPlayer.PlayerControl); + fakeImpostorTeam.Add(PlayerControl.LocalPlayer); foreach (PlayerControl p in players) { - if (CachedPlayer.LocalPlayer.PlayerControl != p && (p == Spy.spy || p.Data.Role.IsImpostor)) + if (PlayerControl.LocalPlayer != p && (p == Spy.spy || p.Data.Role.IsImpostor)) fakeImpostorTeam.Add(p); } yourTeam = fakeImpostorTeam; @@ -172,7 +172,7 @@ namespace TheOtherRoles.Patches { } public static void setupIntroTeam(IntroCutscene __instance, ref Il2CppSystem.Collections.Generic.List yourTeam) { - List infos = RoleInfo.getRoleInfoForPlayer(CachedPlayer.LocalPlayer.PlayerControl); + List infos = RoleInfo.getRoleInfoForPlayer(PlayerControl.LocalPlayer); RoleInfo roleInfo = infos.Where(info => !info.isModifier).FirstOrDefault(); if (roleInfo == null) return; if (roleInfo.isNeutral) { @@ -205,7 +205,7 @@ namespace TheOtherRoles.Patches { static int seed = 0; static public void SetRoleTexts(IntroCutscene __instance) { // Don't override the intro of the vanilla roles - List infos = RoleInfo.getRoleInfoForPlayer(CachedPlayer.LocalPlayer.PlayerControl); + List infos = RoleInfo.getRoleInfoForPlayer(PlayerControl.LocalPlayer); RoleInfo roleInfo = infos.Where(info => !info.isModifier).FirstOrDefault(); RoleInfo modifierInfo = infos.Where(info => info.isModifier).FirstOrDefault(); @@ -229,7 +229,7 @@ namespace TheOtherRoles.Patches { if (modifierInfo.roleId != RoleId.Lover) __instance.RoleBlurbText.text += Helpers.cs(modifierInfo.color, $"\n{modifierInfo.introDescription}"); else { - PlayerControl otherLover = CachedPlayer.LocalPlayer.PlayerControl == Lovers.lover1 ? Lovers.lover2 : Lovers.lover1; + PlayerControl otherLover = PlayerControl.LocalPlayer == Lovers.lover1 ? Lovers.lover2 : Lovers.lover1; __instance.RoleBlurbText.text += Helpers.cs(Lovers.color, $"\n♥ You are in love with {otherLover?.Data?.PlayerName ?? ""} ♥"); } } diff --git a/TheOtherRoles/Patches/LobbyScreenPatch.cs b/TheOtherRoles/Patches/LobbyScreenPatch.cs new file mode 100644 index 0000000..b133beb --- /dev/null +++ b/TheOtherRoles/Patches/LobbyScreenPatch.cs @@ -0,0 +1,68 @@ + +using AmongUs.Data; +using HarmonyLib; +using InnerNet; +using System.Text.RegularExpressions; +using UnityEngine; + +namespace TheOtherRoles.Patches { + [HarmonyPatch] + + public sealed class LobbyJoinBind { + static int GameId; + + static GameObject LobbyText; + + [HarmonyPatch(typeof(InnerNetClient), nameof(InnerNetClient.JoinGame))] + [HarmonyPostfix] + + public static void Postfix(InnerNetClient __instance) { + GameId = __instance.GameId; + } + + [HarmonyPatch(typeof(MMOnlineManager), nameof(MMOnlineManager.Start))] + [HarmonyPostfix] + + public static void Postfix() { + if (!LobbyText) { + LobbyText = new("lobbycode"); + var comp = LobbyText.AddComponent(); + comp.fontSize = 2.5f; + LobbyText.transform.localPosition = new(10.3f, -3.9f, 0); + LobbyText.SetActive(true); + } + } + + [HarmonyPatch(typeof(MMOnlineManager), nameof(MMOnlineManager.Update))] + [HarmonyPostfix] + + public static void Postfix(MMOnlineManager __instance) { + + string code2 = GUIUtility.systemCopyBuffer; + + if (code2.Length != 6 || !Regex.IsMatch(code2, @"^[a-zA-Z]+$")) + code2 = ""; + string code2Disp = DataManager.Settings.Gameplay.StreamerMode ? "****" : code2.ToUpper(); + if (GameId != 0 && Input.GetKeyDown(KeyCode.LeftShift)) { + __instance.StartCoroutine(AmongUsClient.Instance.CoJoinOnlineGameFromCode(GameId)); + } else if (Input.GetKeyDown(KeyCode.RightShift) && code2 != "") { + __instance.StartCoroutine(AmongUsClient.Instance.CoJoinOnlineGameFromCode(GameCode.GameNameToInt(code2))); + } + + if (LobbyText) { + LobbyText.GetComponent().text = ""; + if (GameId != 0 && GameId != 32) { + string code = GameCode.IntToGameName(GameId); + if (code != "") { + code = DataManager.Settings.Gameplay.StreamerMode ? "****" : code; + LobbyText.GetComponent().text = $"Prev Lobby: {code} [LShift]"; + + } + } + if (code2 != "") { + LobbyText.GetComponent().text += $"\nClipboard: {code2Disp} [RShift]"; + } + } + } + } +} \ No newline at end of file diff --git a/TheOtherRoles/Patches/MapBehaviourPatch.cs b/TheOtherRoles/Patches/MapBehaviourPatch.cs index 76e9272..2830179 100644 --- a/TheOtherRoles/Patches/MapBehaviourPatch.cs +++ b/TheOtherRoles/Patches/MapBehaviourPatch.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; using TheOtherRoles.Objects; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using UnityEngine; @@ -13,7 +13,7 @@ namespace TheOtherRoles.Patches { [HarmonyPatch(typeof(MapBehaviour))] static class MapBehaviourPatch { - public static Dictionary herePoints = new(); + public static Dictionary herePoints = new(); public static Sprite Vent = Helpers.loadSpriteFromResources("TheOtherRoles.Resources.Vent.png", 150f); @@ -39,9 +39,9 @@ namespace TheOtherRoles.Patches { } __instance.HerePoint.transform.SetLocalZ(-2.1f); - if (Trapper.trapper != null && CachedPlayer.LocalPlayer.PlayerId == Trapper.trapper.PlayerId) { + if (Trapper.trapper != null && PlayerControl.LocalPlayer.PlayerId == Trapper.trapper.PlayerId) { foreach (PlayerControl player in Trapper.playersOnMap) { - if (herePoints.ContainsKey(player)) continue; + if (herePoints.ContainsKey(player.PlayerId)) continue; Vector3 v = Trap.trapPlayerIdMap[player.PlayerId].trap.transform.position; v /= MapUtilities.CachedShipStatus.MapScale; v.x *= Mathf.Sign(MapUtilities.CachedShipStatus.transform.localScale.x); @@ -53,19 +53,19 @@ namespace TheOtherRoles.Patches { if (Trapper.anonymousMap) player.CurrentOutfit.ColorId = 6; player.SetPlayerMaterialColors(herePoint); player.CurrentOutfit.ColorId = colorId; - herePoints.Add(player, herePoint); + herePoints.Add(player.PlayerId, herePoint); } - foreach (var s in herePoints.Where(x => !Trapper.playersOnMap.Contains(x.Key)).ToList()) { + foreach (var s in herePoints.Where(x => !Trapper.playersOnMap.Contains(Helpers.playerById(x.Key))).ToList()) { UnityEngine.Object.Destroy(s.Value); herePoints.Remove(s.Key); } - } else if (Snitch.snitch != null && CachedPlayer.LocalPlayer.PlayerId == Snitch.snitch.PlayerId && !Snitch.snitch.Data.IsDead && Snitch.mode != Snitch.Mode.Chat) { + } else if (Snitch.snitch != null && PlayerControl.LocalPlayer.PlayerId == Snitch.snitch.PlayerId && !Snitch.snitch.Data.IsDead && Snitch.mode != Snitch.Mode.Chat) { var (playerCompleted, playerTotal) = TasksHandler.taskInfo(Snitch.snitch.Data); int numberOfTasks = playerTotal - playerCompleted; if (numberOfTasks == 0) { if (MeetingHud.Instance == null) { - foreach (PlayerControl player in CachedPlayer.AllPlayers) { + foreach (PlayerControl player in PlayerControl.AllPlayerControls) { if (Snitch.targets == Snitch.Targets.EvilPlayers && !Helpers.isEvil(player)) continue; else if (Snitch.targets == Snitch.Targets.Killers && !Helpers.isKiller(player)) continue; if (player.Data.IsDead) continue; @@ -73,8 +73,8 @@ namespace TheOtherRoles.Patches { v /= MapUtilities.CachedShipStatus.MapScale; v.x *= Mathf.Sign(MapUtilities.CachedShipStatus.transform.localScale.x); v.z = -2.1f; - if (herePoints.ContainsKey(player)) { - herePoints[player].transform.localPosition = v; + if (herePoints.ContainsKey(player.PlayerId)) { + herePoints[player.PlayerId].transform.localPosition = v; continue; } var herePoint = UnityEngine.Object.Instantiate(__instance.HerePoint, __instance.HerePoint.transform.parent, true); @@ -84,7 +84,7 @@ namespace TheOtherRoles.Patches { player.CurrentOutfit.ColorId = 6; player.SetPlayerMaterialColors(herePoint); player.CurrentOutfit.ColorId = colorId; - herePoints.Add(player, herePoint); + herePoints.Add(player.PlayerId, herePoint); } } else { foreach (var s in herePoints) { @@ -97,7 +97,7 @@ namespace TheOtherRoles.Patches { // Show location of all players on the map for ghosts! if (PlayerControl.LocalPlayer.Data.IsDead && (!PlayerControl.LocalPlayer.Data.Role.IsImpostor || CustomOptionHolder.deadImpsBlockSabotage.getBool())) { - foreach (PlayerControl player in CachedPlayer.AllPlayers) { + foreach (PlayerControl player in PlayerControl.AllPlayerControls) { if (player == PlayerControl.LocalPlayer) continue; var alpha = player.Data.IsDead ? 0.25f : 1f; @@ -105,18 +105,29 @@ namespace TheOtherRoles.Patches { v /= MapUtilities.CachedShipStatus.MapScale; v.x *= Mathf.Sign(MapUtilities.CachedShipStatus.transform.localScale.x); v.z = -2.1f; - if (herePoints.ContainsKey(player)) { - herePoints[player].transform.localPosition = v; - herePoints[player].color = herePoints[player].color.SetAlpha(alpha); + if (herePoints.TryGetValue(player.PlayerId, out _)) { + herePoints[player.PlayerId].transform.localPosition = v; + herePoints[player.PlayerId].color = herePoints[player.PlayerId].color.SetAlpha(alpha); continue; } - var herePoint = UnityEngine.Object.Instantiate(__instance.HerePoint, __instance.HerePoint.transform.parent, true); + + string pointName = $"TOR HerePoint {player.PlayerId}"; + var doublePoint = GameObject.Find(pointName); + if (doublePoint != null) { + doublePoint.Destroy(); + } + + var herePoint = UnityEngine.Object.Instantiate(__instance.HerePoint, __instance.HerePoint.transform.parent, true); + + herePoint.name = pointName; herePoint.transform.localPosition = v; herePoint.enabled = true; + + int colorId = player.CurrentOutfit.ColorId; player.SetPlayerMaterialColors(herePoint); - herePoints.Add(player, herePoint); + herePoints.Add(player.PlayerId, herePoint); } } foreach (var vent in MapUtilities.CachedShipStatus.AllVents) { diff --git a/TheOtherRoles/Patches/MeetingPatch.cs b/TheOtherRoles/Patches/MeetingPatch.cs index e73bbf3..da0f91b 100644 --- a/TheOtherRoles/Patches/MeetingPatch.cs +++ b/TheOtherRoles/Patches/MeetingPatch.cs @@ -6,7 +6,7 @@ using static TheOtherRoles.TheOtherRoles; using static TheOtherRoles.TORMapOptions; using TheOtherRoles.Objects; using System; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using UnityEngine; using Innersloth.Assets; @@ -123,7 +123,7 @@ namespace TheOtherRoles.Patches { exiled = potentialExiled.ToArray().FirstOrDefault(v => v.PlayerId == tiebreakerVote); tie = false; - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetTiebreak, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetTiebreak, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.setTiebreak(); } @@ -141,8 +141,8 @@ namespace TheOtherRoles.Patches { public static bool Prefix(MeetingHud __instance, NetworkedPlayerInfo voterPlayer, int index, Transform parent) { var spriteRenderer = UnityEngine.Object.Instantiate(__instance.PlayerVotePrefab); var showVoteColors = !GameManager.Instance.LogicOptions.GetAnonymousVotes() || - (CachedPlayer.LocalPlayer.Data.IsDead && TORMapOptions.ghostsSeeVotes) || - (Mayor.mayor != null && Mayor.mayor == CachedPlayer.LocalPlayer.PlayerControl && Mayor.canSeeVoteColors && TasksHandler.taskInfo(CachedPlayer.LocalPlayer.Data).Item1 >= Mayor.tasksNeededToSeeVoteColors); + (PlayerControl.LocalPlayer.Data.IsDead && TORMapOptions.ghostsSeeVotes) || + (Mayor.mayor != null && Mayor.mayor == PlayerControl.LocalPlayer && Mayor.canSeeVoteColors && TasksHandler.taskInfo(PlayerControl.LocalPlayer.Data).Item1 >= Mayor.tasksNeededToSeeVoteColors); if (showVoteColors) { PlayerMaterial.SetColors(voterPlayer.DefaultOutfit.ColorId, spriteRenderer); @@ -300,7 +300,7 @@ namespace TheOtherRoles.Patches { if (swapperButtonList[A] != null) swapperButtonList[A].OnClick.RemoveAllListeners(); // Swap buttons can't be clicked / changed anymore } if (firstPlayer != null && secondPlayer != null) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SwapperSwap, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SwapperSwap, Hazel.SendOption.Reliable, -1); writer.Write((byte)firstPlayer.TargetPlayerId); writer.Write((byte)secondPlayer.TargetPlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -325,7 +325,7 @@ namespace TheOtherRoles.Patches { // Only for the swapper: Reset all the buttons and charges value to their original state. - if (CachedPlayer.LocalPlayer.PlayerControl != Swapper.swapper) return; + if (PlayerControl.LocalPlayer != Swapper.swapper) return; // check if dying player was a selected player (but not confirmed yet) @@ -365,7 +365,7 @@ namespace TheOtherRoles.Patches { Mayor.voteTwice = !Mayor.voteTwice; - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.MayorSetVoteTwice, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.MayorSetVoteTwice, Hazel.SendOption.Reliable, -1); writer.Write(Mayor.voteTwice); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -404,7 +404,7 @@ namespace TheOtherRoles.Patches { guesserUIExitButton.OnClick.AddListener((System.Action)(() => { __instance.playerStates.ToList().ForEach(x => { x.gameObject.SetActive(true); - if (CachedPlayer.LocalPlayer.Data.IsDead && x.transform.FindChild("ShootButton") != null) UnityEngine.Object.Destroy(x.transform.FindChild("ShootButton").gameObject); + if (PlayerControl.LocalPlayer.Data.IsDead && x.transform.FindChild("ShootButton") != null) UnityEngine.Object.Destroy(x.transform.FindChild("ShootButton").gameObject); }); UnityEngine.Object.Destroy(container.gameObject); })); @@ -413,10 +413,10 @@ namespace TheOtherRoles.Patches { Transform selectedButton = null; foreach (RoleInfo roleInfo in RoleInfo.allRoleInfos) { - RoleId guesserRole = (Guesser.niceGuesser != null && CachedPlayer.LocalPlayer.PlayerId == Guesser.niceGuesser.PlayerId) ? RoleId.NiceGuesser : RoleId.EvilGuesser; + RoleId guesserRole = (Guesser.niceGuesser != null && PlayerControl.LocalPlayer.PlayerId == Guesser.niceGuesser.PlayerId) ? RoleId.NiceGuesser : RoleId.EvilGuesser; if (roleInfo.isModifier || roleInfo.roleId == guesserRole || (!HandleGuesser.evilGuesserCanGuessSpy && guesserRole == RoleId.EvilGuesser && roleInfo.roleId == RoleId.Spy && !HandleGuesser.isGuesserGm)) continue; // Not guessable roles & modifier if (HandleGuesser.isGuesserGm && (roleInfo.roleId == RoleId.NiceGuesser || roleInfo.roleId == RoleId.EvilGuesser)) continue; // remove Guesser for guesser game mode - if (HandleGuesser.isGuesserGm && CachedPlayer.LocalPlayer.PlayerControl.Data.Role.IsImpostor && !HandleGuesser.evilGuesserCanGuessSpy && roleInfo.roleId == RoleId.Spy) continue; + if (HandleGuesser.isGuesserGm && PlayerControl.LocalPlayer.Data.Role.IsImpostor && !HandleGuesser.evilGuesserCanGuessSpy && roleInfo.roleId == RoleId.Spy) continue; // remove all roles that cannot spawn due to the settings from the ui. RoleManagerSelectRolesPatch.RoleAssignmentData roleData = RoleManagerSelectRolesPatch.getRoleAssignmentData(); if (roleData.neutralSettings.ContainsKey((byte)roleInfo.roleId) && roleData.neutralSettings[(byte)roleInfo.roleId] == 0) continue; @@ -452,19 +452,19 @@ namespace TheOtherRoles.Patches { int copiedIndex = i; button.GetComponent().OnClick.RemoveAllListeners(); - if (!CachedPlayer.LocalPlayer.Data.IsDead && !Helpers.playerById((byte)__instance.playerStates[buttonTarget].TargetPlayerId).Data.IsDead) button.GetComponent().OnClick.AddListener((System.Action)(() => { + if (!PlayerControl.LocalPlayer.Data.IsDead && !Helpers.playerById((byte)__instance.playerStates[buttonTarget].TargetPlayerId).Data.IsDead) button.GetComponent().OnClick.AddListener((System.Action)(() => { if (selectedButton != button) { selectedButton = button; buttons.ForEach(x => x.GetComponent().color = x == selectedButton ? Color.red : Color.white); } else { PlayerControl focusedTarget = Helpers.playerById((byte)__instance.playerStates[buttonTarget].TargetPlayerId); - if (!(__instance.state == MeetingHud.VoteStates.Voted || __instance.state == MeetingHud.VoteStates.NotVoted) || focusedTarget == null || HandleGuesser.remainingShots(CachedPlayer.LocalPlayer.PlayerId) <= 0 ) return; + if (!(__instance.state == MeetingHud.VoteStates.Voted || __instance.state == MeetingHud.VoteStates.NotVoted) || focusedTarget == null || HandleGuesser.remainingShots(PlayerControl.LocalPlayer.PlayerId) <= 0 ) return; if (!HandleGuesser.killsThroughShield && focusedTarget == Medic.shielded) { // Depending on the options, shooting the shielded player will not allow the guess, notifiy everyone about the kill attempt and close the window __instance.playerStates.ToList().ForEach(x => x.gameObject.SetActive(true)); UnityEngine.Object.Destroy(container.gameObject); - MessageWriter murderAttemptWriter = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShieldedMurderAttempt, Hazel.SendOption.Reliable, -1); + MessageWriter murderAttemptWriter = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShieldedMurderAttempt, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(murderAttemptWriter); RPCProcedure.shieldedMurderAttempt(); SoundEffectsManager.play("fail"); @@ -474,24 +474,24 @@ namespace TheOtherRoles.Patches { var mainRoleInfo = RoleInfo.getRoleInfoForPlayer(focusedTarget, false).FirstOrDefault(); if (mainRoleInfo == null) return; - PlayerControl dyingTarget = (mainRoleInfo == roleInfo) ? focusedTarget : CachedPlayer.LocalPlayer.PlayerControl; + PlayerControl dyingTarget = (mainRoleInfo == roleInfo) ? focusedTarget : PlayerControl.LocalPlayer; // Reset the GUI __instance.playerStates.ToList().ForEach(x => x.gameObject.SetActive(true)); UnityEngine.Object.Destroy(container.gameObject); - if (HandleGuesser.hasMultipleShotsPerMeeting && HandleGuesser.remainingShots(CachedPlayer.LocalPlayer.PlayerId) > 1 && dyingTarget != CachedPlayer.LocalPlayer.PlayerControl) + if (HandleGuesser.hasMultipleShotsPerMeeting && HandleGuesser.remainingShots(PlayerControl.LocalPlayer.PlayerId) > 1 && dyingTarget != PlayerControl.LocalPlayer) __instance.playerStates.ToList().ForEach(x => { if (x.TargetPlayerId == dyingTarget.PlayerId && x.transform.FindChild("ShootButton") != null) UnityEngine.Object.Destroy(x.transform.FindChild("ShootButton").gameObject); }); else __instance.playerStates.ToList().ForEach(x => { if (x.transform.FindChild("ShootButton") != null) UnityEngine.Object.Destroy(x.transform.FindChild("ShootButton").gameObject); }); // Shoot player and send chat info if activated - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.GuesserShoot, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.GuesserShoot, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write(dyingTarget.PlayerId); writer.Write(focusedTarget.PlayerId); writer.Write((byte)roleInfo.roleId); AmongUsClient.Instance.FinishRpcImmediately(writer); - RPCProcedure.guesserShoot(CachedPlayer.LocalPlayer.PlayerId, dyingTarget.PlayerId, focusedTarget.PlayerId, (byte)roleInfo.roleId); + RPCProcedure.guesserShoot(PlayerControl.LocalPlayer.PlayerId, dyingTarget.PlayerId, focusedTarget.PlayerId, (byte)roleInfo.roleId); } })); @@ -503,14 +503,14 @@ namespace TheOtherRoles.Patches { [HarmonyPatch(typeof(PlayerVoteArea), nameof(PlayerVoteArea.Select))] class PlayerVoteAreaSelectPatch { static bool Prefix(MeetingHud __instance) { - return !(CachedPlayer.LocalPlayer != null && HandleGuesser.isGuesser(CachedPlayer.LocalPlayer.PlayerId) && guesserUI != null); + return !(PlayerControl.LocalPlayer != null && HandleGuesser.isGuesser(PlayerControl.LocalPlayer.PlayerId) && guesserUI != null); } } static void populateButtonsPostfix(MeetingHud __instance) { // Add Swapper Buttons - bool addSwapperButtons = Swapper.swapper != null && CachedPlayer.LocalPlayer.PlayerControl == Swapper.swapper && !Swapper.swapper.Data.IsDead; - bool addMayorButton = Mayor.mayor != null && CachedPlayer.LocalPlayer.PlayerControl == Mayor.mayor && !Mayor.mayor.Data.IsDead && Mayor.mayorChooseSingleVote > 0; + bool addSwapperButtons = Swapper.swapper != null && PlayerControl.LocalPlayer == Swapper.swapper && !Swapper.swapper.Data.IsDead; + bool addMayorButton = Mayor.mayor != null && PlayerControl.LocalPlayer == Mayor.mayor && !Mayor.mayor.Data.IsDead && Mayor.mayorChooseSingleVote > 0; if (addSwapperButtons) { selections = new bool[__instance.playerStates.Length]; renderers = new SpriteRenderer[__instance.playerStates.Length]; @@ -525,7 +525,7 @@ namespace TheOtherRoles.Patches { checkbox.transform.SetParent(playerVoteArea.transform); checkbox.transform.position = template.transform.position; checkbox.transform.localPosition = new Vector3(-0.95f, 0.03f, -1.3f); - if (HandleGuesser.isGuesserGm && HandleGuesser.isGuesser(CachedPlayer.LocalPlayer.PlayerId)) checkbox.transform.localPosition = new Vector3(-0.5f, 0.03f, -1.3f); + if (HandleGuesser.isGuesserGm && HandleGuesser.isGuesser(PlayerControl.LocalPlayer.PlayerId)) checkbox.transform.localPosition = new Vector3(-0.5f, 0.03f, -1.3f); SpriteRenderer renderer = checkbox.GetComponent(); renderer.sprite = Swapper.getCheckSprite(); renderer.color = Color.red; @@ -579,7 +579,7 @@ namespace TheOtherRoles.Patches { } PassiveButton passiveButton = meetingExtraButton.GetComponent(); passiveButton.OnClick.RemoveAllListeners(); - if (!CachedPlayer.LocalPlayer.Data.IsDead) { + if (!PlayerControl.LocalPlayer.Data.IsDead) { if (addSwapperButtons) passiveButton.OnClick.AddListener((Action)(() => swapperConfirm(__instance))); else if (addMayorButton) @@ -594,7 +594,7 @@ namespace TheOtherRoles.Patches { } - bool isGuesser = HandleGuesser.isGuesser(CachedPlayer.LocalPlayer.PlayerId); + bool isGuesser = HandleGuesser.isGuesser(PlayerControl.LocalPlayer.PlayerId); // Add overlay for spelled players if (Witch.witch != null && Witch.futureSpelled != null) { @@ -604,20 +604,22 @@ namespace TheOtherRoles.Patches { rend.transform.SetParent(pva.transform); rend.gameObject.layer = pva.Megaphone.gameObject.layer; rend.transform.localPosition = new Vector3(-0.5f, -0.03f, -1f); - if (CachedPlayer.LocalPlayer.PlayerControl == Swapper.swapper && isGuesser) rend.transform.localPosition = new Vector3(-0.725f, -0.15f, -1f); + if (PlayerControl.LocalPlayer == Swapper.swapper && isGuesser) rend.transform.localPosition = new Vector3(-0.725f, -0.15f, -1f); rend.sprite = Witch.getSpelledOverlaySprite(); } } } // Add Guesser Buttons - int remainingShots = HandleGuesser.remainingShots(CachedPlayer.LocalPlayer.PlayerId); + int remainingShots = HandleGuesser.remainingShots(PlayerControl.LocalPlayer.PlayerId); + var (playerCompleted, playerTotal) = TasksHandler.taskInfo(PlayerControl.LocalPlayer.Data); - if (isGuesser && !CachedPlayer.LocalPlayer.Data.IsDead && remainingShots > 0) { + if (isGuesser && !PlayerControl.LocalPlayer.Data.IsDead && remainingShots > 0) { for (int i = 0; i < __instance.playerStates.Length; i++) { PlayerVoteArea playerVoteArea = __instance.playerStates[i]; - if (playerVoteArea.AmDead || playerVoteArea.TargetPlayerId == CachedPlayer.LocalPlayer.PlayerId) continue; - if (CachedPlayer.LocalPlayer != null && CachedPlayer.LocalPlayer.PlayerControl == Eraser.eraser && Eraser.alreadyErased.Contains(playerVoteArea.TargetPlayerId)) continue; + if (playerVoteArea.AmDead || playerVoteArea.TargetPlayerId == PlayerControl.LocalPlayer.PlayerId) continue; + if (PlayerControl.LocalPlayer != null && PlayerControl.LocalPlayer == Eraser.eraser && Eraser.alreadyErased.Contains(playerVoteArea.TargetPlayerId)) continue; + if (PlayerControl.LocalPlayer != null && !Helpers.isEvil(PlayerControl.LocalPlayer) && playerCompleted < HandleGuesser.tasksToUnlock) continue; GameObject template = playerVoteArea.Buttons.transform.Find("CancelButton").gameObject; GameObject targetBox = UnityEngine.Object.Instantiate(template, playerVoteArea.transform); @@ -661,8 +663,8 @@ namespace TheOtherRoles.Patches { roomId = (byte)roomTracker.LastRoom?.RoomId; } if (Snitch.snitch != null && roomTracker != null) { - MessageWriter roomWriter = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareRoom, Hazel.SendOption.Reliable, -1); - roomWriter.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter roomWriter = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareRoom, Hazel.SendOption.Reliable, -1); + roomWriter.Write(PlayerControl.LocalPlayer.PlayerId); roomWriter.Write(roomId); AmongUsClient.Instance.FinishRpcImmediately(roomWriter); } @@ -670,11 +672,11 @@ namespace TheOtherRoles.Patches { // Resett Bait list Bait.active = new Dictionary(); // Save AntiTeleport position, if the player is able to move (i.e. not on a ladder or a gap thingy) - if (CachedPlayer.LocalPlayer.PlayerPhysics.enabled && (CachedPlayer.LocalPlayer.PlayerControl.moveable || CachedPlayer.LocalPlayer.PlayerControl.inVent + if (PlayerControl.LocalPlayer.MyPhysics.enabled && (PlayerControl.LocalPlayer.moveable || PlayerControl.LocalPlayer.inVent || HudManagerStartPatch.hackerVitalsButton.isEffectActive || HudManagerStartPatch.hackerAdminTableButton.isEffectActive || HudManagerStartPatch.securityGuardCamButton.isEffectActive - || Portal.isTeleporting && Portal.teleportedPlayers.Last().playerId == CachedPlayer.LocalPlayer.PlayerId)) { - if (!CachedPlayer.LocalPlayer.PlayerControl.inMovingPlat) - AntiTeleport.position = CachedPlayer.LocalPlayer.transform.position; + || Portal.isTeleporting && Portal.teleportedPlayers.Last().playerId == PlayerControl.LocalPlayer.PlayerId)) { + if (!PlayerControl.LocalPlayer.inMovingPlat) + AntiTeleport.position = PlayerControl.LocalPlayer.transform.position; } // Medium meeting start time @@ -691,7 +693,7 @@ namespace TheOtherRoles.Patches { // Add Portal info into Portalmaker Chat: - if (Portalmaker.portalmaker != null && (CachedPlayer.LocalPlayer.PlayerControl == Portalmaker.portalmaker || Helpers.shouldShowGhostInfo()) && !Portalmaker.portalmaker.Data.IsDead) { + if (Portalmaker.portalmaker != null && (PlayerControl.LocalPlayer == Portalmaker.portalmaker || Helpers.shouldShowGhostInfo()) && !Portalmaker.portalmaker.Data.IsDead) { if (Portal.teleportedPlayers.Count > 0) { string msg = "Portal Log:\n"; foreach (var entry in Portal.teleportedPlayers) { @@ -704,7 +706,7 @@ namespace TheOtherRoles.Patches { } // Add trapped Info into Trapper chat - if (Trapper.trapper != null && (CachedPlayer.LocalPlayer.PlayerControl == Trapper.trapper || Helpers.shouldShowGhostInfo()) && !Trapper.trapper.Data.IsDead) { + if (Trapper.trapper != null && (PlayerControl.LocalPlayer == Trapper.trapper || Helpers.shouldShowGhostInfo()) && !Trapper.trapper.Data.IsDead) { if (Trap.traps.Any(x => x.revealed)) FastDestroyableSingleton.Instance.Chat.AddChat(Trapper.trapper, "Trap Logs:"); foreach (Trap trap in Trap.traps) { @@ -726,14 +728,14 @@ namespace TheOtherRoles.Patches { // Add Snitch info string output = ""; - if (Snitch.snitch != null && Snitch.mode != Snitch.Mode.Map && (CachedPlayer.LocalPlayer.PlayerControl == Snitch.snitch || Helpers.shouldShowGhostInfo()) && !Snitch.snitch.Data.IsDead) { + if (Snitch.snitch != null && Snitch.mode != Snitch.Mode.Map && (PlayerControl.LocalPlayer == Snitch.snitch || Helpers.shouldShowGhostInfo()) && !Snitch.snitch.Data.IsDead) { var (playerCompleted, playerTotal) = TasksHandler.taskInfo(Snitch.snitch.Data); int numberOfTasks = playerTotal - playerCompleted; if (numberOfTasks == 0) { output = $"Bad alive roles in game: \n \n"; FastDestroyableSingleton.Instance.StartCoroutine(Effects.Lerp(0.4f, new Action((x) => { if (x == 1f) { - foreach (PlayerControl p in CachedPlayer.AllPlayers) { + foreach (PlayerControl p in PlayerControl.AllPlayerControls) { if (Snitch.targets == Snitch.Targets.Killers && !Helpers.isKiller(p)) continue; if (Snitch.targets == Snitch.Targets.EvilPlayers && !Helpers.isEvil(p)) continue; if (!Snitch.playerRoomMap.ContainsKey(p.PlayerId)) continue; @@ -751,7 +753,7 @@ namespace TheOtherRoles.Patches { } } - if (CachedPlayer.LocalPlayer.Data.IsDead && output != "") FastDestroyableSingleton.Instance.Chat.AddChat(CachedPlayer.LocalPlayer, $"{output}"); + if (PlayerControl.LocalPlayer.Data.IsDead && output != "") FastDestroyableSingleton.Instance.Chat.AddChat(PlayerControl.LocalPlayer, $"{output}"); Trapper.playersOnMap = new List(); Snitch.playerRoomMap = new Dictionary(); diff --git a/TheOtherRoles/Patches/PlayerControlPatch.cs b/TheOtherRoles/Patches/PlayerControlPatch.cs index ace0e5f..790f27a 100644 --- a/TheOtherRoles/Patches/PlayerControlPatch.cs +++ b/TheOtherRoles/Patches/PlayerControlPatch.cs @@ -6,7 +6,7 @@ using System.Linq; using static TheOtherRoles.TheOtherRoles; using static TheOtherRoles.GameHistory; using TheOtherRoles.Objects; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using UnityEngine; using TheOtherRoles.CustomGameModes; @@ -25,7 +25,7 @@ namespace TheOtherRoles.Patches { PlayerControl result = null; float num = AmongUs.GameOptions.GameOptionsData.KillDistances[Mathf.Clamp(GameOptionsManager.Instance.currentNormalGameOptions.KillDistance, 0, 2)]; if (!MapUtilities.CachedShipStatus) return result; - if (targetingPlayer == null) targetingPlayer = CachedPlayer.LocalPlayer.PlayerControl; + if (targetingPlayer == null) targetingPlayer = PlayerControl.LocalPlayer; if (targetingPlayer.Data.IsDead) return result; Vector2 truePosition = targetingPlayer.GetTruePosition(); @@ -63,7 +63,7 @@ namespace TheOtherRoles.Patches { // Update functions static void setBasePlayerOutlines() { - foreach (PlayerControl target in CachedPlayer.AllPlayers) { + foreach (PlayerControl target in PlayerControl.AllPlayerControls) { if (target == null || target.cosmetics?.currentBodySprite?.BodySprite == null) continue; bool isMorphedMorphling = target == Morphling.morphling && Morphling.morphTarget != null && Morphling.morphTimer > 0f; @@ -77,22 +77,27 @@ namespace TheOtherRoles.Patches { color = Color.blue; } + if (PlayerControl.LocalPlayer.Data.IsDead && Armored.armored != null && target == Armored.armored && !Armored.isBrokenArmor && !hasVisibleShield) { + hasVisibleShield = true; + color = Color.yellow; + } + if (hasVisibleShield) { target.cosmetics.currentBodySprite.BodySprite.material.SetFloat("_Outline", 1f); target.cosmetics.currentBodySprite.BodySprite.material.SetColor("_OutlineColor", color); } else { target.cosmetics.currentBodySprite.BodySprite.material.SetFloat("_Outline", 0f); - } + } } } static void setPetVisibility() { - bool localalive = !CachedPlayer.LocalPlayer.Data.IsDead; - foreach (var player in CachedPlayer.AllPlayers) + bool localalive = PlayerControl.LocalPlayer.Data.IsDead; + foreach (var player in PlayerControl.AllPlayerControls) { bool playeralive = !player.Data.IsDead; - player.PlayerControl.cosmetics.SetPetVisible((localalive && playeralive) || !localalive); + player.cosmetics.SetPetVisible((localalive && playeralive) || !localalive); } } @@ -103,22 +108,22 @@ namespace TheOtherRoles.Patches { var next = localPlayerPositions[0]; if (next.Item2 == true) { // Exit current vent if necessary - if (CachedPlayer.LocalPlayer.PlayerControl.inVent) { + if (PlayerControl.LocalPlayer.inVent) { foreach (Vent vent in MapUtilities.CachedShipStatus.AllVents) { bool canUse; bool couldUse; - vent.CanUse(CachedPlayer.LocalPlayer.Data, out canUse, out couldUse); + vent.CanUse(PlayerControl.LocalPlayer.Data, out canUse, out couldUse); if (canUse) { - CachedPlayer.LocalPlayer.PlayerPhysics.RpcExitVent(vent.Id); + PlayerControl.LocalPlayer.MyPhysics.RpcExitVent(vent.Id); vent.SetButtons(false); } } } // Set position - CachedPlayer.LocalPlayer.transform.position = next.Item1; + PlayerControl.LocalPlayer.transform.position = next.Item1; } else if (localPlayerPositions.Any(x => x.Item2 == true)) { - CachedPlayer.LocalPlayer.transform.position = next.Item1; + PlayerControl.LocalPlayer.transform.position = next.Item1; } if (SubmergedCompatibility.IsSubmerged) { SubmergedCompatibility.ChangeFloor(next.Item1.y > -7); @@ -130,43 +135,43 @@ namespace TheOtherRoles.Patches { } else { TimeMaster.isRewinding = false; - CachedPlayer.LocalPlayer.PlayerControl.moveable = true; + PlayerControl.LocalPlayer.moveable = true; } } else { while (localPlayerPositions.Count >= Mathf.Round(TimeMaster.rewindTime / Time.fixedDeltaTime)) localPlayerPositions.RemoveAt(localPlayerPositions.Count - 1); - localPlayerPositions.Insert(0, new Tuple(CachedPlayer.LocalPlayer.transform.position, CachedPlayer.LocalPlayer.PlayerControl.CanMove)); // CanMove = CanMove + localPlayerPositions.Insert(0, new Tuple(PlayerControl.LocalPlayer.transform.position, PlayerControl.LocalPlayer.CanMove)); // CanMove = CanMove } } static void medicSetTarget() { - if (Medic.medic == null || Medic.medic != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Medic.medic == null || Medic.medic != PlayerControl.LocalPlayer) return; Medic.currentTarget = setTarget(); if (!Medic.usedShield) setPlayerOutline(Medic.currentTarget, Medic.shieldedColor); } static void shifterSetTarget() { - if (Shifter.shifter == null || Shifter.shifter != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Shifter.shifter == null || Shifter.shifter != PlayerControl.LocalPlayer) return; Shifter.currentTarget = setTarget(); if (Shifter.futureShift == null) setPlayerOutline(Shifter.currentTarget, Color.yellow); } static void morphlingSetTarget() { - if (Morphling.morphling == null || Morphling.morphling != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Morphling.morphling == null || Morphling.morphling != PlayerControl.LocalPlayer) return; Morphling.currentTarget = setTarget(); setPlayerOutline(Morphling.currentTarget, Morphling.color); } static void sheriffSetTarget() { - if (Sheriff.sheriff == null || Sheriff.sheriff != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Sheriff.sheriff == null || Sheriff.sheriff != PlayerControl.LocalPlayer) return; Sheriff.currentTarget = setTarget(); setPlayerOutline(Sheriff.currentTarget, Sheriff.color); } static void deputySetTarget() { - if (Deputy.deputy == null || Deputy.deputy != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Deputy.deputy == null || Deputy.deputy != PlayerControl.LocalPlayer) return; Deputy.currentTarget = setTarget(); setPlayerOutline(Deputy.currentTarget, Deputy.color); } @@ -174,30 +179,30 @@ namespace TheOtherRoles.Patches { public static void deputyCheckPromotion(bool isMeeting=false) { // If LocalPlayer is Deputy, the Sheriff is disconnected and Deputy promotion is enabled, then trigger promotion - if (Deputy.deputy == null || Deputy.deputy != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Deputy.deputy == null || Deputy.deputy != PlayerControl.LocalPlayer) return; if (Deputy.promotesToSheriff == 0 || Deputy.deputy.Data.IsDead == true || Deputy.promotesToSheriff == 2 && !isMeeting) return; if (Sheriff.sheriff == null || Sheriff.sheriff?.Data?.Disconnected == true || Sheriff.sheriff.Data.IsDead) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.DeputyPromotes, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.DeputyPromotes, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.deputyPromotes(); } } static void trackerSetTarget() { - if (Tracker.tracker == null || Tracker.tracker != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Tracker.tracker == null || Tracker.tracker != PlayerControl.LocalPlayer) return; Tracker.currentTarget = setTarget(); if (!Tracker.usedTracker) setPlayerOutline(Tracker.currentTarget, Tracker.color); } static void detectiveUpdateFootPrints() { - if (Detective.detective == null || Detective.detective != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Detective.detective == null || Detective.detective != PlayerControl.LocalPlayer) return; Detective.timer -= Time.fixedDeltaTime; if (Detective.timer <= 0f) { Detective.timer = Detective.footprintIntervall; - foreach (PlayerControl player in CachedPlayer.AllPlayers) { - if (player != null && player != CachedPlayer.LocalPlayer.PlayerControl && !player.Data.IsDead && !player.inVent) + foreach (PlayerControl player in PlayerControl.AllPlayerControls) { + if (player != null && player != PlayerControl.LocalPlayer && !player.Data.IsDead && !player.inVent) { FootprintHolder.Instance.MakeFootprint(player); } @@ -206,7 +211,7 @@ namespace TheOtherRoles.Patches { } static void vampireSetTarget() { - if (Vampire.vampire == null || Vampire.vampire != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Vampire.vampire == null || Vampire.vampire != PlayerControl.LocalPlayer) return; PlayerControl target = null; if (Spy.spy != null || Sidekick.wasSpy || Jackal.wasSpy) { @@ -235,7 +240,7 @@ namespace TheOtherRoles.Patches { } static void jackalSetTarget() { - if (Jackal.jackal == null || Jackal.jackal != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Jackal.jackal == null || Jackal.jackal != PlayerControl.LocalPlayer) return; var untargetablePlayers = new List(); if (Jackal.canCreateSidekickFromImpostor) { // Only exclude sidekick from beeing targeted if the jackal can create sidekicks from impostors @@ -247,7 +252,7 @@ namespace TheOtherRoles.Patches { } static void sidekickSetTarget() { - if (Sidekick.sidekick == null || Sidekick.sidekick != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Sidekick.sidekick == null || Sidekick.sidekick != PlayerControl.LocalPlayer) return; var untargetablePlayers = new List(); if (Jackal.jackal != null) untargetablePlayers.Add(Jackal.jackal); if (Mini.mini != null && !Mini.isGrownUp()) untargetablePlayers.Add(Mini.mini); // Exclude Sidekick from targeting the Mini unless it has grown up @@ -257,17 +262,17 @@ namespace TheOtherRoles.Patches { static void sidekickCheckPromotion() { // If LocalPlayer is Sidekick, the Jackal is disconnected and Sidekick promotion is enabled, then trigger promotion - if (Sidekick.sidekick == null || Sidekick.sidekick != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Sidekick.sidekick == null || Sidekick.sidekick != PlayerControl.LocalPlayer) return; if (Sidekick.sidekick.Data.IsDead == true || !Sidekick.promotesToJackal) return; if (Jackal.jackal == null || Jackal.jackal?.Data?.Disconnected == true) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SidekickPromotes, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SidekickPromotes, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.sidekickPromotes(); } } static void eraserSetTarget() { - if (Eraser.eraser == null || Eraser.eraser != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Eraser.eraser == null || Eraser.eraser != PlayerControl.LocalPlayer) return; List untargetables = new List(); if (Spy.spy != null) untargetables.Add(Spy.spy); @@ -279,17 +284,17 @@ namespace TheOtherRoles.Patches { static void deputyUpdate() { - if (CachedPlayer.LocalPlayer.PlayerControl == null || !Deputy.handcuffedKnows.ContainsKey(CachedPlayer.LocalPlayer.PlayerId)) return; + if (PlayerControl.LocalPlayer == null || !Deputy.handcuffedKnows.ContainsKey(PlayerControl.LocalPlayer.PlayerId)) return; - if (Deputy.handcuffedKnows[CachedPlayer.LocalPlayer.PlayerId] <= 0) + if (Deputy.handcuffedKnows[PlayerControl.LocalPlayer.PlayerId] <= 0) { - Deputy.handcuffedKnows.Remove(CachedPlayer.LocalPlayer.PlayerId); + Deputy.handcuffedKnows.Remove(PlayerControl.LocalPlayer.PlayerId); // Resets the buttons Deputy.setHandcuffedKnows(false); // Ghost info - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write((byte)RPCProcedure.GhostInfoTypes.HandcuffOver); AmongUsClient.Instance.FinishRpcImmediately(writer); } @@ -297,8 +302,8 @@ namespace TheOtherRoles.Patches { } static void engineerUpdate() { - bool jackalHighlight = Engineer.highlightForTeamJackal && (CachedPlayer.LocalPlayer.PlayerControl == Jackal.jackal || CachedPlayer.LocalPlayer.PlayerControl == Sidekick.sidekick); - bool impostorHighlight = Engineer.highlightForImpostors && CachedPlayer.LocalPlayer.Data.Role.IsImpostor; + bool jackalHighlight = Engineer.highlightForTeamJackal && (PlayerControl.LocalPlayer == Jackal.jackal || PlayerControl.LocalPlayer == Sidekick.sidekick); + bool impostorHighlight = Engineer.highlightForImpostors && PlayerControl.LocalPlayer.Data.Role.IsImpostor; if ((jackalHighlight || impostorHighlight) && MapUtilities.CachedShipStatus?.AllVents != null) { foreach (Vent vent in MapUtilities.CachedShipStatus.AllVents) { try { @@ -318,7 +323,7 @@ namespace TheOtherRoles.Patches { } static void impostorSetTarget() { - if (!CachedPlayer.LocalPlayer.Data.Role.IsImpostor ||!CachedPlayer.LocalPlayer.PlayerControl.CanMove || CachedPlayer.LocalPlayer.Data.IsDead) { // !isImpostor || !canMove || isDead + if (!PlayerControl.LocalPlayer.Data.Role.IsImpostor ||!PlayerControl.LocalPlayer.CanMove || PlayerControl.LocalPlayer.Data.IsDead) { // !isImpostor || !canMove || isDead FastDestroyableSingleton.Instance.KillButton.SetTarget(null); return; } @@ -340,7 +345,7 @@ namespace TheOtherRoles.Patches { } static void warlockSetTarget() { - if (Warlock.warlock == null || Warlock.warlock != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Warlock.warlock == null || Warlock.warlock != PlayerControl.LocalPlayer) return; if (Warlock.curseVictim != null && (Warlock.curseVictim.Data.Disconnected || Warlock.curseVictim.Data.IsDead)) { // If the cursed victim is disconnected or dead reset the curse so a new curse can be applied Warlock.resetCurse(); @@ -357,9 +362,9 @@ namespace TheOtherRoles.Patches { static void ninjaUpdate() { - if (Ninja.isInvisble && Ninja.invisibleTimer <= 0 && Ninja.ninja == CachedPlayer.LocalPlayer.PlayerControl) + if (Ninja.isInvisble && Ninja.invisibleTimer <= 0 && Ninja.ninja == PlayerControl.LocalPlayer) { - MessageWriter invisibleWriter = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetInvisible, Hazel.SendOption.Reliable, -1); + MessageWriter invisibleWriter = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetInvisible, Hazel.SendOption.Reliable, -1); invisibleWriter.Write(Ninja.ninja.PlayerId); invisibleWriter.Write(byte.MaxValue); AmongUsClient.Instance.FinishRpcImmediately(invisibleWriter); @@ -367,11 +372,11 @@ namespace TheOtherRoles.Patches { } if (Ninja.arrow?.arrow != null) { - if (Ninja.ninja == null || Ninja.ninja != CachedPlayer.LocalPlayer.PlayerControl || !Ninja.knowsTargetLocation) { + if (Ninja.ninja == null || Ninja.ninja != PlayerControl.LocalPlayer || !Ninja.knowsTargetLocation) { Ninja.arrow.arrow.SetActive(false); return; } - if (Ninja.ninjaMarked != null && !CachedPlayer.LocalPlayer.Data.IsDead) + if (Ninja.ninjaMarked != null && !PlayerControl.LocalPlayer.Data.IsDead) { bool trackedOnMap = !Ninja.ninjaMarked.Data.IsDead; Vector3 position = Ninja.ninjaMarked.transform.position; @@ -396,7 +401,7 @@ namespace TheOtherRoles.Patches { static void trackerUpdate() { // Handle player tracking if (Tracker.arrow?.arrow != null) { - if (Tracker.tracker == null || CachedPlayer.LocalPlayer.PlayerControl != Tracker.tracker) { + if (Tracker.tracker == null || PlayerControl.LocalPlayer != Tracker.tracker) { Tracker.arrow.arrow.SetActive(false); if (Tracker.DangerMeterParent) Tracker.DangerMeterParent.SetActive(false); return; @@ -433,7 +438,7 @@ namespace TheOtherRoles.Patches { } // Handle corpses tracking - if (Tracker.tracker != null && Tracker.tracker == CachedPlayer.LocalPlayer.PlayerControl && Tracker.corpsesTrackingTimer >= 0f && !Tracker.tracker.Data.IsDead) { + if (Tracker.tracker != null && Tracker.tracker == PlayerControl.LocalPlayer && Tracker.corpsesTrackingTimer >= 0f && !Tracker.tracker.Data.IsDead) { bool arrowsCountChanged = Tracker.localArrows.Count != Tracker.deadBodyPositions.Count(); int index = 0; @@ -483,7 +488,7 @@ namespace TheOtherRoles.Patches { public static void updatePlayerInfo() { Vector3 colorBlindTextMeetingInitialLocalPos = new Vector3(0.3384f, -0.16666f, -0.01f); Vector3 colorBlindTextMeetingInitialLocalScale = new Vector3(0.9f, 1f, 1f); - foreach (PlayerControl p in CachedPlayer.AllPlayers) { + foreach (PlayerControl p in PlayerControl.AllPlayerControls) { // Colorblind Text in Meeting PlayerVoteArea playerVoteArea = MeetingHud.Instance?.playerStates?.FirstOrDefault(x => x.TargetPlayerId == p.PlayerId); @@ -499,7 +504,7 @@ namespace TheOtherRoles.Patches { p.cosmetics.nameText.transform.parent.SetLocalZ(-0.0001f); // This moves both the name AND the colorblindtext behind objects (if the player is behind the object), like the rock on polus - if ((Lawyer.lawyerKnowsRole && CachedPlayer.LocalPlayer.PlayerControl == Lawyer.lawyer && p == Lawyer.target) || p == CachedPlayer.LocalPlayer.PlayerControl || CachedPlayer.LocalPlayer.Data.IsDead) { + if ((Lawyer.lawyerKnowsRole && PlayerControl.LocalPlayer == Lawyer.lawyer && p == Lawyer.target) || p == PlayerControl.LocalPlayer || PlayerControl.LocalPlayer.Data.IsDead) { Transform playerInfoTransform = p.cosmetics.nameText.transform.parent.FindChild("Info"); TMPro.TextMeshPro playerInfo = playerInfoTransform != null ? playerInfoTransform.GetComponent() : null; if (playerInfo == null) { @@ -532,7 +537,7 @@ namespace TheOtherRoles.Patches { string playerInfoText = ""; string meetingInfoText = ""; - if (p == CachedPlayer.LocalPlayer.PlayerControl) { + if (p == PlayerControl.LocalPlayer) { if (p.Data.IsDead) roleNames = roleText; playerInfoText = $"{roleNames}"; if (p == Swapper.swapper) playerInfoText = $"{roleNames}" + Helpers.cs(Swapper.color, $" ({Swapper.charges})"); @@ -550,7 +555,7 @@ namespace TheOtherRoles.Patches { playerInfoText = $"{taskInfo}".Trim(); meetingInfoText = playerInfoText; } - else if (TORMapOptions.ghostsSeeRoles || (Lawyer.lawyerKnowsRole && CachedPlayer.LocalPlayer.PlayerControl == Lawyer.lawyer && p == Lawyer.target)) { + else if (TORMapOptions.ghostsSeeRoles || (Lawyer.lawyerKnowsRole && PlayerControl.LocalPlayer == Lawyer.lawyer && p == Lawyer.target)) { playerInfoText = $"{roleText}"; meetingInfoText = playerInfoText; } @@ -563,10 +568,10 @@ namespace TheOtherRoles.Patches { } public static void securityGuardSetTarget() { - if (SecurityGuard.securityGuard == null || SecurityGuard.securityGuard != CachedPlayer.LocalPlayer.PlayerControl || MapUtilities.CachedShipStatus == null || MapUtilities.CachedShipStatus.AllVents == null) return; + if (SecurityGuard.securityGuard == null || SecurityGuard.securityGuard != PlayerControl.LocalPlayer || MapUtilities.CachedShipStatus == null || MapUtilities.CachedShipStatus.AllVents == null) return; Vent target = null; - Vector2 truePosition = CachedPlayer.LocalPlayer.PlayerControl.GetTruePosition(); + Vector2 truePosition = PlayerControl.LocalPlayer.GetTruePosition(); float closestDistance = float.MaxValue; for (int i = 0; i < MapUtilities.CachedShipStatus.AllVents.Length; i++) { Vent vent = MapUtilities.CachedShipStatus.AllVents[i]; @@ -582,7 +587,7 @@ namespace TheOtherRoles.Patches { } public static void securityGuardUpdate() { - if (SecurityGuard.securityGuard == null || CachedPlayer.LocalPlayer.PlayerControl != SecurityGuard.securityGuard || SecurityGuard.securityGuard.Data.IsDead) return; + if (SecurityGuard.securityGuard == null || PlayerControl.LocalPlayer != SecurityGuard.securityGuard || SecurityGuard.securityGuard.Data.IsDead) return; var (playerCompleted, _) = TasksHandler.taskInfo(SecurityGuard.securityGuard.Data); if (playerCompleted == SecurityGuard.rechargedTasks) { SecurityGuard.rechargedTasks += SecurityGuard.rechargeTasksNumber; @@ -591,16 +596,16 @@ namespace TheOtherRoles.Patches { } public static void arsonistSetTarget() { - if (Arsonist.arsonist == null || Arsonist.arsonist != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Arsonist.arsonist == null || Arsonist.arsonist != PlayerControl.LocalPlayer) return; List untargetables; if (Arsonist.douseTarget != null) { untargetables = new(); - foreach (CachedPlayer cachedPlayer in CachedPlayer.AllPlayers) + foreach (PlayerControl player in PlayerControl.AllPlayerControls) { - if (cachedPlayer.PlayerId != Arsonist.douseTarget.PlayerId) + if (player.PlayerId != Arsonist.douseTarget.PlayerId) { - untargetables.Add(cachedPlayer); + untargetables.Add(player); } } } @@ -617,7 +622,7 @@ namespace TheOtherRoles.Patches { var (playerCompleted, playerTotal) = TasksHandler.taskInfo(Snitch.snitch.Data); if (playerTotal == 0) return; - PlayerControl local = CachedPlayer.LocalPlayer.PlayerControl; + PlayerControl local = PlayerControl.LocalPlayer; int numberOfTasks = playerTotal - playerCompleted; @@ -643,7 +648,7 @@ namespace TheOtherRoles.Patches { } static void bountyHunterUpdate() { - if (BountyHunter.bountyHunter == null || CachedPlayer.LocalPlayer.PlayerControl != BountyHunter.bountyHunter) return; + if (BountyHunter.bountyHunter == null || PlayerControl.LocalPlayer != BountyHunter.bountyHunter) return; if (BountyHunter.bountyHunter.Data.IsDead) { if (BountyHunter.arrow != null || BountyHunter.arrow.arrow != null) UnityEngine.Object.Destroy(BountyHunter.arrow.arrow); @@ -666,15 +671,15 @@ namespace TheOtherRoles.Patches { BountyHunter.arrowUpdateTimer = 0f; // Force arrow to update BountyHunter.bountyUpdateTimer = BountyHunter.bountyDuration; var possibleTargets = new List(); - foreach (PlayerControl p in CachedPlayer.AllPlayers) { + foreach (PlayerControl p in PlayerControl.AllPlayerControls) { if (!p.Data.IsDead && !p.Data.Disconnected && p != p.Data.Role.IsImpostor && p != Spy.spy && (p != Sidekick.sidekick || !Sidekick.wasTeamRed) && (p != Jackal.jackal || !Jackal.wasTeamRed) && (p != Mini.mini || Mini.isGrownUp()) && (Lovers.getPartner(BountyHunter.bountyHunter) == null || p != Lovers.getPartner(BountyHunter.bountyHunter))) possibleTargets.Add(p); } BountyHunter.bounty = possibleTargets[TheOtherRoles.rnd.Next(0, possibleTargets.Count)]; if (BountyHunter.bounty == null) return; // Ghost Info - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write((byte)RPCProcedure.GhostInfoTypes.BountyTarget); writer.Write(BountyHunter.bounty.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -709,7 +714,7 @@ namespace TheOtherRoles.Patches { } static void vultureUpdate() { - if (Vulture.vulture == null || CachedPlayer.LocalPlayer.PlayerControl != Vulture.vulture || Vulture.localArrows == null || !Vulture.showArrows) return; + if (Vulture.vulture == null || PlayerControl.LocalPlayer != Vulture.vulture || Vulture.localArrows == null || !Vulture.showArrows) return; if (Vulture.vulture.Data.IsDead) { foreach (Arrow arrow in Vulture.localArrows) UnityEngine.Object.Destroy(arrow.arrow); Vulture.localArrows = new List(); @@ -736,10 +741,10 @@ namespace TheOtherRoles.Patches { } public static void mediumSetTarget() { - if (Medium.medium == null || Medium.medium != CachedPlayer.LocalPlayer.PlayerControl || Medium.medium.Data.IsDead || Medium.deadBodies == null || MapUtilities.CachedShipStatus?.AllVents == null) return; + if (Medium.medium == null || Medium.medium != PlayerControl.LocalPlayer || Medium.medium.Data.IsDead || Medium.deadBodies == null || MapUtilities.CachedShipStatus?.AllVents == null) return; DeadPlayer target = null; - Vector2 truePosition = CachedPlayer.LocalPlayer.PlayerControl.GetTruePosition(); + Vector2 truePosition = PlayerControl.LocalPlayer.GetTruePosition(); float closestDistance = float.MaxValue; float usableDistance = MapUtilities.CachedShipStatus.AllVents.FirstOrDefault().UsableDistance; foreach ((DeadPlayer dp, Vector3 ps) in Medium.deadBodies) { @@ -780,7 +785,7 @@ namespace TheOtherRoles.Patches { Morphling.morphling.setLook(target.Data.PlayerName, target.Data.DefaultOutfit.ColorId, target.Data.DefaultOutfit.HatId, target.Data.DefaultOutfit.VisorId, target.Data.DefaultOutfit.SkinId, target.Data.DefaultOutfit.PetId); } if (Camouflager.camouflageTimer > 0) { - foreach (PlayerControl player in CachedPlayer.AllPlayers) + foreach (PlayerControl player in PlayerControl.AllPlayerControls) player.setLook("", 6, "", "", "", ""); } } @@ -792,11 +797,11 @@ namespace TheOtherRoles.Patches { } public static void lawyerUpdate() { - if (Lawyer.lawyer == null || Lawyer.lawyer != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Lawyer.lawyer == null || Lawyer.lawyer != PlayerControl.LocalPlayer) return; // Promote to Pursuer if (Lawyer.target != null && Lawyer.target.Data.Disconnected && !Lawyer.lawyer.Data.IsDead) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.LawyerPromotesToPursuer, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.LawyerPromotesToPursuer, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.lawyerPromotesToPursuer(); return; @@ -804,7 +809,7 @@ namespace TheOtherRoles.Patches { } public static void hackerUpdate() { - if (Hacker.hacker == null || CachedPlayer.LocalPlayer.PlayerControl != Hacker.hacker || Hacker.hacker.Data.IsDead) return; + if (Hacker.hacker == null || PlayerControl.LocalPlayer != Hacker.hacker || Hacker.hacker.Data.IsDead) return; var (playerCompleted, _) = TasksHandler.taskInfo(Hacker.hacker.Data); if (playerCompleted == Hacker.rechargedTasks) { Hacker.rechargedTasks += Hacker.rechargeTasksNumber; @@ -815,8 +820,8 @@ namespace TheOtherRoles.Patches { // For swapper swap charges public static void swapperUpdate() { - if (Swapper.swapper == null || CachedPlayer.LocalPlayer.PlayerControl != Swapper.swapper || CachedPlayer.LocalPlayer.Data.IsDead) return; - var (playerCompleted, _) = TasksHandler.taskInfo(CachedPlayer.LocalPlayer.Data); + if (Swapper.swapper == null || PlayerControl.LocalPlayer != Swapper.swapper || PlayerControl.LocalPlayer.Data.IsDead) return; + var (playerCompleted, _) = TasksHandler.taskInfo(PlayerControl.LocalPlayer.Data); if (playerCompleted == Swapper.rechargedTasks) { Swapper.rechargedTasks += Swapper.rechargeTasksNumber; Swapper.charges++; @@ -824,13 +829,13 @@ namespace TheOtherRoles.Patches { } static void pursuerSetTarget() { - if (Pursuer.pursuer == null || Pursuer.pursuer != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Pursuer.pursuer == null || Pursuer.pursuer != PlayerControl.LocalPlayer) return; Pursuer.target = setTarget(); setPlayerOutline(Pursuer.target, Pursuer.color); } static void witchSetTarget() { - if (Witch.witch == null || Witch.witch != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Witch.witch == null || Witch.witch != PlayerControl.LocalPlayer) return; List untargetables; if (Witch.spellCastingTarget != null) untargetables = PlayerControl.AllPlayerControls.ToArray().Where(x => x.PlayerId != Witch.spellCastingTarget.PlayerId).ToList(); // Don't switch the target from the the one you're currently casting a spell on @@ -846,7 +851,7 @@ namespace TheOtherRoles.Patches { static void ninjaSetTarget() { - if (Ninja.ninja == null || Ninja.ninja != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Ninja.ninja == null || Ninja.ninja != PlayerControl.LocalPlayer) return; List untargetables = new List(); if (Spy.spy != null && !Spy.impostorsCanKillAnyone) untargetables.Add(Spy.spy); if (Mini.mini != null && !Mini.isGrownUp()) untargetables.Add(Mini.mini); @@ -857,7 +862,7 @@ namespace TheOtherRoles.Patches { } static void thiefSetTarget() { - if (Thief.thief == null || Thief.thief != CachedPlayer.LocalPlayer.PlayerControl) return; + if (Thief.thief == null || Thief.thief != PlayerControl.LocalPlayer) return; List untargetables = new List(); if (Mini.mini != null && !Mini.isGrownUp()) untargetables.Add(Mini.mini); Thief.currentTarget = setTarget(onlyCrewmates: false, untargetablePlayers: untargetables); @@ -875,11 +880,11 @@ namespace TheOtherRoles.Patches { Bait.active[entry.Key] = entry.Value - Time.fixedDeltaTime; if (entry.Value <= 0) { Bait.active.Remove(entry.Key); - if (entry.Key.killerIfExisting != null && entry.Key.killerIfExisting.PlayerId == CachedPlayer.LocalPlayer.PlayerId) { + if (entry.Key.killerIfExisting != null && entry.Key.killerIfExisting.PlayerId == PlayerControl.LocalPlayer.PlayerId) { Helpers.handleVampireBiteOnBodyReport(); // Manually call Vampire handling, since the CmdReportDeadBody Prefix won't be called RPCProcedure.uncheckedCmdReportDeadBody(entry.Key.killerIfExisting.PlayerId, entry.Key.player.PlayerId); - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.UncheckedCmdReportDeadBody, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UncheckedCmdReportDeadBody, Hazel.SendOption.Reliable, -1); writer.Write(entry.Key.killerIfExisting.PlayerId); writer.Write(entry.Key.player.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -905,7 +910,7 @@ namespace TheOtherRoles.Patches { // Mini set adapted button cooldown for Vampire, Sheriff, Jackal, Sidekick, Warlock, Cleaner public static void miniCooldownUpdate() { - if (Mini.mini != null && CachedPlayer.LocalPlayer.PlayerControl == Mini.mini) { + if (Mini.mini != null && PlayerControl.LocalPlayer == Mini.mini) { var multiplier = Mini.isGrownUp() ? 0.66f : 2f; HudManagerStartPatch.sheriffKillButton.MaxTimer = Sheriff.cooldown * multiplier; HudManagerStartPatch.vampireKillButton.MaxTimer = Vampire.cooldown * multiplier; @@ -920,7 +925,7 @@ namespace TheOtherRoles.Patches { } public static void trapperUpdate() { - if (Trapper.trapper == null || CachedPlayer.LocalPlayer.PlayerControl != Trapper.trapper || Trapper.trapper.Data.IsDead) return; + if (Trapper.trapper == null || PlayerControl.LocalPlayer != Trapper.trapper || Trapper.trapper.Data.IsDead) return; var (playerCompleted, _) = TasksHandler.taskInfo(Trapper.trapper.Data); if (playerCompleted == Trapper.rechargedTasks) { Trapper.rechargedTasks += Trapper.rechargeTasksNumber; @@ -957,10 +962,10 @@ namespace TheOtherRoles.Patches { } } if (HideNSeek.isHunted() && !Hunted.taskPunish && !HideNSeek.isWaitingTimer) { - var (playerCompleted, playerTotal) = TasksHandler.taskInfo(CachedPlayer.LocalPlayer.Data); + var (playerCompleted, playerTotal) = TasksHandler.taskInfo(PlayerControl.LocalPlayer.Data); int numberOfTasks = playerTotal - playerCompleted; if (numberOfTasks == 0) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareTimer, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareTimer, Hazel.SendOption.Reliable, -1); writer.Write(HideNSeek.taskPunish); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.shareTimer(HideNSeek.taskPunish); @@ -971,11 +976,11 @@ namespace TheOtherRoles.Patches { if (!HideNSeek.isHunter()) return; - byte playerId = CachedPlayer.LocalPlayer.PlayerId; + byte playerId = PlayerControl.LocalPlayer.PlayerId; foreach (Arrow arrow in Hunter.localArrows) arrow.arrow.SetActive(false); if (Hunter.arrowActive) { int arrowIndex = 0; - foreach (PlayerControl p in CachedPlayer.AllPlayers) { + foreach (PlayerControl p in PlayerControl.AllPlayerControls) { if (!p.Data.IsDead && !p.Data.Role.IsImpostor) { if (arrowIndex >= Hunter.localArrows.Count) { Hunter.localArrows.Add(new Arrow(Color.blue)); @@ -1001,7 +1006,7 @@ namespace TheOtherRoles.Patches { //pc.cosmetics.colorBlindText.gameObject.transform.localPosition = new Vector3(0, 0, -0.0001f); } - if (CachedPlayer.LocalPlayer.PlayerControl == __instance) { + if (PlayerControl.LocalPlayer == __instance) { // Update player outlines setBasePlayerOutlines(); @@ -1130,14 +1135,14 @@ namespace TheOtherRoles.Patches { } } - [HarmonyPatch(typeof(PlayerControl), nameof(CachedPlayer.LocalPlayer.PlayerControl.CmdReportDeadBody))] + [HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.LocalPlayer.CmdReportDeadBody))] class BodyReportPatch { static void Postfix(PlayerControl __instance, [HarmonyArgument(0)]NetworkedPlayerInfo target) { // Medic or Detective report - bool isMedicReport = Medic.medic != null && Medic.medic == CachedPlayer.LocalPlayer.PlayerControl && __instance.PlayerId == Medic.medic.PlayerId; - bool isDetectiveReport = Detective.detective != null && Detective.detective == CachedPlayer.LocalPlayer.PlayerControl && __instance.PlayerId == Detective.detective.PlayerId; + bool isMedicReport = Medic.medic != null && Medic.medic == PlayerControl.LocalPlayer && __instance.PlayerId == Medic.medic.PlayerId; + bool isDetectiveReport = Detective.detective != null && Detective.detective == PlayerControl.LocalPlayer && __instance.PlayerId == Detective.detective.PlayerId; if (isMedicReport || isDetectiveReport) { DeadPlayer deadPlayer = deadPlayers?.Where(x => x.player?.PlayerId == target?.PlayerId)?.FirstOrDefault(); @@ -1163,11 +1168,11 @@ namespace TheOtherRoles.Patches { { if (AmongUsClient.Instance.AmClient && FastDestroyableSingleton.Instance) { - FastDestroyableSingleton.Instance.Chat.AddChat(CachedPlayer.LocalPlayer.PlayerControl, msg); + FastDestroyableSingleton.Instance.Chat.AddChat(PlayerControl.LocalPlayer, msg); // Ghost Info - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write((byte)RPCProcedure.GhostInfoTypes.DetectiveOrMedicInfo); writer.Write(msg); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -1224,21 +1229,21 @@ namespace TheOtherRoles.Patches { } // Sidekick promotion trigger on murder - if (Sidekick.promotesToJackal && Sidekick.sidekick != null && !Sidekick.sidekick.Data.IsDead && target == Jackal.jackal && Jackal.jackal == CachedPlayer.LocalPlayer.PlayerControl) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SidekickPromotes, Hazel.SendOption.Reliable, -1); + if (Sidekick.promotesToJackal && Sidekick.sidekick != null && !Sidekick.sidekick.Data.IsDead && target == Jackal.jackal && Jackal.jackal == PlayerControl.LocalPlayer) { + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SidekickPromotes, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.sidekickPromotes(); } // Pursuer promotion trigger on murder (the host sends the call such that everyone recieves the update before a possible game End) if (target == Lawyer.target && AmongUsClient.Instance.AmHost && Lawyer.lawyer != null) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.LawyerPromotesToPursuer, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.LawyerPromotesToPursuer, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.lawyerPromotesToPursuer(); } // Seer show flash and add dead player position - if (Seer.seer != null && (CachedPlayer.LocalPlayer.PlayerControl == Seer.seer || Helpers.shouldShowGhostInfo()) && !Seer.seer.Data.IsDead && Seer.seer != target && Seer.mode <= 1) { + if (Seer.seer != null && (PlayerControl.LocalPlayer == Seer.seer || Helpers.shouldShowGhostInfo()) && !Seer.seer.Data.IsDead && Seer.seer != target && Seer.mode <= 1) { Helpers.showFlash(new Color(42f / 255f, 187f / 255f, 245f / 255f), message : "Seer Info: Someone Died"); } if (Seer.deadBodyPositions != null) Seer.deadBodyPositions.Add(target.transform.position); @@ -1252,7 +1257,7 @@ namespace TheOtherRoles.Patches { } // Set bountyHunter cooldown - if (BountyHunter.bountyHunter != null && CachedPlayer.LocalPlayer.PlayerControl == BountyHunter.bountyHunter && __instance == BountyHunter.bountyHunter) { + if (BountyHunter.bountyHunter != null && PlayerControl.LocalPlayer == BountyHunter.bountyHunter && __instance == BountyHunter.bountyHunter) { if (target == BountyHunter.bounty) { BountyHunter.bountyHunter.SetKillTimer(BountyHunter.bountyKillCooldown); BountyHunter.bountyUpdateTimer = 0f; // Force bounty update @@ -1262,28 +1267,28 @@ namespace TheOtherRoles.Patches { } // Mini Set Impostor Mini kill timer (Due to mini being a modifier, all "SetKillTimers" must have happened before this!) - if (Mini.mini != null && __instance == Mini.mini && __instance == CachedPlayer.LocalPlayer.PlayerControl) { + if (Mini.mini != null && __instance == Mini.mini && __instance == PlayerControl.LocalPlayer) { float multiplier = 1f; - if (Mini.mini != null && CachedPlayer.LocalPlayer.PlayerControl == Mini.mini) multiplier = Mini.isGrownUp() ? 0.66f : 2f; + if (Mini.mini != null && PlayerControl.LocalPlayer == Mini.mini) multiplier = Mini.isGrownUp() ? 0.66f : 2f; Mini.mini.SetKillTimer(__instance.killTimer * multiplier); } // Cleaner Button Sync - if (Cleaner.cleaner != null && CachedPlayer.LocalPlayer.PlayerControl == Cleaner.cleaner && __instance == Cleaner.cleaner && HudManagerStartPatch.cleanerCleanButton != null) + if (Cleaner.cleaner != null && PlayerControl.LocalPlayer == Cleaner.cleaner && __instance == Cleaner.cleaner && HudManagerStartPatch.cleanerCleanButton != null) HudManagerStartPatch.cleanerCleanButton.Timer = Cleaner.cleaner.killTimer; // Witch Button Sync - if (Witch.triggerBothCooldowns && Witch.witch != null && CachedPlayer.LocalPlayer.PlayerControl == Witch.witch && __instance == Witch.witch && HudManagerStartPatch.witchSpellButton != null) + if (Witch.triggerBothCooldowns && Witch.witch != null && PlayerControl.LocalPlayer == Witch.witch && __instance == Witch.witch && HudManagerStartPatch.witchSpellButton != null) HudManagerStartPatch.witchSpellButton.Timer = HudManagerStartPatch.witchSpellButton.MaxTimer; // Warlock Button Sync - if (Warlock.warlock != null && CachedPlayer.LocalPlayer.PlayerControl == Warlock.warlock && __instance == Warlock.warlock && HudManagerStartPatch.warlockCurseButton != null) { + if (Warlock.warlock != null && PlayerControl.LocalPlayer == Warlock.warlock && __instance == Warlock.warlock && HudManagerStartPatch.warlockCurseButton != null) { if (Warlock.warlock.killTimer > HudManagerStartPatch.warlockCurseButton.Timer) { HudManagerStartPatch.warlockCurseButton.Timer = Warlock.warlock.killTimer; } } // Ninja Button Sync - if (Ninja.ninja != null && CachedPlayer.LocalPlayer.PlayerControl == Ninja.ninja && __instance == Ninja.ninja && HudManagerStartPatch.ninjaButton != null) + if (Ninja.ninja != null && PlayerControl.LocalPlayer == Ninja.ninja && __instance == Ninja.ninja && HudManagerStartPatch.ninjaButton != null) HudManagerStartPatch.ninjaButton.Timer = HudManagerStartPatch.ninjaButton.MaxTimer; // Bait @@ -1291,12 +1296,12 @@ namespace TheOtherRoles.Patches { float reportDelay = (float) rnd.Next((int)Bait.reportDelayMin, (int)Bait.reportDelayMax + 1); Bait.active.Add(deadPlayer, reportDelay); - if (Bait.showKillFlash && __instance == CachedPlayer.LocalPlayer.PlayerControl) Helpers.showFlash(new Color(204f / 255f, 102f / 255f, 0f / 255f)); + if (Bait.showKillFlash && __instance == PlayerControl.LocalPlayer) Helpers.showFlash(new Color(204f / 255f, 102f / 255f, 0f / 255f)); } // Add Bloody Modifier if (Bloody.bloody.FindAll(x => x.PlayerId == target.PlayerId).Count > 0) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.Bloody, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.Bloody, Hazel.SendOption.Reliable, -1); writer.Write(__instance.PlayerId); writer.Write(target.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); @@ -1318,7 +1323,7 @@ namespace TheOtherRoles.Patches { if (HideNSeek.isHideNSeekGM) { int visibleCounter = 0; Vector3 bottomLeft = IntroCutsceneOnDestroyPatch.bottomLeft + new Vector3(-0.25f, -0.25f, 0); - foreach (PlayerControl p in CachedPlayer.AllPlayers) { + foreach (PlayerControl p in PlayerControl.AllPlayerControls) { if (!TORMapOptions.playerIcons.ContainsKey(p.PlayerId) || p.Data.Role.IsImpostor) continue; if (p.Data.IsDead || p.Data.Disconnected) { TORMapOptions.playerIcons[p.PlayerId].gameObject.SetActive(false); @@ -1331,8 +1336,8 @@ namespace TheOtherRoles.Patches { } // Snitch - if (Snitch.snitch != null && CachedPlayer.LocalPlayer.PlayerId == Snitch.snitch.PlayerId && MapBehaviourPatch.herePoints.Keys.Any(x => x.PlayerId == target.PlayerId)) { - foreach (var a in MapBehaviourPatch.herePoints.Where(x => x.Key.PlayerId == target.PlayerId)) { + if (Snitch.snitch != null && PlayerControl.LocalPlayer.PlayerId == Snitch.snitch.PlayerId && MapBehaviourPatch.herePoints.Keys.Any(x => x == target.PlayerId)) { + foreach (var a in MapBehaviourPatch.herePoints.Where(x => x.Key == target.PlayerId)) { UnityEngine.Object.Destroy(a.Value); MapBehaviourPatch.herePoints.Remove(a.Key); } @@ -1347,8 +1352,8 @@ namespace TheOtherRoles.Patches { if (GameOptionsManager.Instance.currentNormalGameOptions.KillCooldown <= 0f) return false; float multiplier = 1f; float addition = 0f; - if (Mini.mini != null && CachedPlayer.LocalPlayer.PlayerControl == Mini.mini) multiplier = Mini.isGrownUp() ? 0.66f : 2f; - if (BountyHunter.bountyHunter != null && CachedPlayer.LocalPlayer.PlayerControl == BountyHunter.bountyHunter) addition = BountyHunter.punishmentTime; + if (Mini.mini != null && PlayerControl.LocalPlayer == Mini.mini) multiplier = Mini.isGrownUp() ? 0.66f : 2f; + if (BountyHunter.bountyHunter != null && PlayerControl.LocalPlayer == BountyHunter.bountyHunter) addition = BountyHunter.punishmentTime; __instance.killTimer = Mathf.Clamp(time, 0f, GameOptionsManager.Instance.currentNormalGameOptions.KillCooldown * multiplier + addition); FastDestroyableSingleton.Instance.KillButton.SetCoolDown(__instance.killTimer, GameOptionsManager.Instance.currentNormalGameOptions.KillCooldown * multiplier + addition); @@ -1407,8 +1412,8 @@ namespace TheOtherRoles.Patches { } // Sidekick promotion trigger on exile - if (Sidekick.promotesToJackal && Sidekick.sidekick != null && !Sidekick.sidekick.Data.IsDead && __instance == Jackal.jackal && Jackal.jackal == CachedPlayer.LocalPlayer.PlayerControl) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SidekickPromotes, Hazel.SendOption.Reliable, -1); + if (Sidekick.promotesToJackal && Sidekick.sidekick != null && !Sidekick.sidekick.Data.IsDead && __instance == Jackal.jackal && Jackal.jackal == PlayerControl.LocalPlayer) { + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SidekickPromotes, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.sidekickPromotes(); } @@ -1417,7 +1422,7 @@ namespace TheOtherRoles.Patches { if (Lawyer.lawyer != null && __instance == Lawyer.target) { PlayerControl lawyer = Lawyer.lawyer; if (AmongUsClient.Instance.AmHost && ((Lawyer.target != Jester.jester && !Lawyer.isProsecutor) || Lawyer.targetWasGuessed)) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.LawyerPromotesToPursuer, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.LawyerPromotesToPursuer, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.lawyerPromotesToPursuer(); } @@ -1426,8 +1431,8 @@ namespace TheOtherRoles.Patches { if (Lawyer.lawyer != null) Lawyer.lawyer.Exiled(); if (Pursuer.pursuer != null) Pursuer.pursuer.Exiled(); - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write((byte)RPCProcedure.GhostInfoTypes.DeathReasonAndKiller); writer.Write(lawyer.PlayerId); writer.Write((byte)DeadPlayer.CustomDeathReason.LawyerSuicide); @@ -1443,11 +1448,11 @@ namespace TheOtherRoles.Patches { public static class PlayerPhysicsFixedUpdate { public static void Postfix(PlayerPhysics __instance) { - bool shouldInvert = Invert.invert.FindAll(x => x.PlayerId == CachedPlayer.LocalPlayer.PlayerId).Count > 0 && Invert.meetings > 0; + bool shouldInvert = Invert.invert.FindAll(x => x.PlayerId == PlayerControl.LocalPlayer.PlayerId).Count > 0 && Invert.meetings > 0; if (__instance.AmOwner && AmongUsClient.Instance && AmongUsClient.Instance.GameState == InnerNet.InnerNetClient.GameStates.Started && - !CachedPlayer.LocalPlayer.Data.IsDead && + !PlayerControl.LocalPlayer.Data.IsDead && shouldInvert && GameData.Instance && __instance.myPlayer.CanMove) @@ -1461,7 +1466,7 @@ namespace TheOtherRoles.Patches { if (GameOptionsManager.Instance.currentGameOptions.GameMode == GameModes.HideNSeek) return true; __result = false; - if (!CachedPlayer.LocalPlayer.Data.IsDead && Lighter.lighter != null && Lighter.lighter.PlayerId == CachedPlayer.LocalPlayer.PlayerId) { + if (!PlayerControl.LocalPlayer.Data.IsDead && Lighter.lighter != null && Lighter.lighter.PlayerId == PlayerControl.LocalPlayer.PlayerId) { __result = true; } @@ -1472,9 +1477,9 @@ namespace TheOtherRoles.Patches { [HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.AdjustLighting))] public static class AdjustLight { public static bool Prefix(PlayerControl __instance) { - if (__instance == null || CachedPlayer.LocalPlayer == null || Lighter.lighter == null) return true; + if (__instance == null || PlayerControl.LocalPlayer == null || Lighter.lighter == null) return true; - bool hasFlashlight = !CachedPlayer.LocalPlayer.Data.IsDead && Lighter.lighter.PlayerId == CachedPlayer.LocalPlayer.PlayerId; + bool hasFlashlight = !PlayerControl.LocalPlayer.Data.IsDead && Lighter.lighter.PlayerId == PlayerControl.LocalPlayer.PlayerId; __instance.SetFlashlightInputMethod(); __instance.lightSource.SetupLightingForGameplay(hasFlashlight, Lighter.flashlightWidth, __instance.TargetFlashlight.transform); diff --git a/TheOtherRoles/Patches/RegionMenuPatch.cs b/TheOtherRoles/Patches/RegionMenuPatch.cs index b9363c7..f607b3d 100644 --- a/TheOtherRoles/Patches/RegionMenuPatch.cs +++ b/TheOtherRoles/Patches/RegionMenuPatch.cs @@ -145,13 +145,14 @@ namespace TheOtherRoles.Patches { if (serverWarning == null) { var tmplt = __instance.ButtonPool.activeChildren[^1] ; - serverWarning = GameObject.Instantiate(tmplt.transform.GetChild(0).gameObject, tmplt.transform); - var comp = serverWarning.GetComponent(); - comp.fontSizeMin = 2; - comp.fontSizeMax = 2; - serverWarning.transform.localPosition = new Vector3(0f, -3f, -10f); + serverWarning = new GameObject("serverWarning"); // GameObject.Instantiate(tmplt.transform.GetChild(0).gameObject, tmplt.transform); + var comp = serverWarning.AddComponent(); // serverWarning.GetComponent(); + //serverWarning.transform.SetParent(tmplt.transform, true); + comp.fontSize = 0.2f; + serverWarning.transform.position = new Vector3(5f, 1f, -200f); __instance.StartCoroutine(Effects.Lerp(0.1f, new Action((p) => { comp.text = Helpers.cs(Color.red, "Vanilla Servers Are Currently Not Compatible With TOR"); + serverWarning.transform.position = new Vector3(0f, 1f, -200f); }))); serverWarning.SetActive(true); } diff --git a/TheOtherRoles/Patches/RoleAssignmentPatch.cs b/TheOtherRoles/Patches/RoleAssignmentPatch.cs index ded2828..012903b 100644 --- a/TheOtherRoles/Patches/RoleAssignmentPatch.cs +++ b/TheOtherRoles/Patches/RoleAssignmentPatch.cs @@ -5,7 +5,7 @@ using System.Linq; using UnityEngine; using System; using AmongUs.GameOptions; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using static TheOtherRoles.TheOtherRoles; using TheOtherRoles.CustomGameModes; @@ -48,7 +48,7 @@ namespace TheOtherRoles.Patches { private static List> playerRoleMap = new List>(); public static bool isGuesserGamemode { get { return TORMapOptions.gameMode == CustomGamemodes.Guesser; } } public static void Postfix() { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ResetVaribles, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ResetVaribles, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.resetVariables(); if (TORMapOptions.gameMode == CustomGamemodes.HideNSeek || TORMapOptions.gameMode == CustomGamemodes.PropHunt || GameOptionsManager.Instance.currentGameOptions.GameMode == GameModes.HideNSeek) return; // Don't assign Roles in Hide N Seek @@ -97,6 +97,9 @@ namespace TheOtherRoles.Patches { int crewCountSettings = rnd.Next(crewmateMin, crewmateMax + 1); int neutralCountSettings = rnd.Next(neutralMin, neutralMax + 1); int impCountSettings = rnd.Next(impostorMin, impostorMax + 1); + // If fill crewmates is enabled, make sure crew + neutral >= crewmates s.t. everyone has a role! + while (crewCountSettings + neutralCountSettings < crewmates.Count && CustomOptionHolder.crewmateRolesFill.getBool()) + crewCountSettings++; // Potentially lower the actual maximum to the assignable players int maxCrewmateRoles = Mathf.Min(crewmates.Count, crewCountSettings); @@ -385,24 +388,24 @@ namespace TheOtherRoles.Patches { if (Lawyer.lawyer != null) { var possibleTargets = new List(); if (!Lawyer.isProsecutor) { // Lawyer - foreach (PlayerControl p in CachedPlayer.AllPlayers) { + foreach (PlayerControl p in PlayerControl.AllPlayerControls) { if (!p.Data.IsDead && !p.Data.Disconnected && p != Lovers.lover1 && p != Lovers.lover2 && (p.Data.Role.IsImpostor || p == Jackal.jackal || (Lawyer.targetCanBeJester && p == Jester.jester))) possibleTargets.Add(p); } } else { // Prosecutor - foreach (PlayerControl p in CachedPlayer.AllPlayers) { + foreach (PlayerControl p in PlayerControl.AllPlayerControls) { if (!p.Data.IsDead && !p.Data.Disconnected && p != Lovers.lover1 && p != Lovers.lover2 && p != Mini.mini && !p.Data.Role.IsImpostor && !Helpers.isNeutral(p) && p != Swapper.swapper) possibleTargets.Add(p); } } if (possibleTargets.Count == 0) { - MessageWriter w = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.LawyerPromotesToPursuer, Hazel.SendOption.Reliable, -1); + MessageWriter w = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.LawyerPromotesToPursuer, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(w); RPCProcedure.lawyerPromotesToPursuer(); } else { var target = possibleTargets[TheOtherRoles.rnd.Next(0, possibleTargets.Count)]; - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.LawyerSetTarget, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.LawyerSetTarget, Hazel.SendOption.Reliable, -1); writer.Write(target.PlayerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.lawyerSetTarget(target.PlayerId); @@ -435,6 +438,7 @@ namespace TheOtherRoles.Patches { RoleId.Vip, RoleId.Invert, RoleId.Chameleon, + RoleId.Armored, RoleId.Shifter }); @@ -509,7 +513,7 @@ namespace TheOtherRoles.Patches { byte playerId = playerList[index].PlayerId; playerList.RemoveAt(index); - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetGuesserGm, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetGuesserGm, Hazel.SendOption.Reliable, -1); writer.Write(playerId); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.setGuesserGm(playerId); @@ -537,7 +541,7 @@ namespace TheOtherRoles.Patches { byte playerId = playerList[index].PlayerId; playerList.RemoveAt(index); - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.SetModifier, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetModifier, Hazel.SendOption.Reliable, -1); writer.Write(modifierId); writer.Write(playerId); writer.Write(flag); @@ -621,8 +625,12 @@ namespace TheOtherRoles.Patches { selection = CustomOptionHolder.modifierChameleon.getSelection(); if (multiplyQuantity) selection *= CustomOptionHolder.modifierChameleonQuantity.getQuantity(); break; + case RoleId.Armored: + selection = CustomOptionHolder.modifierArmored.getSelection(); + break; case RoleId.Shifter: - selection = CustomOptionHolder.modifierShifter.getSelection(); break; + selection = CustomOptionHolder.modifierShifter.getSelection(); + break; } return selection; @@ -634,7 +642,7 @@ namespace TheOtherRoles.Patches { while (playerRoleMap.Any()) { byte amount = (byte)Math.Min(playerRoleMap.Count, 20); - var writer = AmongUsClient.Instance!.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.WorkaroundSetRoles, SendOption.Reliable, -1); + var writer = AmongUsClient.Instance!.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.WorkaroundSetRoles, SendOption.Reliable, -1); writer.Write(amount); for (int i = 0; i < amount; i++) { diff --git a/TheOtherRoles/Patches/TransportationToolPatches.cs b/TheOtherRoles/Patches/TransportationToolPatches.cs index 1924aee..f51f10c 100644 --- a/TheOtherRoles/Patches/TransportationToolPatches.cs +++ b/TheOtherRoles/Patches/TransportationToolPatches.cs @@ -23,7 +23,7 @@ namespace TheOtherRoles.Patches { [HarmonyPrefix] [HarmonyPatch(typeof(ZiplineBehaviour), nameof(ZiplineBehaviour.Use), new Type[] {typeof(PlayerControl), typeof(bool)})] public static void prefix3(ZiplineBehaviour __instance, PlayerControl player, bool fromTop) { - AntiTeleport.position = Players.CachedPlayer.LocalPlayer.transform.position; + AntiTeleport.position = PlayerControl.LocalPlayer.transform.position; } [HarmonyPostfix] @@ -36,11 +36,11 @@ namespace TheOtherRoles.Patches { if (hand != null) { if (Camouflager.camouflageTimer <= 0 && !Helpers.MushroomSabotageActive()) { if (player == Morphling.morphling && Morphling.morphTimer > 0) { - hand.SetPlayerColor(Morphling.morphTarget.CurrentOutfit, PlayerMaterial.MaskType.None); + hand.SetPlayerColor(Morphling.morphTarget.CurrentOutfit, PlayerMaterial.MaskType.None, 1f); // Also set hat color, cause the line destroys it... player.RawSetHat(Morphling.morphTarget.Data.DefaultOutfit.HatId, Morphling.morphTarget.Data.DefaultOutfit.ColorId); } else { - hand.SetPlayerColor(player.CurrentOutfit, PlayerMaterial.MaskType.None); + hand.SetPlayerColor(player.CurrentOutfit, PlayerMaterial.MaskType.None, 1f); } } else { PlayerMaterial.SetColors(6, hand.handRenderer); @@ -53,7 +53,7 @@ namespace TheOtherRoles.Patches { [HarmonyPrefix] [HarmonyPatch(typeof(PlayerPhysics), nameof(PlayerPhysics.ClimbLadder))] public static void prefix() { - AntiTeleport.position = Players.CachedPlayer.LocalPlayer.transform.position; + AntiTeleport.position = PlayerControl.LocalPlayer.transform.position; } [HarmonyPostfix] @@ -71,7 +71,7 @@ namespace TheOtherRoles.Patches { [HarmonyPrefix] [HarmonyPatch(typeof(MovingPlatformBehaviour), nameof(MovingPlatformBehaviour.UsePlatform))] public static void prefix2() { - AntiTeleport.position = Players.CachedPlayer.LocalPlayer.transform.position; + AntiTeleport.position = PlayerControl.LocalPlayer.transform.position; } } } diff --git a/TheOtherRoles/Patches/UpdatePatch.cs b/TheOtherRoles/Patches/UpdatePatch.cs index 34cf405..9079436 100644 --- a/TheOtherRoles/Patches/UpdatePatch.cs +++ b/TheOtherRoles/Patches/UpdatePatch.cs @@ -5,7 +5,7 @@ using static TheOtherRoles.TheOtherRoles; using TheOtherRoles.Objects; using System.Collections.Generic; using System.Linq; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using TheOtherRoles.CustomGameModes; using AmongUs.GameOptions; @@ -16,8 +16,8 @@ namespace TheOtherRoles.Patches { { private static Dictionary TagColorDict = new(); static void resetNameTagsAndColors() { - var localPlayer = CachedPlayer.LocalPlayer.PlayerControl; - var myData = CachedPlayer.LocalPlayer.Data; + var localPlayer = PlayerControl.LocalPlayer; + var myData = PlayerControl.LocalPlayer.Data; var amImpostor = myData.Role.IsImpostor; var morphTimerNotUp = Morphling.morphTimer > 0f; var morphTargetNotNull = Morphling.morphTarget != null; @@ -70,7 +70,7 @@ namespace TheOtherRoles.Patches { } static void setNameColors() { - var localPlayer = CachedPlayer.LocalPlayer.PlayerControl; + var localPlayer = PlayerControl.LocalPlayer; var localRole = RoleInfo.getRoleInfoForPlayer(localPlayer, false).FirstOrDefault(); setPlayerNameColor(localPlayer, localRole.color); @@ -171,8 +171,8 @@ namespace TheOtherRoles.Patches { static void setNameTags() { // Mafia - if (CachedPlayer.LocalPlayer != null && CachedPlayer.LocalPlayer.Data.Role.IsImpostor) { - foreach (PlayerControl player in CachedPlayer.AllPlayers) + if (PlayerControl.LocalPlayer != null && PlayerControl.LocalPlayer.Data.Role.IsImpostor) { + foreach (PlayerControl player in PlayerControl.AllPlayerControls) if (Godfather.godfather != null && Godfather.godfather == player) player.cosmetics.nameText.text = player.Data.PlayerName + " (G)"; else if (Mafioso.mafioso != null && Mafioso.mafioso == player) @@ -190,7 +190,7 @@ namespace TheOtherRoles.Patches { } // Lovers - if (Lovers.lover1 != null && Lovers.lover2 != null && (Lovers.lover1 == CachedPlayer.LocalPlayer.PlayerControl || Lovers.lover2 == CachedPlayer.LocalPlayer.PlayerControl)) { + if (Lovers.lover1 != null && Lovers.lover2 != null && (Lovers.lover1 == PlayerControl.LocalPlayer || Lovers.lover2 == PlayerControl.LocalPlayer)) { string suffix = Helpers.cs(Lovers.color, " ♥"); Lovers.lover1.cosmetics.nameText.text += suffix; Lovers.lover2.cosmetics.nameText.text += suffix; @@ -202,7 +202,7 @@ namespace TheOtherRoles.Patches { } // Lawyer or Prosecutor - if ((Lawyer.lawyer != null && Lawyer.target != null && Lawyer.lawyer == CachedPlayer.LocalPlayer.PlayerControl)) { + if ((Lawyer.lawyer != null && Lawyer.target != null && Lawyer.lawyer == PlayerControl.LocalPlayer)) { Color color = Lawyer.color; PlayerControl target = Lawyer.target; string suffix = Helpers.cs(color, " §"); @@ -215,7 +215,7 @@ namespace TheOtherRoles.Patches { } // Former Thief - if (Thief.formerThief != null && (Thief.formerThief == CachedPlayer.LocalPlayer.PlayerControl || CachedPlayer.LocalPlayer.PlayerControl.Data.IsDead)) { + if (Thief.formerThief != null && (Thief.formerThief == PlayerControl.LocalPlayer || PlayerControl.LocalPlayer.Data.IsDead)) { string suffix = Helpers.cs(Thief.color, " $"); Thief.formerThief.cosmetics.nameText.text += suffix; if (MeetingHud.Instance != null) @@ -225,7 +225,7 @@ namespace TheOtherRoles.Patches { } // Display lighter / darker color for all alive players - if (CachedPlayer.LocalPlayer != null && MeetingHud.Instance != null && TORMapOptions.showLighterDarker) { + if (PlayerControl.LocalPlayer != null && MeetingHud.Instance != null && TORMapOptions.showLighterDarker) { foreach (PlayerVoteArea player in MeetingHud.Instance.playerStates) { var target = Helpers.playerById(player.TargetPlayerId); if (target != null) player.NameText.text += $" ({(Helpers.isLighterColor(target) ? "L" : "D")})"; @@ -285,36 +285,36 @@ namespace TheOtherRoles.Patches { } static void updateImpostorKillButton(HudManager __instance) { - if (!CachedPlayer.LocalPlayer.Data.Role.IsImpostor) return; + if (!PlayerControl.LocalPlayer.Data.Role.IsImpostor) return; if (MeetingHud.Instance) { __instance.KillButton.Hide(); return; } bool enabled = true; - if (Vampire.vampire != null && Vampire.vampire == CachedPlayer.LocalPlayer.PlayerControl) + if (Vampire.vampire != null && Vampire.vampire == PlayerControl.LocalPlayer) enabled = false; - else if (Mafioso.mafioso != null && Mafioso.mafioso == CachedPlayer.LocalPlayer.PlayerControl && Godfather.godfather != null && !Godfather.godfather.Data.IsDead) + else if (Mafioso.mafioso != null && Mafioso.mafioso == PlayerControl.LocalPlayer && Godfather.godfather != null && !Godfather.godfather.Data.IsDead) enabled = false; - else if (Janitor.janitor != null && Janitor.janitor == CachedPlayer.LocalPlayer.PlayerControl) + else if (Janitor.janitor != null && Janitor.janitor == PlayerControl.LocalPlayer) enabled = false; if (enabled) __instance.KillButton.Show(); else __instance.KillButton.Hide(); - if (Deputy.handcuffedKnows.ContainsKey(CachedPlayer.LocalPlayer.PlayerId) && Deputy.handcuffedKnows[CachedPlayer.LocalPlayer.PlayerId] > 0) __instance.KillButton.Hide(); + if (Deputy.handcuffedKnows.ContainsKey(PlayerControl.LocalPlayer.PlayerId) && Deputy.handcuffedKnows[PlayerControl.LocalPlayer.PlayerId] > 0) __instance.KillButton.Hide(); } static void updateReportButton(HudManager __instance) { if (GameOptionsManager.Instance.currentGameOptions.GameMode == GameModes.HideNSeek) return; - if (Deputy.handcuffedKnows.ContainsKey(CachedPlayer.LocalPlayer.PlayerId) && Deputy.handcuffedKnows[CachedPlayer.LocalPlayer.PlayerId] > 0 || MeetingHud.Instance) __instance.ReportButton.Hide(); + if (Deputy.handcuffedKnows.ContainsKey(PlayerControl.LocalPlayer.PlayerId) && Deputy.handcuffedKnows[PlayerControl.LocalPlayer.PlayerId] > 0 || MeetingHud.Instance) __instance.ReportButton.Hide(); else if (!__instance.ReportButton.isActiveAndEnabled) __instance.ReportButton.Show(); } static void updateVentButton(HudManager __instance) { if (GameOptionsManager.Instance.currentGameOptions.GameMode == GameModes.HideNSeek) return; - if (Deputy.handcuffedKnows.ContainsKey(CachedPlayer.LocalPlayer.PlayerId) && Deputy.handcuffedKnows[CachedPlayer.LocalPlayer.PlayerId] > 0 || MeetingHud.Instance) __instance.ImpostorVentButton.Hide(); - else if (CachedPlayer.LocalPlayer.PlayerControl.roleCanUseVents() && !__instance.ImpostorVentButton.isActiveAndEnabled) __instance.ImpostorVentButton.Show(); + if (Deputy.handcuffedKnows.ContainsKey(PlayerControl.LocalPlayer.PlayerId) && Deputy.handcuffedKnows[PlayerControl.LocalPlayer.PlayerId] > 0 || MeetingHud.Instance) __instance.ImpostorVentButton.Hide(); + else if (PlayerControl.LocalPlayer.roleCanUseVents() && !__instance.ImpostorVentButton.isActiveAndEnabled) __instance.ImpostorVentButton.Show(); } @@ -328,7 +328,7 @@ namespace TheOtherRoles.Patches { } static void updateMapButton(HudManager __instance) { - if (Trapper.trapper == null || !(CachedPlayer.LocalPlayer.PlayerId == Trapper.trapper.PlayerId) || __instance == null || __instance.MapButton.HeldButtonSprite == null) return; + if (Trapper.trapper == null || !(PlayerControl.LocalPlayer.PlayerId == Trapper.trapper.PlayerId) || __instance == null || __instance.MapButton.HeldButtonSprite == null) return; __instance.MapButton.HeldButtonSprite.color = Trapper.playersOnMap.Any() ? Trapper.color : Color.white; } @@ -361,7 +361,7 @@ namespace TheOtherRoles.Patches { if (!MeetingHud.Instance) __instance.AbilityButton?.Update(); // Fix dead player's pets being visible by just always updating whether the pet should be visible at all. - foreach (PlayerControl target in CachedPlayer.AllPlayers) { + foreach (PlayerControl target in PlayerControl.AllPlayerControls) { var pet = target.GetPet(); if (pet != null) { pet.Visible = (PlayerControl.LocalPlayer.Data.IsDead && target.Data.IsDead || !target.Data.IsDead) && !target.inVent; diff --git a/TheOtherRoles/Patches/UsablesPatch.cs b/TheOtherRoles/Patches/UsablesPatch.cs index 0da7c82..1d05421 100644 --- a/TheOtherRoles/Patches/UsablesPatch.cs +++ b/TheOtherRoles/Patches/UsablesPatch.cs @@ -7,7 +7,7 @@ using static TheOtherRoles.TheOtherRoles; using static TheOtherRoles.GameHistory; using static TheOtherRoles.TORMapOptions; using System.Collections.Generic; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using TheOtherRoles.Objects; using TheOtherRoles.CustomGameModes; @@ -41,7 +41,7 @@ namespace TheOtherRoles.Patches { } switch (__instance.Id) { case 9: // Cannot enter vent 9 (Engine Room Exit Only Vent)! - if (CachedPlayer.LocalPlayer.PlayerControl.inVent) break; + if (PlayerControl.LocalPlayer.inVent) break; __result = float.MaxValue; return canUse = couldUse = false; case 14: // Lower Central @@ -60,7 +60,7 @@ namespace TheOtherRoles.Patches { var usableDistance = __instance.UsableDistance; if (__instance.name.StartsWith("JackInTheBoxVent_")) { - if(Trickster.trickster != CachedPlayer.LocalPlayer.PlayerControl) { + if(Trickster.trickster != PlayerControl.LocalPlayer) { // Only the Trickster can use the Jack-In-The-Boxes! canUse = false; couldUse = false; @@ -90,7 +90,7 @@ namespace TheOtherRoles.Patches { class VentButtonDoClickPatch { static bool Prefix(VentButton __instance) { // Manually modifying the VentButton to use Vent.Use again in order to trigger the Vent.Use prefix patch - if (__instance.currentTarget != null && !Deputy.handcuffedKnows.ContainsKey(CachedPlayer.LocalPlayer.PlayerId)) __instance.currentTarget.Use(); + if (__instance.currentTarget != null && !Deputy.handcuffedKnows.ContainsKey(PlayerControl.LocalPlayer.PlayerId)) __instance.currentTarget.Use(); return false; } } @@ -100,36 +100,36 @@ namespace TheOtherRoles.Patches { public static bool Prefix(Vent __instance) { if (GameOptionsManager.Instance.currentGameOptions.GameMode == GameModes.HideNSeek) return true; // Deputy handcuff disables the vents - if (Deputy.handcuffedPlayers.Contains(CachedPlayer.LocalPlayer.PlayerId)) { + if (Deputy.handcuffedPlayers.Contains(PlayerControl.LocalPlayer.PlayerId)) { Deputy.setHandcuffedKnows(); return false; } - if (Trapper.playersOnMap.Contains(CachedPlayer.LocalPlayer.PlayerControl)) return false; + if (Trapper.playersOnMap.Contains(PlayerControl.LocalPlayer)) return false; bool canUse; bool couldUse; - __instance.CanUse(CachedPlayer.LocalPlayer.Data, out canUse, out couldUse); - bool canMoveInVents = CachedPlayer.LocalPlayer.PlayerControl != Spy.spy && !Trapper.playersOnMap.Contains(CachedPlayer.LocalPlayer.PlayerControl); + __instance.CanUse(PlayerControl.LocalPlayer.Data, out canUse, out couldUse); + bool canMoveInVents = PlayerControl.LocalPlayer != Spy.spy && !Trapper.playersOnMap.Contains(PlayerControl.LocalPlayer); if (!canUse) return false; // No need to execute the native method as using is disallowed anyways - bool isEnter = !CachedPlayer.LocalPlayer.PlayerControl.inVent; + bool isEnter = !PlayerControl.LocalPlayer.inVent; if (__instance.name.StartsWith("JackInTheBoxVent_")) { __instance.SetButtons(isEnter && canMoveInVents); - MessageWriter writer = AmongUsClient.Instance.StartRpc(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.UseUncheckedVent, Hazel.SendOption.Reliable); + MessageWriter writer = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UseUncheckedVent, Hazel.SendOption.Reliable); writer.WritePacked(__instance.Id); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write(isEnter ? byte.MaxValue : (byte)0); writer.EndMessage(); - RPCProcedure.useUncheckedVent(__instance.Id, CachedPlayer.LocalPlayer.PlayerId, isEnter ? byte.MaxValue : (byte)0); + RPCProcedure.useUncheckedVent(__instance.Id, PlayerControl.LocalPlayer.PlayerId, isEnter ? byte.MaxValue : (byte)0); SoundEffectsManager.play("tricksterUseBoxVent"); return false; } if(isEnter) { - CachedPlayer.LocalPlayer.PlayerPhysics.RpcEnterVent(__instance.Id); + PlayerControl.LocalPlayer.MyPhysics.RpcEnterVent(__instance.Id); } else { - CachedPlayer.LocalPlayer.PlayerPhysics.RpcExitVent(__instance.Id); + PlayerControl.LocalPlayer.MyPhysics.RpcExitVent(__instance.Id); } __instance.SetButtons(isEnter && canMoveInVents); return false; @@ -139,7 +139,7 @@ namespace TheOtherRoles.Patches { [HarmonyPatch(typeof(Vent), nameof(Vent.TryMoveToVent))] public static class MoveToVentPatch { public static bool Prefix(Vent otherVent) { - return !Trapper.playersOnMap.Contains(CachedPlayer.LocalPlayer.PlayerControl); + return !Trapper.playersOnMap.Contains(PlayerControl.LocalPlayer); } } @@ -157,7 +157,7 @@ namespace TheOtherRoles.Patches { static Sprite defaultVentSprite = null; static void Postfix(VentButton __instance) { // Trickster render special vent button - if (Trickster.trickster != null && Trickster.trickster == CachedPlayer.LocalPlayer.PlayerControl) { + if (Trickster.trickster != null && Trickster.trickster == PlayerControl.LocalPlayer) { if (defaultVentSprite == null) defaultVentSprite = __instance.graphic.sprite; bool isSpecialVent = __instance.currentTarget != null && __instance.currentTarget.gameObject != null && __instance.currentTarget.gameObject.name.StartsWith("JackInTheBoxVent_"); __instance.graphic.sprite = isSpecialVent ? Trickster.getTricksterVentButtonSprite() : defaultVentSprite; @@ -173,27 +173,27 @@ namespace TheOtherRoles.Patches { KillAnimationCoPerformKillPatch.hideNextAnimation = true; // dont jump out of bounds! return false; } - if (__instance.isActiveAndEnabled && __instance.currentTarget && !__instance.isCoolingDown && !CachedPlayer.LocalPlayer.Data.IsDead && CachedPlayer.LocalPlayer.PlayerControl.CanMove) { + if (__instance.isActiveAndEnabled && __instance.currentTarget && !__instance.isCoolingDown && !PlayerControl.LocalPlayer.Data.IsDead && PlayerControl.LocalPlayer.CanMove) { // Deputy handcuff update. - if (Deputy.handcuffedPlayers.Contains(CachedPlayer.LocalPlayer.PlayerId)) { + if (Deputy.handcuffedPlayers.Contains(PlayerControl.LocalPlayer.PlayerId)) { Deputy.setHandcuffedKnows(); return false; } // Use an unchecked kill command, to allow shorter kill cooldowns etc. without getting kicked - MurderAttemptResult res = Helpers.checkMurderAttemptAndKill(CachedPlayer.LocalPlayer.PlayerControl, __instance.currentTarget); + MurderAttemptResult res = Helpers.checkMurderAttemptAndKill(PlayerControl.LocalPlayer, __instance.currentTarget); // Handle blank kill if (res == MurderAttemptResult.BlankKill) { - CachedPlayer.LocalPlayer.PlayerControl.killTimer = GameOptionsManager.Instance.currentNormalGameOptions.KillCooldown; - if (CachedPlayer.LocalPlayer.PlayerControl == Cleaner.cleaner) + PlayerControl.LocalPlayer.killTimer = GameOptionsManager.Instance.currentNormalGameOptions.KillCooldown; + if (PlayerControl.LocalPlayer == Cleaner.cleaner) Cleaner.cleaner.killTimer = HudManagerStartPatch.cleanerCleanButton.Timer = HudManagerStartPatch.cleanerCleanButton.MaxTimer; - else if (CachedPlayer.LocalPlayer.PlayerControl == Warlock.warlock) + else if (PlayerControl.LocalPlayer == Warlock.warlock) Warlock.warlock.killTimer = HudManagerStartPatch.warlockCurseButton.Timer = HudManagerStartPatch.warlockCurseButton.MaxTimer; - else if (CachedPlayer.LocalPlayer.PlayerControl == Mini.mini && Mini.mini.Data.Role.IsImpostor) + else if (PlayerControl.LocalPlayer == Mini.mini && Mini.mini.Data.Role.IsImpostor) Mini.mini.SetKillTimer(GameOptionsManager.Instance.currentNormalGameOptions.KillCooldown * (Mini.isGrownUp() ? 0.66f : 2f)); - else if (CachedPlayer.LocalPlayer.PlayerControl == Witch.witch) + else if (PlayerControl.LocalPlayer == Witch.witch) Witch.witch.killTimer = HudManagerStartPatch.witchSpellButton.Timer = HudManagerStartPatch.witchSpellButton.MaxTimer; - else if (CachedPlayer.LocalPlayer.PlayerControl == Ninja.ninja) + else if (PlayerControl.LocalPlayer == Ninja.ninja) Ninja.ninja.killTimer = HudManagerStartPatch.ninjaButton.Timer = HudManagerStartPatch.ninjaButton.MaxTimer; } __instance.SetTarget(null); @@ -206,8 +206,8 @@ namespace TheOtherRoles.Patches { class SabotageButtonRefreshPatch { static void Postfix() { // Mafia disable sabotage button for Janitor and sometimes for Mafioso - bool blockSabotageJanitor = (Janitor.janitor != null && Janitor.janitor == CachedPlayer.LocalPlayer.PlayerControl); - bool blockSabotageMafioso = (Mafioso.mafioso != null && Mafioso.mafioso == CachedPlayer.LocalPlayer.PlayerControl && Godfather.godfather != null && !Godfather.godfather.Data.IsDead); + bool blockSabotageJanitor = (Janitor.janitor != null && Janitor.janitor == PlayerControl.LocalPlayer); + bool blockSabotageMafioso = (Mafioso.mafioso != null && Mafioso.mafioso == PlayerControl.LocalPlayer && Godfather.godfather != null && !Godfather.godfather.Data.IsDead); if (blockSabotageJanitor || blockSabotageMafioso) { FastDestroyableSingleton.Instance.SabotageButton.SetDisabled(); } @@ -217,8 +217,8 @@ namespace TheOtherRoles.Patches { [HarmonyPatch(typeof(ReportButton), nameof(ReportButton.DoClick))] class ReportButtonDoClickPatch { public static bool Prefix(ReportButton __instance) { - if (__instance.isActiveAndEnabled && Deputy.handcuffedPlayers.Contains(CachedPlayer.LocalPlayer.PlayerId) && __instance.graphic.color == Palette.EnabledColor) Deputy.setHandcuffedKnows(); - return !Deputy.handcuffedKnows.ContainsKey(CachedPlayer.LocalPlayer.PlayerId); + if (__instance.isActiveAndEnabled && Deputy.handcuffedPlayers.Contains(PlayerControl.LocalPlayer.PlayerId) && __instance.graphic.color == Palette.EnabledColor) Deputy.setHandcuffedKnows(); + return !Deputy.handcuffedKnows.ContainsKey(PlayerControl.LocalPlayer.PlayerId); } } @@ -229,17 +229,17 @@ namespace TheOtherRoles.Patches { var statusText = ""; // Deactivate emergency button for Swapper - if (Swapper.swapper != null && Swapper.swapper == CachedPlayer.LocalPlayer.PlayerControl && !Swapper.canCallEmergency) { + if (Swapper.swapper != null && Swapper.swapper == PlayerControl.LocalPlayer && !Swapper.canCallEmergency) { roleCanCallEmergency = false; statusText = "The Swapper can't start an emergency meeting"; } // Potentially deactivate emergency button for Jester - if (Jester.jester != null && Jester.jester == CachedPlayer.LocalPlayer.PlayerControl && !Jester.canCallEmergency) { + if (Jester.jester != null && Jester.jester == PlayerControl.LocalPlayer && !Jester.canCallEmergency) { roleCanCallEmergency = false; statusText = "The Jester can't start an emergency meeting"; } // Potentially deactivate emergency button for Lawyer/Prosecutor - if (Lawyer.lawyer != null && Lawyer.lawyer == CachedPlayer.LocalPlayer.PlayerControl && !Lawyer.canCallEmergency) { + if (Lawyer.lawyer != null && Lawyer.lawyer == PlayerControl.LocalPlayer && !Lawyer.canCallEmergency) { roleCanCallEmergency = false; statusText = "The Lawyer can't start an emergency meeting"; if (Lawyer.isProsecutor) statusText = "The Prosecutor can't start an emergency meeting"; @@ -256,9 +256,9 @@ namespace TheOtherRoles.Patches { // Handle max number of meetings if (__instance.state == 1) { - int localRemaining = CachedPlayer.LocalPlayer.PlayerControl.RemainingEmergencies; + int localRemaining = PlayerControl.LocalPlayer.RemainingEmergencies; int teamRemaining = Mathf.Max(0, maxNumberOfMeetings - meetingsCount); - int remaining = Mathf.Min(localRemaining, (Mayor.mayor != null && Mayor.mayor == CachedPlayer.LocalPlayer.PlayerControl) ? 1 : teamRemaining); + int remaining = Mathf.Min(localRemaining, (Mayor.mayor != null && Mayor.mayor == PlayerControl.LocalPlayer) ? 1 : teamRemaining); __instance.NumberText.text = $"{localRemaining.ToString()} and the ship has {teamRemaining.ToString()}"; __instance.ButtonActive = remaining > 0; __instance.ClosedLid.gameObject.SetActive(!__instance.ButtonActive); @@ -273,7 +273,7 @@ namespace TheOtherRoles.Patches { public static class ConsoleCanUsePatch { public static bool Prefix(ref float __result, Console __instance, [HarmonyArgument(0)] NetworkedPlayerInfo pc, [HarmonyArgument(1)] out bool canUse, [HarmonyArgument(2)] out bool couldUse) { canUse = couldUse = false; - if (Swapper.swapper != null && Swapper.swapper == CachedPlayer.LocalPlayer.PlayerControl) + if (Swapper.swapper != null && Swapper.swapper == PlayerControl.LocalPlayer) return !__instance.TaskTypes.Any(x => x == TaskTypes.FixLights || x == TaskTypes.FixComms); if (__instance.AllowImpostor) return true; if (!Helpers.hasFakeTasks(pc.Object)) return true; @@ -286,7 +286,7 @@ namespace TheOtherRoles.Patches { class CommsMinigameBeginPatch { static void Postfix(TuneRadioMinigame __instance) { // Block Swapper from fixing comms. Still looking for a better way to do this, but deleting the task doesn't seem like a viable option since then the camera, admin table, ... work while comms are out - if (Swapper.swapper != null && Swapper.swapper == CachedPlayer.LocalPlayer.PlayerControl) { + if (Swapper.swapper != null && Swapper.swapper == PlayerControl.LocalPlayer) { __instance.Close(); } } @@ -296,7 +296,7 @@ namespace TheOtherRoles.Patches { class LightsMinigameBeginPatch { static void Postfix(SwitchMinigame __instance) { // Block Swapper from fixing lights. One could also just delete the PlayerTask, but I wanted to do it the same way as with coms for now. - if (Swapper.swapper != null && Swapper.swapper == CachedPlayer.LocalPlayer.PlayerControl) { + if (Swapper.swapper != null && Swapper.swapper == PlayerControl.LocalPlayer) { __instance.Close(); } } @@ -309,7 +309,7 @@ namespace TheOtherRoles.Patches { [HarmonyPatch(typeof(VitalsMinigame), nameof(VitalsMinigame.Begin))] class VitalsMinigameStartPatch { static void Postfix(VitalsMinigame __instance) { - if (Hacker.hacker != null && CachedPlayer.LocalPlayer.PlayerControl == Hacker.hacker) { + if (Hacker.hacker != null && PlayerControl.LocalPlayer == Hacker.hacker) { hackerTexts = new List(); foreach (VitalsPanel panel in __instance.vitals) { TMPro.TextMeshPro text = UnityEngine.Object.Instantiate(__instance.SabText, panel.transform); @@ -337,7 +337,7 @@ namespace TheOtherRoles.Patches { static void Postfix(VitalsMinigame __instance) { // Hacker show time since death - if (Hacker.hacker != null && Hacker.hacker == CachedPlayer.LocalPlayer.PlayerControl && Hacker.hackerTimer > 0) { + if (Hacker.hacker != null && Hacker.hacker == PlayerControl.LocalPlayer && Hacker.hackerTimer > 0) { for (int k = 0; k < __instance.vitals.Length; k++) { VitalsPanel vitalsPanel = __instance.vitals[k]; NetworkedPlayerInfo player = vitalsPanel.PlayerInfo; @@ -376,7 +376,7 @@ namespace TheOtherRoles.Patches { __instance.timer = 0f; players = new Dictionary>(); bool commsActive = false; - foreach (PlayerTask task in CachedPlayer.LocalPlayer.PlayerControl.myTasks.GetFastEnumerator()) + foreach (PlayerTask task in PlayerControl.LocalPlayer.myTasks.GetFastEnumerator()) if (task.TaskType == TaskTypes.FixComms) commsActive = true; @@ -461,7 +461,7 @@ namespace TheOtherRoles.Patches { private static Material newMat; static void Postfix(CounterArea __instance) { // Hacker display saved colors on the admin panel - bool showHackerInfo = Hacker.hacker != null && Hacker.hacker == CachedPlayer.LocalPlayer.PlayerControl && Hacker.hackerTimer > 0; + bool showHackerInfo = Hacker.hacker != null && Hacker.hacker == PlayerControl.LocalPlayer && Hacker.hackerTimer > 0; if (players.ContainsKey(__instance.RoomType)) { List colors = players[__instance.RoomType]; int i = -1; @@ -545,7 +545,7 @@ namespace TheOtherRoles.Patches { timer = 0f; } - if ((__instance.isStatic || update) && !PlayerTask.PlayerHasTaskOfType(CachedPlayer.LocalPlayer.PlayerControl)) { + if ((__instance.isStatic || update) && !PlayerTask.PlayerHasTaskOfType(PlayerControl.LocalPlayer)) { __instance.isStatic = false; for (int i = 0; i < __instance.ViewPorts.Length; i++) { __instance.ViewPorts[i].sharedMaterial = __instance.DefaultMaterial; @@ -555,7 +555,7 @@ namespace TheOtherRoles.Patches { else __instance.ViewPorts[i].sharedMaterial = __instance.StaticMaterial; } - } else if (!__instance.isStatic && PlayerTask.PlayerHasTaskOfType(CachedPlayer.LocalPlayer.PlayerControl)) { + } else if (!__instance.isStatic && PlayerTask.PlayerHasTaskOfType(PlayerControl.LocalPlayer)) { __instance.isStatic = true; for (int j = 0; j < __instance.ViewPorts.Length; j++) { __instance.ViewPorts[j].sharedMaterial = __instance.StaticMaterial; @@ -648,12 +648,12 @@ namespace TheOtherRoles.Patches { } } - isLightsOut = CachedPlayer.LocalPlayer.PlayerControl.myTasks.ToArray().Any(x => x.name.Contains("FixLightsTask")) || Trickster.lightsOutTimer > 0; - bool ignoreNightVision = CustomOptionHolder.camsNoNightVisionIfImpVision.getBool() && Helpers.hasImpVision(GameData.Instance.GetPlayerById(CachedPlayer.LocalPlayer.PlayerId)) || CachedPlayer.LocalPlayer.Data.IsDead; + isLightsOut = PlayerControl.LocalPlayer.myTasks.ToArray().Any(x => x.name.Contains("FixLightsTask")) || Trickster.lightsOutTimer > 0; + bool ignoreNightVision = CustomOptionHolder.camsNoNightVisionIfImpVision.getBool() && Helpers.hasImpVision(GameData.Instance.GetPlayerById(PlayerControl.LocalPlayer.PlayerId)) || PlayerControl.LocalPlayer.Data.IsDead; bool nightVisionEnabled = CustomOptionHolder.camsNightVision.getBool(); if (isLightsOut && !nightVisionIsActive && nightVisionEnabled && !ignoreNightVision) { // only update when something changed! - foreach (PlayerControl pc in CachedPlayer.AllPlayers) { + foreach (PlayerControl pc in PlayerControl.AllPlayerControls) { if (pc == Ninja.ninja && Ninja.invisibleTimer > 0f) { continue; } @@ -682,7 +682,7 @@ namespace TheOtherRoles.Patches { if (nightVisionIsActive) { nightVisionIsActive = false; - foreach (PlayerControl pc in CachedPlayer.AllPlayers) { + foreach (PlayerControl pc in PlayerControl.AllPlayerControls) { if (Camouflager.camouflageTimer > 0) { pc.setLook("", 6, "", "", "", "", false); } else if (pc == Morphling.morphling && Morphling.morphTimer > 0) { @@ -727,7 +727,7 @@ namespace TheOtherRoles.Patches { class MedScanMinigameFixedUpdatePatch { static void Prefix(MedScanMinigame __instance) { if (TORMapOptions.allowParallelMedBayScans) { - __instance.medscan.CurrentUser = CachedPlayer.LocalPlayer.PlayerId; + __instance.medscan.CurrentUser = PlayerControl.LocalPlayer.PlayerId; __instance.medscan.UsersList.Clear(); } } diff --git a/TheOtherRoles/RPC.cs b/TheOtherRoles/RPC.cs index 1c9da7b..cecd478 100644 --- a/TheOtherRoles/RPC.cs +++ b/TheOtherRoles/RPC.cs @@ -10,7 +10,7 @@ using System.Collections.Generic; using System.Linq; using UnityEngine; using System; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using TheOtherRoles.CustomGameModes; using AmongUs.Data; @@ -77,6 +77,7 @@ namespace TheOtherRoles Vip, Invert, Chameleon, + Armored, Shifter } @@ -152,6 +153,7 @@ namespace TheOtherRoles ShareRoom, YoyoMarkLocation, YoyoBlink, + BreakArmor, // Gamemode SetGuesserGm, @@ -207,7 +209,7 @@ namespace TheOtherRoles public static void forceEnd() { if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.GameStates.Started) return; - foreach (PlayerControl player in CachedPlayer.AllPlayers) + foreach (PlayerControl player in PlayerControl.AllPlayerControls) { if (!player.Data.Role.IsImpostor) { @@ -251,7 +253,7 @@ namespace TheOtherRoles } public static void setRole(byte roleId, byte playerId) { - foreach (PlayerControl player in CachedPlayer.AllPlayers) { + foreach (PlayerControl player in PlayerControl.AllPlayerControls) { if (player.PlayerId == playerId) { switch ((RoleId)roleId) { case RoleId.Jester: @@ -433,6 +435,9 @@ namespace TheOtherRoles case RoleId.Chameleon: Chameleon.chameleon.Add(player); break; + case RoleId.Armored: + Armored.armored = player; + break; case RoleId.Shifter: Shifter.shifter = player; break; @@ -533,7 +538,7 @@ namespace TheOtherRoles public static void timeMasterRewindTime() { TimeMaster.shieldActive = false; // Shield is no longer active when rewinding SoundEffectsManager.stop("timemasterShield"); // Shield sound stopped when rewinding - if(TimeMaster.timeMaster != null && TimeMaster.timeMaster == CachedPlayer.LocalPlayer.PlayerControl) { + if(TimeMaster.timeMaster != null && TimeMaster.timeMaster == PlayerControl.LocalPlayer) { resetTimeMasterButton(); } FastDestroyableSingleton.Instance.FullScreen.color = new Color(0f, 0.5f, 0.8f, 0.3f); @@ -543,7 +548,7 @@ namespace TheOtherRoles if (p == 1f) FastDestroyableSingleton.Instance.FullScreen.enabled = false; }))); - if (TimeMaster.timeMaster == null || CachedPlayer.LocalPlayer.PlayerControl == TimeMaster.timeMaster) return; // Time Master himself does not rewind + if (TimeMaster.timeMaster == null || PlayerControl.LocalPlayer == TimeMaster.timeMaster) return; // Time Master himself does not rewind TimeMaster.isRewinding = true; @@ -551,7 +556,7 @@ namespace TheOtherRoles MapBehaviour.Instance.Close(); if (Minigame.Instance) Minigame.Instance.ForceClose(); - CachedPlayer.LocalPlayer.PlayerControl.moveable = false; + PlayerControl.LocalPlayer.moveable = false; } public static void timeMasterShield() { @@ -570,9 +575,9 @@ namespace TheOtherRoles public static void shieldedMurderAttempt() { if (Medic.shielded == null || Medic.medic == null) return; - bool isShieldedAndShow = Medic.shielded == CachedPlayer.LocalPlayer.PlayerControl && Medic.showAttemptToShielded; + bool isShieldedAndShow = Medic.shielded == PlayerControl.LocalPlayer && Medic.showAttemptToShielded; isShieldedAndShow = isShieldedAndShow && (Medic.meetingAfterShielding || !Medic.showShieldAfterMeeting); // Dont show attempt, if shield is not shown yet - bool isMedicAndShow = Medic.medic == CachedPlayer.LocalPlayer.PlayerControl && Medic.showAttemptToMedic; + bool isMedicAndShow = Medic.medic == PlayerControl.LocalPlayer && Medic.showAttemptToMedic; if (isShieldedAndShow || isMedicAndShow || Helpers.shouldShowGhostInfo()) Helpers.showFlash(Palette.ImpostorRed, duration: 0.5f, "Failed Murder Attempt on Shielded Player"); } @@ -590,7 +595,7 @@ namespace TheOtherRoles oldShifter.Exiled(); GameHistory.overrideDeathReasonAndKiller(oldShifter, DeadPlayer.CustomDeathReason.Shift, player); if (oldShifter == Lawyer.target && AmongUsClient.Instance.AmHost && Lawyer.lawyer != null) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.LawyerPromotesToPursuer, Hazel.SendOption.Reliable, -1); + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.LawyerPromotesToPursuer, Hazel.SendOption.Reliable, -1); AmongUsClient.Instance.FinishRpcImmediately(writer); RPCProcedure.lawyerPromotesToPursuer(); } @@ -600,7 +605,7 @@ namespace TheOtherRoles Shifter.shiftRole(oldShifter, player); // Set cooldowns to max for both players - if (CachedPlayer.LocalPlayer.PlayerControl == oldShifter || CachedPlayer.LocalPlayer.PlayerControl == player) + if (PlayerControl.LocalPlayer == oldShifter || PlayerControl.LocalPlayer == player) CustomButton.ResetAllCooldowns(); } @@ -626,7 +631,7 @@ namespace TheOtherRoles Camouflager.camouflageTimer = Camouflager.duration; if (Helpers.MushroomSabotageActive()) return; // Dont overwrite the fungle "camo" - foreach (PlayerControl player in CachedPlayer.AllPlayers) + foreach (PlayerControl player in PlayerControl.AllPlayerControls) player.setLook("", 6, "", "", "", ""); } @@ -638,7 +643,7 @@ namespace TheOtherRoles } if (Vampire.vampire == null) return; - foreach (PlayerControl player in CachedPlayer.AllPlayers) { + foreach (PlayerControl player in PlayerControl.AllPlayerControls) { if (player.PlayerId == targetId && !player.Data.IsDead) { Vampire.bitten = player; } @@ -654,7 +659,7 @@ namespace TheOtherRoles public static void trackerUsedTracker(byte targetId) { Tracker.usedTracker = true; - foreach (PlayerControl player in CachedPlayer.AllPlayers) + foreach (PlayerControl player in PlayerControl.AllPlayerControls) if (player.PlayerId == targetId) Tracker.tracked = player; } @@ -694,11 +699,11 @@ namespace TheOtherRoles } erasePlayerRoles(player.PlayerId, true); Sidekick.sidekick = player; - if (player.PlayerId == CachedPlayer.LocalPlayer.PlayerId) CachedPlayer.LocalPlayer.PlayerControl.moveable = true; + if (player.PlayerId == PlayerControl.LocalPlayer.PlayerId) PlayerControl.LocalPlayer.moveable = true; if (wasSpy || wasImpostor) Sidekick.wasTeamRed = true; Sidekick.wasSpy = wasSpy; Sidekick.wasImpostor = wasImpostor; - if (player == CachedPlayer.LocalPlayer.PlayerControl) SoundEffectsManager.play("jackalSidekick"); + if (player == PlayerControl.LocalPlayer) SoundEffectsManager.play("jackalSidekick"); if (HandleGuesser.isGuesserGm && CustomOptionHolder.guesserGamemodeSidekickIsAlwaysGuesser.getBool() && !HandleGuesser.isGuesser(targetId)) setGuesserGm(targetId); } @@ -788,6 +793,7 @@ namespace TheOtherRoles if (Vip.vip.Any(x => x.PlayerId == player.PlayerId)) Vip.vip.RemoveAll(x => x.PlayerId == player.PlayerId); if (Invert.invert.Any(x => x.PlayerId == player.PlayerId)) Invert.invert.RemoveAll(x => x.PlayerId == player.PlayerId); if (Chameleon.chameleon.Any(x => x.PlayerId == player.PlayerId)) Chameleon.chameleon.RemoveAll(x => x.PlayerId == player.PlayerId); + if (player == Armored.armored) Armored.clearAndReload(); } } @@ -823,7 +829,7 @@ namespace TheOtherRoles position.x = BitConverter.ToSingle(buff, 0 * sizeof(float)); position.y = BitConverter.ToSingle(buff, 1 * sizeof(float)); new NinjaTrace(position, Ninja.traceTime); - if (CachedPlayer.LocalPlayer.PlayerControl != Ninja.ninja) + if (PlayerControl.LocalPlayer != Ninja.ninja) Ninja.ninjaMarked = null; } @@ -844,7 +850,7 @@ namespace TheOtherRoles target.setLook("", 6, "", "", "", ""); Color color = Color.clear; - bool canSee = CachedPlayer.LocalPlayer.Data.Role.IsImpostor || CachedPlayer.LocalPlayer.Data.IsDead; + bool canSee = PlayerControl.LocalPlayer.Data.Role.IsImpostor || PlayerControl.LocalPlayer.Data.IsDead; if (canSee) color.a = 0.1f; target.cosmetics.currentBodySprite.BodySprite.color = color; target.cosmetics.colorBlindText.gameObject.SetActive(false); @@ -874,7 +880,7 @@ namespace TheOtherRoles public static void lightsOut() { Trickster.lightsOutTimer = Trickster.lightsOutDuration; // If the local player is impostor indicate lights out - if(Helpers.hasImpVision(GameData.Instance.GetPlayerById(CachedPlayer.LocalPlayer.PlayerId))) { + if(Helpers.hasImpVision(GameData.Instance.GetPlayerById(PlayerControl.LocalPlayer.PlayerId))) { new CustomMessage("Lights are out", Trickster.lightsOutDuration); } } @@ -906,7 +912,7 @@ namespace TheOtherRoles } - if (CachedPlayer.LocalPlayer.PlayerControl == SecurityGuard.securityGuard) { + if (PlayerControl.LocalPlayer == SecurityGuard.securityGuard) { camera.gameObject.SetActive(true); camera.gameObject.GetComponent().color = new Color(1f, 1f, 1f, 0.5f); } else { @@ -920,7 +926,7 @@ namespace TheOtherRoles if (vent == null) return; SecurityGuard.remainingScrews -= SecurityGuard.ventPrice; - if (CachedPlayer.LocalPlayer.PlayerControl == SecurityGuard.securityGuard) { + if (PlayerControl.LocalPlayer == SecurityGuard.securityGuard) { PowerTools.SpriteAnim animator = vent.GetComponent(); vent.EnterVentAnim = vent.ExitVentAnim = null; @@ -944,7 +950,7 @@ namespace TheOtherRoles public static void arsonistWin() { Arsonist.triggerArsonistWin = true; - foreach (PlayerControl p in CachedPlayer.AllPlayers) { + foreach (PlayerControl p in PlayerControl.AllPlayerControls) { if (p != Arsonist.arsonist && !p.Data.IsDead) { p.Exiled(); overrideDeathReasonAndKiller(p, DeadPlayer.CustomDeathReason.Arson, Arsonist.arsonist); @@ -963,7 +969,7 @@ namespace TheOtherRoles Pursuer.pursuer = player; - if (player.PlayerId == CachedPlayer.LocalPlayer.PlayerId && client != null) { + if (player.PlayerId == PlayerControl.LocalPlayer.PlayerId && client != null) { Transform playerInfoTransform = client.cosmetics.nameText.transform.parent.FindChild("Info"); TMPro.TextMeshPro playerInfo = playerInfoTransform != null ? playerInfoTransform.GetComponent() : null; if (playerInfo != null) playerInfo.text = ""; @@ -988,7 +994,7 @@ namespace TheOtherRoles bool lawyerDiedAdditionally = false; if (Lawyer.lawyer != null && !Lawyer.isProsecutor && Lawyer.lawyer.PlayerId == killerId && Lawyer.target != null && Lawyer.target.PlayerId == dyingTargetId) { // Lawyer guessed client. - if (CachedPlayer.LocalPlayer.PlayerControl == Lawyer.lawyer) { + if (PlayerControl.LocalPlayer == Lawyer.lawyer) { FastDestroyableSingleton.Instance.KillOverlay.ShowKillAnimation(Lawyer.lawyer.Data, Lawyer.lawyer.Data); if (MeetingHudPatch.guesserUI != null) MeetingHudPatch.guesserUIExitButton.OnClick.Invoke(); } @@ -1023,10 +1029,10 @@ namespace TheOtherRoles MeetingHud.Instance.CheckForEndVoting(); } if (FastDestroyableSingleton.Instance != null && guesser != null) - if (CachedPlayer.LocalPlayer.PlayerControl == dyingTarget) { + if (PlayerControl.LocalPlayer == dyingTarget) { FastDestroyableSingleton.Instance.KillOverlay.ShowKillAnimation(guesser.Data, dyingTarget.Data); if (MeetingHudPatch.guesserUI != null) MeetingHudPatch.guesserUIExitButton.OnClick.Invoke(); - } else if (dyingLoverPartner != null && CachedPlayer.LocalPlayer.PlayerControl == dyingLoverPartner) { + } else if (dyingLoverPartner != null && PlayerControl.LocalPlayer == dyingLoverPartner) { FastDestroyableSingleton.Instance.KillOverlay.ShowKillAnimation(dyingLoverPartner.Data, dyingLoverPartner.Data); if (MeetingHudPatch.guesserUI != null) MeetingHudPatch.guesserUIExitButton.OnClick.Invoke(); } @@ -1047,7 +1053,7 @@ namespace TheOtherRoles PlayerControl guessedTarget = Helpers.playerById(guessedTargetId); - if (CachedPlayer.LocalPlayer.Data.IsDead && guessedTarget != null && guesser != null) { + if (PlayerControl.LocalPlayer.Data.IsDead && guessedTarget != null && guesser != null) { RoleInfo roleInfo = RoleInfo.allRoleInfos.FirstOrDefault(x => (byte)x.roleId == guessedRoleId); string msg = $"{guesser.Data.PlayerName} guessed the role {roleInfo?.name ?? ""} for {guessedTarget.Data.PlayerName}!"; if (AmongUsClient.Instance.AmClient && FastDestroyableSingleton.Instance) @@ -1165,7 +1171,7 @@ namespace TheOtherRoles public static void huntedRewindTime(byte playerId) { Hunted.timeshieldActive.Remove(playerId); // Shield is no longer active when rewinding SoundEffectsManager.stop("timemasterShield"); // Shield sound stopped when rewinding - if (playerId == CachedPlayer.LocalPlayer.PlayerControl.PlayerId) { + if (playerId == PlayerControl.LocalPlayer.PlayerId) { resetHuntedRewindButton(); } FastDestroyableSingleton.Instance.FullScreen.color = new Color(0f, 0.5f, 0.8f, 0.3f); @@ -1175,7 +1181,7 @@ namespace TheOtherRoles if (p == 1f) FastDestroyableSingleton.Instance.FullScreen.enabled = false; }))); - if (!CachedPlayer.LocalPlayer.Data.Role.IsImpostor) return; // only rewind hunter + if (!PlayerControl.LocalPlayer.Data.Role.IsImpostor) return; // only rewind hunter TimeMaster.isRewinding = true; @@ -1183,7 +1189,7 @@ namespace TheOtherRoles MapBehaviour.Instance.Close(); if (Minigame.Instance) Minigame.Instance.ForceClose(); - CachedPlayer.LocalPlayer.PlayerControl.moveable = false; + PlayerControl.LocalPlayer.moveable = false; } public static void propHuntStartTimer(bool blackout = false) { @@ -1340,6 +1346,14 @@ namespace TheOtherRoles if (Chameleon.chameleon.Any(x => x.PlayerId == Yoyo.yoyo.PlayerId)) // Make the Yoyo visible if chameleon! Chameleon.lastMoved[Yoyo.yoyo.PlayerId] = Time.time; } + + public static void breakArmor() { + if (Armored.armored == null || Armored.isBrokenArmor) return; + Armored.isBrokenArmor = true; + if (PlayerControl.LocalPlayer.Data.IsDead) { + Armored.armored.ShowFailedMurder(); + } + } } [HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.HandleRpc))] @@ -1596,6 +1610,9 @@ namespace TheOtherRoles case (byte)CustomRPC.YoyoBlink: RPCProcedure.yoyoBlink(reader.ReadByte() == byte.MaxValue, reader.ReadBytesAndSize()); break; + case (byte)CustomRPC.BreakArmor: + RPCProcedure.breakArmor(); + break; // Game mode case (byte)CustomRPC.SetGuesserGm: diff --git a/TheOtherRoles/Resources/AnimatedVentSealed.png b/TheOtherRoles/Resources/AnimatedVentSealed.png index 68a0d2d..38ec863 100644 Binary files a/TheOtherRoles/Resources/AnimatedVentSealed.png and b/TheOtherRoles/Resources/AnimatedVentSealed.png differ diff --git a/TheOtherRoles/Resources/Arrow.png b/TheOtherRoles/Resources/Arrow.png index 5be952a..4d70329 100644 Binary files a/TheOtherRoles/Resources/Arrow.png and b/TheOtherRoles/Resources/Arrow.png differ diff --git a/TheOtherRoles/Resources/Banner.png b/TheOtherRoles/Resources/Banner.png index 73d63de..9a5bc8b 100644 Binary files a/TheOtherRoles/Resources/Banner.png and b/TheOtherRoles/Resources/Banner.png differ diff --git a/TheOtherRoles/Resources/Banner2.png b/TheOtherRoles/Resources/Banner2.png index 29ce90b..584a0d0 100644 Binary files a/TheOtherRoles/Resources/Banner2.png and b/TheOtherRoles/Resources/Banner2.png differ diff --git a/TheOtherRoles/Resources/Blood1.png b/TheOtherRoles/Resources/Blood1.png index ba81a86..0961d06 100644 Binary files a/TheOtherRoles/Resources/Blood1.png and b/TheOtherRoles/Resources/Blood1.png differ diff --git a/TheOtherRoles/Resources/Blood2.png b/TheOtherRoles/Resources/Blood2.png index 5f32a41..62a1428 100644 Binary files a/TheOtherRoles/Resources/Blood2.png and b/TheOtherRoles/Resources/Blood2.png differ diff --git a/TheOtherRoles/Resources/Blood3.png b/TheOtherRoles/Resources/Blood3.png index 5b0013b..f7424ba 100644 Binary files a/TheOtherRoles/Resources/Blood3.png and b/TheOtherRoles/Resources/Blood3.png differ diff --git a/TheOtherRoles/Resources/Bomb.png b/TheOtherRoles/Resources/Bomb.png index 5d9fcb6..4fb68e1 100644 Binary files a/TheOtherRoles/Resources/Bomb.png and b/TheOtherRoles/Resources/Bomb.png differ diff --git a/TheOtherRoles/Resources/BombBackground.png b/TheOtherRoles/Resources/BombBackground.png index 1d6dbee..a59d5af 100644 Binary files a/TheOtherRoles/Resources/BombBackground.png and b/TheOtherRoles/Resources/BombBackground.png differ diff --git a/TheOtherRoles/Resources/Bomb_Button_Defuse.png b/TheOtherRoles/Resources/Bomb_Button_Defuse.png index f7df1de..45ae593 100644 Binary files a/TheOtherRoles/Resources/Bomb_Button_Defuse.png and b/TheOtherRoles/Resources/Bomb_Button_Defuse.png differ diff --git a/TheOtherRoles/Resources/Bomb_Button_Plant.png b/TheOtherRoles/Resources/Bomb_Button_Plant.png index 53847e3..081bf7c 100644 Binary files a/TheOtherRoles/Resources/Bomb_Button_Plant.png and b/TheOtherRoles/Resources/Bomb_Button_Plant.png differ diff --git a/TheOtherRoles/Resources/CamoButton.png b/TheOtherRoles/Resources/CamoButton.png index 91fec8e..6e1f713 100644 Binary files a/TheOtherRoles/Resources/CamoButton.png and b/TheOtherRoles/Resources/CamoButton.png differ diff --git a/TheOtherRoles/Resources/CentralLowerBlocked.png b/TheOtherRoles/Resources/CentralLowerBlocked.png index 952fd9c..ecdcf44 100644 Binary files a/TheOtherRoles/Resources/CentralLowerBlocked.png and b/TheOtherRoles/Resources/CentralLowerBlocked.png differ diff --git a/TheOtherRoles/Resources/CentralUpperBlocked.png b/TheOtherRoles/Resources/CentralUpperBlocked.png index 438a6ed..5e15a48 100644 Binary files a/TheOtherRoles/Resources/CentralUpperBlocked.png and b/TheOtherRoles/Resources/CentralUpperBlocked.png differ diff --git a/TheOtherRoles/Resources/CleanButton.png b/TheOtherRoles/Resources/CleanButton.png index 69a8c5c..42392f2 100644 Binary files a/TheOtherRoles/Resources/CleanButton.png and b/TheOtherRoles/Resources/CleanButton.png differ diff --git a/TheOtherRoles/Resources/CloseVentButton.png b/TheOtherRoles/Resources/CloseVentButton.png index ffe2bb2..f04685c 100644 Binary files a/TheOtherRoles/Resources/CloseVentButton.png and b/TheOtherRoles/Resources/CloseVentButton.png differ diff --git a/TheOtherRoles/Resources/Copy.png b/TheOtherRoles/Resources/Copy.png index 1db34bb..fff4a4b 100644 Binary files a/TheOtherRoles/Resources/Copy.png and b/TheOtherRoles/Resources/Copy.png differ diff --git a/TheOtherRoles/Resources/CopyActive.png b/TheOtherRoles/Resources/CopyActive.png index f19ecd7..b1908d4 100644 Binary files a/TheOtherRoles/Resources/CopyActive.png and b/TheOtherRoles/Resources/CopyActive.png differ diff --git a/TheOtherRoles/Resources/CopyButton.png b/TheOtherRoles/Resources/CopyButton.png index 4d76964..215611f 100644 Binary files a/TheOtherRoles/Resources/CopyButton.png and b/TheOtherRoles/Resources/CopyButton.png differ diff --git a/TheOtherRoles/Resources/CopyPasteBG.png b/TheOtherRoles/Resources/CopyPasteBG.png index c8f47cc..341509b 100644 Binary files a/TheOtherRoles/Resources/CopyPasteBG.png and b/TheOtherRoles/Resources/CopyPasteBG.png differ diff --git a/TheOtherRoles/Resources/CreditsButton.png b/TheOtherRoles/Resources/CreditsButton.png index dd8f59f..98b820f 100644 Binary files a/TheOtherRoles/Resources/CreditsButton.png and b/TheOtherRoles/Resources/CreditsButton.png differ diff --git a/TheOtherRoles/Resources/CurrentSettingsButton.png b/TheOtherRoles/Resources/CurrentSettingsButton.png index a593620..23b9fbd 100644 Binary files a/TheOtherRoles/Resources/CurrentSettingsButton.png and b/TheOtherRoles/Resources/CurrentSettingsButton.png differ diff --git a/TheOtherRoles/Resources/CurseButton.png b/TheOtherRoles/Resources/CurseButton.png index 0b29330..b071c4f 100644 Binary files a/TheOtherRoles/Resources/CurseButton.png and b/TheOtherRoles/Resources/CurseButton.png differ diff --git a/TheOtherRoles/Resources/CurseKillButton.png b/TheOtherRoles/Resources/CurseKillButton.png index 140b7b9..3c1bcf2 100644 Binary files a/TheOtherRoles/Resources/CurseKillButton.png and b/TheOtherRoles/Resources/CurseKillButton.png differ diff --git a/TheOtherRoles/Resources/DeputizeButton.png b/TheOtherRoles/Resources/DeputizeButton.png index c915e05..25f7063 100644 Binary files a/TheOtherRoles/Resources/DeputizeButton.png and b/TheOtherRoles/Resources/DeputizeButton.png differ diff --git a/TheOtherRoles/Resources/DeputyHandcuffButton.png b/TheOtherRoles/Resources/DeputyHandcuffButton.png index b12991d..3bda9bf 100644 Binary files a/TheOtherRoles/Resources/DeputyHandcuffButton.png and b/TheOtherRoles/Resources/DeputyHandcuffButton.png differ diff --git a/TheOtherRoles/Resources/DeputyHandcuffed.png b/TheOtherRoles/Resources/DeputyHandcuffed.png index 38e00ba..5f9fc33 100644 Binary files a/TheOtherRoles/Resources/DeputyHandcuffed.png and b/TheOtherRoles/Resources/DeputyHandcuffed.png differ diff --git a/TheOtherRoles/Resources/DisguiseButton.png b/TheOtherRoles/Resources/DisguiseButton.png index dbc4b8d..23bfae0 100644 Binary files a/TheOtherRoles/Resources/DisguiseButton.png and b/TheOtherRoles/Resources/DisguiseButton.png differ diff --git a/TheOtherRoles/Resources/DouseButton.png b/TheOtherRoles/Resources/DouseButton.png index c5531a3..ec80e37 100644 Binary files a/TheOtherRoles/Resources/DouseButton.png and b/TheOtherRoles/Resources/DouseButton.png differ diff --git a/TheOtherRoles/Resources/EmergencyButton.png b/TheOtherRoles/Resources/EmergencyButton.png index 57d3b88..dd64f4e 100644 Binary files a/TheOtherRoles/Resources/EmergencyButton.png and b/TheOtherRoles/Resources/EmergencyButton.png differ diff --git a/TheOtherRoles/Resources/EraserButton.png b/TheOtherRoles/Resources/EraserButton.png index 7cf31dd..ea0d890 100644 Binary files a/TheOtherRoles/Resources/EraserButton.png and b/TheOtherRoles/Resources/EraserButton.png differ diff --git a/TheOtherRoles/Resources/FindButton.png b/TheOtherRoles/Resources/FindButton.png index b476302..d80fdfa 100644 Binary files a/TheOtherRoles/Resources/FindButton.png and b/TheOtherRoles/Resources/FindButton.png differ diff --git a/TheOtherRoles/Resources/Footprint.png b/TheOtherRoles/Resources/Footprint.png index 2bcd1ac..f743f91 100644 Binary files a/TheOtherRoles/Resources/Footprint.png and b/TheOtherRoles/Resources/Footprint.png differ diff --git a/TheOtherRoles/Resources/FungleVentSealed.png b/TheOtherRoles/Resources/FungleVentSealed.png index 16b157c..6f117ba 100644 Binary files a/TheOtherRoles/Resources/FungleVentSealed.png and b/TheOtherRoles/Resources/FungleVentSealed.png differ diff --git a/TheOtherRoles/Resources/Garlic.png b/TheOtherRoles/Resources/Garlic.png index c078e9a..3d2ca2c 100644 Binary files a/TheOtherRoles/Resources/Garlic.png and b/TheOtherRoles/Resources/Garlic.png differ diff --git a/TheOtherRoles/Resources/GarlicBackground.png b/TheOtherRoles/Resources/GarlicBackground.png index 0a3c8d3..54a02e9 100644 Binary files a/TheOtherRoles/Resources/GarlicBackground.png and b/TheOtherRoles/Resources/GarlicBackground.png differ diff --git a/TheOtherRoles/Resources/GarlicButton.png b/TheOtherRoles/Resources/GarlicButton.png index fcca3b4..3cb9816 100644 Binary files a/TheOtherRoles/Resources/GarlicButton.png and b/TheOtherRoles/Resources/GarlicButton.png differ diff --git a/TheOtherRoles/Resources/HackerButton.png b/TheOtherRoles/Resources/HackerButton.png index 934acf3..3bdf675 100644 Binary files a/TheOtherRoles/Resources/HackerButton.png and b/TheOtherRoles/Resources/HackerButton.png differ diff --git a/TheOtherRoles/Resources/HideNSeekArrowButton.png b/TheOtherRoles/Resources/HideNSeekArrowButton.png index 9e8708a..aa47a14 100644 Binary files a/TheOtherRoles/Resources/HideNSeekArrowButton.png and b/TheOtherRoles/Resources/HideNSeekArrowButton.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat10.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat10.png index dc6340f..d5aee83 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat10.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat10.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat10_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat10_back.png index 132eb1a..be55323 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat10_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat10_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat11_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat11_adaptive.png index 3992150..f2162fc 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat11_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat11_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat11_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat11_adaptive_back.png index f790f25..a7eb4bf 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat11_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat11_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat12.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat12.png index d3b3802..8b2ead2 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat12.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat12.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat12_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat12_back.png index 9adfa8d..4cafb04 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat12_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat12_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat13.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat13.png index e89ae9d..834ad66 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat13.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat13.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat13_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat13_back.png index 3486011..1f9913c 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat13_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat13_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat14.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat14.png index 7c679b7..5dc5c03 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat14.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat14.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat14_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat14_back.png index 7726bd0..f8ac32b 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat14_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat14_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat15.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat15.png index 1986ba3..686cf2b 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat15.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat15.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat15_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat15_back.png index 87057cf..0336183 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat15_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat15_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat16_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat16_adaptive.png index ef69fa9..a2c63f0 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat16_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat16_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat16_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat16_adaptive_back.png index 0963ce6..feaebab 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat16_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat16_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat17_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat17_adaptive.png index afd162d..264ae8f 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat17_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat17_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat17_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat17_adaptive_back.png index 0f24b32..2ccf0bf 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat17_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat17_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat18_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat18_adaptive.png index dee0ddb..88016bc 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat18_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat18_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat18_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat18_adaptive_back.png index cbb2790..228bcbf 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat18_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat18_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat19.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat19.png index 84367e3..b56f272 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat19.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat19.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat19_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat19_back.png index 41208f0..ac666e1 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat19_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat19_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat1_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat1_adaptive.png index e564106..e41d663 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat1_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat1_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat2.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat2.png index ef2904b..569c734 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat2.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat2.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat20_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat20_adaptive.png index 620a69e..dcc4945 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat20_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat20_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat20_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat20_adaptive_back.png index 1dc8055..1e6dbaa 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat20_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat20_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat21.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat21.png index 609a795..0e8fa0b 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat21.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat21.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat22.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat22.png index f94ae76..4c5ac70 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat22.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat22.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat23_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat23_adaptive.png index d0082d9..afc818a 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat23_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat23_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat24_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat24_adaptive.png index b6d76a5..63766a4 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat24_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat24_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat25_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat25_adaptive.png index ab36cb1..84e1b78 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat25_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat25_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat26.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat26.png index d17e869..1b420a7 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat26.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat26.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat26_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat26_back.png index e4ebc38..d970a79 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat26_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat26_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat27.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat27.png index ed39d6d..3284e47 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat27.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat27.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat27_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat27_back.png index d41c533..f3d7787 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat27_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat27_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat28.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat28.png index a50fa9d..9fc8a1d 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat28.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat28.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat28_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat28_back.png index d5de4ce..7479132 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat28_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat28_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat29_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat29_adaptive.png index 7f59019..32a7573 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat29_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat29_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat30_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat30_adaptive.png index 329a858..f016ad8 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat30_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat30_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat31_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat31_adaptive.png index 5904cea..1f8b092 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat31_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat31_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat32_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat32_adaptive.png index 958596c..a926352 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat32_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat32_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat32_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat32_adaptive_back.png index 1859a17..6a6eefa 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat32_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat32_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat33_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat33_adaptive.png index 4b0b09b..bf41fc5 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat33_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat33_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat33_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat33_adaptive_back.png index b49e0f1..931b86d 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat33_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat33_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat34.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat34.png index 1671a11..29bf470 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat34.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat34.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat34_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat34_back.png index 6727917..d7bdcfb 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat34_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat34_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat35_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat35_adaptive.png index fa29393..ba95433 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat35_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat35_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat35_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat35_adaptive_back.png index 701e8b6..cee25bc 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat35_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat35_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat36_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat36_adaptive.png index d55a633..61e442e 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat36_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat36_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat37_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat37_adaptive.png index be2eef0..619255d 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat37_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat37_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat37_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat37_adaptive_back.png index 0072417..e098a16 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat37_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat37_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat38_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat38_adaptive.png index af966e3..a4a28b6 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat38_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat38_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat39.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat39.png index a42e49f..8abb0dc 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat39.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat39.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat39_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat39_back.png index e7bc515..a960c16 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat39_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat39_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat3_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat3_adaptive.png index 88e6e7c..ce71c9e 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat3_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat3_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat3_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat3_adaptive_back.png index 8a9d65a..d92ab4c 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat3_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat3_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat4.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat4.png index 9eafb10..5072d9b 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat4.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat4.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat40_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat40_adaptive.png index a0c5653..5a0d787 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat40_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat40_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat40_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat40_adaptive_back.png index ff12b08..7cbc1c5 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat40_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat40_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat41_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat41_adaptive.png index 0d3366b..123d276 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat41_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat41_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat42_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat42_adaptive.png index 801a316..38ff0f3 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat42_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat42_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat42_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat42_adaptive_back.png index 87d66db..4f24708 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat42_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat42_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat43_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat43_adaptive.png index bf32e42..c94077c 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat43_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat43_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat44_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat44_adaptive.png index bc82ae5..0117168 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat44_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat44_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat45_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat45_adaptive.png index 34a9c04..e45cade 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat45_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat45_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat45_adaptive_flip.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat45_adaptive_flip.png index d2f65c8..1f9badd 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat45_adaptive_flip.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat45_adaptive_flip.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat46.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat46.png index 0af5438..0e4d8e8 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat46.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat46.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat46_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat46_back.png index 87057cf..0336183 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat46_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat46_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat47_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat47_adaptive.png index a0e09e9..1516369 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat47_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat47_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat48_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat48_adaptive.png index 68937cd..5d2cf0c 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat48_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat48_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat48_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat48_adaptive_back.png index 3eee17c..0d2896c 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat48_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat48_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat49_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat49_adaptive.png index 1600833..fe0a72b 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat49_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat49_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat50_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat50_adaptive.png index 5508732..48e8a61 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat50_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat50_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat51_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat51_adaptive.png index 3101883..883ff69 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat51_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat51_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat52_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat52_adaptive.png index 029db37..7031dce 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat52_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat52_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat52_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat52_adaptive_back.png index 129f398..b758cc8 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat52_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat52_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat53_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat53_adaptive.png index 3df429e..b212f22 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat53_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat53_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat54_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat54_adaptive.png index 1e4d260..b0701e2 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat54_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat54_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat55_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat55_adaptive.png index 9923213..2a4e7d8 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat55_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat55_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56.png index 25b0d06..f8ab2f9 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56_back.png index d6655e5..dd16730 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56_climb.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56_climb.png index 999d645..2bd0b81 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56_climb.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56_climb.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56_flip.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56_flip.png index a9dc0ed..999acf8 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56_flip.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat56_flip.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat57_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat57_adaptive.png index d68ff55..aa834f4 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat57_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat57_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat57_bounce_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat57_bounce_back.png index 35461d5..414433b 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat57_bounce_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat57_bounce_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat57_climb_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat57_climb_adaptive.png index bc0a437..2a3f273 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat57_climb_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat57_climb_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat5_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat5_adaptive.png index e83fe1b..b367280 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat5_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat5_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat6_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat6_adaptive.png index e683187..5bfb8e6 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat6_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat6_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat6_adaptive_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat6_adaptive_back.png index 14d9232..dbd9a54 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat6_adaptive_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat6_adaptive_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat7.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat7.png index a18a0e4..3468138 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat7.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat7.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat7_back.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat7_back.png index 8282da8..4ec4bba 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat7_back.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat7_back.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat8_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat8_adaptive.png index f4cbe6c..54855b4 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat8_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat8_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat8_back_adaptive.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat8_back_adaptive.png index 7b6de65..e07ae9b 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat8_back_adaptive.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat8_back_adaptive.png differ diff --git a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat9.png b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat9.png index e9d3215..cef3837 100644 Binary files a/TheOtherRoles/Resources/HorseHats/HorseSpecialHat9.png and b/TheOtherRoles/Resources/HorseHats/HorseSpecialHat9.png differ diff --git a/TheOtherRoles/Resources/HorseModeButtonOff.png b/TheOtherRoles/Resources/HorseModeButtonOff.png index dac3a5d..34129f2 100644 Binary files a/TheOtherRoles/Resources/HorseModeButtonOff.png and b/TheOtherRoles/Resources/HorseModeButtonOff.png differ diff --git a/TheOtherRoles/Resources/HorseModeButtonOn.png b/TheOtherRoles/Resources/HorseModeButtonOn.png index ddd7ccb..90b1def 100644 Binary files a/TheOtherRoles/Resources/HorseModeButtonOn.png and b/TheOtherRoles/Resources/HorseModeButtonOn.png differ diff --git a/TheOtherRoles/Resources/IgniteButton.png b/TheOtherRoles/Resources/IgniteButton.png index a30a380..829bcab 100644 Binary files a/TheOtherRoles/Resources/IgniteButton.png and b/TheOtherRoles/Resources/IgniteButton.png differ diff --git a/TheOtherRoles/Resources/IntroAnimation/intro b/TheOtherRoles/Resources/IntroAnimation/intro new file mode 100644 index 0000000..4687c56 Binary files /dev/null and b/TheOtherRoles/Resources/IntroAnimation/intro differ diff --git a/TheOtherRoles/Resources/InvisButton.png b/TheOtherRoles/Resources/InvisButton.png index 8147372..a229852 100644 Binary files a/TheOtherRoles/Resources/InvisButton.png and b/TheOtherRoles/Resources/InvisButton.png differ diff --git a/TheOtherRoles/Resources/LighterButton.png b/TheOtherRoles/Resources/LighterButton.png index bfd53b1..33dec22 100644 Binary files a/TheOtherRoles/Resources/LighterButton.png and b/TheOtherRoles/Resources/LighterButton.png differ diff --git a/TheOtherRoles/Resources/LightsOutButton.png b/TheOtherRoles/Resources/LightsOutButton.png index 9fce067..8f98073 100644 Binary files a/TheOtherRoles/Resources/LightsOutButton.png and b/TheOtherRoles/Resources/LightsOutButton.png differ diff --git a/TheOtherRoles/Resources/MediumButton.png b/TheOtherRoles/Resources/MediumButton.png index 13e64a4..446296d 100644 Binary files a/TheOtherRoles/Resources/MediumButton.png and b/TheOtherRoles/Resources/MediumButton.png differ diff --git a/TheOtherRoles/Resources/MinusButton.png b/TheOtherRoles/Resources/MinusButton.png index cd1bba6..7e808c7 100644 Binary files a/TheOtherRoles/Resources/MinusButton.png and b/TheOtherRoles/Resources/MinusButton.png differ diff --git a/TheOtherRoles/Resources/Minus_Button.png b/TheOtherRoles/Resources/Minus_Button.png index 8453665..868e5f2 100644 Binary files a/TheOtherRoles/Resources/Minus_Button.png and b/TheOtherRoles/Resources/Minus_Button.png differ diff --git a/TheOtherRoles/Resources/Minus_ButtonActive.png b/TheOtherRoles/Resources/Minus_ButtonActive.png index 2cd4b5a..41f5dfa 100644 Binary files a/TheOtherRoles/Resources/Minus_ButtonActive.png and b/TheOtherRoles/Resources/Minus_ButtonActive.png differ diff --git a/TheOtherRoles/Resources/ModStamp.png b/TheOtherRoles/Resources/ModStamp.png index 4e5cfda..fc759d2 100644 Binary files a/TheOtherRoles/Resources/ModStamp.png and b/TheOtherRoles/Resources/ModStamp.png differ diff --git a/TheOtherRoles/Resources/MorphButton.png b/TheOtherRoles/Resources/MorphButton.png index e68441d..7680ee8 100644 Binary files a/TheOtherRoles/Resources/MorphButton.png and b/TheOtherRoles/Resources/MorphButton.png differ diff --git a/TheOtherRoles/Resources/NightVisionOverlay.png b/TheOtherRoles/Resources/NightVisionOverlay.png index 20b631a..07492aa 100644 Binary files a/TheOtherRoles/Resources/NightVisionOverlay.png and b/TheOtherRoles/Resources/NightVisionOverlay.png differ diff --git a/TheOtherRoles/Resources/NinjaAssassinateButton.png b/TheOtherRoles/Resources/NinjaAssassinateButton.png index 674ad47..7803646 100644 Binary files a/TheOtherRoles/Resources/NinjaAssassinateButton.png and b/TheOtherRoles/Resources/NinjaAssassinateButton.png differ diff --git a/TheOtherRoles/Resources/NinjaMarkButton.png b/TheOtherRoles/Resources/NinjaMarkButton.png index 7e7baa6..2b6f265 100644 Binary files a/TheOtherRoles/Resources/NinjaMarkButton.png and b/TheOtherRoles/Resources/NinjaMarkButton.png differ diff --git a/TheOtherRoles/Resources/NinjaTraceW.png b/TheOtherRoles/Resources/NinjaTraceW.png index cdb2937..2fa49b3 100644 Binary files a/TheOtherRoles/Resources/NinjaTraceW.png and b/TheOtherRoles/Resources/NinjaTraceW.png differ diff --git a/TheOtherRoles/Resources/Paste.png b/TheOtherRoles/Resources/Paste.png index 8bae0fc..25d67bb 100644 Binary files a/TheOtherRoles/Resources/Paste.png and b/TheOtherRoles/Resources/Paste.png differ diff --git a/TheOtherRoles/Resources/PasteActive.png b/TheOtherRoles/Resources/PasteActive.png index b80d73b..254fa5f 100644 Binary files a/TheOtherRoles/Resources/PasteActive.png and b/TheOtherRoles/Resources/PasteActive.png differ diff --git a/TheOtherRoles/Resources/PasteButton.png b/TheOtherRoles/Resources/PasteButton.png index 1e07e09..493f815 100644 Binary files a/TheOtherRoles/Resources/PasteButton.png and b/TheOtherRoles/Resources/PasteButton.png differ diff --git a/TheOtherRoles/Resources/PathfindButton.png b/TheOtherRoles/Resources/PathfindButton.png index 32be1b1..6f5a5c7 100644 Binary files a/TheOtherRoles/Resources/PathfindButton.png and b/TheOtherRoles/Resources/PathfindButton.png differ diff --git a/TheOtherRoles/Resources/PlaceCameraButton.png b/TheOtherRoles/Resources/PlaceCameraButton.png index 2e37148..b474f0e 100644 Binary files a/TheOtherRoles/Resources/PlaceCameraButton.png and b/TheOtherRoles/Resources/PlaceCameraButton.png differ diff --git a/TheOtherRoles/Resources/PlaceJackInTheBoxButton.png b/TheOtherRoles/Resources/PlaceJackInTheBoxButton.png index 8b7e358..bddf917 100644 Binary files a/TheOtherRoles/Resources/PlaceJackInTheBoxButton.png and b/TheOtherRoles/Resources/PlaceJackInTheBoxButton.png differ diff --git a/TheOtherRoles/Resources/PlacePortalButton.png b/TheOtherRoles/Resources/PlacePortalButton.png index 97e717d..3d8046c 100644 Binary files a/TheOtherRoles/Resources/PlacePortalButton.png and b/TheOtherRoles/Resources/PlacePortalButton.png differ diff --git a/TheOtherRoles/Resources/PlusButton.png b/TheOtherRoles/Resources/PlusButton.png index e0ae50c..436e6d2 100644 Binary files a/TheOtherRoles/Resources/PlusButton.png and b/TheOtherRoles/Resources/PlusButton.png differ diff --git a/TheOtherRoles/Resources/Plus_Button.png b/TheOtherRoles/Resources/Plus_Button.png index 35335d5..d642c2c 100644 Binary files a/TheOtherRoles/Resources/Plus_Button.png and b/TheOtherRoles/Resources/Plus_Button.png differ diff --git a/TheOtherRoles/Resources/Plus_ButtonActive.png b/TheOtherRoles/Resources/Plus_ButtonActive.png index ac30e9b..87904e4 100644 Binary files a/TheOtherRoles/Resources/Plus_ButtonActive.png and b/TheOtherRoles/Resources/Plus_ButtonActive.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/plattform.png b/TheOtherRoles/Resources/PortalAnimation/plattform.png index 0d9f694..dd304d4 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/plattform.png and b/TheOtherRoles/Resources/PortalAnimation/plattform.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_000.png b/TheOtherRoles/Resources/PortalAnimation/portal_000.png index 8cf6656..e6b457b 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_000.png and b/TheOtherRoles/Resources/PortalAnimation/portal_000.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_001.png b/TheOtherRoles/Resources/PortalAnimation/portal_001.png index 0efb94d..1a2b4c9 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_001.png and b/TheOtherRoles/Resources/PortalAnimation/portal_001.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_002.png b/TheOtherRoles/Resources/PortalAnimation/portal_002.png index 37463fa..3a71c0d 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_002.png and b/TheOtherRoles/Resources/PortalAnimation/portal_002.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_003.png b/TheOtherRoles/Resources/PortalAnimation/portal_003.png index c3b3de5..847f3e2 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_003.png and b/TheOtherRoles/Resources/PortalAnimation/portal_003.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_004.png b/TheOtherRoles/Resources/PortalAnimation/portal_004.png index 8fb9f0b..1539ca1 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_004.png and b/TheOtherRoles/Resources/PortalAnimation/portal_004.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_005.png b/TheOtherRoles/Resources/PortalAnimation/portal_005.png index 986aa93..3337810 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_005.png and b/TheOtherRoles/Resources/PortalAnimation/portal_005.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_006.png b/TheOtherRoles/Resources/PortalAnimation/portal_006.png index d24a511..3c30f02 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_006.png and b/TheOtherRoles/Resources/PortalAnimation/portal_006.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_007.png b/TheOtherRoles/Resources/PortalAnimation/portal_007.png index d7cd939..7b46cd2 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_007.png and b/TheOtherRoles/Resources/PortalAnimation/portal_007.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_008.png b/TheOtherRoles/Resources/PortalAnimation/portal_008.png index 74d9a0e..6835dcb 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_008.png and b/TheOtherRoles/Resources/PortalAnimation/portal_008.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_009.png b/TheOtherRoles/Resources/PortalAnimation/portal_009.png index ee8003b..61516ab 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_009.png and b/TheOtherRoles/Resources/PortalAnimation/portal_009.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_010.png b/TheOtherRoles/Resources/PortalAnimation/portal_010.png index 899e2af..8ff87bb 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_010.png and b/TheOtherRoles/Resources/PortalAnimation/portal_010.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_011.png b/TheOtherRoles/Resources/PortalAnimation/portal_011.png index 1976750..7ab307e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_011.png and b/TheOtherRoles/Resources/PortalAnimation/portal_011.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_012.png b/TheOtherRoles/Resources/PortalAnimation/portal_012.png index 945ab0c..e6f73f5 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_012.png and b/TheOtherRoles/Resources/PortalAnimation/portal_012.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_013.png b/TheOtherRoles/Resources/PortalAnimation/portal_013.png index fc730cc..19d16d8 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_013.png and b/TheOtherRoles/Resources/PortalAnimation/portal_013.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_014.png b/TheOtherRoles/Resources/PortalAnimation/portal_014.png index 54579b0..4120721 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_014.png and b/TheOtherRoles/Resources/PortalAnimation/portal_014.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_015.png b/TheOtherRoles/Resources/PortalAnimation/portal_015.png index 6b5e482..b33268f 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_015.png and b/TheOtherRoles/Resources/PortalAnimation/portal_015.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_016.png b/TheOtherRoles/Resources/PortalAnimation/portal_016.png index 8f8f134..a41b5aa 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_016.png and b/TheOtherRoles/Resources/PortalAnimation/portal_016.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_017.png b/TheOtherRoles/Resources/PortalAnimation/portal_017.png index 4fdd037..27553eb 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_017.png and b/TheOtherRoles/Resources/PortalAnimation/portal_017.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_018.png b/TheOtherRoles/Resources/PortalAnimation/portal_018.png index 20463fd..9ad039a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_018.png and b/TheOtherRoles/Resources/PortalAnimation/portal_018.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_019.png b/TheOtherRoles/Resources/PortalAnimation/portal_019.png index fa7030a..5ca9e63 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_019.png and b/TheOtherRoles/Resources/PortalAnimation/portal_019.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_020.png b/TheOtherRoles/Resources/PortalAnimation/portal_020.png index 63a4935..895b9e8 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_020.png and b/TheOtherRoles/Resources/PortalAnimation/portal_020.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_021.png b/TheOtherRoles/Resources/PortalAnimation/portal_021.png index 11cc004..178e965 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_021.png and b/TheOtherRoles/Resources/PortalAnimation/portal_021.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_022.png b/TheOtherRoles/Resources/PortalAnimation/portal_022.png index 635e281..774d1f7 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_022.png and b/TheOtherRoles/Resources/PortalAnimation/portal_022.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_023.png b/TheOtherRoles/Resources/PortalAnimation/portal_023.png index a27c319..62b31b2 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_023.png and b/TheOtherRoles/Resources/PortalAnimation/portal_023.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_024.png b/TheOtherRoles/Resources/PortalAnimation/portal_024.png index 3989814..f16b588 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_024.png and b/TheOtherRoles/Resources/PortalAnimation/portal_024.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_025.png b/TheOtherRoles/Resources/PortalAnimation/portal_025.png index b310781..f7ead12 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_025.png and b/TheOtherRoles/Resources/PortalAnimation/portal_025.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_026.png b/TheOtherRoles/Resources/PortalAnimation/portal_026.png index 345b56e..62c2493 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_026.png and b/TheOtherRoles/Resources/PortalAnimation/portal_026.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_027.png b/TheOtherRoles/Resources/PortalAnimation/portal_027.png index 4addf77..49b75b1 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_027.png and b/TheOtherRoles/Resources/PortalAnimation/portal_027.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_028.png b/TheOtherRoles/Resources/PortalAnimation/portal_028.png index 58861cd..bee1024 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_028.png and b/TheOtherRoles/Resources/PortalAnimation/portal_028.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_029.png b/TheOtherRoles/Resources/PortalAnimation/portal_029.png index ef64dbd..4887cae 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_029.png and b/TheOtherRoles/Resources/PortalAnimation/portal_029.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_030.png b/TheOtherRoles/Resources/PortalAnimation/portal_030.png index e8dc199..7420fb3 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_030.png and b/TheOtherRoles/Resources/PortalAnimation/portal_030.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_031.png b/TheOtherRoles/Resources/PortalAnimation/portal_031.png index 416f15d..f94deca 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_031.png and b/TheOtherRoles/Resources/PortalAnimation/portal_031.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_032.png b/TheOtherRoles/Resources/PortalAnimation/portal_032.png index dcc1ef7..a246b07 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_032.png and b/TheOtherRoles/Resources/PortalAnimation/portal_032.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_033.png b/TheOtherRoles/Resources/PortalAnimation/portal_033.png index 8e52ddf..e429d60 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_033.png and b/TheOtherRoles/Resources/PortalAnimation/portal_033.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_034.png b/TheOtherRoles/Resources/PortalAnimation/portal_034.png index 9bfaecd..cbdcb05 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_034.png and b/TheOtherRoles/Resources/PortalAnimation/portal_034.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_035.png b/TheOtherRoles/Resources/PortalAnimation/portal_035.png index 67c9845..a80ae37 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_035.png and b/TheOtherRoles/Resources/PortalAnimation/portal_035.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_036.png b/TheOtherRoles/Resources/PortalAnimation/portal_036.png index f016c7d..6eb9b56 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_036.png and b/TheOtherRoles/Resources/PortalAnimation/portal_036.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_037.png b/TheOtherRoles/Resources/PortalAnimation/portal_037.png index 1ff2467..9c276a4 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_037.png and b/TheOtherRoles/Resources/PortalAnimation/portal_037.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_038.png b/TheOtherRoles/Resources/PortalAnimation/portal_038.png index 778b93a..2d49e45 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_038.png and b/TheOtherRoles/Resources/PortalAnimation/portal_038.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_039.png b/TheOtherRoles/Resources/PortalAnimation/portal_039.png index 647291f..ef04cc9 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_039.png and b/TheOtherRoles/Resources/PortalAnimation/portal_039.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_040.png b/TheOtherRoles/Resources/PortalAnimation/portal_040.png index 840ac15..1d68d51 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_040.png and b/TheOtherRoles/Resources/PortalAnimation/portal_040.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_041.png b/TheOtherRoles/Resources/PortalAnimation/portal_041.png index 9d12df1..308cf9e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_041.png and b/TheOtherRoles/Resources/PortalAnimation/portal_041.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_042.png b/TheOtherRoles/Resources/PortalAnimation/portal_042.png index b8d5d0d..89bbf7b 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_042.png and b/TheOtherRoles/Resources/PortalAnimation/portal_042.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_043.png b/TheOtherRoles/Resources/PortalAnimation/portal_043.png index 3854d84..7e5ff09 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_043.png and b/TheOtherRoles/Resources/PortalAnimation/portal_043.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_044.png b/TheOtherRoles/Resources/PortalAnimation/portal_044.png index caeaf95..0ceeb0b 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_044.png and b/TheOtherRoles/Resources/PortalAnimation/portal_044.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_045.png b/TheOtherRoles/Resources/PortalAnimation/portal_045.png index 25d5ed8..5698513 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_045.png and b/TheOtherRoles/Resources/PortalAnimation/portal_045.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_046.png b/TheOtherRoles/Resources/PortalAnimation/portal_046.png index fea3874..76d5ab3 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_046.png and b/TheOtherRoles/Resources/PortalAnimation/portal_046.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_047.png b/TheOtherRoles/Resources/PortalAnimation/portal_047.png index 8a6ad8e..872fcba 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_047.png and b/TheOtherRoles/Resources/PortalAnimation/portal_047.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_048.png b/TheOtherRoles/Resources/PortalAnimation/portal_048.png index 9e47b8b..1e552dd 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_048.png and b/TheOtherRoles/Resources/PortalAnimation/portal_048.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_049.png b/TheOtherRoles/Resources/PortalAnimation/portal_049.png index 6f84846..c166bcf 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_049.png and b/TheOtherRoles/Resources/PortalAnimation/portal_049.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_050.png b/TheOtherRoles/Resources/PortalAnimation/portal_050.png index c8fd793..3d8c71b 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_050.png and b/TheOtherRoles/Resources/PortalAnimation/portal_050.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_051.png b/TheOtherRoles/Resources/PortalAnimation/portal_051.png index d250d23..1f49ae4 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_051.png and b/TheOtherRoles/Resources/PortalAnimation/portal_051.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_052.png b/TheOtherRoles/Resources/PortalAnimation/portal_052.png index e8554a5..9113ee8 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_052.png and b/TheOtherRoles/Resources/PortalAnimation/portal_052.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_053.png b/TheOtherRoles/Resources/PortalAnimation/portal_053.png index 0082d9b..a05f351 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_053.png and b/TheOtherRoles/Resources/PortalAnimation/portal_053.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_054.png b/TheOtherRoles/Resources/PortalAnimation/portal_054.png index e013a2f..63934a1 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_054.png and b/TheOtherRoles/Resources/PortalAnimation/portal_054.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_055.png b/TheOtherRoles/Resources/PortalAnimation/portal_055.png index 585f333..4f82b39 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_055.png and b/TheOtherRoles/Resources/PortalAnimation/portal_055.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_056.png b/TheOtherRoles/Resources/PortalAnimation/portal_056.png index f83fdb3..3024a54 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_056.png and b/TheOtherRoles/Resources/PortalAnimation/portal_056.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_057.png b/TheOtherRoles/Resources/PortalAnimation/portal_057.png index ac4de1b..ca3c78f 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_057.png and b/TheOtherRoles/Resources/PortalAnimation/portal_057.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_058.png b/TheOtherRoles/Resources/PortalAnimation/portal_058.png index 2cb913d..b66a513 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_058.png and b/TheOtherRoles/Resources/PortalAnimation/portal_058.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_059.png b/TheOtherRoles/Resources/PortalAnimation/portal_059.png index 527c212..1c1ace8 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_059.png and b/TheOtherRoles/Resources/PortalAnimation/portal_059.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_060.png b/TheOtherRoles/Resources/PortalAnimation/portal_060.png index 00ceba2..d74e407 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_060.png and b/TheOtherRoles/Resources/PortalAnimation/portal_060.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_061.png b/TheOtherRoles/Resources/PortalAnimation/portal_061.png index 52ee9e8..9a87136 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_061.png and b/TheOtherRoles/Resources/PortalAnimation/portal_061.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_062.png b/TheOtherRoles/Resources/PortalAnimation/portal_062.png index 6e0f50c..a930d5d 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_062.png and b/TheOtherRoles/Resources/PortalAnimation/portal_062.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_063.png b/TheOtherRoles/Resources/PortalAnimation/portal_063.png index 24a022f..f40d2a0 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_063.png and b/TheOtherRoles/Resources/PortalAnimation/portal_063.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_064.png b/TheOtherRoles/Resources/PortalAnimation/portal_064.png index cd60605..84f1101 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_064.png and b/TheOtherRoles/Resources/PortalAnimation/portal_064.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_065.png b/TheOtherRoles/Resources/PortalAnimation/portal_065.png index e4e43ac..d9ef72f 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_065.png and b/TheOtherRoles/Resources/PortalAnimation/portal_065.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_066.png b/TheOtherRoles/Resources/PortalAnimation/portal_066.png index 396fe4b..9c1a48e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_066.png and b/TheOtherRoles/Resources/PortalAnimation/portal_066.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_067.png b/TheOtherRoles/Resources/PortalAnimation/portal_067.png index 80a1b05..1c23024 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_067.png and b/TheOtherRoles/Resources/PortalAnimation/portal_067.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_068.png b/TheOtherRoles/Resources/PortalAnimation/portal_068.png index 57f61eb..ef61c62 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_068.png and b/TheOtherRoles/Resources/PortalAnimation/portal_068.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_069.png b/TheOtherRoles/Resources/PortalAnimation/portal_069.png index d9bc049..de128ef 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_069.png and b/TheOtherRoles/Resources/PortalAnimation/portal_069.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_070.png b/TheOtherRoles/Resources/PortalAnimation/portal_070.png index ae0db03..8beda96 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_070.png and b/TheOtherRoles/Resources/PortalAnimation/portal_070.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_071.png b/TheOtherRoles/Resources/PortalAnimation/portal_071.png index 7fbff2f..3089aa7 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_071.png and b/TheOtherRoles/Resources/PortalAnimation/portal_071.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_072.png b/TheOtherRoles/Resources/PortalAnimation/portal_072.png index e9ae84c..c0c5fcd 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_072.png and b/TheOtherRoles/Resources/PortalAnimation/portal_072.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_073.png b/TheOtherRoles/Resources/PortalAnimation/portal_073.png index f518460..90182c0 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_073.png and b/TheOtherRoles/Resources/PortalAnimation/portal_073.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_074.png b/TheOtherRoles/Resources/PortalAnimation/portal_074.png index 216c5d5..efda60e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_074.png and b/TheOtherRoles/Resources/PortalAnimation/portal_074.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_075.png b/TheOtherRoles/Resources/PortalAnimation/portal_075.png index 9bd7188..8e8bd06 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_075.png and b/TheOtherRoles/Resources/PortalAnimation/portal_075.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_076.png b/TheOtherRoles/Resources/PortalAnimation/portal_076.png index 6fb9074..7635cf1 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_076.png and b/TheOtherRoles/Resources/PortalAnimation/portal_076.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_077.png b/TheOtherRoles/Resources/PortalAnimation/portal_077.png index 5f47e9b..63c253d 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_077.png and b/TheOtherRoles/Resources/PortalAnimation/portal_077.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_078.png b/TheOtherRoles/Resources/PortalAnimation/portal_078.png index 4a05e35..cf46257 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_078.png and b/TheOtherRoles/Resources/PortalAnimation/portal_078.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_079.png b/TheOtherRoles/Resources/PortalAnimation/portal_079.png index 9641cbb..e3aac0b 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_079.png and b/TheOtherRoles/Resources/PortalAnimation/portal_079.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_080.png b/TheOtherRoles/Resources/PortalAnimation/portal_080.png index 1ddd0c0..9297265 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_080.png and b/TheOtherRoles/Resources/PortalAnimation/portal_080.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_081.png b/TheOtherRoles/Resources/PortalAnimation/portal_081.png index 3d43874..ad46a79 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_081.png and b/TheOtherRoles/Resources/PortalAnimation/portal_081.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_082.png b/TheOtherRoles/Resources/PortalAnimation/portal_082.png index d9235a7..a1440c3 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_082.png and b/TheOtherRoles/Resources/PortalAnimation/portal_082.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_083.png b/TheOtherRoles/Resources/PortalAnimation/portal_083.png index 252096e..a23dc43 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_083.png and b/TheOtherRoles/Resources/PortalAnimation/portal_083.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_084.png b/TheOtherRoles/Resources/PortalAnimation/portal_084.png index 90709ef..f24ee93 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_084.png and b/TheOtherRoles/Resources/PortalAnimation/portal_084.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_085.png b/TheOtherRoles/Resources/PortalAnimation/portal_085.png index 0b67725..49abfc7 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_085.png and b/TheOtherRoles/Resources/PortalAnimation/portal_085.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_086.png b/TheOtherRoles/Resources/PortalAnimation/portal_086.png index aa10791..6ca148e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_086.png and b/TheOtherRoles/Resources/PortalAnimation/portal_086.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_087.png b/TheOtherRoles/Resources/PortalAnimation/portal_087.png index 16d749a..812d2fb 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_087.png and b/TheOtherRoles/Resources/PortalAnimation/portal_087.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_088.png b/TheOtherRoles/Resources/PortalAnimation/portal_088.png index a6cf27e..4c39123 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_088.png and b/TheOtherRoles/Resources/PortalAnimation/portal_088.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_089.png b/TheOtherRoles/Resources/PortalAnimation/portal_089.png index 8c62efb..38b841a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_089.png and b/TheOtherRoles/Resources/PortalAnimation/portal_089.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_090.png b/TheOtherRoles/Resources/PortalAnimation/portal_090.png index 6a43d2b..35e8150 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_090.png and b/TheOtherRoles/Resources/PortalAnimation/portal_090.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_091.png b/TheOtherRoles/Resources/PortalAnimation/portal_091.png index b66670e..08449b5 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_091.png and b/TheOtherRoles/Resources/PortalAnimation/portal_091.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_092.png b/TheOtherRoles/Resources/PortalAnimation/portal_092.png index b66670e..08449b5 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_092.png and b/TheOtherRoles/Resources/PortalAnimation/portal_092.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_093.png b/TheOtherRoles/Resources/PortalAnimation/portal_093.png index 56b05b5..d1f006e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_093.png and b/TheOtherRoles/Resources/PortalAnimation/portal_093.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_094.png b/TheOtherRoles/Resources/PortalAnimation/portal_094.png index 56b05b5..d1f006e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_094.png and b/TheOtherRoles/Resources/PortalAnimation/portal_094.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_095.png b/TheOtherRoles/Resources/PortalAnimation/portal_095.png index 56b05b5..d1f006e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_095.png and b/TheOtherRoles/Resources/PortalAnimation/portal_095.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_096.png b/TheOtherRoles/Resources/PortalAnimation/portal_096.png index 56b05b5..d1f006e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_096.png and b/TheOtherRoles/Resources/PortalAnimation/portal_096.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_097.png b/TheOtherRoles/Resources/PortalAnimation/portal_097.png index 1cdfcf7..dfbb516 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_097.png and b/TheOtherRoles/Resources/PortalAnimation/portal_097.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_098.png b/TheOtherRoles/Resources/PortalAnimation/portal_098.png index e6259a9..5b5eed2 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_098.png and b/TheOtherRoles/Resources/PortalAnimation/portal_098.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_099.png b/TheOtherRoles/Resources/PortalAnimation/portal_099.png index ad9fc0f..57b98cd 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_099.png and b/TheOtherRoles/Resources/PortalAnimation/portal_099.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_100.png b/TheOtherRoles/Resources/PortalAnimation/portal_100.png index 28b905f..14278fb 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_100.png and b/TheOtherRoles/Resources/PortalAnimation/portal_100.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_101.png b/TheOtherRoles/Resources/PortalAnimation/portal_101.png index a187c22..728cb12 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_101.png and b/TheOtherRoles/Resources/PortalAnimation/portal_101.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_102.png b/TheOtherRoles/Resources/PortalAnimation/portal_102.png index 7466613..a39f051 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_102.png and b/TheOtherRoles/Resources/PortalAnimation/portal_102.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_103.png b/TheOtherRoles/Resources/PortalAnimation/portal_103.png index d4f147a..b292d1f 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_103.png and b/TheOtherRoles/Resources/PortalAnimation/portal_103.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_104.png b/TheOtherRoles/Resources/PortalAnimation/portal_104.png index 791e61d..a08cc17 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_104.png and b/TheOtherRoles/Resources/PortalAnimation/portal_104.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_105.png b/TheOtherRoles/Resources/PortalAnimation/portal_105.png index ffa4a4c..9bd36e9 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_105.png and b/TheOtherRoles/Resources/PortalAnimation/portal_105.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_106.png b/TheOtherRoles/Resources/PortalAnimation/portal_106.png index 42a02c9..c95ed5d 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_106.png and b/TheOtherRoles/Resources/PortalAnimation/portal_106.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_107.png b/TheOtherRoles/Resources/PortalAnimation/portal_107.png index 88a145c..689cfd7 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_107.png and b/TheOtherRoles/Resources/PortalAnimation/portal_107.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_108.png b/TheOtherRoles/Resources/PortalAnimation/portal_108.png index c55a87e..ea58e4e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_108.png and b/TheOtherRoles/Resources/PortalAnimation/portal_108.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_109.png b/TheOtherRoles/Resources/PortalAnimation/portal_109.png index 06e31ae..ff52fc8 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_109.png and b/TheOtherRoles/Resources/PortalAnimation/portal_109.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_110.png b/TheOtherRoles/Resources/PortalAnimation/portal_110.png index f69432c..3f7a78e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_110.png and b/TheOtherRoles/Resources/PortalAnimation/portal_110.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_111.png b/TheOtherRoles/Resources/PortalAnimation/portal_111.png index 65a952d..6b23809 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_111.png and b/TheOtherRoles/Resources/PortalAnimation/portal_111.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_112.png b/TheOtherRoles/Resources/PortalAnimation/portal_112.png index ffee63e..703344d 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_112.png and b/TheOtherRoles/Resources/PortalAnimation/portal_112.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_113.png b/TheOtherRoles/Resources/PortalAnimation/portal_113.png index 4ac6733..06c42c6 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_113.png and b/TheOtherRoles/Resources/PortalAnimation/portal_113.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_114.png b/TheOtherRoles/Resources/PortalAnimation/portal_114.png index c7d33e7..029d62c 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_114.png and b/TheOtherRoles/Resources/PortalAnimation/portal_114.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_115.png b/TheOtherRoles/Resources/PortalAnimation/portal_115.png index 4fcdb27..60f63e4 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_115.png and b/TheOtherRoles/Resources/PortalAnimation/portal_115.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_116.png b/TheOtherRoles/Resources/PortalAnimation/portal_116.png index c63e804..7b713a0 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_116.png and b/TheOtherRoles/Resources/PortalAnimation/portal_116.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_117.png b/TheOtherRoles/Resources/PortalAnimation/portal_117.png index dad5251..e014dc6 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_117.png and b/TheOtherRoles/Resources/PortalAnimation/portal_117.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_118.png b/TheOtherRoles/Resources/PortalAnimation/portal_118.png index aa529eb..f168121 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_118.png and b/TheOtherRoles/Resources/PortalAnimation/portal_118.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_119.png b/TheOtherRoles/Resources/PortalAnimation/portal_119.png index 01910a0..769457e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_119.png and b/TheOtherRoles/Resources/PortalAnimation/portal_119.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_120.png b/TheOtherRoles/Resources/PortalAnimation/portal_120.png index 5b29a63..247840a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_120.png and b/TheOtherRoles/Resources/PortalAnimation/portal_120.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_121.png b/TheOtherRoles/Resources/PortalAnimation/portal_121.png index 4fd3a6f..f4bfa64 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_121.png and b/TheOtherRoles/Resources/PortalAnimation/portal_121.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_122.png b/TheOtherRoles/Resources/PortalAnimation/portal_122.png index 348acdb..2235987 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_122.png and b/TheOtherRoles/Resources/PortalAnimation/portal_122.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_123.png b/TheOtherRoles/Resources/PortalAnimation/portal_123.png index e4552e6..9fc21eb 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_123.png and b/TheOtherRoles/Resources/PortalAnimation/portal_123.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_124.png b/TheOtherRoles/Resources/PortalAnimation/portal_124.png index 9fbc68b..dd8ebae 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_124.png and b/TheOtherRoles/Resources/PortalAnimation/portal_124.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_125.png b/TheOtherRoles/Resources/PortalAnimation/portal_125.png index e620479..8e16ebe 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_125.png and b/TheOtherRoles/Resources/PortalAnimation/portal_125.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_126.png b/TheOtherRoles/Resources/PortalAnimation/portal_126.png index f12f691..6320b80 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_126.png and b/TheOtherRoles/Resources/PortalAnimation/portal_126.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_127.png b/TheOtherRoles/Resources/PortalAnimation/portal_127.png index 0a18f09..584c187 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_127.png and b/TheOtherRoles/Resources/PortalAnimation/portal_127.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_128.png b/TheOtherRoles/Resources/PortalAnimation/portal_128.png index 9911486..2d82481 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_128.png and b/TheOtherRoles/Resources/PortalAnimation/portal_128.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_129.png b/TheOtherRoles/Resources/PortalAnimation/portal_129.png index 9618674..788c761 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_129.png and b/TheOtherRoles/Resources/PortalAnimation/portal_129.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_130.png b/TheOtherRoles/Resources/PortalAnimation/portal_130.png index dc3affa..40c9698 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_130.png and b/TheOtherRoles/Resources/PortalAnimation/portal_130.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_131.png b/TheOtherRoles/Resources/PortalAnimation/portal_131.png index 88949c5..17cd4d2 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_131.png and b/TheOtherRoles/Resources/PortalAnimation/portal_131.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_132.png b/TheOtherRoles/Resources/PortalAnimation/portal_132.png index d903e71..5c99227 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_132.png and b/TheOtherRoles/Resources/PortalAnimation/portal_132.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_133.png b/TheOtherRoles/Resources/PortalAnimation/portal_133.png index 7f67424..568c213 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_133.png and b/TheOtherRoles/Resources/PortalAnimation/portal_133.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_134.png b/TheOtherRoles/Resources/PortalAnimation/portal_134.png index f7dc591..d3b20b1 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_134.png and b/TheOtherRoles/Resources/PortalAnimation/portal_134.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_135.png b/TheOtherRoles/Resources/PortalAnimation/portal_135.png index bcde204..8a612fc 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_135.png and b/TheOtherRoles/Resources/PortalAnimation/portal_135.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_136.png b/TheOtherRoles/Resources/PortalAnimation/portal_136.png index df667b4..a6f3a63 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_136.png and b/TheOtherRoles/Resources/PortalAnimation/portal_136.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_137.png b/TheOtherRoles/Resources/PortalAnimation/portal_137.png index bd2ebd0..fe4dada 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_137.png and b/TheOtherRoles/Resources/PortalAnimation/portal_137.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_138.png b/TheOtherRoles/Resources/PortalAnimation/portal_138.png index e78d3b8..9415526 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_138.png and b/TheOtherRoles/Resources/PortalAnimation/portal_138.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_139.png b/TheOtherRoles/Resources/PortalAnimation/portal_139.png index 3262a7b..762e06e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_139.png and b/TheOtherRoles/Resources/PortalAnimation/portal_139.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_140.png b/TheOtherRoles/Resources/PortalAnimation/portal_140.png index 675b406..8296f22 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_140.png and b/TheOtherRoles/Resources/PortalAnimation/portal_140.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_141.png b/TheOtherRoles/Resources/PortalAnimation/portal_141.png index 9ed1c67..546d9b9 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_141.png and b/TheOtherRoles/Resources/PortalAnimation/portal_141.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_142.png b/TheOtherRoles/Resources/PortalAnimation/portal_142.png index 671435b..52c8cb3 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_142.png and b/TheOtherRoles/Resources/PortalAnimation/portal_142.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_143.png b/TheOtherRoles/Resources/PortalAnimation/portal_143.png index 1757fe9..9f1cbea 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_143.png and b/TheOtherRoles/Resources/PortalAnimation/portal_143.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_144.png b/TheOtherRoles/Resources/PortalAnimation/portal_144.png index e23470c..433c9e3 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_144.png and b/TheOtherRoles/Resources/PortalAnimation/portal_144.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_145.png b/TheOtherRoles/Resources/PortalAnimation/portal_145.png index 85bc565..5d0cc61 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_145.png and b/TheOtherRoles/Resources/PortalAnimation/portal_145.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_146.png b/TheOtherRoles/Resources/PortalAnimation/portal_146.png index 7cc9460..e3c8866 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_146.png and b/TheOtherRoles/Resources/PortalAnimation/portal_146.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_147.png b/TheOtherRoles/Resources/PortalAnimation/portal_147.png index 09fce0f..6b6a234 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_147.png and b/TheOtherRoles/Resources/PortalAnimation/portal_147.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_148.png b/TheOtherRoles/Resources/PortalAnimation/portal_148.png index 095983d..aa039ce 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_148.png and b/TheOtherRoles/Resources/PortalAnimation/portal_148.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_149.png b/TheOtherRoles/Resources/PortalAnimation/portal_149.png index 33d2255..184c177 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_149.png and b/TheOtherRoles/Resources/PortalAnimation/portal_149.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_150.png b/TheOtherRoles/Resources/PortalAnimation/portal_150.png index 65cee63..8b3de5f 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_150.png and b/TheOtherRoles/Resources/PortalAnimation/portal_150.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_151.png b/TheOtherRoles/Resources/PortalAnimation/portal_151.png index 17c9157..d3c8077 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_151.png and b/TheOtherRoles/Resources/PortalAnimation/portal_151.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_152.png b/TheOtherRoles/Resources/PortalAnimation/portal_152.png index 07194aa..0b31038 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_152.png and b/TheOtherRoles/Resources/PortalAnimation/portal_152.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_153.png b/TheOtherRoles/Resources/PortalAnimation/portal_153.png index a7bfdcc..3bf80f6 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_153.png and b/TheOtherRoles/Resources/PortalAnimation/portal_153.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_154.png b/TheOtherRoles/Resources/PortalAnimation/portal_154.png index 7eff317..11f5f94 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_154.png and b/TheOtherRoles/Resources/PortalAnimation/portal_154.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_155.png b/TheOtherRoles/Resources/PortalAnimation/portal_155.png index 8358cd7..f37887d 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_155.png and b/TheOtherRoles/Resources/PortalAnimation/portal_155.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_156.png b/TheOtherRoles/Resources/PortalAnimation/portal_156.png index 8916023..c6a3543 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_156.png and b/TheOtherRoles/Resources/PortalAnimation/portal_156.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_157.png b/TheOtherRoles/Resources/PortalAnimation/portal_157.png index c78738c..b707c8e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_157.png and b/TheOtherRoles/Resources/PortalAnimation/portal_157.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_158.png b/TheOtherRoles/Resources/PortalAnimation/portal_158.png index 6cbbe6b..491c454 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_158.png and b/TheOtherRoles/Resources/PortalAnimation/portal_158.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_159.png b/TheOtherRoles/Resources/PortalAnimation/portal_159.png index 775570f..48f68f5 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_159.png and b/TheOtherRoles/Resources/PortalAnimation/portal_159.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_160.png b/TheOtherRoles/Resources/PortalAnimation/portal_160.png index 6159def..4e5d67e 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_160.png and b/TheOtherRoles/Resources/PortalAnimation/portal_160.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_161.png b/TheOtherRoles/Resources/PortalAnimation/portal_161.png index dba0597..ecd2c64 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_161.png and b/TheOtherRoles/Resources/PortalAnimation/portal_161.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_162.png b/TheOtherRoles/Resources/PortalAnimation/portal_162.png index 66bdf19..4ea5f91 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_162.png and b/TheOtherRoles/Resources/PortalAnimation/portal_162.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_163.png b/TheOtherRoles/Resources/PortalAnimation/portal_163.png index 661b62b..3a366b2 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_163.png and b/TheOtherRoles/Resources/PortalAnimation/portal_163.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_164.png b/TheOtherRoles/Resources/PortalAnimation/portal_164.png index 2000819..f2c17cd 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_164.png and b/TheOtherRoles/Resources/PortalAnimation/portal_164.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_165.png b/TheOtherRoles/Resources/PortalAnimation/portal_165.png index 26627b8..abb6dec 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_165.png and b/TheOtherRoles/Resources/PortalAnimation/portal_165.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_166.png b/TheOtherRoles/Resources/PortalAnimation/portal_166.png index 918f118..a9ab55b 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_166.png and b/TheOtherRoles/Resources/PortalAnimation/portal_166.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_167.png b/TheOtherRoles/Resources/PortalAnimation/portal_167.png index d99d8cc..474fa06 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_167.png and b/TheOtherRoles/Resources/PortalAnimation/portal_167.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_168.png b/TheOtherRoles/Resources/PortalAnimation/portal_168.png index 3e45b01..297033a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_168.png and b/TheOtherRoles/Resources/PortalAnimation/portal_168.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_169.png b/TheOtherRoles/Resources/PortalAnimation/portal_169.png index 2051a03..ece945d 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_169.png and b/TheOtherRoles/Resources/PortalAnimation/portal_169.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_170.png b/TheOtherRoles/Resources/PortalAnimation/portal_170.png index 28ac52b..411af8c 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_170.png and b/TheOtherRoles/Resources/PortalAnimation/portal_170.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_171.png b/TheOtherRoles/Resources/PortalAnimation/portal_171.png index 4172d26..792c2cc 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_171.png and b/TheOtherRoles/Resources/PortalAnimation/portal_171.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_172.png b/TheOtherRoles/Resources/PortalAnimation/portal_172.png index 8ce88d4..57fc96f 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_172.png and b/TheOtherRoles/Resources/PortalAnimation/portal_172.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_173.png b/TheOtherRoles/Resources/PortalAnimation/portal_173.png index 1804cde..ae2d2ec 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_173.png and b/TheOtherRoles/Resources/PortalAnimation/portal_173.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_174.png b/TheOtherRoles/Resources/PortalAnimation/portal_174.png index 979fc2c..fb52e0a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_174.png and b/TheOtherRoles/Resources/PortalAnimation/portal_174.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_175.png b/TheOtherRoles/Resources/PortalAnimation/portal_175.png index cc8f13b..3ee1417 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_175.png and b/TheOtherRoles/Resources/PortalAnimation/portal_175.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_176.png b/TheOtherRoles/Resources/PortalAnimation/portal_176.png index 09fdb0c..49303e8 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_176.png and b/TheOtherRoles/Resources/PortalAnimation/portal_176.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_177.png b/TheOtherRoles/Resources/PortalAnimation/portal_177.png index 97bc084..eae8bf7 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_177.png and b/TheOtherRoles/Resources/PortalAnimation/portal_177.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_178.png b/TheOtherRoles/Resources/PortalAnimation/portal_178.png index 2c5325b..d93f093 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_178.png and b/TheOtherRoles/Resources/PortalAnimation/portal_178.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_179.png b/TheOtherRoles/Resources/PortalAnimation/portal_179.png index c69066e..bdbe109 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_179.png and b/TheOtherRoles/Resources/PortalAnimation/portal_179.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_180.png b/TheOtherRoles/Resources/PortalAnimation/portal_180.png index 02d44d9..24aab98 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_180.png and b/TheOtherRoles/Resources/PortalAnimation/portal_180.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_181.png b/TheOtherRoles/Resources/PortalAnimation/portal_181.png index c56ce86..46e0437 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_181.png and b/TheOtherRoles/Resources/PortalAnimation/portal_181.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_182.png b/TheOtherRoles/Resources/PortalAnimation/portal_182.png index 88bf869..e206c90 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_182.png and b/TheOtherRoles/Resources/PortalAnimation/portal_182.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_183.png b/TheOtherRoles/Resources/PortalAnimation/portal_183.png index 539ac9c..9dba0f5 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_183.png and b/TheOtherRoles/Resources/PortalAnimation/portal_183.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_184.png b/TheOtherRoles/Resources/PortalAnimation/portal_184.png index 46f34fe..b1ebd18 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_184.png and b/TheOtherRoles/Resources/PortalAnimation/portal_184.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_185.png b/TheOtherRoles/Resources/PortalAnimation/portal_185.png index 45586af..f34de69 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_185.png and b/TheOtherRoles/Resources/PortalAnimation/portal_185.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_186.png b/TheOtherRoles/Resources/PortalAnimation/portal_186.png index 4560622..5a525ea 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_186.png and b/TheOtherRoles/Resources/PortalAnimation/portal_186.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_187.png b/TheOtherRoles/Resources/PortalAnimation/portal_187.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_187.png and b/TheOtherRoles/Resources/PortalAnimation/portal_187.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_188.png b/TheOtherRoles/Resources/PortalAnimation/portal_188.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_188.png and b/TheOtherRoles/Resources/PortalAnimation/portal_188.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_189.png b/TheOtherRoles/Resources/PortalAnimation/portal_189.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_189.png and b/TheOtherRoles/Resources/PortalAnimation/portal_189.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_190.png b/TheOtherRoles/Resources/PortalAnimation/portal_190.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_190.png and b/TheOtherRoles/Resources/PortalAnimation/portal_190.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_191.png b/TheOtherRoles/Resources/PortalAnimation/portal_191.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_191.png and b/TheOtherRoles/Resources/PortalAnimation/portal_191.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_192.png b/TheOtherRoles/Resources/PortalAnimation/portal_192.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_192.png and b/TheOtherRoles/Resources/PortalAnimation/portal_192.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_193.png b/TheOtherRoles/Resources/PortalAnimation/portal_193.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_193.png and b/TheOtherRoles/Resources/PortalAnimation/portal_193.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_194.png b/TheOtherRoles/Resources/PortalAnimation/portal_194.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_194.png and b/TheOtherRoles/Resources/PortalAnimation/portal_194.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_195.png b/TheOtherRoles/Resources/PortalAnimation/portal_195.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_195.png and b/TheOtherRoles/Resources/PortalAnimation/portal_195.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_196.png b/TheOtherRoles/Resources/PortalAnimation/portal_196.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_196.png and b/TheOtherRoles/Resources/PortalAnimation/portal_196.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_197.png b/TheOtherRoles/Resources/PortalAnimation/portal_197.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_197.png and b/TheOtherRoles/Resources/PortalAnimation/portal_197.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_198.png b/TheOtherRoles/Resources/PortalAnimation/portal_198.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_198.png and b/TheOtherRoles/Resources/PortalAnimation/portal_198.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_199.png b/TheOtherRoles/Resources/PortalAnimation/portal_199.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_199.png and b/TheOtherRoles/Resources/PortalAnimation/portal_199.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_200.png b/TheOtherRoles/Resources/PortalAnimation/portal_200.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_200.png and b/TheOtherRoles/Resources/PortalAnimation/portal_200.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_201.png b/TheOtherRoles/Resources/PortalAnimation/portal_201.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_201.png and b/TheOtherRoles/Resources/PortalAnimation/portal_201.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_202.png b/TheOtherRoles/Resources/PortalAnimation/portal_202.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_202.png and b/TheOtherRoles/Resources/PortalAnimation/portal_202.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_203.png b/TheOtherRoles/Resources/PortalAnimation/portal_203.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_203.png and b/TheOtherRoles/Resources/PortalAnimation/portal_203.png differ diff --git a/TheOtherRoles/Resources/PortalAnimation/portal_204.png b/TheOtherRoles/Resources/PortalAnimation/portal_204.png index 3a65da1..7b71b2a 100644 Binary files a/TheOtherRoles/Resources/PortalAnimation/portal_204.png and b/TheOtherRoles/Resources/PortalAnimation/portal_204.png differ diff --git a/TheOtherRoles/Resources/PursuerButton.png b/TheOtherRoles/Resources/PursuerButton.png index 5cd9da8..29fdf8e 100644 Binary files a/TheOtherRoles/Resources/PursuerButton.png and b/TheOtherRoles/Resources/PursuerButton.png differ diff --git a/TheOtherRoles/Resources/RepairButton.png b/TheOtherRoles/Resources/RepairButton.png index f3be912..bfa30d5 100644 Binary files a/TheOtherRoles/Resources/RepairButton.png and b/TheOtherRoles/Resources/RepairButton.png differ diff --git a/TheOtherRoles/Resources/Reveal.png b/TheOtherRoles/Resources/Reveal.png index 544351e..02105f1 100644 Binary files a/TheOtherRoles/Resources/Reveal.png and b/TheOtherRoles/Resources/Reveal.png differ diff --git a/TheOtherRoles/Resources/RewindButton.png b/TheOtherRoles/Resources/RewindButton.png index 9d58a5c..afc1e65 100644 Binary files a/TheOtherRoles/Resources/RewindButton.png and b/TheOtherRoles/Resources/RewindButton.png differ diff --git a/TheOtherRoles/Resources/SampleButton.png b/TheOtherRoles/Resources/SampleButton.png index 0f51d67..a04b0df 100644 Binary files a/TheOtherRoles/Resources/SampleButton.png and b/TheOtherRoles/Resources/SampleButton.png differ diff --git a/TheOtherRoles/Resources/SeerButton.png b/TheOtherRoles/Resources/SeerButton.png index 544351e..02105f1 100644 Binary files a/TheOtherRoles/Resources/SeerButton.png and b/TheOtherRoles/Resources/SeerButton.png differ diff --git a/TheOtherRoles/Resources/Settings_Button.png b/TheOtherRoles/Resources/Settings_Button.png index 9119e37..2a19bef 100644 Binary files a/TheOtherRoles/Resources/Settings_Button.png and b/TheOtherRoles/Resources/Settings_Button.png differ diff --git a/TheOtherRoles/Resources/Settings_ButtonActive.png b/TheOtherRoles/Resources/Settings_ButtonActive.png index 813c937..cf0188b 100644 Binary files a/TheOtherRoles/Resources/Settings_ButtonActive.png and b/TheOtherRoles/Resources/Settings_ButtonActive.png differ diff --git a/TheOtherRoles/Resources/ShieldButton.png b/TheOtherRoles/Resources/ShieldButton.png index 6315ab8..d2dec69 100644 Binary files a/TheOtherRoles/Resources/ShieldButton.png and b/TheOtherRoles/Resources/ShieldButton.png differ diff --git a/TheOtherRoles/Resources/ShiftButton.png b/TheOtherRoles/Resources/ShiftButton.png index 47d83d0..95f8f1d 100644 Binary files a/TheOtherRoles/Resources/ShiftButton.png and b/TheOtherRoles/Resources/ShiftButton.png differ diff --git a/TheOtherRoles/Resources/SidekickButton.png b/TheOtherRoles/Resources/SidekickButton.png index 296ce9d..cb2df9f 100644 Binary files a/TheOtherRoles/Resources/SidekickButton.png and b/TheOtherRoles/Resources/SidekickButton.png differ diff --git a/TheOtherRoles/Resources/Silhouette.png b/TheOtherRoles/Resources/Silhouette.png index ca0f93a..0c7d304 100644 Binary files a/TheOtherRoles/Resources/Silhouette.png and b/TheOtherRoles/Resources/Silhouette.png differ diff --git a/TheOtherRoles/Resources/Soul.png b/TheOtherRoles/Resources/Soul.png index 8a1808c..31f73d9 100644 Binary files a/TheOtherRoles/Resources/Soul.png and b/TheOtherRoles/Resources/Soul.png differ diff --git a/TheOtherRoles/Resources/SoundEffects/toraudio b/TheOtherRoles/Resources/SoundEffects/toraudio new file mode 100644 index 0000000..b3fb5d0 Binary files /dev/null and b/TheOtherRoles/Resources/SoundEffects/toraudio differ diff --git a/TheOtherRoles/Resources/SpeedboostButton.png b/TheOtherRoles/Resources/SpeedboostButton.png index 004f4ff..e90dcdb 100644 Binary files a/TheOtherRoles/Resources/SpeedboostButton.png and b/TheOtherRoles/Resources/SpeedboostButton.png differ diff --git a/TheOtherRoles/Resources/SpellButton.png b/TheOtherRoles/Resources/SpellButton.png index dc878f8..fef9072 100644 Binary files a/TheOtherRoles/Resources/SpellButton.png and b/TheOtherRoles/Resources/SpellButton.png differ diff --git a/TheOtherRoles/Resources/SpellButtonMeeting.png b/TheOtherRoles/Resources/SpellButtonMeeting.png index 30c5482..60c0384 100644 Binary files a/TheOtherRoles/Resources/SpellButtonMeeting.png and b/TheOtherRoles/Resources/SpellButtonMeeting.png differ diff --git a/TheOtherRoles/Resources/StaticVentSealed.png b/TheOtherRoles/Resources/StaticVentSealed.png index 8b2abad..08084a2 100644 Binary files a/TheOtherRoles/Resources/StaticVentSealed.png and b/TheOtherRoles/Resources/StaticVentSealed.png differ diff --git a/TheOtherRoles/Resources/StopClean.png b/TheOtherRoles/Resources/StopClean.png index d284137..6aaf141 100644 Binary files a/TheOtherRoles/Resources/StopClean.png and b/TheOtherRoles/Resources/StopClean.png differ diff --git a/TheOtherRoles/Resources/SwapperCheck.png b/TheOtherRoles/Resources/SwapperCheck.png index 32ff666..e7aeb4b 100644 Binary files a/TheOtherRoles/Resources/SwapperCheck.png and b/TheOtherRoles/Resources/SwapperCheck.png differ diff --git a/TheOtherRoles/Resources/TabIcon.png b/TheOtherRoles/Resources/TabIcon.png index db404fa..2a90047 100644 Binary files a/TheOtherRoles/Resources/TabIcon.png and b/TheOtherRoles/Resources/TabIcon.png differ diff --git a/TheOtherRoles/Resources/TabIconClassicMode.png b/TheOtherRoles/Resources/TabIconClassicMode.png index 10eb786..aff8993 100644 Binary files a/TheOtherRoles/Resources/TabIconClassicMode.png and b/TheOtherRoles/Resources/TabIconClassicMode.png differ diff --git a/TheOtherRoles/Resources/TabIconCrewmate.png b/TheOtherRoles/Resources/TabIconCrewmate.png index a459ba7..91905b9 100644 Binary files a/TheOtherRoles/Resources/TabIconCrewmate.png and b/TheOtherRoles/Resources/TabIconCrewmate.png differ diff --git a/TheOtherRoles/Resources/TabIconGuesserMode.png b/TheOtherRoles/Resources/TabIconGuesserMode.png index 85027e2..27d3f88 100644 Binary files a/TheOtherRoles/Resources/TabIconGuesserMode.png and b/TheOtherRoles/Resources/TabIconGuesserMode.png differ diff --git a/TheOtherRoles/Resources/TabIconGuesserSettings.png b/TheOtherRoles/Resources/TabIconGuesserSettings.png index ac04d21..a960496 100644 Binary files a/TheOtherRoles/Resources/TabIconGuesserSettings.png and b/TheOtherRoles/Resources/TabIconGuesserSettings.png differ diff --git a/TheOtherRoles/Resources/TabIconHideNSeekMode.png b/TheOtherRoles/Resources/TabIconHideNSeekMode.png index 69658e4..6f05d06 100644 Binary files a/TheOtherRoles/Resources/TabIconHideNSeekMode.png and b/TheOtherRoles/Resources/TabIconHideNSeekMode.png differ diff --git a/TheOtherRoles/Resources/TabIconHideNSeekRoles.png b/TheOtherRoles/Resources/TabIconHideNSeekRoles.png index da0cf99..5629579 100644 Binary files a/TheOtherRoles/Resources/TabIconHideNSeekRoles.png and b/TheOtherRoles/Resources/TabIconHideNSeekRoles.png differ diff --git a/TheOtherRoles/Resources/TabIconHideNSeekSettings.png b/TheOtherRoles/Resources/TabIconHideNSeekSettings.png index e6edb12..913b4fd 100644 Binary files a/TheOtherRoles/Resources/TabIconHideNSeekSettings.png and b/TheOtherRoles/Resources/TabIconHideNSeekSettings.png differ diff --git a/TheOtherRoles/Resources/TabIconImpostor.png b/TheOtherRoles/Resources/TabIconImpostor.png index 073c196..32ed13a 100644 Binary files a/TheOtherRoles/Resources/TabIconImpostor.png and b/TheOtherRoles/Resources/TabIconImpostor.png differ diff --git a/TheOtherRoles/Resources/TabIconModifier.png b/TheOtherRoles/Resources/TabIconModifier.png index a564d30..1119bfc 100644 Binary files a/TheOtherRoles/Resources/TabIconModifier.png and b/TheOtherRoles/Resources/TabIconModifier.png differ diff --git a/TheOtherRoles/Resources/TabIconNeutral.png b/TheOtherRoles/Resources/TabIconNeutral.png index f747816..b95f74f 100644 Binary files a/TheOtherRoles/Resources/TabIconNeutral.png and b/TheOtherRoles/Resources/TabIconNeutral.png differ diff --git a/TheOtherRoles/Resources/TabIconPropHuntSettings.png b/TheOtherRoles/Resources/TabIconPropHuntSettings.png index 357b496..9a08b3c 100644 Binary files a/TheOtherRoles/Resources/TabIconPropHuntSettings.png and b/TheOtherRoles/Resources/TabIconPropHuntSettings.png differ diff --git a/TheOtherRoles/Resources/TargetIcon.png b/TheOtherRoles/Resources/TargetIcon.png index 760ca78..625aa13 100644 Binary files a/TheOtherRoles/Resources/TargetIcon.png and b/TheOtherRoles/Resources/TargetIcon.png differ diff --git a/TheOtherRoles/Resources/TimeShieldButton.png b/TheOtherRoles/Resources/TimeShieldButton.png index 1a3f896..05a2d2b 100644 Binary files a/TheOtherRoles/Resources/TimeShieldButton.png and b/TheOtherRoles/Resources/TimeShieldButton.png differ diff --git a/TheOtherRoles/Resources/TrackerButton.png b/TheOtherRoles/Resources/TrackerButton.png index 2cd82d5..1f38153 100644 Binary files a/TheOtherRoles/Resources/TrackerButton.png and b/TheOtherRoles/Resources/TrackerButton.png differ diff --git a/TheOtherRoles/Resources/Trapper_Place_Button.png b/TheOtherRoles/Resources/Trapper_Place_Button.png index e2130c8..e6a6267 100644 Binary files a/TheOtherRoles/Resources/Trapper_Place_Button.png and b/TheOtherRoles/Resources/Trapper_Place_Button.png differ diff --git a/TheOtherRoles/Resources/Trapper_Trap_Ingame.png b/TheOtherRoles/Resources/Trapper_Trap_Ingame.png index 2487d09..3cca072 100644 Binary files a/TheOtherRoles/Resources/Trapper_Trap_Ingame.png and b/TheOtherRoles/Resources/Trapper_Trap_Ingame.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0001.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0001.png index 5610019..a5edd0b 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0001.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0001.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0002.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0002.png index bbaf640..5bee0cb 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0002.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0002.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0003.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0003.png index 7da0c9d..4de1f51 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0003.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0003.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0004.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0004.png index d867c1b..951d90f 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0004.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0004.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0005.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0005.png index 7120112..677312e 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0005.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0005.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0006.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0006.png index 407ba40..e6f1161 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0006.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0006.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0007.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0007.png index 869eaa8..d6a7cd6 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0007.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0007.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0008.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0008.png index 02ec17a..fa23e14 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0008.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0008.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0009.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0009.png index 32bcba5..2f0565b 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0009.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0009.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0010.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0010.png index 775ffc9..2526774 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0010.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0010.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0011.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0011.png index dfd103d..c01ddcb 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0011.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0011.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0012.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0012.png index b039043..1da83a1 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0012.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0012.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0013.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0013.png index 1f882c1..0be898e 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0013.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0013.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0014.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0014.png index 0609185..4401440 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0014.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0014.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0015.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0015.png index 6851b82..a0b16ea 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0015.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0015.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0016.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0016.png index f35e5f0..668b522 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0016.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0016.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0017.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0017.png index 7d967b3..ef5bd07 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0017.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0017.png differ diff --git a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0018.png b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0018.png index 61785a8..e9bf43d 100644 Binary files a/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0018.png and b/TheOtherRoles/Resources/TricksterAnimation/trickster_box_0018.png differ diff --git a/TheOtherRoles/Resources/TricksterVentButton.png b/TheOtherRoles/Resources/TricksterVentButton.png index f23870a..d32f68c 100644 Binary files a/TheOtherRoles/Resources/TricksterVentButton.png and b/TheOtherRoles/Resources/TricksterVentButton.png differ diff --git a/TheOtherRoles/Resources/UnStuck.png b/TheOtherRoles/Resources/UnStuck.png index 028930e..729ce51 100644 Binary files a/TheOtherRoles/Resources/UnStuck.png and b/TheOtherRoles/Resources/UnStuck.png differ diff --git a/TheOtherRoles/Resources/UsePortalButton.png b/TheOtherRoles/Resources/UsePortalButton.png index 8ec3316..ba7ef96 100644 Binary files a/TheOtherRoles/Resources/UsePortalButton.png and b/TheOtherRoles/Resources/UsePortalButton.png differ diff --git a/TheOtherRoles/Resources/VampireButton.png b/TheOtherRoles/Resources/VampireButton.png index f2a2822..a0ff115 100644 Binary files a/TheOtherRoles/Resources/VampireButton.png and b/TheOtherRoles/Resources/VampireButton.png differ diff --git a/TheOtherRoles/Resources/Vent.png b/TheOtherRoles/Resources/Vent.png index 29fa8f4..46af2bf 100644 Binary files a/TheOtherRoles/Resources/Vent.png and b/TheOtherRoles/Resources/Vent.png differ diff --git a/TheOtherRoles/Resources/VultureButton.png b/TheOtherRoles/Resources/VultureButton.png index 42e8e2d..eb6003c 100644 Binary files a/TheOtherRoles/Resources/VultureButton.png and b/TheOtherRoles/Resources/VultureButton.png differ diff --git a/TheOtherRoles/Resources/YoyoBlinkButtonSprite.png b/TheOtherRoles/Resources/YoyoBlinkButtonSprite.png index cb8de34..5279e23 100644 Binary files a/TheOtherRoles/Resources/YoyoBlinkButtonSprite.png and b/TheOtherRoles/Resources/YoyoBlinkButtonSprite.png differ diff --git a/TheOtherRoles/Resources/YoyoMarkButtonSprite.png b/TheOtherRoles/Resources/YoyoMarkButtonSprite.png index a8c40c9..7de3f44 100644 Binary files a/TheOtherRoles/Resources/YoyoMarkButtonSprite.png and b/TheOtherRoles/Resources/YoyoMarkButtonSprite.png differ diff --git a/TheOtherRoles/Resources/bannerTheHorseRoles.png b/TheOtherRoles/Resources/bannerTheHorseRoles.png index 3ff904a..b5f5c03 100644 Binary files a/TheOtherRoles/Resources/bannerTheHorseRoles.png and b/TheOtherRoles/Resources/bannerTheHorseRoles.png differ diff --git a/TheOtherRoles/RoleInfo.cs b/TheOtherRoles/RoleInfo.cs index 9fcccd5..9ed2a45 100644 --- a/TheOtherRoles/RoleInfo.cs +++ b/TheOtherRoles/RoleInfo.cs @@ -1,7 +1,7 @@ using System.Linq; using System; using System.Collections.Generic; -using TheOtherRoles.Players; + using static TheOtherRoles.TheOtherRoles; using UnityEngine; using TheOtherRoles.Utilities; @@ -95,6 +95,7 @@ namespace TheOtherRoles public static RoleInfo vip = new RoleInfo("VIP", Color.yellow, "You are the VIP", "Everyone is notified when you die", RoleId.Vip, false, true); public static RoleInfo invert = new RoleInfo("Invert", Color.yellow, "Your movement is inverted", "Your movement is inverted", RoleId.Invert, false, true); public static RoleInfo chameleon = new RoleInfo("Chameleon", Color.yellow, "You're hard to see when not moving", "You're hard to see when not moving", RoleId.Chameleon, false, true); + public static RoleInfo armored = new RoleInfo("Armored", Color.yellow, "You are protected from one murder attempt", "You are protected from one murder attempt", RoleId.Armored, false, true); public static RoleInfo shifter = new RoleInfo("Shifter", Color.yellow, "Shift your role", "Shift your role", RoleId.Shifter, false, true); @@ -155,6 +156,7 @@ namespace TheOtherRoles vip, invert, chameleon, + armored, shifter }; @@ -178,6 +180,7 @@ namespace TheOtherRoles if (p == Mini.mini) infos.Add(mini); if (Invert.invert.Any(x => x.PlayerId == p.PlayerId)) infos.Add(invert); if (Chameleon.chameleon.Any(x => x.PlayerId == p.PlayerId)) infos.Add(chameleon); + if (p == Armored.armored) infos.Add(armored); if (p == Shifter.shifter) infos.Add(shifter); } @@ -243,14 +246,21 @@ namespace TheOtherRoles public static String GetRolesString(PlayerControl p, bool useColors, bool showModifier = true, bool suppressGhostInfo = false) { string roleName; roleName = String.Join(" ", getRoleInfoForPlayer(p, showModifier).Select(x => useColors ? Helpers.cs(x.color, x.name) : x.name).ToArray()); - if (Lawyer.target != null && p.PlayerId == Lawyer.target.PlayerId && CachedPlayer.LocalPlayer.PlayerControl != Lawyer.target) + if (Lawyer.target != null && p.PlayerId == Lawyer.target.PlayerId && PlayerControl.LocalPlayer != Lawyer.target) roleName += (useColors ? Helpers.cs(Pursuer.color, " §") : " §"); - if (HandleGuesser.isGuesserGm && HandleGuesser.isGuesser(p.PlayerId)) roleName += " (Guesser)"; + if (HandleGuesser.isGuesserGm && HandleGuesser.isGuesser(p.PlayerId)) { + int remainingShots = HandleGuesser.remainingShots(p.PlayerId); + var (playerCompleted, playerTotal) = TasksHandler.taskInfo(p.Data); + if (!Helpers.isEvil(p) && playerCompleted < HandleGuesser.tasksToUnlock || remainingShots == 0) + roleName += Helpers.cs(Color.gray, " (Guesser)"); + else + roleName += Helpers.cs(Color.white," (Guesser)"); + } if (!suppressGhostInfo && p != null) { - if (p == Shifter.shifter && (CachedPlayer.LocalPlayer.PlayerControl == Shifter.shifter || Helpers.shouldShowGhostInfo()) && Shifter.futureShift != null) + if (p == Shifter.shifter && (PlayerControl.LocalPlayer == Shifter.shifter || Helpers.shouldShowGhostInfo()) && Shifter.futureShift != null) roleName += Helpers.cs(Color.yellow, " ← " + Shifter.futureShift.Data.PlayerName); - if (p == Vulture.vulture && (CachedPlayer.LocalPlayer.PlayerControl == Vulture.vulture || Helpers.shouldShowGhostInfo())) + if (p == Vulture.vulture && (PlayerControl.LocalPlayer == Vulture.vulture || Helpers.shouldShowGhostInfo())) roleName = roleName + Helpers.cs(Vulture.color, $" ({Vulture.vultureNumberToWin - Vulture.eatenBodies} left)"); if (Helpers.shouldShowGhostInfo()) { if (Eraser.futureErased.Contains(p)) @@ -274,7 +284,7 @@ namespace TheOtherRoles if (Arsonist.dousedPlayers.Contains(p)) roleName = Helpers.cs(Arsonist.color, "♨ ") + roleName; if (p == Arsonist.arsonist) - roleName = roleName + Helpers.cs(Arsonist.color, $" ({CachedPlayer.AllPlayers.Count(x => { return x.PlayerControl != Arsonist.arsonist && !x.Data.IsDead && !x.Data.Disconnected && !Arsonist.dousedPlayers.Any(y => y.PlayerId == x.PlayerId); })} left)"); + roleName = roleName + Helpers.cs(Arsonist.color, $" ({PlayerControl.AllPlayerControls.ToArray().Count(x => { return x != Arsonist.arsonist && !x.Data.IsDead && !x.Data.Disconnected && !Arsonist.dousedPlayers.Any(y => y.PlayerId == x.PlayerId); })} left)"); if (p == Jackal.fakeSidekick) roleName = Helpers.cs(Sidekick.color, $" (fake SK)") + roleName; diff --git a/TheOtherRoles/SoundEffectsManager.cs b/TheOtherRoles/SoundEffectsManager.cs index 006693f..8061cca 100644 --- a/TheOtherRoles/SoundEffectsManager.cs +++ b/TheOtherRoles/SoundEffectsManager.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Text; using UnityEngine; using System.Linq; +using Reactor.Utilities.Extensions; namespace TheOtherRoles { @@ -20,19 +21,30 @@ namespace TheOtherRoles soundEffects = new Dictionary(); Assembly assembly = Assembly.GetExecutingAssembly(); string[] resourceNames = assembly.GetManifestResourceNames(); + + /* Old way of loading .raw files. Left here for reference -Gendelo foreach (string resourceName in resourceNames) { - if (resourceName.Contains("TheOtherRoles.Resources.SoundEffects.") && resourceName.Contains(".raw")) + if (resourceName.Contains("TheOtherRoles.Resources.SoundEffects.") && (resourceName.Contains(".raw") || resourceName.Contains(".ogg"))) { soundEffects.Add(resourceName, Helpers.loadAudioClipFromResources(resourceName)); } + }*/ + + var resourceBundle = assembly.GetManifestResourceStream("TheOtherRoles.Resources.SoundEffects.toraudio"); + var assetBundle = AssetBundle.LoadFromMemory(resourceBundle.ReadFully()); + foreach (var f in assetBundle.GetAllAssetNames()) { + soundEffects.Add(f, assetBundle.LoadAsset(f).DontUnload()); } + assetBundle.Unload(false); + } public static AudioClip get(string path) { // Convenience: As as SoundEffects are stored in the same folder, allow using just the name as well - if (!path.Contains(".")) path = "TheOtherRoles.Resources.SoundEffects." + path + ".raw"; + //if (!path.Contains(".")) path = "TheOtherRoles.Resources.SoundEffects." + path + ".raw"; + path = "assets/audio/" + path.ToLower() + ".ogg"; AudioClip returnValue; return soundEffects.TryGetValue(path, out returnValue) ? returnValue : null; } @@ -60,7 +72,7 @@ namespace TheOtherRoles source.Stop(); } float distance, volume; - distance = Vector2.Distance(position, Players.CachedPlayer.LocalPlayer.PlayerControl.GetTruePosition()); + distance = Vector2.Distance(position, PlayerControl.LocalPlayer.GetTruePosition()); if (distance < range) volume = (1f - distance / range); else diff --git a/TheOtherRoles/SubmergedCompatibility.cs b/TheOtherRoles/SubmergedCompatibility.cs index fbfa491..1fe6782 100644 --- a/TheOtherRoles/SubmergedCompatibility.cs +++ b/TheOtherRoles/SubmergedCompatibility.cs @@ -6,7 +6,7 @@ using BepInEx; using BepInEx.Unity.IL2CPP; using HarmonyLib; using TheOtherRoles.Patches; -using TheOtherRoles.Players; + using UnityEngine; using Object = UnityEngine.Object; @@ -155,7 +155,7 @@ namespace TheOtherRoles public static void ChangeFloor(bool toUpper) { if (!Loaded) return; - MonoBehaviour _floorHandler = ((Component)GetFloorHandlerMethod.Invoke(null, new object[] { CachedPlayer.LocalPlayer.PlayerControl })).TryCast(FloorHandlerType) as MonoBehaviour; + MonoBehaviour _floorHandler = ((Component)GetFloorHandlerMethod.Invoke(null, new object[] { PlayerControl.LocalPlayer })).TryCast(FloorHandlerType) as MonoBehaviour; RpcRequestChangeFloorMethod.Invoke(_floorHandler, new object[] { toUpper }); } @@ -168,7 +168,7 @@ namespace TheOtherRoles if (!Loaded) return; try { ShipStatus.Instance.RpcRepairSystem((SystemTypes)130, 64); - RepairDamageMethod.Invoke(SubmarineOxygenSystemInstanceField.Invoke(null, Array.Empty()), new object[] { CachedPlayer.LocalPlayer.PlayerControl, 64 }); + RepairDamageMethod.Invoke(SubmarineOxygenSystemInstanceField.Invoke(null, Array.Empty()), new object[] { PlayerControl.LocalPlayer, 64 }); } catch (System.NullReferenceException) { TheOtherRolesPlugin.Logger.LogMessage("null reference in engineer oxygen fix"); diff --git a/TheOtherRoles/TasksHandler.cs b/TheOtherRoles/TasksHandler.cs index 8ce050a..1eda7de 100644 --- a/TheOtherRoles/TasksHandler.cs +++ b/TheOtherRoles/TasksHandler.cs @@ -9,7 +9,7 @@ namespace TheOtherRoles { public static Tuple taskInfo(NetworkedPlayerInfo playerInfo) { int TotalTasks = 0; int CompletedTasks = 0; - if (!playerInfo.Disconnected && playerInfo.Tasks != null && + if (playerInfo != null && !playerInfo.Disconnected && playerInfo.Tasks != null && playerInfo.Object && playerInfo.Role && playerInfo.Role.TasksCountTowardProgress && !playerInfo.Object.hasFakeTasks() && !playerInfo.Role.IsImpostor diff --git a/TheOtherRoles/TheOtherRoles.cs b/TheOtherRoles/TheOtherRoles.cs index 63aa6be..ee52ab3 100644 --- a/TheOtherRoles/TheOtherRoles.cs +++ b/TheOtherRoles/TheOtherRoles.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; using UnityEngine; using TheOtherRoles.Objects; -using TheOtherRoles.Players; + using TheOtherRoles.Utilities; using TheOtherRoles.CustomGameModes; using static TheOtherRoles.TheOtherRoles; @@ -74,6 +74,7 @@ namespace TheOtherRoles Vip.clearAndReload(); Invert.clearAndReload(); Chameleon.clearAndReload(); + Armored.clearAndReload(); // Gamemodes HandleGuesser.clearAndReload(); @@ -318,11 +319,11 @@ namespace TheOtherRoles public static void setHandcuffedKnows(bool active = true, byte playerId = Byte.MaxValue) { if (playerId == Byte.MaxValue) - playerId = CachedPlayer.LocalPlayer.PlayerId; + playerId = PlayerControl.LocalPlayer.PlayerId; - if (active && playerId == CachedPlayer.LocalPlayer.PlayerId) { - MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); - writer.Write(CachedPlayer.LocalPlayer.PlayerId); + if (active && playerId == PlayerControl.LocalPlayer.PlayerId) { + MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareGhostInfo, Hazel.SendOption.Reliable, -1); + writer.Write(PlayerControl.LocalPlayer.PlayerId); writer.Write((byte)RPCProcedure.GhostInfoTypes.HandcuffNoticed); AmongUsClient.Instance.FinishRpcImmediately(writer); } @@ -332,7 +333,7 @@ namespace TheOtherRoles handcuffedPlayers.RemoveAll(x => x == playerId); } - if (playerId == CachedPlayer.LocalPlayer.PlayerId) { + if (playerId == PlayerControl.LocalPlayer.PlayerId) { HudManagerStartPatch.setAllButtonsHandcuffedStatus(active); SoundEffectsManager.play("deputyHandcuff"); } @@ -454,10 +455,10 @@ namespace TheOtherRoles bool isMorphedMorphling = target == Morphling.morphling && Morphling.morphTarget != null && Morphling.morphTimer > 0f; if (Medic.shielded != null && ((target == Medic.shielded && !isMorphedMorphling) || (isMorphedMorphling && Morphling.morphTarget == Medic.shielded))) { hasVisibleShield = Medic.showShielded == 0 || Helpers.shouldShowGhostInfo() // Everyone or Ghost info - || (Medic.showShielded == 1 && (CachedPlayer.LocalPlayer.PlayerControl == Medic.shielded || CachedPlayer.LocalPlayer.PlayerControl == Medic.medic)) // Shielded + Medic - || (Medic.showShielded == 2 && CachedPlayer.LocalPlayer.PlayerControl == Medic.medic); // Medic only + || (Medic.showShielded == 1 && (PlayerControl.LocalPlayer == Medic.shielded || PlayerControl.LocalPlayer == Medic.medic)) // Shielded + Medic + || (Medic.showShielded == 2 && PlayerControl.LocalPlayer == Medic.medic); // Medic only // Make shield invisible till after the next meeting if the option is set (the medic can already see the shield) - hasVisibleShield = hasVisibleShield && (Medic.meetingAfterShielding || !Medic.showShieldAfterMeeting || CachedPlayer.LocalPlayer.PlayerControl == Medic.medic || Helpers.shouldShowGhostInfo()); + hasVisibleShield = hasVisibleShield && (Medic.meetingAfterShielding || !Medic.showShieldAfterMeeting || PlayerControl.LocalPlayer == Medic.medic || Helpers.shouldShowGhostInfo()); } return hasVisibleShield; } @@ -651,7 +652,7 @@ namespace TheOtherRoles public static void resetCamouflage() { camouflageTimer = 0f; - foreach (PlayerControl p in CachedPlayer.AllPlayers) { + foreach (PlayerControl p in PlayerControl.AllPlayerControls) { if (p == Ninja.ninja && Ninja.isInvisble) continue; p.setDefaultLook(); @@ -1250,7 +1251,7 @@ namespace TheOtherRoles } public static bool dousedEveryoneAlive() { - return CachedPlayer.AllPlayers.All(x => { return x.PlayerControl == Arsonist.arsonist || x.Data.IsDead || x.Data.Disconnected || Arsonist.dousedPlayers.Any(y => y.PlayerId == x.PlayerId); }); + return PlayerControl.AllPlayerControls.ToArray().All(x => { return x == Arsonist.arsonist || x.Data.IsDead || x.Data.Disconnected || Arsonist.dousedPlayers.Any(y => y.PlayerId == x.PlayerId); }); } public static void clearAndReload() { @@ -1435,17 +1436,17 @@ namespace TheOtherRoles chanceAdditionalInfo = CustomOptionHolder.mediumChanceAdditionalInfo.getSelection() / 10f; } - public static string getInfo(PlayerControl target, PlayerControl killer) { + public static string getInfo(PlayerControl target, PlayerControl killer, DeadPlayer.CustomDeathReason deathReason) { string msg = ""; List infos = new List(); // collect fitting death info types. // suicides: if (killer == target) { - if (target == Sheriff.sheriff || target == Sheriff.formerSheriff) infos.Add(SpecialMediumInfo.SheriffSuicide); + if ((target == Sheriff.sheriff || target == Sheriff.formerSheriff) && deathReason != DeadPlayer.CustomDeathReason.LoverSuicide) infos.Add(SpecialMediumInfo.SheriffSuicide); if (target == Lovers.lover1 || target == Lovers.lover2) infos.Add(SpecialMediumInfo.PassiveLoverSuicide); - if (target == Thief.thief) infos.Add(SpecialMediumInfo.ThiefSuicide); - if (target == Warlock.warlock) infos.Add(SpecialMediumInfo.WarlockSuicide); + if (target == Thief.thief && deathReason != DeadPlayer.CustomDeathReason.LoverSuicide) infos.Add(SpecialMediumInfo.ThiefSuicide); + if (target == Warlock.warlock && deathReason != DeadPlayer.CustomDeathReason.LoverSuicide) infos.Add(SpecialMediumInfo.WarlockSuicide); } else { if (target == Lovers.lover1 || target == Lovers.lover2) infos.Add(SpecialMediumInfo.ActiveLoverDies); if (target.Data.Role.IsImpostor && killer.Data.Role.IsImpostor && Thief.formerThief != killer) infos.Add(SpecialMediumInfo.ImpostorTeamkill); @@ -1891,8 +1892,8 @@ namespace TheOtherRoles public static void setPosition() { if (position == Vector3.zero) return; // Check if this has been set, otherwise first spawn on submerged will fail - if (antiTeleport.FindAll(x => x.PlayerId == CachedPlayer.LocalPlayer.PlayerId).Count > 0) { - CachedPlayer.LocalPlayer.NetTransform.RpcSnapTo(position); + if (antiTeleport.FindAll(x => x.PlayerId == PlayerControl.LocalPlayer.PlayerId).Count > 0) { + PlayerControl.LocalPlayer.NetTransform.RpcSnapTo(position); if (SubmergedCompatibility.IsSubmerged) { SubmergedCompatibility.ChangeFloor(position.y > -7); } @@ -2034,6 +2035,17 @@ namespace TheOtherRoles } } + public static class Armored { + public static PlayerControl armored; + + public static bool isBrokenArmor = false; + + public static void clearAndReload() { + armored = null; + isBrokenArmor = false; + } + } + public static class Shifter { public static PlayerControl shifter; diff --git a/TheOtherRoles/TheOtherRoles.csproj b/TheOtherRoles/TheOtherRoles.csproj index 500b874..4d0f4ab 100644 --- a/TheOtherRoles/TheOtherRoles.csproj +++ b/TheOtherRoles/TheOtherRoles.csproj @@ -1,7 +1,7 @@  net6.0 - 4.6.0 + 4.7.0 TheOtherRoles Eisbison latest @@ -17,12 +17,16 @@ - + - - + + + + + + diff --git a/TheOtherRoles/Utilities/EventUtility.cs b/TheOtherRoles/Utilities/EventUtility.cs index a7c7a1c..ea9a9ee 100644 --- a/TheOtherRoles/Utilities/EventUtility.cs +++ b/TheOtherRoles/Utilities/EventUtility.cs @@ -4,7 +4,7 @@ using System.Text; using UnityEngine; using TheOtherRoles; using TheOtherRoles.Patches; -using TheOtherRoles.Players; + using static TheOtherRoles.TheOtherRoles; using System.Linq; using InnerNet; diff --git a/TheOtherRoles/Utilities/HandleGuesser.cs b/TheOtherRoles/Utilities/HandleGuesser.cs index 2b81e08..d9637f1 100644 --- a/TheOtherRoles/Utilities/HandleGuesser.cs +++ b/TheOtherRoles/Utilities/HandleGuesser.cs @@ -12,6 +12,7 @@ namespace TheOtherRoles.Utilities { public static bool killsThroughShield = true; public static bool evilGuesserCanGuessSpy = true; public static bool guesserCantGuessSnitch = false; + public static int tasksToUnlock = Mathf.RoundToInt(CustomOptionHolder.guesserGamemodeCrewGuesserNumberOfTasks.getFloat()); public static Sprite getTargetSprite() { if (targetSprite) return targetSprite; @@ -43,6 +44,7 @@ namespace TheOtherRoles.Utilities { hasMultipleShotsPerMeeting = CustomOptionHolder.guesserGamemodeHasMultipleShotsPerMeeting.getBool(); killsThroughShield = CustomOptionHolder.guesserGamemodeKillsThroughShield.getBool(); evilGuesserCanGuessSpy = CustomOptionHolder.guesserGamemodeEvilCanKillSpy.getBool(); + tasksToUnlock = Mathf.RoundToInt(CustomOptionHolder.guesserGamemodeCrewGuesserNumberOfTasks.getFloat()); } else { guesserCantGuessSnitch = CustomOptionHolder.guesserCantGuessSnitchIfTaksDone.getBool(); hasMultipleShotsPerMeeting = CustomOptionHolder.guesserHasMultipleShotsPerMeeting.getBool(); diff --git a/TheOtherRoles/packages.lock.json b/TheOtherRoles/packages.lock.json index e83bd99..3f34044 100644 --- a/TheOtherRoles/packages.lock.json +++ b/TheOtherRoles/packages.lock.json @@ -4,9 +4,9 @@ "net6.0": { "AmongUs.GameLibs.Steam": { "type": "Direct", - "requested": "[2024.6.18, )", - "resolved": "2024.6.18", - "contentHash": "xb+HP1xXn4/ES8AgXpk9xeoW568LFYw5NTjY6bHwd6vQjHDf2kT1xHMmQ1me5Vfee/Gp69YIMZDXUAUToG7Elg==" + "requested": "[2024.10.29, )", + "resolved": "2024.10.29", + "contentHash": "znuLMD9DRMTp7RMfIz3hts5KUljioPZ1TiuodgyFrH3mDEcOLZtn1sA08AU9pUzsgQA9hzikrrzP+sJIsPqZ9g==" }, "BepInEx.IL2CPP.MSBuild": { "type": "Direct", @@ -16,14 +16,14 @@ }, "BepInEx.Unity.IL2CPP": { "type": "Direct", - "requested": "[6.0.0-be.692, )", - "resolved": "6.0.0-be.692", - "contentHash": "rYjnJCN2APD/04dZUKhRCbu30jhzseIKd0+pfaWWgfDJNggd8rq+whEzM/ZC0fEkkLgcIkEgbtX2LuSqsCrIgg==", - "dependencies": { - "BepInEx.Core": "6.0.0-be.692", - "BepInEx.Unity.Common": "6.0.0-be.692", - "HarmonyX": "2.10.1", - "Iced": "1.20.0", + "requested": "[6.0.0-be.697, )", + "resolved": "6.0.0-be.697", + "contentHash": "+ahFT8WkKZ8m9NCdXgQI05M34/mdE1MXmLnLRKhqpjId6mqDQf9ORJ1bCPifdkbgYJjteIvey9EreCfmD9Vndw==", + "dependencies": { + "BepInEx.Core": "6.0.0-be.697", + "BepInEx.Unity.Common": "6.0.0-be.697", + "HarmonyX": "2.10.2", + "Iced": "1.21.0", "Il2CppInterop.Generator": "1.4.6-ci.426", "Il2CppInterop.HarmonySupport": "1.4.6-ci.426", "Il2CppInterop.Runtime": "1.4.6-ci.426", @@ -33,11 +33,11 @@ }, "Reactor": { "type": "Direct", - "requested": "[2.2.0, )", - "resolved": "2.2.0", - "contentHash": "foMHya01tmr//3tw+kO7FmY1ojnR0m+ShMU6sxogbnWeO85lmX3QM8aSIsYeAhtJSThf6Ben6iTM4O0KgVcmqw==", + "requested": "[2.3.1, )", + "resolved": "2.3.1", + "contentHash": "CsFs84aM3PA6+74TzHEAUayXOosYBJEJKf1Ebs3CpL10RMLrj+WRAWrpgFoNd9qS+pIzQflW76Q5Pgg/aOQ40w==", "dependencies": { - "BepInEx.Unity.IL2CPP": "6.0.0-be.670" + "BepInEx.Unity.IL2CPP": "6.0.0-be.679" } }, "AsmResolver": { @@ -85,25 +85,25 @@ }, "AssetRipper.Primitives": { "type": "Transitive", - "resolved": "3.1.1", - "contentHash": "GhFAVMWpG8MyZscQxwYCd1HSS36UhIQeW0Gn9iPYiininZWlo8RTV9tGYv0CNNXw5bODYJtXf4qiqo6sQOVAEg==" + "resolved": "3.1.3", + "contentHash": "djZbN/+EXmI+Oia9Pm0LyjZVCPLf60TPSL5rGb7mBEYM5F4CN3nPFXvl2yA5LanPZoHS1Yq7PghGUmkP7Pv9RQ==" }, "BepInEx.Core": { "type": "Transitive", - "resolved": "6.0.0-be.692", - "contentHash": "I/JuhVhOXUFRrSxy7MqMHpygKoYNt39XY5V8e7PTLbq+nfCBGYzOhszcPx90Wj5xGPx6IFuABJocWAbFDHUddA==", + "resolved": "6.0.0-be.697", + "contentHash": "6p/zLtBja8BEA5+FwFwH1lUg8avO725mZKRw0P1JbuXj/XUZL8Qy5n0c7COiq/dJ58nCyW5J/ldeYUHM0c4vRA==", "dependencies": { - "HarmonyX": "2.10.1", + "HarmonyX": "2.10.2", "MonoMod.Utils": "22.5.1.1", "SemanticVersioning": "2.0.2" } }, "BepInEx.Unity.Common": { "type": "Transitive", - "resolved": "6.0.0-be.692", - "contentHash": "QYsp8Sf4kQwmx4qwFLhS7SW+Dp67iBibb0zo5IdMQXGmS0KY2WH7/SZ+fFmG6ce06BT+E58wsxk0rU6NW0qWbg==", + "resolved": "6.0.0-be.697", + "contentHash": "6eTjN4vBy7veWUwCVWqfvL05fQ4MskpjD4wIsD0FF8g0kF/1lKjsK0Fmyb4N78vSrvm/tV1quhHChCh2SQU0GQ==", "dependencies": { - "AssetRipper.Primitives": "3.1.1", + "AssetRipper.Primitives": "3.1.3", "MonoMod.Utils": "22.5.1.1" } }, @@ -114,8 +114,8 @@ }, "HarmonyX": { "type": "Transitive", - "resolved": "2.10.1", - "contentHash": "9LodMC9Y0u1TW96eKJoWrFJFpmzbgojEO38/Q+e7c1mFPhmHt8xcR8qhI06iF1rf0Dnsk+hqENFVSgbtwl/bEw==", + "resolved": "2.10.2", + "contentHash": "/5WwkxXX8mPsRuigQt957rJGx1f0dDQxk+bvk4yYITKFjXas9Em+O71zEP8X0ym8OFQQ2XH/2SxS4NC7vEC+Xg==", "dependencies": { "MonoMod.RuntimeDetour": "22.3.23.4", "System.Reflection.Emit": "4.7.0" @@ -123,8 +123,8 @@ }, "Iced": { "type": "Transitive", - "resolved": "1.20.0", - "contentHash": "cjk+vNDIatLI5vQ22tOCAzsgowZ32Ob1Fy4ljQSfqfzMe5ATKXU+dMPRE6+cIUUFetoyyWkUJArJoxe3QwDXAA==" + "resolved": "1.21.0", + "contentHash": "dv5+81Q1TBQvVMSOOOmRcjJmvWcX3BZPZsIq31+RLc5cNft0IHAyNlkdb7ZarOWG913PyBoFDsDXoCIlKmLclg==" }, "Il2CppInterop.Common": { "type": "Transitive",