\r
# The Other Roles\r
\r
-The **The Other Roles**, is a mod for Amongs Us which currently adds 25 additional roles and new [Settings](#settings) to the game.\r
+The **The Other Roles**, is a mod for Amongs Us which adds manny new roles, new [Settings](#settings) and support for [10+ Player Lobbies](#Custom-Servers-and-10+-Players) to the game.\r
Even more roles are coming soon :)\r
\r
- [Mafia](#mafia)\r
- [Camouflager](#camouflager)\r
- [Vampire](#vampire)\r
- [Eraser](#eraser)\r
+- [Trickster](#trickster)\r
- [Lovers](#lovers)\r
- Lover\r
- ImpLover\r
# Releases\r
| Among Us - Version| Mod Version | Link |\r
|----------|-------------|-----------------|\r
+| 2021.4.12s| v2.2.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.2.0/TheOtherRoles.zip)\r
| 2021.3.31.3s| v2.1.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.1.0/TheOtherRoles.zip)\r
| 2021.3.31.3s| v2.0.1 beta| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.0.1/TheOtherRoles.zip)\r
| 2021.3.31.3s | v2.0.0 beta | [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.0.0/TheOtherRoles.zip)\r
<details>\r
<summary>Click to show the Changelog</summary>\r
\r
+**Version 2.2.0**\r
+- **Works with the latest Among Us version (2021.4.12s)**\r
+- **Added support for 10+ player lobbies on custom servers:** Check the [Custom Servers and 10+ Players](#Custom-Servers-and-10+-Players) section. During meetings use the up/down keys, on vitals use the left/right keys.\r
+- **Added a new Impostor role: The Trickster** check the [Trickster](#trickster) section for more infos\r
+- You can now set how long the Time Master shield lasts\r
+- The host now sees for how long the lobby will remain open\r
+- We changed the look/layout of the settings\r
+- Added a new option that deactivates skipping in meetings (if the player does not vote, he votes himself)\r
+- You can now choose whether the Eraser is able to erase the Spy/Impostors or not\r
+- Fixed a bug where a Lovers win wasn't displayed properly\r
+- Fixed the Among Us bug where people were unable to move after meetings\r
+- We added a version checking system: The host can only start the game if everyone in his lobby has the same version of the mod installed (he will see, who is using a wrong version). This prevents hacking in public lobbies and bugs because of version missmatches.\r
+- Fixed a bug where the Child Impostor had the same cooldowns as normal Impostors\r
+- Fixed a bug where the Vampire/Janitor/Mafioso would lose their kill button after being erased\r
+- The Child is now able to use ladders and it can do all the tasks right away\r
+\r
**Version 2.1.0**\r
- **New Role:** [Spy](#spy)\r
- **Eraser:** The Eraser can now also remove the role of other Impostors. This enables him to reveal the Spy, but might result in removing the special ability of his partner.\r
If you have problems with the AmongUsModUpdater, make sure To [contact us](https://discord.gg/csa3pHYdPU).\r
\r
## Windows Manual Installation\r
-1. Download and unzip the newest [release](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.1.0/TheOtherRoles.zip)\r
+1. Download and unzip the newest [release](https://github.com/Eisbison/TheOtherRoles/releases/latest)\r
2. Find the folder of your game, for steams players you can right click in steam, on the game, a menu will appear proposing you to go to the folders.\r
3. Make a copy of your game, it's not obligatory but advise, put it where you want.\r
4. Drag or extract the files from the zip into your game, at the .exe level.\r
\r
**Linux Manual**\r
1. Install Among Us via steam\r
-2. Download newest [release](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.1.0/TheOtherRoles.zip) and extract it to ~/.steam/steam/steamapps/common/Among Us\r
+2. Download newest [release](https://github.com/Eisbison/TheOtherRoles/releases/latest) and extract it to ~/.steam/steam/steamapps/common/Among Us\r
3. Enable winhttp.dll via the proton winecfg (https://bepinex.github.io/bepinex_docs/master/articles/advanced/steam_interop.html#protonwine)\r
4. Launch the game via Steam\r
\r
-# Custom Servers\r
-We recommend you to play on custom servers rather than on the official ones. A guide on how to set up a server will be added soon. In order to make your client able to connect to a custom server we recommend using [Unify](https://github.com/moltenmods/unify). Just add\r
-the *.dll* file into your Among Us/BepInEx/plugins folder and you're good to go.\r
+# Custom Servers and 10+ Players\r
+We always recommend you to play on custom servers rather than on the official ones. If you want to play with more than 10 players in one lobby, you're required to use a custom server. Credits for the original implementation that allowed 10+ player lobbies go to the creaters of the [Crowded-Mod](https://github.com/CrowdedMods/CrowdedMod).\r
+\r
+**Setup the Clients:**\r
+1. Run the game one time after you installed TheOtherRoles to generate the config files\r
+2. Open the Among Us folder (or the folder containing the TheOtherRoles mod), go to the subfolder BepInEx/config/ and replace the *Custom Server IP* and *Custom Server Port* in the **me.eisbison.theotherroles.cfg** with the ones of your server\r
+3. Launch the game and select the region *Custom*\r
+\r
+**Setup the Server:**\r
+1. Get the [Impostor](https://github.com/Impostor/Impostor) release for the Among Us version **2021.3.31 - 2021.4.2**\r
+2. Follow the steps (using the server release you just downloaded) on the official [Impostor-Documentation](https://github.com/Impostor/Impostor/wiki/Running-the-server)\r
+3. Make sure to set the following values to false in the *config.json* file:\r
+```\r
+ ...\r
+ "AntiCheat": {\r
+ "Enabled": false,\r
+ "BanIpFromGame": false\r
+ }\r
+```\r
+4. Make sure to forward the right ports on the hosting machine\r
+5. Run the server and setup the client\r
+\r
+**Setting up Server as Docker Container:** \\r
+If you want to run the server as a docker container you'll need to use the image\r
+```\r
+aeonlucid/impostor:nightly\r
+```\r
+(Currently only the "nightly" tag is starting a server supporting 2021.3.31 or later)\r
+\r
+In addition to running it we need to set the environment variables to disable the AntiCheat feature.\r
+```\r
+IMPOSTOR_AntiCheat__Enabled=false\r
+IMPOSTOR_AntiCheat__BanIpFromGame=false\r
+```\r
+\r
+Example to docker run command:\r
+```\r
+docker run -p 22023:22023/udp --env IMPOSTOR_AntiCheat__Enabled=false --env IMPOSTOR_AntiCheat__BanIpFromGame=false aeonlucid/impostor:nightly\r
+```\r
+\r
+Or use to run it in the background\r
+```\r
+docker run -d -p 22023:22023/udp --env IMPOSTOR_AntiCheat__Enabled=false --env IMPOSTOR_AntiCheat__BanIpFromGame=false aeonlucid/impostor:nightly\r
+```\r
+\r
\r
# Credits & Resources\r
[Reactor](https://github.com/NuclearPowered/Reactor) - The framework used for all version before v2.0.0\\r
[Among-Us-Sheriff-Mod](https://github.com/Woodi-dev/Among-Us-Sheriff-Mod) - Idea for the Sheriff role comes from **Woodi-dev**\\r
[TooManyRolesMods](https://github.com/Hardel-DW/TooManyRolesMods) - Idea for the Detective and Time Master roles comes from **Hardel-DW**. Also some code snippets of the implementation were used.\\r
[TownOfUs](https://github.com/slushiegoose/Town-Of-Us) - Idea for the Swapper, Shifter and a similar Mayor role come from **Slushiegoose**\\r
-[Ottomated](https://twitter.com/ottomated_) - Idea for the Morphling, Snitch and Camouflager role come from **Ottomated**\r
+[Ottomated](https://twitter.com/ottomated_) - Idea for the Morphling, Snitch and Camouflager role come from **Ottomated**\\r
+[Crowded-Mod](https://github.com/CrowdedMods/CrowdedMod) - Our implementation for 10+ player lobbies is inspired by the one from the **Crowded Mod Team**\r
\r
# Settings\r
The mod adds a few new settings to Among Us (in addition to the role settings):\r
-- The number of Impostor count be set inside a lobby\r
-- The map can be changed inside a lobby\r
-- You can set the maximum number of meetings that can be called in total (every player still has personal maximum of buttons, but if the maximum number of meetings is reached you can't use your meetings even if you have some left, Impostor and Jackal meetings also count) \r
-\r
+- **Number of Impostors:** The number of Impostor count be set inside a lobby\r
+- **Map:** The map can be changed inside a lobby\r
+- **Maximum Number Of Meetings:** You can set the maximum number of meetings that can be called in total (every player still has personal maximum of buttons, but if the maximum number of meetings is reached you can't use your meetings even if you have some left, Impostor and Jackal meetings also count) \r
+- **Allow Skips On Emergency Meetings:** If set to false, there will not be a skip button in emergency meetings. If a player does not vote, he'll vote himself.\r
# Roles\r
\r
## Role Assignment\r
The targeted players will lose their role after the meeting right before a player is exiled.\\r
After every erase, the cooldown increases by 10 seconds.\\r
The erase will be performed, even if the Eraser or his target die before the next meeting.\\r
+By default the Eraser can erase everyone but the Spy and other Impostors. Depending on the options\r
+he can also erase them (Impostors will lose their special Impostor ability).\r
\\r
**NOTE:**\r
- The Shifter shift will always be triggered before the Erase (hence either the new role of the Shifter will be erased or the Shifter saves the role of his target, depending on who the Eraser erased)\r
- Erasing a Jackal that has a Sidekick, triggers the Sidekick promotion if it's activated in the settings\r
- As the erasing is being triggered before the eject of a player, erasing and voting out a Lover in the same round, would result in the\r
ex lover surviving as the partnership was erased before. Also a Jester win would not happen, as the erase will be triggered before.\r
-- The Eraser can erase the role of other Impostors to reveal if they are a real Impostor or a Spy. When erasing a real Impostor, the Impostor loses its special ability.\r
\r
### Game Options\r
| Name | Description |\r
|----------|:-------------:|\r
| Eraser Spawn Chance | -\r
| Eraser Cooldown | The Erasers cooldown will increase by 10 seconds after every erase.\r
+| Eraser Can Erase Anyone | If set to false, he can't erase the Spy and other Impostors\r
+-----------------------\r
+\r
+## Trickster\r
+### **Team: Impostors**\r
+The Trickster is an Impostor that can place 3 jack-in-the-boxes that are invisible at first to other players. \\r
+If the Trickster has placed all of his boxes they will be converted into a vent network usable only by the trickster himself, but the boxes are revealed to the others. \\r
+If the boxes are converted to a vent network, the trickster gains a new ability "Lights out" to limit the visibility of Non-Impostors, that cannot be fixed by other players. Lights are automatically restored after a while. \\r
+\r
+\\r
+**NOTE:**\r
+- Impostors will get a text indicator at the bottom of the screen to notify them if the lights are out due to the trickster ability, as there is no sabotage arrows or task to sabotage text to otherwise notify them about it.\r
+\r
+### Game Options\r
+| Name | Description |\r
+|----------|:-------------:|\r
+| Trickster Spawn Chance | -\r
+| Trickster Box Cooldown | Cooldown for placing jack-in-the-boxes\r
+| Trickster Lights Out Cooldown | Cooldown for his "lights out" ability\r
+| Trickster Lights Out Duration | Duration after which the light is automatically restored\r
-----------------------\r
\r
## Lovers\r
The Lovers never know the role of their partner, they only see who their partner is.\\r
The Lovers win if they are both alive among the last 3 players, however they can also win with their respective role.\\r
If both Lovers are crewmates, they can achieve a "double victory" but the crewmates then also win.\\r
-If one Lover is an impostor and one a crewmate, they can get a "Lovers solo win" where only they win (even if there is another impostor alive).\\r
+If one Lover is an impostor and one a crewmate, they can only get a "Lovers solo win" where only they win (even if there is another impostor alive).\\r
\\r
**NOTE:**\r
- If there is an equal amount of impostors and crewmates left in the game and one of the Lovers is an impostor, the game is not automatically over since the Lovers can still achieve a solo win. E.g. if there are the following roles Impostor + ImpLover + Lover + Crewmate left, the game will not end and the next kill will decide if the impostors or Lovers win.\r
| Name | Description |\r
|----------|:-------------:|\r
| Jester Spawn Chance | -\r
+| Jester can call emergency meeting | Option to disable the emergency button for the Jester\r
-----------------------\r
\r
## Seer\r
|----------|:-------------:|\r
| Seer Spawn Chance | - \r
| Seer Mode | Options: Show death flash and souls, show death flash, show souls \r
+| Seer Limit Soul Duration | Toggle if souls should turn invisible after a while\r
| Seer Soul Duration | Sets how long it will take the souls to turn invisible after a meeting \r
-----------------------\r
\r
The Shifter can take over the role of another Crewmate or Neutral, the other player will transform into a Crewmate.\\r
The Shift will always be performed at the end of the next meeting right before a player is exiled. The target needs to be chosen during the round.\\r
Even if the Shifter or the target dies before the meeting, the Shift will still be performed.\\r
-Swapping roles with a Crewmate or Neutral gives them their role, the other player becomes the new Shifter.\\r
+Swapping roles with a Crewmate or Neutral gives them their role, the other player becomes a Crewmate.\\r
Swapping roles with an impostor or a custom impostor role fails and the Shifter commits suicide (there won't be a body after the meeting).\\r
The Shifter aims to save roles from leaving the game, by e.g. taking over a Sheriff or Medic that is known to the Impostors.\\r
This works especially well against the Eraser, but also gives the Eraser the possiblity to act like a Shifter.\\r
\r
## Time Master\r
### **Team: Crewmates**\r
-The Time Master has a time shield which he can activate. The time shield remains active for 3 seconds.\\r
+The Time Master has a time shield which he can activate. The time shield remains active for a configurable amount of time.\\r
If a player trys to kill the Time Master while the time shield is active, the kill won't happen and the \r
time will rewind for a set amount of time.\\r
The kill cooldown of the killer won't be reset, so the Time Master\r
The Time Master won't be affected by the rewind.\\r
\\r
**NOTE:**\r
-- Only movement and kills are affected (not cooldowns, meetings, tasks, ...)\r
+- Only the movement is affected by the rewind\r
- A Vampire bite will trigger the rewind. If the Time Master misses shielding the bite, he can still shield the kill which happens a few seconds later.\r
- If the Time Master was bitten and has his shield active before when a meeting is called, he survives but the time won't be rewinded.\r
- If the Time Master has a Medic shield, he won't rewind.\r
+- The shield itself ends immediately when triggered. So the timemaster can be attacked again as soon as the rewind ends.\r
\r
### Game Options\r
| Name | Description |\r
| Time Master Spawn Chance | - |\r
| Time Master Cooldown | - |\r
| Rewind Duration | How much time to rewind |\r
+| Time Master Shield Duration |\r
-----------------------\r
\r
## Swapper\r
### **Team: Crewmates**\r
During meetings the Swapper can exchange votes that two people get (i.e. all votes\r
that player A got will be given to player B and vice versa).\\r
-Because of the Swappers strength in meetings, they can't start emergency meetings\r
+Because of the Swappers strength in meetings, they might not start emergency meetings\r
and can't fix lights and comms.\r
\r
### Game Options\r
| Name | Description\r
|----------|:-------------:|\r
| Swapper Spawn Chance | -\r
+| Swapper can call emergency meeting | Option to disable the emergency button for the Swapper\r
-----------------------\r
\r
## Tracker\r
- The Crew could be eliminated, then the Team Jackal fight against the Impostors (the Crew can still make a task win in this scenario)\r
\r
The priority of the win conditions is the following:\r
-1. Jester wins by vote\r
-2. Team Impostor wins by sabotage\r
-3. Team Crew wins by tasks (also possible if the whole Crew is deacd)\r
-4. Lovers among the last three players win\r
-5. Team Jackal wins by outnumbering (When the team Jackal contains an equal or greater amount of players than the Crew and there are 0 Impostors left and team Jackal contains no Lover)\r
-6. Team Impostor wins by outnumbering (When the team Impostors contains an equal or greater amount of players than the Crew and there are 0 players of the team Jackal left and team Impostors contains no Lover)\r
-7. Team Crew wins by outnumbering (When there is no player of the team Jackal and the team Impostrs left)\r
+1. Crewmate Child lose by vote\r
+2. Jester wins by vote\r
+3. Team Impostor wins by sabotage\r
+4. Team Crew wins by tasks (also possible if the whole Crew is dead)\r
+5. Lovers among the last three players win\r
+6. Team Jackal wins by outnumbering (When the team Jackal contains an equal or greater amount of players than the Crew and there are 0 Impostors left and team Jackal contains no Lover)\r
+7. Team Impostor wins by outnumbering (When the team Impostors contains an equal or greater amount of players than the Crew and there are 0 players of the team Jackal left and team Impostors contains no Lover)\r
+8. Team Crew wins by outnumbering (When there is no player of the team Jackal and the team Impostrs left)\r
\r
**NOTE:**\r
- The Jackal (and his Sidekick) may be killed by a Sheriff.\r
using UnityEngine;
using static TheOtherRoles.TheOtherRoles;
-using Palette = GLNPIJPGGNJ;
-using TaskTypes = CBFIAGIGOFA;
-using SystemTypes = LGBKLKNAINN;
-using Constants = NFONDPLFBCP;
-using PhysicsHelpers = IEPBCHBGDOA;
-using Effects = HLPCBNMDEHF;
+using Palette = BLMBFIODBKL;
+using TaskTypes = DMOAGPGAFKM;
+using SystemTypes = BCPJLGGNHBC;
+using Constants = LNCOKMACBKP;
+using PhysicsHelpers = FJFJIDCFLDJ;
+using Effects = AEOEPNHOJDP;
namespace TheOtherRoles
{
private static CustomButton jackalSidekickButton;
private static CustomButton lighterButton;
private static CustomButton eraserButton;
+ private static CustomButton placeJackInTheBoxButton;
+ private static CustomButton lightsOutButton;
public static void setCustomButtonCooldowns() {
engineerRepairButton.MaxTimer = 0f;
jackalSidekickButton.MaxTimer = Jackal.createSidekickCooldown;
lighterButton.MaxTimer = Lighter.cooldown;
eraserButton.MaxTimer = Eraser.cooldown;
+ placeJackInTheBoxButton.MaxTimer = Trickster.placeBoxCooldown;
+ lightsOutButton.MaxTimer = Trickster.lightsOutCooldown;
timeMasterShieldButton.EffectDuration = TimeMaster.shieldDuration;
hackerButton.EffectDuration = Hacker.duration;
vampireKillButton.EffectDuration = Vampire.delay;
lighterButton.EffectDuration = Lighter.duration;
+ lightsOutButton.EffectDuration = Trickster.lightsOutDuration;
+
+ // Already set the timer to the max, as the button is enabled during the game and not available at the start
+ lightsOutButton.Timer = lightsOutButton.MaxTimer;
+ }
+
+ public static void resetTimeMasterButton() {
+ timeMasterShieldButton.Timer = timeMasterShieldButton.MaxTimer;
+ timeMasterShieldButton.isEffectActive = false;
+ timeMasterShieldButton.killButtonManager.TimerText.color = Palette.BJENLBHMKAI;
}
public static void Postfix(HudManager __instance)
}
}
},
- () => { return Engineer.engineer != null && Engineer.engineer == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
+ () => { return Engineer.engineer != null && Engineer.engineer == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
() => {
bool sabotageActive = false;
foreach (PlayerTask task in PlayerControl.LocalPlayer.myTasks)
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)
sabotageActive = true;
- return sabotageActive && !Engineer.usedRepair && PlayerControl.LocalPlayer.AMDJMEEHNIG;
+ return sabotageActive && !Engineer.usedRepair && PlayerControl.LocalPlayer.POECPOEKKNO;
},
() => {},
Engineer.getButtonSprite(),
// Janitor Clean
janitorCleanButton = new CustomButton(
() => {
- foreach (Collider2D collider2D in Physics2D.OverlapCircleAll(PlayerControl.LocalPlayer.GetTruePosition(), PlayerControl.LocalPlayer.MaxReportDistance, Constants.NFGGONLDDAN)) {
+ foreach (Collider2D collider2D in Physics2D.OverlapCircleAll(PlayerControl.LocalPlayer.GetTruePosition(), PlayerControl.LocalPlayer.MaxReportDistance, Constants.ODGOCDBFMFC)) {
if (collider2D.tag == "DeadBody")
{
DeadBody component = collider2D.GetComponent<DeadBody>();
if (component && !component.Reported)
{
Vector2 truePosition = PlayerControl.LocalPlayer.GetTruePosition();
- Vector2 truePosition2 = component.NCMFGFMFDJB;
- if (Vector2.Distance(truePosition2, truePosition) <= PlayerControl.LocalPlayer.MaxReportDistance && PlayerControl.LocalPlayer.AMDJMEEHNIG && !PhysicsHelpers.GCFCONMBBOF(truePosition, truePosition2, Constants.DHLPLBPJNBA, false))
+ Vector2 truePosition2 = component.AMIPFAILDIF;
+ if (Vector2.Distance(truePosition2, truePosition) <= PlayerControl.LocalPlayer.MaxReportDistance && PlayerControl.LocalPlayer.POECPOEKKNO && !PhysicsHelpers.DOAHONIIFJD(truePosition, truePosition2, Constants.LEOCDMEJGPA, false))
{
- GameData.OFKOJOKOOAK OFKOJOKOOAK = GameData.Instance.GetPlayerById(component.ParentId);
+ GameData.LGBOMGHJELL LGBOMGHJELL = GameData.Instance.GetPlayerById(component.ParentId);
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.JanitorClean, Hazel.SendOption.Reliable, -1);
- writer.Write(OFKOJOKOOAK.GMBAIPNOKLP);
+ writer.Write(LGBOMGHJELL.FNPNJHNKEBK);
AmongUsClient.Instance.FinishRpcImmediately(writer);
- RPCProcedure.janitorClean(OFKOJOKOOAK.GMBAIPNOKLP);
+ RPCProcedure.janitorClean(LGBOMGHJELL.FNPNJHNKEBK);
janitorCleanButton.Timer = janitorCleanButton.MaxTimer;
break;
}
}
},
- () => { return Janitor.janitor != null && Janitor.janitor == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return __instance.ReportButton.renderer.color == Palette.MKAFGNEBHKC && PlayerControl.LocalPlayer.AMDJMEEHNIG; },
+ () => { return Janitor.janitor != null && Janitor.janitor == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return __instance.ReportButton.renderer.color == Palette.BJENLBHMKAI && PlayerControl.LocalPlayer.POECPOEKKNO; },
() => { janitorCleanButton.Timer = janitorCleanButton.MaxTimer;},
Janitor.getButtonSprite(),
new Vector3(-1.3f, 0, 0),
}
byte targetId = 0;
- if ((Sheriff.currentTarget.IDOFAMCIJKE.CIDDOFDJHJH && (Sheriff.currentTarget != Child.child || Child.isGrownUp())) ||
+ if ((Sheriff.currentTarget.PPMOEEPBHJO.FDNMBJOAPFL && (Sheriff.currentTarget != Child.child || Child.isGrownUp())) ||
Sheriff.currentTarget == Jackal.jackal ||
Sheriff.currentTarget == Sidekick.sidekick ||
(Sheriff.spyCanDieToSheriff && Spy.spy != null && Spy.spy == Sheriff.currentTarget) ||
sheriffKillButton.Timer = sheriffKillButton.MaxTimer;
Sheriff.currentTarget = null;
},
- () => { return Sheriff.sheriff != null && Sheriff.sheriff == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return Sheriff.currentTarget && PlayerControl.LocalPlayer.AMDJMEEHNIG; },
+ () => { return Sheriff.sheriff != null && Sheriff.sheriff == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return Sheriff.currentTarget && PlayerControl.LocalPlayer.POECPOEKKNO; },
() => { sheriffKillButton.Timer = sheriffKillButton.MaxTimer;},
__instance.KillButton.renderer.sprite,
new Vector3(-1.3f, 0, 0),
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.timeMasterShield();
},
- () => { return TimeMaster.timeMaster != null && TimeMaster.timeMaster == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return PlayerControl.LocalPlayer.AMDJMEEHNIG; },
+ () => { return TimeMaster.timeMaster != null && TimeMaster.timeMaster == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return PlayerControl.LocalPlayer.POECPOEKKNO; },
() => {
timeMasterShieldButton.Timer = timeMasterShieldButton.MaxTimer;
timeMasterShieldButton.isEffectActive = false;
- timeMasterShieldButton.killButtonManager.TimerText.Color = Palette.MKAFGNEBHKC;
+ timeMasterShieldButton.killButtonManager.TimerText.color = Palette.BJENLBHMKAI;
},
TimeMaster.getButtonSprite(),
new Vector3(-1.3f, 0, 0),
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.medicSetShielded(Medic.currentTarget.PlayerId);
},
- () => { return Medic.medic != null && Medic.medic == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return !Medic.usedShield && Medic.currentTarget && PlayerControl.LocalPlayer.AMDJMEEHNIG; },
+ () => { return Medic.medic != null && Medic.medic == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return !Medic.usedShield && Medic.currentTarget && PlayerControl.LocalPlayer.POECPOEKKNO; },
() => {},
Medic.getButtonSprite(),
new Vector3(-1.3f, 0, 0),
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.setFutureShifted(Shifter.currentTarget.PlayerId);
},
- () => { return Shifter.shifter != null && Shifter.shifter == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return Shifter.currentTarget && Shifter.futureShift == null && PlayerControl.LocalPlayer.AMDJMEEHNIG; },
+ () => { return Shifter.shifter != null && Shifter.shifter == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return Shifter.currentTarget && Shifter.futureShift == null && PlayerControl.LocalPlayer.POECPOEKKNO; },
() => { },
Shifter.getButtonSprite(),
new Vector3(-1.3f, 0, 0),
morphlingButton.EffectDuration = 1f;
}
},
- () => { return Morphling.morphling != null && Morphling.morphling == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return (Morphling.currentTarget || Morphling.sampledTarget) && PlayerControl.LocalPlayer.AMDJMEEHNIG; },
+ () => { return Morphling.morphling != null && Morphling.morphling == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return (Morphling.currentTarget || Morphling.sampledTarget) && PlayerControl.LocalPlayer.POECPOEKKNO; },
() => {
morphlingButton.Timer = morphlingButton.MaxTimer;
morphlingButton.Sprite = Morphling.getSampleSprite();
morphlingButton.isEffectActive = false;
- morphlingButton.killButtonManager.TimerText.Color = Palette.MKAFGNEBHKC;
+ morphlingButton.killButtonManager.TimerText.color = Palette.BJENLBHMKAI;
Morphling.sampledTarget = null;
},
Morphling.getSampleSprite(),
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.camouflagerCamouflage();
},
- () => { return Camouflager.camouflager != null && Camouflager.camouflager == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return PlayerControl.LocalPlayer.AMDJMEEHNIG; },
+ () => { return Camouflager.camouflager != null && Camouflager.camouflager == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return PlayerControl.LocalPlayer.POECPOEKKNO; },
() => {
camouflagerButton.Timer = camouflagerButton.MaxTimer;
camouflagerButton.isEffectActive = false;
- camouflagerButton.killButtonManager.TimerText.Color = Palette.MKAFGNEBHKC;
+ camouflagerButton.killButtonManager.TimerText.color = Palette.BJENLBHMKAI;
},
Camouflager.getButtonSprite(),
new Vector3(-1.3f, 1.3f, 0f),
() => {
Hacker.hackerTimer = Hacker.duration;
},
- () => { return Hacker.hacker != null && Hacker.hacker == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return PlayerControl.LocalPlayer.AMDJMEEHNIG; },
+ () => { return Hacker.hacker != null && Hacker.hacker == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return PlayerControl.LocalPlayer.POECPOEKKNO; },
() => {
hackerButton.Timer = hackerButton.MaxTimer;
hackerButton.isEffectActive = false;
- hackerButton.killButtonManager.TimerText.Color = Palette.MKAFGNEBHKC;
+ hackerButton.killButtonManager.TimerText.color = Palette.BJENLBHMKAI;
},
Hacker.getButtonSprite(),
new Vector3(-1.3f, 0, 0),
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.trackerUsedTracker(Tracker.currentTarget.PlayerId);
},
- () => { return Tracker.tracker != null && Tracker.tracker == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return PlayerControl.LocalPlayer.AMDJMEEHNIG && Tracker.currentTarget != null && !Tracker.usedTracker; },
+ () => { return Tracker.tracker != null && Tracker.tracker == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return PlayerControl.LocalPlayer.POECPOEKKNO && Tracker.currentTarget != null && !Tracker.usedTracker; },
() => { },
Tracker.getButtonSprite(),
new Vector3(-1.3f, 0, 0),
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.vampireSetBitten(Vampire.bitten.PlayerId, 0);
- PlayerControl.LocalPlayer.StartCoroutine(Effects.LDACHPMFOIF(Vampire.delay, new Action<float>((p) => { // Delayed action
+ PlayerControl.LocalPlayer.StartCoroutine(Effects.DCHLMIDMBHG(Vampire.delay, new Action<float>((p) => { // Delayed action
if (p == 1f) {
- if (Vampire.bitten != null && !Vampire.bitten.IDOFAMCIJKE.FGNJJFABIHJ && Helpers.handleMurderAttempt(Vampire.bitten)) {
+ if (Vampire.bitten != null && !Vampire.bitten.PPMOEEPBHJO.IAGJEKLJCCI && Helpers.handleMurderAttempt(Vampire.bitten)) {
// Perform kill
MessageWriter killWriter = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.VampireTryKill, Hazel.SendOption.Reliable, -1);
AmongUsClient.Instance.FinishRpcImmediately(killWriter);
vampireKillButton.HasEffect = false; // Block effect if no action was fired
}
},
- () => { return Vampire.vampire != null && Vampire.vampire == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
+ () => { return Vampire.vampire != null && Vampire.vampire == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
() => {
if (Vampire.targetNearGarlic && Vampire.canKillNearGarlics)
vampireKillButton.killButtonManager.renderer.sprite = __instance.KillButton.renderer.sprite;
else
vampireKillButton.killButtonManager.renderer.sprite = Vampire.getButtonSprite();
- return Vampire.currentTarget != null && PlayerControl.LocalPlayer.AMDJMEEHNIG && (!Vampire.targetNearGarlic || Vampire.canKillNearGarlics);
+ return Vampire.currentTarget != null && PlayerControl.LocalPlayer.POECPOEKKNO && (!Vampire.targetNearGarlic || Vampire.canKillNearGarlics);
},
() => {
vampireKillButton.Timer = vampireKillButton.MaxTimer;
vampireKillButton.isEffectActive = false;
- vampireKillButton.killButtonManager.TimerText.Color = Palette.MKAFGNEBHKC;
+ vampireKillButton.killButtonManager.TimerText.color = Palette.BJENLBHMKAI;
},
Vampire.getButtonSprite(),
new Vector3(-1.3f, 0, 0),
writer.EndMessage();
RPCProcedure.placeGarlic(buff);
},
- () => { return !Vampire.localPlacedGarlic && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ && Vampire.garlicsActive; },
- () => { return PlayerControl.LocalPlayer.AMDJMEEHNIG && !Vampire.localPlacedGarlic; },
+ () => { return !Vampire.localPlacedGarlic && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI && Vampire.garlicsActive; },
+ () => { return PlayerControl.LocalPlayer.POECPOEKKNO && !Vampire.localPlacedGarlic; },
() => { },
Vampire.getGarlicButtonSprite(),
Vector3.zero,
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.jackalCreatesSidekick(Jackal.currentTarget.PlayerId);
},
- () => { return Jackal.canCreateSidekick && Sidekick.sidekick == null && Jackal.fakeSidekick == null && Jackal.jackal != null && Jackal.jackal == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return Sidekick.sidekick == null && Jackal.fakeSidekick == null && Jackal.currentTarget != null && PlayerControl.LocalPlayer.AMDJMEEHNIG; },
+ () => { return Jackal.canCreateSidekick && Sidekick.sidekick == null && Jackal.fakeSidekick == null && Jackal.jackal != null && Jackal.jackal == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return Sidekick.sidekick == null && Jackal.fakeSidekick == null && Jackal.currentTarget != null && PlayerControl.LocalPlayer.POECPOEKKNO; },
() => { jackalSidekickButton.Timer = jackalSidekickButton.MaxTimer;},
Jackal.getSidekickButtonSprite(),
new Vector3(-1.3f, 1.3f, 0f),
jackalKillButton.Timer = jackalKillButton.MaxTimer;
Jackal.currentTarget = null;
},
- () => { return Jackal.jackal != null && Jackal.jackal == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return Jackal.currentTarget && PlayerControl.LocalPlayer.AMDJMEEHNIG; },
+ () => { return Jackal.jackal != null && Jackal.jackal == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return Jackal.currentTarget && PlayerControl.LocalPlayer.POECPOEKKNO; },
() => { jackalKillButton.Timer = jackalKillButton.MaxTimer;},
__instance.KillButton.renderer.sprite,
new Vector3(-1.3f, 0, 0),
sidekickKillButton.Timer = sidekickKillButton.MaxTimer;
Sidekick.currentTarget = null;
},
- () => { return Sidekick.canKill && Sidekick.sidekick != null && Sidekick.sidekick == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return Sidekick.currentTarget && PlayerControl.LocalPlayer.AMDJMEEHNIG; },
+ () => { return Sidekick.canKill && Sidekick.sidekick != null && Sidekick.sidekick == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return Sidekick.currentTarget && PlayerControl.LocalPlayer.POECPOEKKNO; },
() => { sidekickKillButton.Timer = sidekickKillButton.MaxTimer;},
__instance.KillButton.renderer.sprite,
new Vector3(-1.3f, 0, 0),
() => {
Lighter.lighterTimer = Lighter.duration;
},
- () => { return Lighter.lighter != null && Lighter.lighter == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return PlayerControl.LocalPlayer.AMDJMEEHNIG; },
+ () => { return Lighter.lighter != null && Lighter.lighter == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return PlayerControl.LocalPlayer.POECPOEKKNO; },
() => {
lighterButton.Timer = lighterButton.MaxTimer;
lighterButton.isEffectActive = false;
- lighterButton.killButtonManager.TimerText.Color = Palette.MKAFGNEBHKC;
+ lighterButton.killButtonManager.TimerText.color = Palette.BJENLBHMKAI;
},
Lighter.getButtonSprite(),
new Vector3(-1.3f, 0f, 0f),
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.setFutureErased(Eraser.currentTarget.PlayerId);
},
- () => { return Eraser.eraser != null && Eraser.eraser == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ; },
- () => { return PlayerControl.LocalPlayer.AMDJMEEHNIG && Eraser.currentTarget != null; },
+ () => { return Eraser.eraser != null && Eraser.eraser == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI; },
+ () => { return PlayerControl.LocalPlayer.POECPOEKKNO && Eraser.currentTarget != null; },
() => { eraserButton.Timer = eraserButton.MaxTimer;},
Eraser.getButtonSprite(),
new Vector3(-1.3f, 1.3f, 0f),
__instance
);
+ placeJackInTheBoxButton = new CustomButton(
+ () => {
+ placeJackInTheBoxButton.Timer = placeJackInTheBoxButton.MaxTimer;
+
+ 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(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.PlaceJackInTheBox, Hazel.SendOption.Reliable);
+ writer.WriteBytesAndSize(buff);
+ writer.EndMessage();
+ RPCProcedure.placeJackInTheBox(buff);
+ },
+ () => { return Trickster.trickster != null && Trickster.trickster == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI && !JackInTheBox.hasJackInTheBoxLimitReached(); },
+ () => { return PlayerControl.LocalPlayer.POECPOEKKNO && !JackInTheBox.hasJackInTheBoxLimitReached(); },
+ () => { placeJackInTheBoxButton.Timer = placeJackInTheBoxButton.MaxTimer;},
+ Trickster.getPlaceBoxButtonSprite(),
+ new Vector3(-1.3f, 1.3f, 0f),
+ __instance
+ );
+
+ lightsOutButton = new CustomButton(
+ () => {
+ MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.LightsOut, Hazel.SendOption.Reliable, -1);
+ AmongUsClient.Instance.FinishRpcImmediately(writer);
+ RPCProcedure.lightsOut();
+ },
+ () => { return Trickster.trickster != null && Trickster.trickster == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI && JackInTheBox.hasJackInTheBoxLimitReached() && JackInTheBox.boxesConvertedToVents; },
+ () => { return PlayerControl.LocalPlayer.POECPOEKKNO && JackInTheBox.hasJackInTheBoxLimitReached() && JackInTheBox.boxesConvertedToVents; },
+ () => {
+ lightsOutButton.Timer = lightsOutButton.MaxTimer;
+ lightsOutButton.isEffectActive = false;
+ lightsOutButton.killButtonManager.TimerText.color = Palette.BJENLBHMKAI;
+ },
+ Trickster.getLightsOutButtonSprite(),
+ new Vector3(-1.3f, 1.3f, 0f),
+ __instance,
+ true,
+ Trickster.lightsOutDuration,
+ () => { lightsOutButton.Timer = lightsOutButton.MaxTimer; }
+ );
+
// Set the default (or settings from the previous game) timers/durations when spawning the buttons
setCustomButtonCooldowns();
}
{
static void Postfix(VersionShower __instance) {
string spacer = new String('\n', 21);
- string fullCredentials = "[FCCE03FF]TheOtherRoles[] v2.1.0:\n- Modded by [FCCE03FF]Eisbison[] and [FFEB91FF]Thunderstorm584[]\n- Balanced with [FFEB91FF]Dhalucard[]\n- Button design by [FFEB91FF]Bavari[]";
- if (__instance.text.Text.Contains(spacer))
- __instance.text.Text += "\n" + fullCredentials;
+ string fullCredentials = $"<color=#FCCE03FF>TheOtherRoles</color> v{TheOtherRolesPlugin.Major}.{TheOtherRolesPlugin.Minor}.{TheOtherRolesPlugin.Patch}:\n- Modded by <color=#FCCE03FF>TheOtherRoles</color> and <color=#FFEB91FF>Thunderstorm584</color>\n- Balanced with <color=#FFEB91FF>Dhalucard</color>\n- Button design by <color=#FFEB91FF>Bavari</color>";
+ if (__instance.text.text.Contains(spacer))
+ __instance.text.text += "\n" + fullCredentials;
else
- __instance.text.Text += spacer + fullCredentials;
+ __instance.text.text += spacer + fullCredentials;
}
}
{
static void Postfix(VersionShower __instance)
{
- if (AmongUsClient.Instance.GameState == InnerNet.InnerNetClient.CJDCOJJNIGL.Started)
- __instance.text.Text += "\n[FCCE03FF]TheOtherRoles[]\nModded by [FCCE03FF]Eisbison[]";
+ if (AmongUsClient.Instance.GameState == InnerNet.InnerNetClient.GCDONLGCMIL.Started)
+ __instance.text.text += "\n<color=#FCCE03FF>TheOtherRoles</color>\nModded by <color=#FCCE03FF>Eisbison</color>";
else
- __instance.text.Text += "\n\n[FCCE03FF]TheOtherRoles[]\nModded by [FCCE03FF]Eisbison[]\nand [FFEB91FF]Thunderstorm584[]\nBalanced with [FFEB91FF]Dhalucard[]\nButton design by [FFEB91FF]Bavari[]";
+ __instance.text.text += "\n\n<color=#FCCE03FF>TheOtherRoles</color>\nModded by <color=#FCCE03FF>Eisbison</color>\nand <color=#FFEB91FF>Thunderstorm584</color>\nBalanced with <color=#FFEB91FF>Dhalucard</color>\nButton design by <color=#FFEB91FF>Bavari</color>";
}
}
}
--- /dev/null
+// Adapted from https://github.com/CrowdedMods/CrowdedMod
+/*
+MIT License
+
+Copyright (c) 2020 andry08 & CrowdedMods
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+using System.Collections.Generic;
+using System.Linq;
+using HarmonyLib;
+using UnityEngine;
+using Hazel;
+
+using Palette = BLMBFIODBKL;
+using SaveManager = BLCGIFOPMIA;
+using GameOptionsData = CEIOGGEDKAN;
+
+namespace TheOtherRoles {
+ [HarmonyPatch]
+ static class GameOptionsPatch {
+ public static List<SpriteRenderer> additionalButtons = new List<SpriteRenderer>();
+
+ [HarmonyPatch(typeof(CreateOptionsPicker), nameof(CreateOptionsPicker.Start))]
+ public static class CreateOptionsPickerStartPatch {
+ public static void Postfix(CreateOptionsPicker __instance) {
+ List<SpriteRenderer> maxPlayerButtons = __instance.MaxPlayerButtons.ToList();
+ if (maxPlayerButtons == null || maxPlayerButtons.Count <= 2) return;
+ additionalButtons = new List<SpriteRenderer>();
+
+ for (int i = 1; i < 6; i++) {
+ SpriteRenderer nextButton = Object.Instantiate(maxPlayerButtons.Last(), maxPlayerButtons.Last().transform.parent);
+ additionalButtons.Add(nextButton);
+ nextButton.enabled = false;
+ nextButton.gameObject.name = "1" + i;
+ TMPro.TMP_Text text = nextButton.gameObject.GetComponentInChildren<TMPro.TMP_Text>();
+ text.text = "1" + i;
+ text.color = Helpers.isCustomServer() ? Color.white : Palette.EGHCBLDNCGP;
+
+ nextButton.transform.position = nextButton.transform.position + new Vector3(i * (maxPlayerButtons[1].transform.position.x - maxPlayerButtons[0].transform.position.x), 0, 0);
+ var passiveButton = nextButton.GetComponent<PassiveButton>();
+ passiveButton.OnClick.RemoveAllListeners();
+
+ void onClick() {
+ bool isCustom = Helpers.isCustomServer();
+ foreach (SpriteRenderer renderer in additionalButtons) {
+ if (renderer != null && renderer.gameObject != null) {
+ renderer.enabled = false;
+ renderer.gameObject.GetComponentInChildren<TMPro.TMP_Text>().color = isCustom ? Color.white : Palette.EGHCBLDNCGP;
+ }
+ }
+
+ if (!isCustom) return;
+
+ nextButton.enabled = true;
+
+ byte value = byte.Parse(nextButton.name);
+ var targetOptions = __instance.GetTargetOptions();
+ if (value <= targetOptions.DIGMGCJMGDB) {
+ targetOptions.DIGMGCJMGDB = value - 1;
+ __instance.SetImpostorButtons(targetOptions.DIGMGCJMGDB);
+ }
+ __instance.SetMaxPlayersButtons(value);
+ }
+ passiveButton.OnClick.AddListener((UnityEngine.Events.UnityAction)onClick);
+ }
+ }
+ }
+
+ public static void setLegalSettings() {
+ GameOptionsData hostOptions = SaveManager.LCNLLGFAEJE;
+ GameOptionsData searchOptions = SaveManager.HGGNKBMAJLO;
+ if (searchOptions.OKAPDMGFNED == 0) searchOptions.PFOGBKICOHD(0); // ToggleMapFilter
+
+ hostOptions.DIGMGCJMGDB = searchOptions.DIGMGCJMGDB = 1; // NumImpostors
+ hostOptions.OAFCIBONLNJ = searchOptions.OAFCIBONLNJ = 4; // MaxPlayers
+
+ SaveManager.LCNLLGFAEJE = hostOptions;
+ SaveManager.HGGNKBMAJLO = searchOptions;
+ }
+
+ [HarmonyPatch(typeof(FindGameButton), nameof(FindGameButton.OnClick))]
+ class FindGameButtonOnClickPatch {
+ public static void Prefix() {
+ // Set legal settings
+ setLegalSettings();
+ }
+ }
+
+ [HarmonyPatch(typeof(JoinGameButton), nameof(JoinGameButton.OnClick))]
+ class JoinGameButtonOnClickPatch {
+ public static void Prefix() {
+ // Set legal settings
+ setLegalSettings();
+ }
+ }
+ }
+
+ [HarmonyPatch(typeof(SaveManager), nameof(SaveManager.LCNLLGFAEJE), MethodType.Getter)]
+ public static class SaveManagerGetHostOptions
+ {
+ public static bool Prefix(out GameOptionsData __result)
+ {
+ SaveManager.KMHAKICCDOJ ??= SaveManager.DHHFAHODPGO("gameHostOptions");
+
+ SaveManager.KMHAKICCDOJ.DIGMGCJMGDB = Mathf.Clamp(SaveManager.KMHAKICCDOJ.DIGMGCJMGDB, 1, SaveManager.KMHAKICCDOJ.OAFCIBONLNJ - 1);
+ SaveManager.KMHAKICCDOJ.OCPGKHJJAHL = Mathf.Clamp(SaveManager.KMHAKICCDOJ.OCPGKHJJAHL, 0, 2);
+
+ __result = SaveManager.KMHAKICCDOJ;
+ return false;
+ }
+ }
+
+ [HarmonyPatch(typeof(GameData), nameof(GameData.GetAvailableId))]
+ public static class GameDataGetAvailableIdPatch {
+ public static bool Prefix(ref GameData __instance, out sbyte __result) {
+ for (sbyte i = 0; i <= 15; i++)
+ if (!__instance.AllPlayers.ToArray().Any(p => p.FNPNJHNKEBK == i)) {
+ __result = i;
+ return false;
+ }
+ __result = -1;
+ return false;
+ }
+ }
+
+ [HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.CmdCheckColor))]
+ public static class PlayerControlCmdCheckColorPatch {
+ public static bool Prefix(PlayerControl __instance, byte CKNNKEMNHAK) {
+ if (!Helpers.isCustomServer()) return true;
+
+ MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SetUncheckedColor, Hazel.SendOption.Reliable, -1);
+ writer.Write(CKNNKEMNHAK);
+ writer.Write(__instance.PlayerId);
+ AmongUsClient.Instance.FinishRpcImmediately(writer);
+ RPCProcedure.setUncheckedColor(CKNNKEMNHAK, __instance.PlayerId);
+ return false;
+ }
+ }
+
+ [HarmonyPatch(typeof(PlayerTab), nameof(PlayerTab.UpdateAvailableColors))]
+ public static class PlayerTabUpdateAvailableColorsPatch {
+ public static bool Prefix(PlayerTab __instance) {
+ if (!Helpers.isCustomServer()) return true;
+
+ PlayerControl.SetPlayerMaterialColors(PlayerControl.LocalPlayer.PPMOEEPBHJO.IMMNCAGJJJC, __instance.DemoImage);
+ for (int i = 0; i < Palette.AEDCMKGJKAG.Length; i++)
+ __instance.HDGKLGFNEIB.Add(i);
+ return false;
+ }
+ }
+
+ [HarmonyPatch(typeof(SecurityLogger), nameof(SecurityLogger.Awake))]
+ public static class SecurityLoggerAwakePatch
+ {
+ public static void Postfix(SecurityLogger __instance) {
+ __instance.DLAMJHGNEIF = new float[15];
+ }
+ }
+
+ [HarmonyPatch(typeof(KeyMinigame),nameof(KeyMinigame.Start))]
+ public static class KeyMinigameStartPatch
+ {
+ public static bool Prefix(KeyMinigame __instance)
+ {
+ __instance.CKEKJGDMNDB = (PlayerControl.LocalPlayer != null) ? PlayerControl.LocalPlayer.PlayerId % 10 : 0;
+ __instance.Slots[__instance.CKEKJGDMNDB].Image.sprite = __instance.Slots[__instance.CKEKJGDMNDB].Highlit;
+ return false;
+ }
+ }
+}
\ No newline at end of file
using System.Reflection;
using UnityEngine;
-using Palette = GLNPIJPGGNJ;
+using Palette = BLMBFIODBKL;
public class CustomButton
{
if (this.HasEffect && !this.isEffectActive) {
this.Timer = this.EffectDuration;
- killButtonManager.TimerText.Color = new Color(0F, 0.8F, 0F);
+ killButtonManager.TimerText.color = new Color(0F, 0.8F, 0F);
this.isEffectActive = true;
}
}
private void Update()
{
- if (PlayerControl.LocalPlayer.IDOFAMCIJKE == null || MeetingHud.Instance || ExileController.Instance || !HasButton()) {
+ if (PlayerControl.LocalPlayer.PPMOEEPBHJO == null || MeetingHud.Instance || ExileController.Instance || !HasButton()) {
setActive(false);
return;
}
if (hudManager.KillButton != null) hudManager.KillButton.transform.localPosition = hudManager.UseButton.transform.localPosition - new Vector3(1.3f, 0, 0); // Align the kill button (because it's on another position depending on the screen resolution)
}
if (CouldUse()) {
- killButtonManager.renderer.color = Palette.MKAFGNEBHKC;
+ killButtonManager.renderer.color = Palette.BJENLBHMKAI;
killButtonManager.renderer.material.SetFloat("_Desat", 0f);
} else {
- killButtonManager.renderer.color = Palette.POCKGPCFGOE;
+ killButtonManager.renderer.color = Palette.ILFJLECIGDB;
killButtonManager.renderer.material.SetFloat("_Desat", 1f);
}
if (Timer <= 0 && HasEffect && isEffectActive) {
isEffectActive = false;
- killButtonManager.TimerText.Color = Palette.MKAFGNEBHKC;
+ killButtonManager.TimerText.color = Palette.BJENLBHMKAI;
OnEffectEnds();
}
--- /dev/null
+using UnityEngine;
+using System.Collections.Generic;
+using System;
+
+using Effects = AEOEPNHOJDP;
+
+namespace TheOtherRoles{
+
+ public class CustomMessage {
+
+ private TMPro.TMP_Text text;
+ private static List<CustomMessage> customMessages = new List<CustomMessage>();
+
+ public CustomMessage(string message, float duration) {
+ RoomTracker roomTracker = HudManager.CHNDKKBEIDG?.roomTracker;
+ if (roomTracker != null) {
+ GameObject gameObject = UnityEngine.Object.Instantiate(roomTracker.gameObject);
+
+ gameObject.transform.SetParent(HudManager.CHNDKKBEIDG.transform);
+ UnityEngine.Object.DestroyImmediate(gameObject.GetComponent<RoomTracker>());
+ text = gameObject.GetComponent<TMPro.TMP_Text>();
+ text.text = message;
+
+ // Use local position to place it in the player's view instead of the world location
+ gameObject.transform.localPosition = new Vector3(0, -1.8f, gameObject.transform.localPosition.z);
+ customMessages.Add(this);
+
+ HudManager.CHNDKKBEIDG.StartCoroutine(Effects.DCHLMIDMBHG(duration, new Action<float>((p) => {
+ bool even = ((int)(p * duration / 0.25f)) % 2 == 0; // Bool flips every 0.25 seconds
+ string prefix = (even ? "<color=#FCBA03FF>" : "<color=#FF0000FF>");
+ text.text = prefix + message + "</color>";
+ if (text != null) text.color = even ? Color.yellow : Color.red;
+ if (p == 1f && text?.gameObject != null) {
+ UnityEngine.Object.Destroy(text.gameObject);
+ customMessages.Remove(this);
+ }
+ })));
+ }
+ }
+ }
+}
\ No newline at end of file
namespace TheOtherRoles {
public class CustomOptionHolder {
public static string[] rates = new string[]{"0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"};
- public static string[] crewmateRoleCaps = new string[]{"0", "0-1", "1", "1-2", "2", "2-3", "3", "3-4", "4", "4-5", "5", "5-6", "6", "6-7", "7", "7-8", "8", "8-9", "9", "9-10", "10"};
+ public static string[] crewmateRoleCaps = new string[]{"0", "0-1", "1", "1-2", "2", "2-3", "3", "3-4", "4", "4-5", "5", "5-6", "6", "6-7", "7", "7-8", "8", "8-9", "9", "9-10", "10", "10-11", "11", "11-12", "12", "12-13", "13", "13-14", "14", "14-15", "15"};
public static string[] impostorRoleCaps = new string[]{"0", "0-1", "1", "1-2", "2", "2-3", "3"};
public static string[] presets = new string[]{"Preset 1", "Preset 2", "Preset 3", "Preset 4", "Preset 5"};
+ public static CustomOption presetSelection;
+ public static CustomOption crewmateRolesCount;
+ public static CustomOption impostorRolesCount;
+
+ public static CustomOption mafiaSpawnRate;
+ public static CustomOption janitorCooldown;
+
+ public static CustomOption morphlingSpawnRate;
+ public static CustomOption morphlingCooldown;
+
+ public static CustomOption camouflagerSpawnRate;
+ public static CustomOption camouflagerCooldown;
+
+ public static CustomOption vampireSpawnRate;
+ public static CustomOption vampireKillDelay;
+ public static CustomOption vampireCooldown;
+ public static CustomOption vampireCanKillNearGarlics;
+
+ public static CustomOption eraserSpawnRate;
+ public static CustomOption eraserCooldown;
+ public static CustomOption eraserCanEraseAnyone;
+
+ public static CustomOption childSpawnRate;
+ public static CustomOption childGrowingUpDuration;
+
+ public static CustomOption loversSpawnRate;
+ public static CustomOption loversImpLoverRate;
+ public static CustomOption loversBothDie;
+
+ public static CustomOption jesterSpawnRate;
+ public static CustomOption jesterCanCallEmergency;
+
+ public static CustomOption shifterSpawnRate;
+
+ public static CustomOption mayorSpawnRate;
+
+ public static CustomOption engineerSpawnRate;
+
+ public static CustomOption sheriffSpawnRate;
+ public static CustomOption sheriffCooldown;
+ public static CustomOption jesterCanDieToSheriff;
+
+ public static CustomOption lighterSpawnRate;
+ public static CustomOption lighterModeLightsOnVision;
+ public static CustomOption lighterModeLightsOffVision;
+ public static CustomOption lighterCooldown;
+ public static CustomOption lighterDuration;
+
+ public static CustomOption detectiveSpawnRate;
+ public static CustomOption detectiveAnonymousFootprints;
+ public static CustomOption detectiveFootprintIntervall;
+ public static CustomOption detectiveFootprintDuration;
+ public static CustomOption detectiveReportNameDuration;
+ public static CustomOption detectiveReportColorDuration;
+
+ public static CustomOption timeMasterSpawnRate;
+ public static CustomOption timeMasterCooldown;
+ public static CustomOption timeMasterRewindTime;
+ public static CustomOption timeMasterShieldDuration;
+
+ public static CustomOption medicSpawnRate;
+ public static CustomOption medicShowShielded;
+ public static CustomOption medicShowAttemptToShielded;
+
+ public static CustomOption swapperSpawnRate;
+ public static CustomOption swapperCanCallEmergency;
+
+ public static CustomOption seerSpawnRate;
+ public static CustomOption seerMode;
+ public static CustomOption seerSoulDuration;
+ public static CustomOption seerLimitSoulDuration;
+
+ public static CustomOption hackerSpawnRate;
+ public static CustomOption hackerCooldown;
+ public static CustomOption hackerHackeringDuration;
+ public static CustomOption hackerOnlyColorType;
+
+ public static CustomOption trackerSpawnRate;
+ public static CustomOption trackerUpdateIntervall;
+
+ public static CustomOption snitchSpawnRate;
+ public static CustomOption snitchLeftTasksForImpostors;
+
+ public static CustomOption jackalSpawnRate;
+ public static CustomOption jackalKillCooldown;
+ public static CustomOption jackalCreateSidekickCooldown;
+ public static CustomOption jackalCanUseVents;
+ public static CustomOption jackalCanCreateSidekick;
+ public static CustomOption sidekickPromotesToJackal;
+ public static CustomOption sidekickCanKill;
+ public static CustomOption sidekickCanUseVents;
+ public static CustomOption jackalPromotedFromSidekickCanCreateSidekick;
+ public static CustomOption jackalCanCreateSidekickFromImpostor;
+
+ public static CustomOption spySpawnRate;
+ public static CustomOption spyCanDieToSheriff;
+ public static CustomOption spyImpostorsCanKillAnyone;
+
+ public static CustomOption tricksterSpawnRate;
+ public static CustomOption tricksterPlaceBoxCooldown;
+ public static CustomOption tricksterLightsOutCooldown;
+ public static CustomOption tricksterLightsOutDuration;
- public static CustomOption presetSelection, crewmateRolesCount, impostorRolesCount;
- public static CustomOption mafiaSpawnRate, morphlingSpawnRate, camouflagerSpawnRate, vampireSpawnRate, eraserSpawnRate;
- public static CustomOption childSpawnRate, loversSpawnRate, jesterSpawnRate;
- public static CustomOption shifterSpawnRate, mayorSpawnRate, engineerSpawnRate, sheriffSpawnRate, lighterSpawnRate, detectiveSpawnRate, timeMasterSpawnRate, medicSpawnRate, swapperSpawnRate, seerSpawnRate, hackerSpawnRate, trackerSpawnRate, snitchSpawnRate, jackalSpawnRate, spySpawnRate;
public static CustomOption maxNumberOfMeetings;
- public static CustomOption janitorCooldown, morphlingCooldown, camouflagerCooldown, vampireKillDelay, vampireCooldown, vampireCanKillNearGarlics, eraserCooldown;
- public static CustomOption childGrowingUpDuration, loversImpLoverRate, loversBothDie;
- public static CustomOption sheriffCooldown, jesterCanDieToSheriff, lighterModeLightsOnVision, lighterModeLightsOffVision, lighterCooldown,
- lighterDuration, detectiveAnonymousFootprints, detectiveFootprintIntervall, detectiveFootprintDuration, detectiveReportNameDuration, detectiveReportColorDuration,
- timeMasterCooldown, timeMasterRewindTime, medicShowShielded, medicShowAttemptToShielded, seerMode, seerSoulDuration, hackerCooldown, hackerHackeringDuration, hackerOnlyColorType,
- trackerUpdateIntervall, snitchLeftTasksForImpostors, jackalKillCooldown, jackalCreateSidekickCooldown, jackalCanUseVents, jackalCanCreateSidekick, sidekickPromotesToJackal, sidekickCanKill,
- sidekickCanUseVents, jackalPromotedFromSidekickCanCreateSidekick, jackalCanCreateSidekickFromImpostor, spyCanDieToSheriff, spyImpostorsCanKillAnyone;
+ public static CustomOption allowSkipOnEmergencyMeetings;
public static string cs(Color c, string s) {
- return string.Format("[{0:X2}{1:X2}{2:X2}{3:X2}]{4}[]", ToByte(c.r), ToByte(c.g), ToByte(c.b), ToByte(c.a), s);
+ return string.Format("<color=#{0:X2}{1:X2}{2:X2}{3:X2}>{4}</color>", ToByte(c.r), ToByte(c.g), ToByte(c.b), ToByte(c.a), s);
}
private static byte ToByte(float f) {
}
public static void Load() {
- presetSelection = CustomOption.Create(0, "[CCCC00FF]Preset[]", presets);
- crewmateRolesCount = CustomOption.Create(1, "[CCCC00FF]Number Of Crewmate/Neutral Roles[]", crewmateRoleCaps);
- impostorRolesCount = CustomOption.Create(2, "[CCCC00FF]Number Of Impostor Roles[]", impostorRoleCaps);
-
- mafiaSpawnRate = CustomOption.Create(10, cs(Janitor.color, "Mafia"), rates);
- morphlingSpawnRate = CustomOption.Create(20, cs(Morphling.color, "Morphling"), rates);
- camouflagerSpawnRate = CustomOption.Create(30, cs(Camouflager.color, "Camouflager"), rates);
- vampireSpawnRate = CustomOption.Create(40, cs(Vampire.color, "Vampire"), rates);
- eraserSpawnRate = CustomOption.Create(230, cs(Eraser.color, "Eraser"), rates);
-
- childSpawnRate = CustomOption.Create(180, cs(Child.color, "Child"), rates);
- loversSpawnRate = CustomOption.Create(50, cs(Lovers.color, "Lovers"), rates);
- jesterSpawnRate = CustomOption.Create(60, cs(Jester.color, "Jester"), rates);
-
- shifterSpawnRate = CustomOption.Create(70, cs(Shifter.color, "Shifter"), rates);
- mayorSpawnRate = CustomOption.Create(80, cs(Mayor.color, "Mayor"), rates);
- engineerSpawnRate = CustomOption.Create(90, cs(Engineer.color, "Engineer"), rates);
- sheriffSpawnRate = CustomOption.Create(100, cs(Sheriff.color, "Sheriff"), rates);
- lighterSpawnRate = CustomOption.Create(110, cs(Lighter.color, "Lighter"), rates);
- detectiveSpawnRate = CustomOption.Create(120, cs(Detective.color, "Detective"), rates);
- timeMasterSpawnRate = CustomOption.Create(130, cs(TimeMaster.color, "Time Master"), rates);
- medicSpawnRate = CustomOption.Create(140, cs(Medic.color, "Medic"), rates);
- swapperSpawnRate = CustomOption.Create(150, cs(Swapper.color, "Swapper"), rates);
- seerSpawnRate = CustomOption.Create(160, cs(Seer.color, "Seer"), rates);
- hackerSpawnRate = CustomOption.Create(170, cs(Hacker.color, "Hacker"), rates);
- trackerSpawnRate = CustomOption.Create(200, cs(Tracker.color, "Tracker"), rates);
- snitchSpawnRate = CustomOption.Create(210, cs(Snitch.color, "Snitch"), rates);
- jackalSpawnRate = CustomOption.Create(220, cs(Jackal.color, "Jackal"), rates);
- spySpawnRate = CustomOption.Create(240, cs(Spy.color, "Spy"), rates);
-
- // Map settings
- maxNumberOfMeetings = CustomOption.Create(3, "Number Of Meetings (excluding Mayor meeting)", 10, 0, 15, 1);
-
- // Role settings
- janitorCooldown = CustomOption.Create(11, "Janitor Cooldown", 30f, 10f, 60f, 2.5f);
- morphlingCooldown = CustomOption.Create(21, "Morphling Cooldown", 30f, 10f, 60f, 2.5f);
- camouflagerCooldown = CustomOption.Create(31, "Camouflager Cooldown", 30f, 10f, 60f, 2.5f);
- vampireKillDelay = CustomOption.Create(41, "Vampire Kill Delay", 10f, 1f, 20f, 1f);
- vampireCooldown = CustomOption.Create(42, "Vampire Cooldown", 30f, 10f, 60f, 2.5f);
- vampireCanKillNearGarlics = CustomOption.Create(43, "Vampire Can Kill Near Garlics", true);
- eraserCooldown = CustomOption.Create(231, "Eraser Cooldown", 30f, 10f, 120f, 5f);
-
- childGrowingUpDuration = CustomOption.Create(181, "Child Growing Up Duration", 400f, 100f, 1500f, 100f);
- loversImpLoverRate = CustomOption.Create(51, "Chance That One Lover Is Impostor", 30f, 0f, 100f, 10f);
- loversBothDie = CustomOption.Create(52, "Both Lovers Die", true);
-
- sheriffCooldown = CustomOption.Create(101, "Sheriff Cooldown", 30f, 10f, 60f, 2.5f);
- jesterCanDieToSheriff = CustomOption.Create(102, "Sheriff Can Kill The Jester", false);
- lighterModeLightsOnVision = CustomOption.Create(111, "Lighter Mode Vision On Lights On", 2f, 0.25f, 5f, 0.25f);
- lighterModeLightsOffVision = CustomOption.Create(112, "Lighter Mode Vision On Lights Off", 0.75f, 0.25f, 5f, 0.25f);
- lighterCooldown = CustomOption.Create(113, "Lighter Cooldown", 30f, 5f, 120f, 5f);
- lighterDuration = CustomOption.Create(114, "Lighter Duration", 5f, 2.5f, 60f, 2.5f);
- detectiveAnonymousFootprints = CustomOption.Create(121, "Anonymous Footprints", false);
- detectiveFootprintIntervall = CustomOption.Create(122, "Footprint Intervall", 0.5f, 0.25f, 10f, 0.25f);
- detectiveFootprintDuration = CustomOption.Create(123, "Footprint Duration", 5f, 0.25f, 10f, 0.25f);
- detectiveReportNameDuration = CustomOption.Create(124, "Time Where Detective Reports Will Have Name", 0, 0, 60, 2.5f);
- detectiveReportColorDuration = CustomOption.Create(125, "Time Where Detective Reports Will Have Color Type", 20, 0, 120, 2.5f);
- timeMasterCooldown = CustomOption.Create(131, "Time Master Cooldown", 30f, 10f, 60f, 2.5f);
- timeMasterRewindTime = CustomOption.Create(132, "Rewind Time", 3f, 1f, 10f, 1f);
- medicShowShielded = CustomOption.Create(143, "Show Shielded Player", new string[] {"Everyone", "Shielded + Medic", "Medic"});
- medicShowAttemptToShielded = CustomOption.Create(144, "Shielded Player Sees Murder Attempt", false);
- seerMode = CustomOption.Create(161, "Seer Mode", new string[]{ "Show Death Flash + Souls", "Show Death Flash", "Show Souls"});
- seerSoulDuration = CustomOption.Create(162, "Seer Soul Duration", 15f, 0f, 60f, 5f);
- hackerCooldown = CustomOption.Create(171, "Hacker Cooldown", 30f, 0f, 60f, 5f);
- hackerHackeringDuration = CustomOption.Create(172, "Hacker Duration", 10f, 2.5f, 60f, 2.5f);
- hackerOnlyColorType = CustomOption.Create(173, "Hacker Only Sees Color Type", false);
- trackerUpdateIntervall = CustomOption.Create(201, "Tracker Update Intervall", 5f, 2.5f, 30f, 2.5f);
- snitchLeftTasksForImpostors = CustomOption.Create(211, "Task Count Where Impostors See Snitch", 1f, 0f, 5f, 1f);
- jackalKillCooldown = CustomOption.Create(221, "Jackal/Sidekick Kill Cooldown", 30f, 10f, 60f, 2.5f);
- jackalCreateSidekickCooldown = CustomOption.Create(222, "Jackal Create Sidekick Cooldown", 30f, 10f, 60f, 2.5f);
- jackalCanUseVents = CustomOption.Create(223, "Jackal Can Use Vents", true);
- jackalCanCreateSidekick = CustomOption.Create(224, "Jackal Can Create A Sidekick", false);
- sidekickPromotesToJackal = CustomOption.Create(225, "Sidekick Gets Promoted To Jackal On Jackal Death", false);
- sidekickCanKill = CustomOption.Create(226, "Sidekick Can Kill", false);
- sidekickCanUseVents = CustomOption.Create(227, "Sidekick Can Use Vents", true);
- jackalPromotedFromSidekickCanCreateSidekick = CustomOption.Create(228, "Jackals Promoted From Sidekick Can Create A Sidekick", true);
- jackalCanCreateSidekickFromImpostor = CustomOption.Create(229, "Jackals Can Make An Impostor To His Sidekick", true);
- spyCanDieToSheriff = CustomOption.Create(241, "Spy Can Die To Sheriff", false);
- spyImpostorsCanKillAnyone = CustomOption.Create(242, "Impostors Can Kill Anyone If There Is A Spy", true);
+
+ // Role Options
+ presetSelection = CustomOption.Create(0, cs(new Color(204f / 255f, 204f / 255f, 0, 1f), "Preset"), presets, null, true);
+
+ crewmateRolesCount = CustomOption.Create(1, cs(new Color(204f / 255f, 204f / 255f, 0, 1f), "Number Of Crewmate/Neutral Roles"), crewmateRoleCaps, null, true);
+ impostorRolesCount = CustomOption.Create(2, cs(new Color(204f / 255f, 204f / 255f, 0, 1f), "Number Of Impostor Roles"), impostorRoleCaps);
+
+ mafiaSpawnRate = CustomOption.Create(10, cs(Janitor.color, "Mafia"), rates, null, true);
+ janitorCooldown = CustomOption.Create(11, "Janitor Cooldown", 30f, 10f, 60f, 2.5f, mafiaSpawnRate);
+
+ morphlingSpawnRate = CustomOption.Create(20, cs(Morphling.color, "Morphling"), rates, null, true);
+ morphlingCooldown = CustomOption.Create(21, "Morphling Cooldown", 30f, 10f, 60f, 2.5f, morphlingSpawnRate);
+
+ camouflagerSpawnRate = CustomOption.Create(30, cs(Camouflager.color, "Camouflager"), rates, null, true);
+ camouflagerCooldown = CustomOption.Create(31, "Camouflager Cooldown", 30f, 10f, 60f, 2.5f, camouflagerSpawnRate);
+
+ vampireSpawnRate = CustomOption.Create(40, cs(Vampire.color, "Vampire"), rates, null, true);
+ vampireKillDelay = CustomOption.Create(41, "Vampire Kill Delay", 10f, 1f, 20f, 1f, vampireSpawnRate);
+ vampireCooldown = CustomOption.Create(42, "Vampire Cooldown", 30f, 10f, 60f, 2.5f, vampireSpawnRate);
+ vampireCanKillNearGarlics = CustomOption.Create(43, "Vampire Can Kill Near Garlics", true, vampireSpawnRate);
+
+ eraserSpawnRate = CustomOption.Create(230, cs(Eraser.color, "Eraser"), rates, null, true);
+ eraserCooldown = CustomOption.Create(231, "Eraser Cooldown", 30f, 10f, 120f, 5f, eraserSpawnRate);
+ eraserCanEraseAnyone = CustomOption.Create(232, "Eraser Can Erase Anyone", false, eraserSpawnRate);
+
+ tricksterSpawnRate = CustomOption.Create(250, cs(Trickster.color, "Trickster"), rates, null, true);
+ tricksterPlaceBoxCooldown = CustomOption.Create(251, "Trickster Box Cooldown", 10f, 0f, 30f, 2.5f, tricksterSpawnRate);
+ tricksterLightsOutCooldown = CustomOption.Create(252, "Trickster Lights Out Cooldown", 30f, 10f, 60f, 5f, tricksterSpawnRate);
+ tricksterLightsOutDuration = CustomOption.Create(253, "Trickster Lights Out Duration", 15f, 5f, 60f, 2.5f, tricksterSpawnRate);
+
+ childSpawnRate = CustomOption.Create(180, cs(Child.color, "Child"), rates, null, true);
+ childGrowingUpDuration = CustomOption.Create(181, "Child Growing Up Duration", 400f, 100f, 1500f, 100f, childSpawnRate);
+
+ loversSpawnRate = CustomOption.Create(50, cs(Lovers.color, "Lovers"), rates, null, true);
+ loversImpLoverRate = CustomOption.Create(51, "Chance That One Lover Is Impostor", 30f, 0f, 100f, 10f, loversSpawnRate);
+ loversBothDie = CustomOption.Create(52, "Both Lovers Die", true, loversSpawnRate);
+
+ jesterSpawnRate = CustomOption.Create(60, cs(Jester.color, "Jester"), rates, null, true);
+ jesterCanCallEmergency = CustomOption.Create(61, "Jester can call emergency meeting", true, jesterSpawnRate);
+
+ shifterSpawnRate = CustomOption.Create(70, cs(Shifter.color, "Shifter"), rates, null, true);
+
+ mayorSpawnRate = CustomOption.Create(80, cs(Mayor.color, "Mayor"), rates, null, true);
+
+ engineerSpawnRate = CustomOption.Create(90, cs(Engineer.color, "Engineer"), rates, null, true);
+
+ sheriffSpawnRate = CustomOption.Create(100, cs(Sheriff.color, "Sheriff"), rates, null, true);
+ sheriffCooldown = CustomOption.Create(101, "Sheriff Cooldown", 30f, 10f, 60f, 2.5f, sheriffSpawnRate);
+ jesterCanDieToSheriff = CustomOption.Create(102, "Sheriff Can Kill The Jester", false, sheriffSpawnRate);
+
+
+ lighterSpawnRate = CustomOption.Create(110, cs(Lighter.color, "Lighter"), rates, null, true);
+ lighterModeLightsOnVision = CustomOption.Create(111, "Lighter Mode Vision On Lights On", 2f, 0.25f, 5f, 0.25f, lighterSpawnRate);
+ lighterModeLightsOffVision = CustomOption.Create(112, "Lighter Mode Vision On Lights Off", 0.75f, 0.25f, 5f, 0.25f, lighterSpawnRate);
+ lighterCooldown = CustomOption.Create(113, "Lighter Cooldown", 30f, 5f, 120f, 5f, lighterSpawnRate);
+ lighterDuration = CustomOption.Create(114, "Lighter Duration", 5f, 2.5f, 60f, 2.5f, lighterSpawnRate);
+
+ detectiveSpawnRate = CustomOption.Create(120, cs(Detective.color, "Detective"), rates, null, true);
+ detectiveAnonymousFootprints = CustomOption.Create(121, "Anonymous Footprints", false, detectiveSpawnRate);
+ detectiveFootprintIntervall = CustomOption.Create(122, "Footprint Intervall", 0.5f, 0.25f, 10f, 0.25f, detectiveSpawnRate);
+ detectiveFootprintDuration = CustomOption.Create(123, "Footprint Duration", 5f, 0.25f, 10f, 0.25f, detectiveSpawnRate);
+ detectiveReportNameDuration = CustomOption.Create(124, "Time Where Detective Reports Will Have Name", 0, 0, 60, 2.5f, detectiveSpawnRate);
+ detectiveReportColorDuration = CustomOption.Create(125, "Time Where Detective Reports Will Have Color Type", 20, 0, 120, 2.5f, detectiveSpawnRate);
+
+ timeMasterSpawnRate = CustomOption.Create(130, cs(TimeMaster.color, "Time Master"), rates, null, true);
+ timeMasterCooldown = CustomOption.Create(131, "Time Master Cooldown", 30f, 10f, 120f, 2.5f, timeMasterSpawnRate);
+ timeMasterRewindTime = CustomOption.Create(132, "Rewind Time", 3f, 1f, 10f, 1f, timeMasterSpawnRate);
+ timeMasterShieldDuration = CustomOption.Create(133, "Time Master Shield Duration", 3f, 1f, 20f, 1f, timeMasterSpawnRate);
+
+ medicSpawnRate = CustomOption.Create(140, cs(Medic.color, "Medic"), rates, null, true);
+ medicShowShielded = CustomOption.Create(143, "Show Shielded Player", new string[] {"Everyone", "Shielded + Medic", "Medic"}, medicSpawnRate);
+ medicShowAttemptToShielded = CustomOption.Create(144, "Shielded Player Sees Murder Attempt", false, medicSpawnRate);
+
+ swapperSpawnRate = CustomOption.Create(150, cs(Swapper.color, "Swapper"), rates, null, true);
+ swapperCanCallEmergency = CustomOption.Create(151, "Swapper can call emergency meeting", false, swapperSpawnRate);
+
+ seerSpawnRate = CustomOption.Create(160, cs(Seer.color, "Seer"), rates, null, true);
+ seerMode = CustomOption.Create(161, "Seer Mode", new string[]{ "Show Death Flash + Souls", "Show Death Flash", "Show Souls"}, seerSpawnRate);
+ seerLimitSoulDuration = CustomOption.Create(163, "Seer Limit Soul Duration", false, seerSpawnRate);
+ seerSoulDuration = CustomOption.Create(162, "Seer Soul Duration", 15f, 0f, 60f, 5f, seerLimitSoulDuration);
+
+ hackerSpawnRate = CustomOption.Create(170, cs(Hacker.color, "Hacker"), rates, null, true);
+ hackerCooldown = CustomOption.Create(171, "Hacker Cooldown", 30f, 0f, 60f, 5f, hackerSpawnRate);
+ hackerHackeringDuration = CustomOption.Create(172, "Hacker Duration", 10f, 2.5f, 60f, 2.5f, hackerSpawnRate);
+ hackerOnlyColorType = CustomOption.Create(173, "Hacker Only Sees Color Type", false, hackerSpawnRate);
+
+ trackerSpawnRate = CustomOption.Create(200, cs(Tracker.color, "Tracker"), rates, null, true);
+ trackerUpdateIntervall = CustomOption.Create(201, "Tracker Update Intervall", 5f, 2.5f, 30f, 2.5f, trackerSpawnRate);
+
+ snitchSpawnRate = CustomOption.Create(210, cs(Snitch.color, "Snitch"), rates, null, true);
+ snitchLeftTasksForImpostors = CustomOption.Create(211, "Task Count Where Impostors See Snitch", 1f, 0f, 5f, 1f, snitchSpawnRate);
+
+ jackalSpawnRate = CustomOption.Create(220, cs(Jackal.color, "Jackal"), rates, null, true);
+ jackalKillCooldown = CustomOption.Create(221, "Jackal/Sidekick Kill Cooldown", 30f, 10f, 60f, 2.5f, jackalSpawnRate);
+ jackalCreateSidekickCooldown = CustomOption.Create(222, "Jackal Create Sidekick Cooldown", 30f, 10f, 60f, 2.5f, jackalSpawnRate);
+ jackalCanUseVents = CustomOption.Create(223, "Jackal Can Use Vents", true, jackalSpawnRate);
+ jackalCanCreateSidekick = CustomOption.Create(224, "Jackal Can Create A Sidekick", false, jackalSpawnRate);
+ sidekickPromotesToJackal = CustomOption.Create(225, "Sidekick Gets Promoted To Jackal On Jackal Death", false, jackalSpawnRate);
+ sidekickCanKill = CustomOption.Create(226, "Sidekick Can Kill", false, jackalSpawnRate);
+ sidekickCanUseVents = CustomOption.Create(227, "Sidekick Can Use Vents", true, jackalSpawnRate);
+ jackalPromotedFromSidekickCanCreateSidekick = CustomOption.Create(228, "Jackals Promoted From Sidekick Can Create A Sidekick", true, jackalSpawnRate);
+ jackalCanCreateSidekickFromImpostor = CustomOption.Create(229, "Jackals Can Make An Impostor To His Sidekick", true, jackalSpawnRate);
+
+ spySpawnRate = CustomOption.Create(240, cs(Spy.color, "Spy"), rates, null, true);
+ spyCanDieToSheriff = CustomOption.Create(241, "Spy Can Die To Sheriff", false, spySpawnRate);
+ spyImpostorsCanKillAnyone = CustomOption.Create(242, "Impostors Can Kill Anyone If There Is A Spy", true, spySpawnRate);
+
+ // Other options
+ maxNumberOfMeetings = CustomOption.Create(3, "Number Of Meetings (excluding Mayor meeting)", 10, 0, 15, 1, null, true);
+ allowSkipOnEmergencyMeetings = CustomOption.Create(4, "Allow Skips On Emergency Meetings", true);
}
}
public ConfigEntry<int> entry;
public int selection;
public OptionBehaviour optionBehaviour;
+ public CustomOption parent;
+ public bool isHeader;
// Option creation
- public CustomOption(int id, string name, System.Object[] selections, System.Object defaultValue) {
+ public CustomOption(int id, string name, System.Object[] selections, System.Object defaultValue, CustomOption parent, bool isHeader) {
this.id = id;
- this.name = name;
+ this.name = parent == null ? name : "- " + name;
this.selections = selections;
int index = Array.IndexOf(selections, defaultValue);
this.defaultSelection = index >= 0 ? index : 0;
+ this.parent = parent;
+ this.isHeader = isHeader;
selection = 0;
if (id != 0) {
entry = TheOtherRolesPlugin.Instance.Config.Bind($"Preset{preset}", id.ToString(), defaultSelection);
options.Add(this);
}
- public static CustomOption Create(int id, string name, string[] selections, string defaultValue = "") {
- return new CustomOption(id, name, selections, defaultValue);
+ public static CustomOption Create(int id, string name, string[] selections, CustomOption parent = null, bool isHeader = false) {
+ return new CustomOption(id, name, selections, "", parent, isHeader);
}
- public static CustomOption Create(int id, string name, float defaultValue, float min, float max, float step) {
+ public static CustomOption Create(int id, string name, float defaultValue, float min, float max, float step, CustomOption parent = null, bool isHeader = false) {
List<float> selections = new List<float>();
for (float s = min; s <= max; s += step)
selections.Add(s);
- return new CustomOption(id, name, selections.Cast<object>().ToArray(), defaultValue);
+ return new CustomOption(id, name, selections.Cast<object>().ToArray(), defaultValue, parent, isHeader);
}
- public static CustomOption Create(int id, string name, bool defaultValue) {
- return new CustomOption(id, name, new string[]{"Off", "On"}, default ? "On" : "Off");
+ public static CustomOption Create(int id, string name, bool defaultValue, CustomOption parent = null, bool isHeader = false) {
+ return new CustomOption(id, name, new string[]{"Off", "On"}, defaultValue ? "On" : "Off", parent, isHeader);
}
// Static behaviour
option.entry = TheOtherRolesPlugin.Instance.Config.Bind($"Preset{preset}", option.id.ToString(), option.defaultSelection);
option.selection = Mathf.Clamp(option.entry.Value, 0, option.selections.Length - 1);
if (option.optionBehaviour != null && option.optionBehaviour is StringOption stringOption) {
- stringOption.IOFLMCGMJBA = stringOption.Value = option.selection;
- stringOption.ValueText.Text = option.selections[option.selection].ToString();
+ stringOption.LCDAKOCANPH = stringOption.Value = option.selection;
+ stringOption.ValueText.text = option.selections[option.selection].ToString();
}
}
}
public static void ShareOptionSelections() {
- if (PlayerControl.AllPlayerControls.Count <= 1 || AmongUsClient.Instance?.CBKCIKKEJHI == false && PlayerControl.LocalPlayer == null) return;
+ if (PlayerControl.AllPlayerControls.Count <= 1 || AmongUsClient.Instance?.HHBLOCGKFAB == false && PlayerControl.LocalPlayer == null) return;
foreach (CustomOption option in CustomOption.options) {
MessageWriter messageWriter = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShareOptionSelection, Hazel.SendOption.Reliable);
messageWriter.WritePacked((uint)option.id);
public void updateSelection(int newSelection) {
selection = Mathf.Clamp((newSelection + selections.Length) % selections.Length, 0, selections.Length - 1);
if (optionBehaviour != null && optionBehaviour is StringOption stringOption) {
- stringOption.IOFLMCGMJBA = stringOption.Value = selection;
- stringOption.ValueText.Text = selections[selection].ToString();
+ stringOption.LCDAKOCANPH = stringOption.Value = selection;
+ stringOption.ValueText.text = selections[selection].ToString();
- if (AmongUsClient.Instance?.CBKCIKKEJHI == true && PlayerControl.LocalPlayer) {
+ if (AmongUsClient.Instance?.HHBLOCGKFAB == true && PlayerControl.LocalPlayer) {
if (id == 0) switchPreset(selection); // Switch presets
else if (entry != null) entry.Value = selection; // Save selection to config
var template = UnityEngine.Object.FindObjectsOfType<StringOption>().FirstOrDefault();
if (template == null) return;
- List<OptionBehaviour> allOptions = __instance.IGFJIPMAJHF.ToList();
+ List<OptionBehaviour> allOptions = __instance.MCAHCPOHNFI.ToList();
for (int i = 0; i < CustomOption.options.Count; i++) {
CustomOption option = CustomOption.options[i];
if (option.optionBehaviour == null) {
StringOption stringOption = UnityEngine.Object.Instantiate(template, template.transform.parent);
allOptions.Add(stringOption);
- stringOption.transform.localPosition = new Vector3(template.transform.localPosition.x, -7.85f - (i + 1) * 0.5F, template.transform.localPosition.z);
stringOption.OnValueChanged = new Action<OptionBehaviour>((o) => {});
- stringOption.TitleText.Text = option.name;
- stringOption.Value = stringOption.IOFLMCGMJBA = option.selection;
- stringOption.ValueText.Text = option.selections[option.selection].ToString();
+ stringOption.TitleText.text = option.name;
+ stringOption.Value = stringOption.LCDAKOCANPH = option.selection;
+ stringOption.ValueText.text = option.selections[option.selection].ToString();
option.optionBehaviour = stringOption;
}
option.optionBehaviour.gameObject.SetActive(true);
}
- __instance.IGFJIPMAJHF = allOptions.ToArray();
+ __instance.MCAHCPOHNFI = allOptions.ToArray();
}
}
if (option == null) return true;
__instance.OnValueChanged = new Action<OptionBehaviour>((o) => {});
- __instance.TitleText.Text = option.name;
- __instance.Value = __instance.IOFLMCGMJBA = option.selection;
- __instance.ValueText.Text = option.selections[option.selection].ToString();
+ __instance.TitleText.text = option.name;
+ __instance.Value = __instance.LCDAKOCANPH = option.selection;
+ __instance.ValueText.text = option.selections[option.selection].ToString();
return false;
}
[HarmonyPatch(typeof(GameOptionsMenu), nameof(GameOptionsMenu.Update))]
class GameOptionsMenuUpdatePatch
{
+ private static float timer = 1f;
public static void Postfix(GameOptionsMenu __instance) {
- __instance.GetComponentInParent<Scroller>().YBounds.max = -0.5F + __instance.IGFJIPMAJHF.Length * 0.5F;
+ __instance.GetComponentInParent<Scroller>().YBounds.max = -0.5F + __instance.MCAHCPOHNFI.Length * 0.55F;
+ timer += Time.deltaTime;
+ if (timer < 0.1f) return;
+ timer = 0f;
+
+ float offset = -7.85f;
+ foreach (CustomOption option in CustomOption.options) {
+ if (option?.optionBehaviour?.gameObject != null) {
+ bool enabled = true;
+ var parent = option.parent;
+ while (parent != null && enabled) {
+ enabled = parent.selection != 0;
+ parent = parent.parent;
+ }
+ option.optionBehaviour.gameObject.SetActive(enabled);
+ if (enabled) {
+ offset -= option.isHeader ? 0.75f : 0.5f;
+ option.optionBehaviour.transform.localPosition = new Vector3(option.optionBehaviour.transform.localPosition.x, offset, option.optionBehaviour.transform.localPosition.z);
+ }
+ }
+ }
}
}
class GameOptionsDataPatch
{
private static IEnumerable<MethodBase> TargetMethods() {
- return typeof(IGDMNKLDEPI).GetMethods().Where(x => x.ReturnType == typeof(string) && x.GetParameters().Length == 1 && x.GetParameters()[0].ParameterType == typeof(int));
+ return typeof(CEIOGGEDKAN).GetMethods().Where(x => x.ReturnType == typeof(string) && x.GetParameters().Length == 1 && x.GetParameters()[0].ParameterType == typeof(int));
}
private static void Postfix(ref string __result)
{
StringBuilder sb = new StringBuilder(__result);
- foreach (CustomOption option in CustomOption.options) {
- sb.AppendLine($"{option.name}: {option.selections[option.selection].ToString()}");
- }
+ foreach (CustomOption option in CustomOption.options)
+ if (option.parent == null)
+ sb.AppendLine($"{option.name}: {option.selections[option.selection].ToString()}");
+ CustomOption parent = null;
+ foreach (CustomOption option in CustomOption.options)
+ if (option.parent != null) {
+ if (option.parent != parent) {
+ sb.AppendLine();
+ parent = option.parent;
+ }
+ sb.AppendLine($"{option.name}: {option.selections[option.selection].ToString()}");
+ }
+
var hudString = sb.ToString();
int defaultSettingsLines = 19;
- int roleSettingsLines = 19 + 26;
- int detailedSettingsLines = 19 + 26 + 25;
+ int roleSettingsLines = 19 + 27;
+ int detailedSettingsLines = 19 + 27 + 37;
int end1 = hudString.TakeWhile(c => (defaultSettingsLines -= (c == '\n' ? 1 : 0)) > 0).Count();
int end2 = hudString.TakeWhile(c => (roleSettingsLines -= (c == '\n' ? 1 : 0)) > 0).Count();
int end3 = hudString.TakeWhile(c => (detailedSettingsLines -= (c == '\n' ? 1 : 0)) > 0).Count();
gap = 4;
index = hudString.TakeWhile(c => (gap -= (c == '\n' ? 1 : 0)) > 0).Count();
hudString = hudString.Insert(index, "\n");
- gap = 10;
+ gap = 11;
index = hudString.TakeWhile(c => (gap -= (c == '\n' ? 1 : 0)) > 0).Count();
hudString = hudString.Insert(index + 1, "\n");
- gap = 14;
+ gap = 15;
index = hudString.TakeWhile(c => (gap -= (c == '\n' ? 1 : 0)) > 0).Count();
hudString = hudString.Insert(index + 1, "\n");
} else if (counter == 2) {
[HarmonyPatch(typeof(HudManager), nameof(HudManager.Update))]
public class GameSettingsScalePatch {
public static void Prefix(HudManager __instance) {
- __instance.GameSettings.scale = 0.5f;
+ if (__instance.GameSettings != null) __instance.GameSettings.fontSize = 1.2f;
}
}
}
\ No newline at end of file
using System;
using System.Text;
-using GameOverReason = JBJHCLOILBF;
-using TempData = DIJKKMDMDCM;
-using WinningPlayerData = KBEBEPNGKOD;
-using DeathReason = KAPJFCMEBJE;
-using SystemTypes = LGBKLKNAINN;
-using ISystemType = CBFMKGACLNE;
-using LifeSuppSystemType = MHEBFNFMKPH;
-using ICriticalSabotage = IEGIFFLBFJG;
+using GameOverReason = AMGMAKBHCMN;
+using TempData = MFEGHOFFKKA;
+using WinningPlayerData = FDAHKHEDJPN;
+using DeathReason = EGHDCAKGMKI;
+using SystemTypes = BCPJLGGNHBC;
+using ISystemType = JBBCJFNFOBB;
+using LifeSuppSystemType = GIICFCLBGOD;
+using ICriticalSabotage = KMBJMPDCFJE;
namespace TheOtherRoles {
enum CustomGameOverReason {
}
}
- [HarmonyPatch(typeof(AmongUsClient), nameof(AmongUsClient.MDDLANONDOD))]
+ [HarmonyPatch(typeof(AmongUsClient), nameof(AmongUsClient.DDIEDPFFHOG))]
public class OnGameEndPatch {
private static GameOverReason gameOverReason;
- public static void Prefix(AmongUsClient __instance, ref GameOverReason FCBGPMEMOJB, bool GKFHPFPIHGA) {
- gameOverReason = FCBGPMEMOJB;
- if ((int)FCBGPMEMOJB >= 10) FCBGPMEMOJB = GameOverReason.ImpostorByKill;
+ public static void Prefix(AmongUsClient __instance, ref GameOverReason NEPMFBMGGLF, bool FBEKDLNKNLL) {
+ gameOverReason = NEPMFBMGGLF;
+ if ((int)NEPMFBMGGLF >= 10) NEPMFBMGGLF = GameOverReason.ImpostorByKill;
}
- public static void Postfix(AmongUsClient __instance, GameOverReason FCBGPMEMOJB, bool GKFHPFPIHGA) {
+ public static void Postfix(AmongUsClient __instance, GameOverReason NEPMFBMGGLF, bool FBEKDLNKNLL) {
AdditionalTempData.clear();
// Remove Jester from winners (on Jester win he will be added again, see below)
if (Jester.jester != null) {
WinningPlayerData jesterWinner = null;
- foreach (WinningPlayerData winner in TempData.BDGOKPKHCNB)
- if (winner.GEDNCGBDPKC == Jester.jester.IDOFAMCIJKE.HGGCLJHCDBM) jesterWinner = winner;
+ foreach (WinningPlayerData winner in TempData.BPDANAHEJDD)
+ if (winner.NNMPJKHJLMB == Jester.jester.PPMOEEPBHJO.PCLLABJCIPC) jesterWinner = winner;
- if (jesterWinner != null) TempData.BDGOKPKHCNB.Remove(jesterWinner);
+ if (jesterWinner != null) TempData.BPDANAHEJDD.Remove(jesterWinner);
}
// Remove Jackal and Sidekick from winners (on Jackal win he will be added again, see below)
if (Jackal.jackal != null || Sidekick.sidekick != null) {
List<WinningPlayerData> winnersToRemove = new List<WinningPlayerData>();
- foreach (WinningPlayerData winner in TempData.BDGOKPKHCNB) {
- if (winner.GEDNCGBDPKC == Jackal.jackal?.IDOFAMCIJKE?.HGGCLJHCDBM) winnersToRemove.Add(winner);
- if (winner.GEDNCGBDPKC == Sidekick.sidekick?.IDOFAMCIJKE?.HGGCLJHCDBM) winnersToRemove.Add(winner);
+ foreach (WinningPlayerData winner in TempData.BPDANAHEJDD) {
+ if (winner.NNMPJKHJLMB == Jackal.jackal?.PPMOEEPBHJO?.PCLLABJCIPC) winnersToRemove.Add(winner);
+ if (winner.NNMPJKHJLMB == Sidekick.sidekick?.PPMOEEPBHJO?.PCLLABJCIPC) winnersToRemove.Add(winner);
foreach(var player in Jackal.formerJackals) {
- if (winner.GEDNCGBDPKC == player.IDOFAMCIJKE.HGGCLJHCDBM) {
+ if (winner.NNMPJKHJLMB == player.PPMOEEPBHJO.PCLLABJCIPC) {
winnersToRemove.Add(winner);
}
}
}
foreach (var winner in winnersToRemove) {
- TempData.BDGOKPKHCNB.Remove(winner);
+ TempData.BPDANAHEJDD.Remove(winner);
}
}
- bool childLose = Child.child != null && gameOverReason == (GameOverReason)CustomGameOverReason.ChildLose;
bool jesterWin = Jester.jester != null && gameOverReason == (GameOverReason)CustomGameOverReason.JesterWin;
+ bool childLose = Child.child != null && gameOverReason == (GameOverReason)CustomGameOverReason.ChildLose;
+ bool loversWin = Lovers.existingAndAlive() && (gameOverReason == (GameOverReason)CustomGameOverReason.LoversWin || (TempData.OMHNAMNPJCP(gameOverReason) && Lovers.existingAndCrewLovers())); // Either they win if they are among the last 3 players, or they win if they are both Crewmates and both alive and the Crew wins (Team Imp/Jackal Lovers can only win solo wins)
+ bool teamJackalWin = gameOverReason == (GameOverReason)CustomGameOverReason.TeamJackalWin && ((Jackal.jackal != null && !Jackal.jackal.PPMOEEPBHJO.IAGJEKLJCCI) || (Sidekick.sidekick != null && !Sidekick.sidekick.PPMOEEPBHJO.IAGJEKLJCCI));
// Child lose
if (childLose) {
- TempData.BDGOKPKHCNB = new Il2CppSystem.Collections.Generic.List<WinningPlayerData>();
- WinningPlayerData wpd = new WinningPlayerData(Child.child.IDOFAMCIJKE);
- wpd.KCEFGIGGLHM = false; // If "no one is the Child", it will display the Child, but also show defeat to everyone
- TempData.BDGOKPKHCNB.Add(wpd);
+ TempData.BPDANAHEJDD = new Il2CppSystem.Collections.Generic.List<WinningPlayerData>();
+ WinningPlayerData wpd = new WinningPlayerData(Child.child.PPMOEEPBHJO);
+ wpd.APIPIPIKLCE = false; // If "no one is the Child", it will display the Child, but also show defeat to everyone
+ TempData.BPDANAHEJDD.Add(wpd);
AdditionalTempData.winCondition = WinCondition.ChildLose;
}
// Jester win
else if (jesterWin) {
- TempData.BDGOKPKHCNB = new Il2CppSystem.Collections.Generic.List<WinningPlayerData>();
- WinningPlayerData wpd = new WinningPlayerData(Jester.jester.IDOFAMCIJKE);
- TempData.BDGOKPKHCNB.Add(wpd);
+ TempData.BPDANAHEJDD = new Il2CppSystem.Collections.Generic.List<WinningPlayerData>();
+ WinningPlayerData wpd = new WinningPlayerData(Jester.jester.PPMOEEPBHJO);
+ TempData.BPDANAHEJDD.Add(wpd);
AdditionalTempData.winCondition = WinCondition.JesterWin;
}
// Lovers win conditions
- else if (Lovers.existingAndAlive() && gameOverReason == (GameOverReason)CustomGameOverReason.LoversWin) {
+ else if (loversWin) {
AdditionalTempData.localIsLover = (PlayerControl.LocalPlayer == Lovers.lover1 || PlayerControl.LocalPlayer == Lovers.lover2);
// Double win for lovers, crewmates also win
- if (!Lovers.existingWithImpLover()) {
+ if (Lovers.existingAndCrewLovers()) {
AdditionalTempData.winCondition = WinCondition.LoversTeamWin;
- TempData.BDGOKPKHCNB = new Il2CppSystem.Collections.Generic.List<WinningPlayerData>();
+ TempData.BPDANAHEJDD = new Il2CppSystem.Collections.Generic.List<WinningPlayerData>();
foreach (PlayerControl p in PlayerControl.AllPlayerControls) {
if (p == null) continue;
if (p == Lovers.lover1 || p == Lovers.lover2)
- TempData.BDGOKPKHCNB.Add(new WinningPlayerData(p.IDOFAMCIJKE));
- else if (p != Jester.jester && p != Jackal.jackal && p != Sidekick.sidekick && !p.IDOFAMCIJKE.CIDDOFDJHJH)
- TempData.BDGOKPKHCNB.Add(new WinningPlayerData(p.IDOFAMCIJKE));
+ TempData.BPDANAHEJDD.Add(new WinningPlayerData(p.PPMOEEPBHJO));
+ else if (p != Jester.jester && p != Jackal.jackal && p != Sidekick.sidekick && !p.PPMOEEPBHJO.FDNMBJOAPFL)
+ TempData.BPDANAHEJDD.Add(new WinningPlayerData(p.PPMOEEPBHJO));
}
}
// Lovers solo win
else {
AdditionalTempData.winCondition = WinCondition.LoversSoloWin;
- TempData.BDGOKPKHCNB = new Il2CppSystem.Collections.Generic.List<WinningPlayerData>();
- TempData.BDGOKPKHCNB.Add(new WinningPlayerData(Lovers.lover1.IDOFAMCIJKE));
- TempData.BDGOKPKHCNB.Add(new WinningPlayerData(Lovers.lover2.IDOFAMCIJKE));
+ TempData.BPDANAHEJDD = new Il2CppSystem.Collections.Generic.List<WinningPlayerData>();
+ TempData.BPDANAHEJDD.Add(new WinningPlayerData(Lovers.lover1.PPMOEEPBHJO));
+ TempData.BPDANAHEJDD.Add(new WinningPlayerData(Lovers.lover2.PPMOEEPBHJO));
}
}
// Jackal win condition (should be implemented using a proper GameOverReason in the future)
- else if (gameOverReason == (GameOverReason)CustomGameOverReason.TeamJackalWin && (Jackal.jackal != null && !Jackal.jackal.IDOFAMCIJKE.FGNJJFABIHJ || Sidekick.sidekick != null && !Sidekick.sidekick.IDOFAMCIJKE.FGNJJFABIHJ)) {
+ else if (teamJackalWin) {
// Jackal wins if nobody except jackal is alive
AdditionalTempData.winCondition = WinCondition.JackalWin;
- TempData.BDGOKPKHCNB = new Il2CppSystem.Collections.Generic.List<WinningPlayerData>();
- WinningPlayerData wpd = new WinningPlayerData(Jackal.jackal.IDOFAMCIJKE);
- wpd.CIDDOFDJHJH = false;
- TempData.BDGOKPKHCNB.Add(wpd);
+ TempData.BPDANAHEJDD = new Il2CppSystem.Collections.Generic.List<WinningPlayerData>();
+ WinningPlayerData wpd = new WinningPlayerData(Jackal.jackal.PPMOEEPBHJO);
+ wpd.FDNMBJOAPFL = false;
+ TempData.BPDANAHEJDD.Add(wpd);
// If there is a sidekick. The sidekick also wins
if (Sidekick.sidekick != null) {
- WinningPlayerData wpdSidekick = new WinningPlayerData(Sidekick.sidekick.IDOFAMCIJKE);
- wpdSidekick.CIDDOFDJHJH = false;
- TempData.BDGOKPKHCNB.Add(wpdSidekick);
+ WinningPlayerData wpdSidekick = new WinningPlayerData(Sidekick.sidekick.PPMOEEPBHJO);
+ wpdSidekick.FDNMBJOAPFL = false;
+ TempData.BPDANAHEJDD.Add(wpdSidekick);
}
foreach(var player in Jackal.formerJackals) {
- WinningPlayerData wpdFormerJackal = new WinningPlayerData(player.IDOFAMCIJKE);
- wpdFormerJackal.CIDDOFDJHJH = false;
- TempData.BDGOKPKHCNB.Add(wpdFormerJackal);
+ WinningPlayerData wpdFormerJackal = new WinningPlayerData(player.PPMOEEPBHJO);
+ wpdFormerJackal.FDNMBJOAPFL = false;
+ TempData.BPDANAHEJDD.Add(wpdFormerJackal);
}
}
}
}
- [HarmonyPatch(typeof(EndGameManager), nameof(EndGameManager.BIGANIAENKO))]
+ [HarmonyPatch(typeof(EndGameManager), nameof(EndGameManager.CMELCNKGDDP))]
public class EndGameManagerSetUpPatch {
public static void Postfix(EndGameManager __instance) {
GameObject bonusText = UnityEngine.Object.Instantiate(__instance.WinText.gameObject);
bonusText.transform.position = new Vector3(__instance.WinText.transform.position.x, __instance.WinText.transform.position.y - 0.8f, __instance.WinText.transform.position.z);
bonusText.transform.localScale = new Vector3(0.7f, 0.7f, 1f);
- TextRenderer textRenderer = bonusText.GetComponent<TextRenderer>();
- textRenderer.Text = "";
+ TMPro.TMP_Text textRenderer = bonusText.GetComponent<TMPro.TMP_Text>();
+ textRenderer.text = "";
if (AdditionalTempData.winCondition == WinCondition.JesterWin) {
- textRenderer.Text = "Jester Wins";
- textRenderer.Color = Jester.color;
+ textRenderer.text = "Jester Wins";
+ textRenderer.color = Jester.color;
}
else if (AdditionalTempData.winCondition == WinCondition.LoversTeamWin) {
if (AdditionalTempData.localIsLover) {
- __instance.WinText.Text = "Double Victory";
+ __instance.WinText.text = "Double Victory";
}
- textRenderer.Text = "Lovers And Crewmates Win";
- textRenderer.Color = Lovers.color;
+ textRenderer.text = "Lovers And Crewmates Win";
+ textRenderer.color = Lovers.color;
__instance.BackgroundBar.material.SetColor("_Color", Lovers.color);
}
else if (AdditionalTempData.winCondition == WinCondition.LoversSoloWin) {
- textRenderer.Text = "Lovers Win";
- textRenderer.Color = Lovers.color;
+ textRenderer.text = "Lovers Win";
+ textRenderer.color = Lovers.color;
__instance.BackgroundBar.material.SetColor("_Color", Lovers.color);
}
else if (AdditionalTempData.winCondition == WinCondition.JackalWin) {
- textRenderer.Text = "Team Jackal Wins";
- textRenderer.Color = Jackal.color;
+ textRenderer.text = "Team Jackal Wins";
+ textRenderer.color = Jackal.color;
}
else if (AdditionalTempData.winCondition == WinCondition.ChildLose) {
- textRenderer.Text = "Child died";
- textRenderer.Color = Child.color;
+ textRenderer.text = "Child died";
+ textRenderer.color = Child.color;
}
AdditionalTempData.clear();
}
}
- [HarmonyPatch(typeof(ShipStatus), nameof(ShipStatus.NBEBPPBCGLJ))]
+ [HarmonyPatch(typeof(ShipStatus), nameof(ShipStatus.KMPKPPGPNIH))]
class CheckEndCriteriaPatch{
public static bool Prefix(ShipStatus __instance) {
private static bool CheckAndEndGameForChildLose(ShipStatus __instance) {
if (Child.triggerChildLose) {
- if (!DestroyableSingleton<TutorialManager>.JECNDKBIOFO)
+ if (!DestroyableSingleton<TutorialManager>.BMHJGNNOGDM)
{
__instance.enabled = false;
- ShipStatus.PBKIGLMJEDH((GameOverReason)CustomGameOverReason.ChildLose, false);
+ ShipStatus.EABBNOODFGL((GameOverReason)CustomGameOverReason.ChildLose, false);
}
- DestroyableSingleton<HudManager>.CMJOLNCMAPD.ShowPopUp(DestroyableSingleton<TranslationController>.CMJOLNCMAPD.GetString(StringNames.GameOverImpostorDead, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
+ DestroyableSingleton<HudManager>.CHNDKKBEIDG.ShowPopUp(DestroyableSingleton<TranslationController>.CHNDKKBEIDG.GetString(StringNames.GameOverImpostorDead, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
ReviveEveryone();
return true;
}
private static bool CheckAndEndGameForJesterWin(ShipStatus __instance) {
if (Jester.triggerJesterWin) {
- if (!DestroyableSingleton<TutorialManager>.JECNDKBIOFO)
+ if (!DestroyableSingleton<TutorialManager>.BMHJGNNOGDM)
{
__instance.enabled = false;
- ShipStatus.PBKIGLMJEDH((GameOverReason)CustomGameOverReason.JesterWin, false);
+ ShipStatus.EABBNOODFGL((GameOverReason)CustomGameOverReason.JesterWin, false);
}
- DestroyableSingleton<HudManager>.CMJOLNCMAPD.ShowPopUp(DestroyableSingleton<TranslationController>.CMJOLNCMAPD.GetString(StringNames.GameOverImpostorDead, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
+ DestroyableSingleton<HudManager>.CHNDKKBEIDG.ShowPopUp(DestroyableSingleton<TranslationController>.CHNDKKBEIDG.GetString(StringNames.GameOverImpostorDead, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
ReviveEveryone();
return true;
}
ISystemType systemType = __instance.Systems.ContainsKey(SystemTypes.LifeSupp) ? __instance.Systems[SystemTypes.LifeSupp] : null;
if (systemType != null) {
LifeSuppSystemType lifeSuppSystemType = systemType.TryCast<LifeSuppSystemType>();
- if (lifeSuppSystemType != null && lifeSuppSystemType.DFAOAPHABEF < 0f) {
+ if (lifeSuppSystemType != null && lifeSuppSystemType.GPBBPGOINOF < 0f) {
EndGameForSabotage(__instance);
- lifeSuppSystemType.DFAOAPHABEF = 10000f;
+ lifeSuppSystemType.GPBBPGOINOF = 10000f;
return true;
}
}
}
if (systemType2 != null) {
ICriticalSabotage criticalSystem = systemType2.TryCast<ICriticalSabotage>();
- if (criticalSystem != null && criticalSystem.DFAOAPHABEF < 0f) {
+ if (criticalSystem != null && criticalSystem.GPBBPGOINOF < 0f) {
EndGameForSabotage(__instance);
criticalSystem.ClearSabotage();
return true;
private static bool CheckAndEndGameForTaskWin(ShipStatus __instance) {
bool localCompletedAllTasks = true;
foreach (PlayerTask t in PlayerControl.LocalPlayer.myTasks) {
- localCompletedAllTasks = localCompletedAllTasks && t.MOHGOCFFHLF;
+ localCompletedAllTasks = localCompletedAllTasks && t.FDIIBNGHCAK;
}
- if (!DestroyableSingleton<TutorialManager>.JECNDKBIOFO)
+ if (!DestroyableSingleton<TutorialManager>.BMHJGNNOGDM)
{
if (GameData.Instance.TotalTasks <= GameData.Instance.CompletedTasks)
{
__instance.enabled = false;
- ShipStatus.PBKIGLMJEDH(GameOverReason.HumansByTask, false);
+ ShipStatus.EABBNOODFGL(GameOverReason.HumansByTask, false);
return true;
}
}
else if (localCompletedAllTasks)
{
- DestroyableSingleton<HudManager>.CMJOLNCMAPD.ShowPopUp(DestroyableSingleton<TranslationController>.CMJOLNCMAPD.GetString(StringNames.GameOverTaskWin, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
+ DestroyableSingleton<HudManager>.CHNDKKBEIDG.ShowPopUp(DestroyableSingleton<TranslationController>.CHNDKKBEIDG.GetString(StringNames.GameOverTaskWin, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
__instance.Begin();
}
return false;
private static bool CheckAndEndGameForLoverWin(ShipStatus __instance, PlayerStatistics statistics) {
if (statistics.TeamLoversAlive == 2 && statistics.TotalAlive <= 3) {
- if (!DestroyableSingleton<TutorialManager>.JECNDKBIOFO)
+ if (!DestroyableSingleton<TutorialManager>.BMHJGNNOGDM)
{
__instance.enabled = false;
- ShipStatus.PBKIGLMJEDH((GameOverReason)CustomGameOverReason.LoversWin, false);
+ ShipStatus.EABBNOODFGL((GameOverReason)CustomGameOverReason.LoversWin, false);
return true;
}
- DestroyableSingleton<HudManager>.CMJOLNCMAPD.ShowPopUp(DestroyableSingleton<TranslationController>.CMJOLNCMAPD.GetString(StringNames.GameOverImpostorDead, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
+ DestroyableSingleton<HudManager>.CHNDKKBEIDG.ShowPopUp(DestroyableSingleton<TranslationController>.CHNDKKBEIDG.GetString(StringNames.GameOverImpostorDead, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
ReviveEveryone();
return true;
}
private static bool CheckAndEndGameForJackalWin(ShipStatus __instance, PlayerStatistics statistics) {
if (statistics.TeamJackalAlive >= statistics.TotalAlive - statistics.TeamJackalAlive && statistics.TeamImpostorsAlive == 0 && !(statistics.TeamJackalHasAliveLover && statistics.TeamLoversAlive == 2)) {
- if (!DestroyableSingleton<TutorialManager>.JECNDKBIOFO)
+ if (!DestroyableSingleton<TutorialManager>.BMHJGNNOGDM)
{
__instance.enabled = false;
- ShipStatus.PBKIGLMJEDH((GameOverReason)CustomGameOverReason.TeamJackalWin, false);
+ ShipStatus.EABBNOODFGL((GameOverReason)CustomGameOverReason.TeamJackalWin, false);
return true;
}
- DestroyableSingleton<HudManager>.CMJOLNCMAPD.ShowPopUp(DestroyableSingleton<TranslationController>.CMJOLNCMAPD.GetString(StringNames.GameOverImpostorKills, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
+ DestroyableSingleton<HudManager>.CHNDKKBEIDG.ShowPopUp(DestroyableSingleton<TranslationController>.CHNDKKBEIDG.GetString(StringNames.GameOverImpostorKills, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
ReviveEveryone();
return true;
}
private static bool CheckAndEndGameForImpostorWin(ShipStatus __instance, PlayerStatistics statistics) {
if (statistics.TeamImpostorsAlive >= statistics.TotalAlive - statistics.TeamImpostorsAlive && statistics.TeamJackalAlive == 0 && !(statistics.TeamImpostorHasAliveLover && statistics.TeamLoversAlive == 2)) {
- if (!DestroyableSingleton<TutorialManager>.JECNDKBIOFO) {
+ if (!DestroyableSingleton<TutorialManager>.BMHJGNNOGDM) {
__instance.enabled = false;
GameOverReason endReason;
- switch (TempData.EBGJMGKCIFN) {
+ switch (TempData.PJPCCFAPCKJ) {
case DeathReason.Exile:
endReason = GameOverReason.ImpostorByVote;
break;
endReason = GameOverReason.ImpostorByVote;
break;
}
- ShipStatus.PBKIGLMJEDH(endReason, false);
+ ShipStatus.EABBNOODFGL(endReason, false);
return true;
}
- DestroyableSingleton<HudManager>.CMJOLNCMAPD.ShowPopUp(DestroyableSingleton<TranslationController>.CMJOLNCMAPD.GetString(StringNames.GameOverImpostorKills, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
+ DestroyableSingleton<HudManager>.CHNDKKBEIDG.ShowPopUp(DestroyableSingleton<TranslationController>.CHNDKKBEIDG.GetString(StringNames.GameOverImpostorKills, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
ReviveEveryone();
return true;
}
private static bool CheckAndEndGameForCrewmateWin(ShipStatus __instance, PlayerStatistics statistics) {
if (statistics.TeamImpostorsAlive == 0 && statistics.TeamJackalAlive == 0) {
- if (!DestroyableSingleton<TutorialManager>.JECNDKBIOFO) {
+ if (!DestroyableSingleton<TutorialManager>.BMHJGNNOGDM) {
__instance.enabled = false;
- ShipStatus.PBKIGLMJEDH(GameOverReason.HumansByVote, false);
+ ShipStatus.EABBNOODFGL(GameOverReason.HumansByVote, false);
return true;
}
- DestroyableSingleton<HudManager>.CMJOLNCMAPD.ShowPopUp(DestroyableSingleton<TranslationController>.CMJOLNCMAPD.GetString(StringNames.GameOverImpostorDead, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
+ DestroyableSingleton<HudManager>.CHNDKKBEIDG.ShowPopUp(DestroyableSingleton<TranslationController>.CHNDKKBEIDG.GetString(StringNames.GameOverImpostorDead, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
ReviveEveryone();
return true;
}
}
private static void ReviveEveryone() {
- for (int i = 0; i < GameData.Instance.BCFPPIDIMJK; i++)
- GameData.Instance.AllPlayers[i].GPBBCHGPABL.Revive();
+ for (int i = 0; i < GameData.Instance.MFDAIFHGKMG; i++)
+ GameData.Instance.AllPlayers[i].GJPBCGFPMOD.Revive();
DeadBody[] array = UnityEngine.Object.FindObjectsOfType<DeadBody>();
for (int i = 0; i < array.Length; i++) UnityEngine.Object.Destroy(array[i].gameObject);
}
private static void EndGameForSabotage(ShipStatus __instance)
{
- if (!DestroyableSingleton<TutorialManager>.JECNDKBIOFO)
+ if (!DestroyableSingleton<TutorialManager>.BMHJGNNOGDM)
{
__instance.enabled = false;
- ShipStatus.PBKIGLMJEDH(GameOverReason.ImpostorBySabotage, false);
+ ShipStatus.EABBNOODFGL(GameOverReason.ImpostorBySabotage, false);
return;
}
- DestroyableSingleton<HudManager>.CMJOLNCMAPD.ShowPopUp(DestroyableSingleton<TranslationController>.CMJOLNCMAPD.GetString(StringNames.GameOverSabotage, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
+ DestroyableSingleton<HudManager>.CHNDKKBEIDG.ShowPopUp(DestroyableSingleton<TranslationController>.CHNDKKBEIDG.GetString(StringNames.GameOverSabotage, new Il2CppReferenceArray<Il2CppSystem.Object>(0)));
ReviveEveryone();
}
public bool TeamJackalHasAliveLover {get;set;}
public PlayerStatistics(ShipStatus __instance) {
- GetBCFPPIDIMJKs();
+ GetMFDAIFHGKMGs();
}
- private bool isLover(GameData.OFKOJOKOOAK p) {
- return (Lovers.lover1 != null && Lovers.lover1.PlayerId == p.GMBAIPNOKLP) || (Lovers.lover2 != null && Lovers.lover2.PlayerId == p.GMBAIPNOKLP);
+ private bool isLover(GameData.LGBOMGHJELL p) {
+ return (Lovers.lover1 != null && Lovers.lover1.PlayerId == p.FNPNJHNKEBK) || (Lovers.lover2 != null && Lovers.lover2.PlayerId == p.FNPNJHNKEBK);
}
- private void GetBCFPPIDIMJKs() {
+ private void GetMFDAIFHGKMGs() {
int numJackalAlive = 0;
int numImpostorsAlive = 0;
int numLoversAlive = 0;
bool impLover = false;
bool jackalLover = false;
- for (int i = 0; i < GameData.Instance.BCFPPIDIMJK; i++)
+ for (int i = 0; i < GameData.Instance.MFDAIFHGKMG; i++)
{
- GameData.OFKOJOKOOAK OFKOJOKOOAK = GameData.Instance.AllPlayers[i];
- if (!OFKOJOKOOAK.GBPMEHJFECK)
+ GameData.LGBOMGHJELL LGBOMGHJELL = GameData.Instance.AllPlayers[i];
+ if (!LGBOMGHJELL.MFFAGDHDHLO)
{
- if (!OFKOJOKOOAK.FGNJJFABIHJ)
+ if (!LGBOMGHJELL.IAGJEKLJCCI)
{
numTotalAlive++;
- bool lover = isLover(OFKOJOKOOAK);
+ bool lover = isLover(LGBOMGHJELL);
if (lover) numLoversAlive++;
- if (OFKOJOKOOAK.CIDDOFDJHJH) {
+ if (LGBOMGHJELL.FDNMBJOAPFL) {
numImpostorsAlive++;
if (lover) impLover = true;
}
- if (Jackal.jackal != null && Jackal.jackal.PlayerId == OFKOJOKOOAK.GMBAIPNOKLP) {
+ if (Jackal.jackal != null && Jackal.jackal.PlayerId == LGBOMGHJELL.FNPNJHNKEBK) {
numJackalAlive++;
if (lover) jackalLover = true;
}
- if (Sidekick.sidekick != null && Sidekick.sidekick.PlayerId == OFKOJOKOOAK.GMBAIPNOKLP) {
+ if (Sidekick.sidekick != null && Sidekick.sidekick.PlayerId == LGBOMGHJELL.FNPNJHNKEBK) {
numJackalAlive++;
if (lover) jackalLover = true;
}
using UnityEngine;
using static TheOtherRoles.TheOtherRoles;
-using Palette = GLNPIJPGGNJ;
-using Effects = HLPCBNMDEHF;
+using Palette = BLMBFIODBKL;
+using Effects = AEOEPNHOJDP;
namespace TheOtherRoles{
class Footprint {
this.owner = player;
this.anonymousFootprints = anonymousFootprints;
if (anonymousFootprints)
- this.color = Palette.CALCLMEEPGL[6];
+ this.color = Palette.AEDCMKGJKAG[6];
else
- this.color = Palette.CALCLMEEPGL[(int) player.IDOFAMCIJKE.JFHFMIKFHGG];
+ this.color = Palette.AEDCMKGJKAG[(int) player.PPMOEEPBHJO.IMMNCAGJJJC];
footprint = new GameObject("Footprint");
Vector3 position = new Vector3(player.transform.position.x, player.transform.position.y, player.transform.position.z + 1f);
footprint.SetActive(true);
footprints.Add(this);
- PlayerControl.LocalPlayer.StartCoroutine(Effects.LDACHPMFOIF(footprintDuration, new Action<float>((p) => {
+ PlayerControl.LocalPlayer.StartCoroutine(Effects.DCHLMIDMBHG(footprintDuration, new Action<float>((p) => {
Color c = color;
if (!anonymousFootprints && owner != null) {
- if (owner == Morphling.morphling && Morphling.morphTimer > 0 && Morphling.morphTarget?.IDOFAMCIJKE != null)
- c = Palette.CHIIBPFJACF[Morphling.morphTarget.IDOFAMCIJKE.JFHFMIKFHGG];
+ if (owner == Morphling.morphling && Morphling.morphTimer > 0 && Morphling.morphTarget?.PPMOEEPBHJO != null)
+ c = Palette.PHFOPNDOEMD[Morphling.morphTarget.PPMOEEPBHJO.IMMNCAGJJJC];
else if (Camouflager.camouflageTimer > 0)
- c = Palette.CALCLMEEPGL[6];
+ c = Palette.AEDCMKGJKAG[6];
}
if (spriteRenderer) spriteRenderer.color = new Color(c.r, c.g, c.b, Mathf.Clamp01(1 - p));
using UnityEngine;
using static TheOtherRoles.TheOtherRoles;
-using DeathReason = KAPJFCMEBJE;
+using DeathReason = EGHDCAKGMKI;
namespace TheOtherRoles{
public class DeadPlayer
--- /dev/null
+
+using HarmonyLib;
+using UnityEngine;
+using System.Collections.Generic;
+using Hazel;
+using System;
+
+using Palette = BLMBFIODBKL;
+
+namespace TheOtherRoles {
+ public class GameStartManagerPatch {
+ public static Dictionary<byte, Tuple<byte, byte, byte>> playerVersions = new Dictionary<byte, Tuple<byte, byte, byte>>();
+ private static float timer = 600f;
+ private static bool versionSent = false;
+
+ [HarmonyPatch(typeof(GameStartManager), nameof(GameStartManager.Start))]
+ public class GameStartManagerStartPatch {
+ public static void Postfix() {
+ // Refresh version infos
+ playerVersions = new Dictionary<byte, Tuple<byte, byte, byte>>();
+ versionSent = false;
+
+ // Reset lobby countdown timer
+ timer = 600f;
+ }
+ }
+
+ [HarmonyPatch(typeof(GameStartManager), nameof(GameStartManager.Update))]
+ public class GameStartManagerUpdatePatch {
+ private static bool update = false;
+ private static string currentText = "";
+
+ public static void Prefix(GameStartManager __instance) {
+ if (!AmongUsClient.Instance.HHBLOCGKFAB || !GameData.Instance) return; // Not host or no instance
+ update = GameData.Instance.MFDAIFHGKMG != __instance.OBFONKJNJFF;
+ }
+
+ public static void Postfix(GameStartManager __instance) {
+ // Send version as soon as PlayerControl.LocalPlayer exists
+ if (PlayerControl.LocalPlayer != null && !versionSent) {
+ versionSent = true;
+ MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.VersionHandshake, Hazel.SendOption.Reliable, -1);
+ writer.Write(TheOtherRolesPlugin.Major);
+ writer.Write(TheOtherRolesPlugin.Minor);
+ writer.Write(TheOtherRolesPlugin.Patch);
+ writer.Write(PlayerControl.LocalPlayer.PlayerId);
+ AmongUsClient.Instance.FinishRpcImmediately(writer);
+ RPCProcedure.versionHandshake(TheOtherRolesPlugin.Major, TheOtherRolesPlugin.Minor, TheOtherRolesPlugin.Patch, PlayerControl.LocalPlayer.PlayerId);
+ }
+
+ // Host update with version handshake infos
+ if (AmongUsClient.Instance.HHBLOCGKFAB) {
+ bool blockStart = false;
+ string message = "";
+ foreach (PlayerControl player in PlayerControl.AllPlayerControls) {
+ var dummyComponent = player.GetComponent<DummyBehaviour>();
+ if (dummyComponent != null && dummyComponent.enabled)
+ continue;
+ else if (!playerVersions.ContainsKey(player.PlayerId)) {
+ blockStart = true;
+ message += $"<color=#FF0000FF>{player.PPMOEEPBHJO.PCLLABJCIPC} has an outdated or no version of The Other Roles\n</color>";
+ } else if (playerVersions[player.PlayerId].Item1 != TheOtherRolesPlugin.Major || playerVersions[player.PlayerId].Item2 != TheOtherRolesPlugin.Minor || playerVersions[player.PlayerId].Item3 != TheOtherRolesPlugin.Patch) {
+ blockStart = true;
+ message += $"<color=#FF0000FF>{player.PPMOEEPBHJO.PCLLABJCIPC} has an outdated version (v{playerVersions[player.PlayerId].Item1}.{playerVersions[player.PlayerId].Item2}.{playerVersions[player.PlayerId].Item3}) of The Other Roles\n</color>";
+ }
+ }
+ if (blockStart) {
+ // __instance.StartButton.color = Palette.ILFJLECIGDB; // Allow the start for this version to test the feature, blocking it with the next version
+ __instance.GameStartText.text = message;
+ __instance.GameStartText.transform.localPosition = __instance.StartButton.transform.localPosition + Vector3.up * 2;
+ } else {
+ // __instance.StartButton.color = ((__instance.OBFONKJNJFF >= __instance.MinPlayers) ? Palette.BJENLBHMKAI : Palette.ILFJLECIGDB); // Allow the start for this version to test the feature, blocking it with the next version
+ __instance.GameStartText.transform.localPosition = __instance.StartButton.transform.localPosition;
+ }
+ }
+
+ // Lobby timer
+ if (!AmongUsClient.Instance.HHBLOCGKFAB || !GameData.Instance) return; // Not host or no instance
+
+ if (update) currentText = __instance.PlayerCounter.text;
+
+ timer = Mathf.Max(0f, timer -= Time.deltaTime);
+ int minutes = (int)timer / 60;
+ int seconds = (int)timer % 60;
+ string suffix = $" ({minutes:00}:{seconds:00})";
+
+ __instance.PlayerCounter.text = currentText + suffix;
+ __instance.PlayerCounter.autoSizeTextContainer = true;
+ }
+ }
+
+ [HarmonyPatch(typeof(GameStartManager), nameof(GameStartManager.BeginGame))]
+ public class GameStartManagerBeginGame {
+ public static bool Prefix(GameStartManager __instance) {
+ // Block game start if not everyone has the same mod version
+ bool continueStart = true;
+
+ // Allow the start for this version to test the feature, blocking it with the next version
+ // if (AmongUsClient.Instance.HHBLOCGKFAB) {
+ // uint hostVersion = Convert.ToUInt32(TheOtherRolesPlugin.Version.Replace(".", string.Empty));
+ // foreach (PlayerControl player in PlayerControl.AllPlayerControls) {
+ // var dummyComponent = player.GetComponent<DummyBehaviour>();
+ // if (dummyComponent != null && dummyComponent.enabled) continue;
+ // if (!playerVersions.ContainsKey(player.PlayerId) || (playerVersions[player.PlayerId].Item1 != TheOtherRolesPlugin.Major || playerVersions[player.PlayerId].Item2 != TheOtherRolesPlugin.Minor || playerVersions[player.PlayerId].Item3 != TheOtherRolesPlugin.Patch))
+ // continueStart = false;
+ // }
+ // }
+ return continueStart;
+ }
+ }
+ }
+}
\ No newline at end of file
using HarmonyLib;
using Hazel;
-using TaskTypes = CBFIAGIGOFA;
+using TaskTypes = DMOAGPGAFKM;
namespace TheOtherRoles {
public static class Helpers {
return res;
}
- public static void setSkinWithAnim(PlayerPhysics playerPhysics, uint LFDAHOFPIAM) {
- SkinData nextSkin = DestroyableSingleton<HatManager>.CMJOLNCMAPD.AllSkins[(int)LFDAHOFPIAM];
+ public static void setSkinWithAnim(PlayerPhysics playerPhysics, uint CGNMKICGLOG) {
+ SkinData nextSkin = DestroyableSingleton<HatManager>.CHNDKKBEIDG.AllSkins[(int)CGNMKICGLOG];
AnimationClip clip = null;
var spriteAnim = playerPhysics.Skin.animator;
var anim = spriteAnim.m_animator;
var skinLayer = playerPhysics.Skin;
- var currentPhysicsAnim = playerPhysics.NDIJGONKPMC.GetCurrentAnimation();
+ var currentPhysicsAnim = playerPhysics.NIKGMJIKBMP.GetCurrentAnimation();
if (currentPhysicsAnim == playerPhysics.RunAnim) clip = nextSkin.RunAnim;
else if (currentPhysicsAnim == playerPhysics.SpawnAnim) clip = nextSkin.SpawnAnim;
else if (currentPhysicsAnim == playerPhysics.EnterVentAnim) clip = nextSkin.EnterVentAnim;
else if (currentPhysicsAnim == playerPhysics.IdleAnim) clip = nextSkin.IdleAnim;
else clip = nextSkin.IdleAnim;
- float progress = playerPhysics.NDIJGONKPMC.m_animator.GetCurrentAnimatorStateInfo(0).normalizedTime;
+ float progress = playerPhysics.NIKGMJIKBMP.m_animator.GetCurrentAnimatorStateInfo(0).normalizedTime;
skinLayer.skin = nextSkin;
spriteAnim.Play(clip, 1f);
if (roleInfo.name == "Jackal") {
var getSidekickText = Jackal.canCreateSidekick ? " and recruit a Sidekick" : "";
- task.Text = $"{roleInfo.colorHexString()}{roleInfo.name}: Kill everyone{getSidekickText}";
+ task.Text = cs(roleInfo.color, $"{roleInfo.name}: Kill everyone{getSidekickText}");
} else {
- task.Text = $"{roleInfo.colorHexString()}{roleInfo.name}: {roleInfo.shortDescription}";
+ task.Text = cs(roleInfo.color, $"{roleInfo.name}: {roleInfo.shortDescription}");
}
player.myTasks.Insert(0, task);
public static bool isLighterColor(int colorId) {
return lighterColors.Contains(colorId);
}
+
+ public static bool isCustomServer() {
+ return DestroyableSingleton<ServerManager>.CHNDKKBEIDG?.KEABFOHAECE == TheOtherRolesPlugin.Ip.Value;
+ }
+
+ public static string cs(Color c, string s) {
+ return string.Format("<color=#{0:X2}{1:X2}{2:X2}{3:X2}>{4}</color>", ToByte(c.r), ToByte(c.g), ToByte(c.b), ToByte(c.a), s);
+ }
+
+ private static byte ToByte(float f) {
+ f = Mathf.Clamp01(f);
+ return (byte)(f * 255);
+ }
}
}
\ No newline at end of file
namespace TheOtherRoles
{
- [HarmonyPatch(typeof(IntroCutscene.MDIMNFHLFBN), nameof(IntroCutscene.MDIMNFHLFBN.MoveNext))]
+ [HarmonyPatch(typeof(IntroCutscene.EMGDLDOHGCK), nameof(IntroCutscene.EMGDLDOHGCK.MoveNext))]
class IntroPatch
{
// Intro special teams
- static void Prefix(IntroCutscene.MDIMNFHLFBN __instance)
+ static void Prefix(IntroCutscene.EMGDLDOHGCK __instance)
{
if (PlayerControl.LocalPlayer == Jester.jester)
{
}
// Add the Spy to the Impostor team (for the Impostors)
- if (Spy.spy != null && PlayerControl.LocalPlayer.IDOFAMCIJKE.CIDDOFDJHJH) {
+ if (Spy.spy != null && PlayerControl.LocalPlayer.PPMOEEPBHJO.FDNMBJOAPFL) {
List<PlayerControl> players = PlayerControl.AllPlayerControls.ToArray().ToList().OrderBy(x => Guid.NewGuid()).ToList();
var fakeImpostorTeam = new Il2CppSystem.Collections.Generic.List<PlayerControl>();
foreach (PlayerControl p in players) {
- if (p == Spy.spy || p.IDOFAMCIJKE.CIDDOFDJHJH)
+ if (p == Spy.spy || p.PPMOEEPBHJO.FDNMBJOAPFL)
fakeImpostorTeam.Add(p);
}
__instance.yourTeam = fakeImpostorTeam;
}
// Intro display role
- static void Postfix(IntroCutscene.MDIMNFHLFBN __instance)
+ static void Postfix(IntroCutscene.EMGDLDOHGCK __instance)
{
List<RoleInfo> infos = RoleInfo.getRoleInfoForPlayer(PlayerControl.LocalPlayer);
if (infos.Count == 0) return;
if (PlayerControl.LocalPlayer == Lovers.lover1 || PlayerControl.LocalPlayer == Lovers.lover2)
{
PlayerControl otherLover = PlayerControl.LocalPlayer == Lovers.lover1 ? Lovers.lover2 : Lovers.lover1;
- __instance.__4__this.Title.Text = PlayerControl.LocalPlayer.IDOFAMCIJKE.CIDDOFDJHJH ? "[FF1919FF]Imp[FC03BEFF]Lover" : "Lover";
- __instance.__4__this.Title.Color = PlayerControl.LocalPlayer.IDOFAMCIJKE.CIDDOFDJHJH ? Color.white : Lovers.color;
- __instance.__4__this.ImpostorText.Text = "You are in [FC03BEFF]Love [FFFFFFFF] with [FC03BEFF]" + (otherLover?.IDOFAMCIJKE?.HGGCLJHCDBM ?? "");
+ __instance.__4__this.Title.text = PlayerControl.LocalPlayer.PPMOEEPBHJO.FDNMBJOAPFL ? "<color=#FF1919FF>Imp</color>Lover" : "Lover";
+ __instance.__4__this.Title.color = PlayerControl.LocalPlayer.PPMOEEPBHJO.FDNMBJOAPFL ? Color.white : Lovers.color;
+ __instance.__4__this.ImpostorText.text = "You are in <color=#FC03BEFF>Love</color><color=#FFFFFFFF> with </color><color=#FC03BEFF>" + (otherLover?.PPMOEEPBHJO?.PCLLABJCIPC ?? "") + "</color>";
__instance.__4__this.ImpostorText.gameObject.SetActive(true);
__instance.__4__this.BackgroundBar.material.color = Lovers.color;
}
else if (roleInfo.name == "Crewmate" || roleInfo.name == "Impostor") {}
else {
- __instance.__4__this.Title.Text = roleInfo.name;
- __instance.__4__this.Title.Color = roleInfo.color;
+ __instance.__4__this.Title.text = roleInfo.name;
+ __instance.__4__this.Title.color = roleInfo.color;
__instance.__4__this.ImpostorText.gameObject.SetActive(true);
- __instance.__4__this.ImpostorText.Text = roleInfo.introDescription;
+ __instance.__4__this.ImpostorText.text = roleInfo.introDescription;
__instance.__4__this.BackgroundBar.material.color = roleInfo.color;
}
}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Collections;
+using UnityEngine;
+using System.Linq;
+
+namespace TheOtherRoles{
+
+ public class JackInTheBox {
+ public static System.Collections.Generic.List<JackInTheBox> AllJackInTheBoxes = new System.Collections.Generic.List<JackInTheBox>();
+ public static int JackInTheBoxLimit = 3;
+ private static Sprite jackInTheBoxSprite;
+ public static bool boxesConvertedToVents = false;
+
+ public static Sprite getJackInTheBoxSprite() {
+ if (jackInTheBoxSprite) return jackInTheBoxSprite;
+ jackInTheBoxSprite = Helpers.loadSpriteFromResources("TheOtherRoles.Resources.JackInTheBox.png", 175f);
+ return jackInTheBoxSprite;
+ }
+
+ private GameObject gameObject;
+ private Vent vent;
+
+ public JackInTheBox(Vector2 p) {
+ gameObject = new GameObject("JackInTheBox");
+ Vector3 position = new Vector3(p.x, p.y, PlayerControl.LocalPlayer.transform.position.z + 1f);
+
+ // Create the marker
+ gameObject.transform.position = position;
+ var boxRenderer = gameObject.AddComponent<SpriteRenderer>();
+ boxRenderer.sprite = getJackInTheBoxSprite();
+
+ // Create the vent
+ var referenceVent = UnityEngine.Object.FindObjectOfType<Vent>();
+ vent = UnityEngine.Object.Instantiate<Vent>(referenceVent);
+ vent.transform.position = gameObject.transform.position;
+ vent.Left = null;
+ vent.Right = null;
+ vent.Center = null;
+ vent.EnterVentAnim = null;
+ vent.ExitVentAnim = null;
+ vent.GetComponent<PowerTools.SpriteAnim>()?.Stop();
+ vent.Id = ShipStatus.Instance.GJHKPDGJHJN.Select(x => x.Id).Max() + 1; // Make sure we have a unique id
+ var ventRenderer = vent.GetComponent<SpriteRenderer>();
+ ventRenderer.sprite = getJackInTheBoxSprite();
+ vent.KJAENOGGEOK = ventRenderer;
+ var allVentsList = ShipStatus.Instance.GJHKPDGJHJN.ToList();
+ allVentsList.Add(vent);
+ ShipStatus.Instance.GJHKPDGJHJN = allVentsList.ToArray();
+ vent.gameObject.SetActive(false);
+ vent.name = "JackInTheBoxVent_" + vent.Id;
+
+ // Only render the box for the Trickster
+ var playerIsTrickster = PlayerControl.LocalPlayer == Trickster.trickster;
+ gameObject.SetActive(playerIsTrickster);
+
+ AllJackInTheBoxes.Add(this);
+ }
+
+ public static void UpdateStates() {
+ if (boxesConvertedToVents == true) return;
+ foreach(var box in AllJackInTheBoxes) {
+ var playerIsTrickster = PlayerControl.LocalPlayer == Trickster.trickster;
+ box.gameObject.SetActive(playerIsTrickster);
+ }
+ }
+
+ public void convertToVent() {
+ gameObject.SetActive(false);
+ vent.gameObject.SetActive(true);
+ return;
+ }
+
+ public static void convertToVents() {
+ foreach(var box in AllJackInTheBoxes) {
+ box.convertToVent();
+ }
+ connectVents();
+ boxesConvertedToVents = true;
+ return;
+ }
+
+ public static bool hasJackInTheBoxLimitReached() {
+ return (AllJackInTheBoxes.Count >= JackInTheBoxLimit);
+ }
+
+ private static void connectVents() {
+ for(var i = 0;i < AllJackInTheBoxes.Count - 1;i++) {
+ var a = AllJackInTheBoxes[i];
+ var b = AllJackInTheBoxes[i + 1];
+ a.vent.Right = b.vent;
+ b.vent.Left = a.vent;
+ }
+ // Connect first with last
+ AllJackInTheBoxes.First().vent.Left = AllJackInTheBoxes.Last().vent;
+ AllJackInTheBoxes.Last().vent.Right = AllJackInTheBoxes.First().vent;
+ }
+
+ public static void clearJackInTheBoxes() {
+ boxesConvertedToVents = false;
+ AllJackInTheBoxes = new List<JackInTheBox>();
+ }
+
+ }
+
+}
\ No newline at end of file
using System.Reflection;
using UnhollowerBaseLib;
using UnityEngine;
-using static TheOtherRoles.TheOtherRoles;
namespace TheOtherRoles
{
- [BepInPlugin(Id, "The Other Roles", "2.1.0")]
+ [BepInPlugin(Id, "The Other Roles", Version)]
[BepInProcess("Among Us.exe")]
public class TheOtherRolesPlugin : BasePlugin
{
public const string Id = "me.eisbison.theotherroles";
+ public const string Version = "2.2.0";
+ public const byte Major = 2;
+ public const byte Minor = 2;
+ public const byte Patch = 0;
+
public Harmony Harmony { get; } = new Harmony(Id);
public static TheOtherRolesPlugin Instance;
public static int optionsPage = 1;
public static ConfigEntry<bool> DebugMode { get; private set; }
+ public static ConfigEntry<string> Ip { get; set; }
+ public static ConfigEntry<ushort> Port { get; set; }
public override void Load() {
+ DebugMode = Config.Bind("Custom", "Enable Debug Mode", false);
+ Ip = Config.Bind("Custom", "Custom Server IP", "127.0.0.1");
+ Port = Config.Bind("Custom", "Custom Server Port", (ushort)22023);
+
+ IRegionInfo customRegion = new DnsRegionInfo(Ip.Value, "Custom", StringNames.NoTranslation, Ip.Value, Port.Value).Cast<IRegionInfo>();
+ ServerManager serverManager = DestroyableSingleton<ServerManager>.CHNDKKBEIDG;
+ IRegionInfo[] regions = ServerManager.DefaultRegions;
+
+ regions = regions.Concat(new IRegionInfo[] { customRegion }).ToArray();
+ ServerManager.DefaultRegions = regions;
+ serverManager.AGFAPIKFOFF = regions;
+ serverManager.SaveServers();
+
+ CEIOGGEDKAN.LMADJLEGIMH = CEIOGGEDKAN.IJGNCMMDGDI = Enumerable.Repeat(3, 16).ToArray(); // Max Imp = Recommended Imp = 3
+ CEIOGGEDKAN.JMEMPINECJN = Enumerable.Repeat(4, 15).ToArray(); // Min Players = 4
+
DebugMode = Config.Bind("Custom", "Enable Debug Mode", false);
Instance = this;
CustomOptionHolder.Load();
-
+
Harmony.PatchAll();
}
}
// Deactivate bans, since I always leave my local testing game and ban myself
- [HarmonyPatch(typeof(MOJBJJPEFPG), nameof(MOJBJJPEFPG.IJMECJONBHM), MethodType.Getter)]
+ [HarmonyPatch(typeof(IAJICOPDKHA), nameof(IAJICOPDKHA.LEHPLHFNDLM), MethodType.Getter)]
public static class AmBannedPatch
{
public static void Postfix(out bool __result)
bots.Add(playerControl);
GameData.Instance.AddPlayer(playerControl);
- AmongUsClient.Instance.Spawn(playerControl, -2, EOCEBECJBHG.None);
+ AmongUsClient.Instance.Spawn(playerControl, -2, IDCDPDDALNM.None);
playerControl.transform.position = PlayerControl.LocalPlayer.transform.position;
playerControl.GetComponent<DummyBehaviour>().enabled = true;
playerControl.NetTransform.enabled = false;
playerControl.SetName(RandomString(10));
- playerControl.SetColor((byte) random.Next(GLNPIJPGGNJ.CALCLMEEPGL.Length));
- playerControl.SetHat((uint) random.Next(HatManager.CMJOLNCMAPD.AllHats.Count), playerControl.IDOFAMCIJKE.JFHFMIKFHGG);
- playerControl.SetPet((uint) random.Next(HatManager.CMJOLNCMAPD.AllPets.Count));
- playerControl.SetSkin((uint) random.Next(HatManager.CMJOLNCMAPD.AllSkins.Count));
+ playerControl.SetColor((byte) random.Next(BLMBFIODBKL.AEDCMKGJKAG.Length));
+ playerControl.SetHat((uint) random.Next(HatManager.CHNDKKBEIDG.AllHats.Count), playerControl.PPMOEEPBHJO.IMMNCAGJJJC);
+ playerControl.SetPet((uint) random.Next(HatManager.CHNDKKBEIDG.AllPets.Count));
+ playerControl.SetSkin((uint) random.Next(HatManager.CHNDKKBEIDG.AllSkins.Count));
GameData.Instance.RpcSetTasks(playerControl.PlayerId, new byte[0]);
}
.Select(s => s[random.Next(s.Length)]).ToArray());
}
}
-
}
static class MapOptions {
// Set values
public static int maxNumberOfMeetings = 10;
+ public static bool allowSkipOnEmergencyMeetings = true;
// Updating values
public static int meetingsCount = 0;
meetingsCount = 0;
maxNumberOfMeetings = Mathf.RoundToInt(CustomOptionHolder.maxNumberOfMeetings.getSelection());
+ allowSkipOnEmergencyMeetings = CustomOptionHolder.allowSkipOnEmergencyMeetings.getBool();
}
}
}
\ No newline at end of file
using System.Linq;
using UnhollowerBaseLib;
using static TheOtherRoles.TheOtherRoles;
+using static TheOtherRoles.MapOptions;
using System.Collections;
using System;
using System.Text;
using UnityEngine;
using System.Reflection;
-using Effects = HLPCBNMDEHF;
-using Palette = GLNPIJPGGNJ;
+using Effects = AEOEPNHOJDP;
+using Palette = BLMBFIODBKL;
namespace TheOtherRoles
{
- [HarmonyPatch(typeof(MeetingHud), nameof(MeetingHud.CDLGIAMFHBH))]
- class MeetingCalculateVotesPatch {
- private static byte[] calculateVotes(MeetingHud __instance) {
- byte[] array = new byte[11];
- for (int i = 0; i < __instance.DHCOPOOJCLN.Length; i++)
- {
- PlayerVoteArea playerVoteArea = __instance.DHCOPOOJCLN[i];
- if (playerVoteArea.didVote)
+ [HarmonyPatch]
+ class MeetingHudPatch {
+ static bool[] selections;
+ static SpriteRenderer[] renderers;
+ private static GameData.LGBOMGHJELL target = null;
+
+ [HarmonyPatch(typeof(MeetingHud), nameof(MeetingHud.KEICNHGALLI))]
+ class MeetingCalculateVotesPatch {
+ private static byte[] calculateVotes(MeetingHud __instance) {
+ byte[] array = new byte[__instance.GBKFCOAKLAH.Length + 1];
+ for (int i = 0; i < __instance.GBKFCOAKLAH.Length; i++)
{
- int num = (int)(playerVoteArea.votedFor + 1);
- if (num >= 0 && num < array.Length)
+ PlayerVoteArea playerVoteArea = __instance.GBKFCOAKLAH[i];
+ if (playerVoteArea.didVote)
{
- byte[] array2 = array;
- int num2 = num;
- // Mayor count vote twice
- if (Mayor.mayor != null && playerVoteArea.HMPHKKGPLAG == (sbyte)Mayor.mayor.PlayerId)
- array2[num2] += 2;
- else
- array2[num2] += 1;
+ int num = (int)(playerVoteArea.votedFor + 1);
+ if (num >= 0 && num < array.Length)
+ {
+ byte[] array2 = array;
+ int num2 = num;
+ // Mayor count vote twice
+ if (Mayor.mayor != null && playerVoteArea.GEIOMAPOPKA == (sbyte)Mayor.mayor.PlayerId)
+ array2[num2] += 2;
+ else
+ array2[num2] += 1;
+ }
}
}
- }
- // Swapper swap votes
- PlayerVoteArea swapped1 = null;
- PlayerVoteArea swapped2 = null;
+ // Swapper swap votes
+ PlayerVoteArea swapped1 = null;
+ PlayerVoteArea swapped2 = null;
- foreach (PlayerVoteArea playerVoteArea in __instance.DHCOPOOJCLN) {
- if (playerVoteArea.HMPHKKGPLAG == Swapper.playerId1) swapped1 = playerVoteArea;
- if (playerVoteArea.HMPHKKGPLAG == Swapper.playerId2) swapped2 = playerVoteArea;
- }
+ foreach (PlayerVoteArea playerVoteArea in __instance.GBKFCOAKLAH) {
+ if (playerVoteArea.GEIOMAPOPKA == Swapper.playerId1) swapped1 = playerVoteArea;
+ if (playerVoteArea.GEIOMAPOPKA == Swapper.playerId2) swapped2 = playerVoteArea;
+ }
- if (swapped1 != null && swapped2 != null && swapped1.HMPHKKGPLAG + 1 >= 0 && swapped1.HMPHKKGPLAG + 1 < array.Length && swapped2.HMPHKKGPLAG + 1 >= 0 && swapped2.HMPHKKGPLAG + 1 < array.Length) {
- byte tmp = array[swapped1.HMPHKKGPLAG + 1];
- array[swapped1.HMPHKKGPLAG + 1] = array[swapped2.HMPHKKGPLAG + 1];
- array[swapped2.HMPHKKGPLAG + 1] = tmp;
+ if (swapped1 != null && swapped2 != null && swapped1.GEIOMAPOPKA + 1 >= 0 && swapped1.GEIOMAPOPKA + 1 < array.Length && swapped2.GEIOMAPOPKA + 1 >= 0 && swapped2.GEIOMAPOPKA + 1 < array.Length) {
+ byte tmp = array[swapped1.GEIOMAPOPKA + 1];
+ array[swapped1.GEIOMAPOPKA + 1] = array[swapped2.GEIOMAPOPKA + 1];
+ array[swapped2.GEIOMAPOPKA + 1] = tmp;
+ }
+ return array;
}
- return array;
- }
- private static int IndexOfMax(byte[] self, Func<byte, int> comparer, out bool tie) {
- tie = false;
- int num = int.MinValue;
- int result = -1;
- for (int i = 0; i < self.Length; i++)
- {
- int num2 = comparer(self[i]);
- if (num2 > num)
+ private static int IndexOfMax(byte[] self, Func<byte, int> comparer, out bool tie) {
+ tie = false;
+ int num = int.MinValue;
+ int result = -1;
+ for (int i = 0; i < self.Length; i++)
{
- result = i;
- num = num2;
- tie = false;
- }
- else if (num2 == num)
- {
- tie = true;
- result = -1;
+ int num2 = comparer(self[i]);
+ if (num2 > num)
+ {
+ result = i;
+ num = num2;
+ tie = false;
+ }
+ else if (num2 == num)
+ {
+ tie = true;
+ result = -1;
+ }
}
+ return result;
}
- return result;
- }
- static bool Prefix(MeetingHud __instance)
- {
- if (__instance.DHCOPOOJCLN.All((PlayerVoteArea ps) => ps.isDead || ps.didVote))
+ static bool Prefix(MeetingHud __instance)
{
- byte[] self = calculateVotes(__instance);
- bool tie;
- int maxIdx = IndexOfMax(self, (byte p) => (int)p, out tie) - 1;
- GameData.OFKOJOKOOAK exiled = null;
- foreach (GameData.OFKOJOKOOAK pi in GameData.Instance.AllPlayers) {
- if (pi.GMBAIPNOKLP == maxIdx) {
- exiled = pi;
- break;
- }
- }
- byte[] array = new byte[10];
- for (int i = 0; i < __instance.DHCOPOOJCLN.Length; i++)
+ if (__instance.GBKFCOAKLAH.All((PlayerVoteArea ps) => ps.isDead || ps.didVote))
{
- PlayerVoteArea playerVoteArea = __instance.DHCOPOOJCLN[i];
- array[(int)playerVoteArea.HMPHKKGPLAG] = playerVoteArea.GetState();
+ // If skipping is disabled, replace skipps/no-votes with self vote
+ if (target == null && !allowSkipOnEmergencyMeetings) {
+ foreach (PlayerVoteArea playerVoteArea in __instance.GBKFCOAKLAH) {
+ if (playerVoteArea.votedFor < 0) playerVoteArea.votedFor = playerVoteArea.GEIOMAPOPKA; // TargetPlayerId
+ }
+ }
+
+ byte[] self = calculateVotes(__instance);
+ bool tie;
+ int maxIdx = IndexOfMax(self, (byte p) => (int)p, out tie) - 1;
+ GameData.LGBOMGHJELL exiled = null;
+ foreach (GameData.LGBOMGHJELL pi in GameData.Instance.AllPlayers) {
+ if (pi.FNPNJHNKEBK == maxIdx) {
+ exiled = pi;
+ break;
+ }
+ }
+ byte[] array = new byte[__instance.GBKFCOAKLAH.Length];
+ for (int i = 0; i < __instance.GBKFCOAKLAH.Length; i++)
+ {
+ PlayerVoteArea playerVoteArea = __instance.GBKFCOAKLAH[i];
+ array[(int)playerVoteArea.GEIOMAPOPKA] = playerVoteArea.GetState();
+ }
+ // RPCVotingComplete
+ if (AmongUsClient.Instance.BPADAHAOBLM)
+ __instance.BBFDNCCEJHI(array, exiled, tie);
+ MessageWriter messageWriter = AmongUsClient.Instance.StartRpc(__instance.NetId, 23, Hazel.SendOption.Reliable);
+ messageWriter.WriteBytesAndSize(array);
+ messageWriter.Write((exiled != null) ? exiled.FNPNJHNKEBK : byte.MaxValue);
+ messageWriter.Write(tie);
+ messageWriter.EndMessage();
}
- // RPCVotingComplete
- if (AmongUsClient.Instance.HNMILJEOEKN)
- __instance.MJIJGEBBMAO(array, exiled, tie);
- MessageWriter messageWriter = AmongUsClient.Instance.StartRpc(__instance.NetId, 23, Hazel.SendOption.Reliable);
- messageWriter.WriteBytesAndSize(array);
- messageWriter.Write((exiled != null) ? exiled.GMBAIPNOKLP : byte.MaxValue);
- messageWriter.Write(tie);
- messageWriter.EndMessage();
+ return false;
}
- return false;
}
- }
-
- [HarmonyPatch(typeof(MeetingHud), nameof(MeetingHud.OMFOBKIENPI))]
- class MeetingPopulateVotesPatch {
- static bool Prefix(MeetingHud __instance, Il2CppStructArray<byte> HIDHPMAKEKH)
- {
- // Swapper swap votes
- PlayerVoteArea swapped1 = null;
- PlayerVoteArea swapped2 = null;
- foreach (PlayerVoteArea playerVoteArea in __instance.DHCOPOOJCLN) {
- if (playerVoteArea.HMPHKKGPLAG == Swapper.playerId1) swapped1 = playerVoteArea;
- if (playerVoteArea.HMPHKKGPLAG == Swapper.playerId2) swapped2 = playerVoteArea;
- }
+ [HarmonyPatch(typeof(MeetingHud), nameof(MeetingHud.FIJFIACMIFB))]
+ class MeetingPopulateVotesPatch {
+ static bool Prefix(MeetingHud __instance, Il2CppStructArray<byte> COMOIMMLKHF)
+ {
+ // Swapper swap votes
+ PlayerVoteArea swapped1 = null;
+ PlayerVoteArea swapped2 = null;
- bool doSwap = swapped1 != null && swapped2 != null;
- if (doSwap) {
+ foreach (PlayerVoteArea playerVoteArea in __instance.GBKFCOAKLAH) {
+ if (playerVoteArea.GEIOMAPOPKA == Swapper.playerId1) swapped1 = playerVoteArea;
+ if (playerVoteArea.GEIOMAPOPKA == Swapper.playerId2) swapped2 = playerVoteArea;
+ }
- __instance.StartCoroutine(Effects.NFAIFCPOFJK(swapped1.transform, swapped1.transform.localPosition, swapped2.transform.localPosition, 2f));
- __instance.StartCoroutine(Effects.NFAIFCPOFJK(swapped2.transform, swapped2.transform.localPosition, swapped1.transform.localPosition, 2f));
- }
+ bool doSwap = swapped1 != null && swapped2 != null;
+ if (doSwap) {
- // Mayor display vote twice
- __instance.TitleText.Text = DestroyableSingleton<TranslationController>.CMJOLNCMAPD.GetString(StringNames.MeetingVotingResults, new Il2CppReferenceArray<Il2CppSystem.Object>(0));
- int num = doSwap ? 4 : 0; // Delay animaton if swapping
- for (int i = 0; i < __instance.DHCOPOOJCLN.Length; i++)
- {
- PlayerVoteArea playerVoteArea = __instance.DHCOPOOJCLN[i];
- playerVoteArea.ClearForResults();
- int num2 = doSwap ? 4 : 0; // Delay animaton if swapping
- bool mayorFirstVoteDisplayed = false;
+ __instance.StartCoroutine(Effects.KLAIEICHCNO(swapped1.transform, swapped1.transform.localPosition, swapped2.transform.localPosition, 2f));
+ __instance.StartCoroutine(Effects.KLAIEICHCNO(swapped2.transform, swapped2.transform.localPosition, swapped1.transform.localPosition, 2f));
+ }
- for (int j = 0; j < __instance.DHCOPOOJCLN.Length; j++)
+ // Mayor display vote twice
+ __instance.TitleText.text = DestroyableSingleton<TranslationController>.CHNDKKBEIDG.GetString(StringNames.MeetingVotingResults, new Il2CppReferenceArray<Il2CppSystem.Object>(0));
+ int num = doSwap ? 4 : 0; // Delay animaton if swapping
+ for (int i = 0; i < __instance.GBKFCOAKLAH.Length; i++)
{
- PlayerVoteArea playerVoteArea2 = __instance.DHCOPOOJCLN[j];
- byte self = HIDHPMAKEKH[(int)playerVoteArea2.HMPHKKGPLAG];
+ PlayerVoteArea playerVoteArea = __instance.GBKFCOAKLAH[i];
+ playerVoteArea.ClearForResults();
+ int num2 = doSwap ? 4 : 0; // Delay animaton if swapping
+ bool mayorFirstVoteDisplayed = false;
- if (!((self & 128) > 0))
+ for (int j = 0; j < __instance.GBKFCOAKLAH.Length; j++)
{
- GameData.OFKOJOKOOAK playerById = GameData.Instance.GetPlayerById((byte)playerVoteArea2.HMPHKKGPLAG);
- int votedFor = (int)PlayerVoteArea.GetVotedFor(self);
- if (votedFor == (int)playerVoteArea.HMPHKKGPLAG)
- {
- SpriteRenderer spriteRenderer = UnityEngine.Object.Instantiate<SpriteRenderer>(__instance.PlayerVotePrefab);
- if (PlayerControl.GameOptions.LNMFPEMGKOB)
- {
- PlayerControl.SetPlayerMaterialColors(Palette.JMELLHINKGM, spriteRenderer);
- }
- else
- {
- PlayerControl.SetPlayerMaterialColors((int)playerById.JFHFMIKFHGG, spriteRenderer);
- }
- spriteRenderer.transform.SetParent(playerVoteArea.transform);
- spriteRenderer.transform.localPosition = __instance.ALGONDAMLHA + new Vector3(__instance.LKIOFMMBOBJ.x * (float)num2, 0f, 0f);
- spriteRenderer.transform.localScale = Vector3.zero;
- spriteRenderer.transform.SetParent(playerVoteArea.transform.parent); // Reparent votes so they don't move with their playerVoteArea
- __instance.StartCoroutine(Effects.POFLJMGFBEJ((float)num2 * 0.5f, spriteRenderer.transform, 1f, 0.5f));
- num2++;
- }
- else if (i == 0 && votedFor == -1)
+ PlayerVoteArea playerVoteArea2 = __instance.GBKFCOAKLAH[j];
+ byte self = COMOIMMLKHF[(int)playerVoteArea2.GEIOMAPOPKA];
+
+ if (!((self & 128) > 0))
{
- SpriteRenderer spriteRenderer2 = UnityEngine.Object.Instantiate<SpriteRenderer>(__instance.PlayerVotePrefab);
- if (PlayerControl.GameOptions.LNMFPEMGKOB)
+ GameData.LGBOMGHJELL playerById = GameData.Instance.GetPlayerById((byte)playerVoteArea2.GEIOMAPOPKA);
+ int votedFor = (int)PlayerVoteArea.GetVotedFor(self);
+ if (votedFor == (int)playerVoteArea.GEIOMAPOPKA)
{
- PlayerControl.SetPlayerMaterialColors(Palette.JMELLHINKGM, spriteRenderer2);
+ SpriteRenderer spriteRenderer = UnityEngine.Object.Instantiate<SpriteRenderer>(__instance.PlayerVotePrefab);
+ if (PlayerControl.GameOptions.BBPDJOCPEEJ)
+ {
+ PlayerControl.SetPlayerMaterialColors(Palette.EGHCBLDNCGP, spriteRenderer);
+ }
+ else
+ {
+ PlayerControl.SetPlayerMaterialColors((int)playerById.IMMNCAGJJJC, spriteRenderer);
+ }
+ spriteRenderer.transform.SetParent(playerVoteArea.transform);
+ spriteRenderer.transform.localPosition = __instance.FAJKDFHIHDN + new Vector3(__instance.GGHFHCMCJAL.x * (float)num2, 0f, 0f);
+ spriteRenderer.transform.localScale = Vector3.zero;
+ spriteRenderer.transform.SetParent(playerVoteArea.transform.parent); // Reparent votes so they don't move with their playerVoteArea
+ __instance.StartCoroutine(Effects.JCDLOIMPBFJ((float)num2 * 0.5f, spriteRenderer.transform, 1f, 0.5f));
+ num2++;
}
- else
+ else if (i == 0 && votedFor == -1)
{
- PlayerControl.SetPlayerMaterialColors((int)playerById.JFHFMIKFHGG, spriteRenderer2);
+ SpriteRenderer spriteRenderer2 = UnityEngine.Object.Instantiate<SpriteRenderer>(__instance.PlayerVotePrefab);
+ if (PlayerControl.GameOptions.BBPDJOCPEEJ)
+ {
+ PlayerControl.SetPlayerMaterialColors(Palette.EGHCBLDNCGP, spriteRenderer2);
+ }
+ else
+ {
+ PlayerControl.SetPlayerMaterialColors((int)playerById.IMMNCAGJJJC, spriteRenderer2);
+ }
+ spriteRenderer2.transform.SetParent(__instance.SkippedVoting.transform);
+ spriteRenderer2.transform.localPosition = __instance.FAJKDFHIHDN + new Vector3(__instance.GGHFHCMCJAL.x * (float)num, 0f, 0f);
+ spriteRenderer2.transform.localScale = Vector3.zero;
+ spriteRenderer2.transform.SetParent(playerVoteArea.transform.parent); // Reparent votes so they don't move with their playerVoteArea
+ __instance.StartCoroutine(Effects.JCDLOIMPBFJ((float)num * 0.5f, spriteRenderer2.transform, 1f, 0.5f));
+ num++;
}
- spriteRenderer2.transform.SetParent(__instance.SkippedVoting.transform);
- spriteRenderer2.transform.localPosition = __instance.ALGONDAMLHA + new Vector3(__instance.LKIOFMMBOBJ.x * (float)num, 0f, 0f);
- spriteRenderer2.transform.localScale = Vector3.zero;
- spriteRenderer2.transform.SetParent(playerVoteArea.transform.parent); // Reparent votes so they don't move with their playerVoteArea
- __instance.StartCoroutine(Effects.POFLJMGFBEJ((float)num * 0.5f, spriteRenderer2.transform, 1f, 0.5f));
- num++;
- }
- // Major vote, redo this iteration to place a second vote
- if (Mayor.mayor != null && playerVoteArea2.HMPHKKGPLAG == (sbyte)Mayor.mayor.PlayerId && !mayorFirstVoteDisplayed) {
- mayorFirstVoteDisplayed = true;
- j--;
+ // Major vote, redo this iteration to place a second vote
+ if (Mayor.mayor != null && playerVoteArea2.GEIOMAPOPKA == (sbyte)Mayor.mayor.PlayerId && !mayorFirstVoteDisplayed) {
+ mayorFirstVoteDisplayed = true;
+ j--;
+ }
}
}
}
- }
- return false;
+ return false;
+ }
}
- }
-
- [HarmonyPatch]
- class MeetingHudPopulateButtonsPatch {
- static bool[] selections;
- static SpriteRenderer[] renderers;
-
- [HarmonyPatch(typeof(MeetingHud), nameof(MeetingHud.MJIJGEBBMAO))]
+ [HarmonyPatch(typeof(MeetingHud), nameof(MeetingHud.BBFDNCCEJHI))]
class MeetingHudVotingCompletedPatch {
- static void Postfix(MeetingHud __instance, byte[] HIDHPMAKEKH, GameData.OFKOJOKOOAK KLHCDCKJHKC, bool EMLKEPIBJLK)
+ static void Postfix(MeetingHud __instance, byte[] COMOIMMLKHF, GameData.LGBOMGHJELL EAFLJGMBLCH, bool EMBDDLIPBME)
{
// Reset swapper values
Swapper.playerId1 = Byte.MaxValue;
// Lovers save next to be exiled, because RPC of ending game comes before RPC of exiled
Lovers.notAckedExiledIsLover = false;
- if (KLHCDCKJHKC != null)
- Lovers.notAckedExiledIsLover = ((Lovers.lover1 != null && Lovers.lover1.PlayerId == KLHCDCKJHKC.GMBAIPNOKLP) || (Lovers.lover2 != null && Lovers.lover2.PlayerId == KLHCDCKJHKC.GMBAIPNOKLP));
+ if (EAFLJGMBLCH != null)
+ Lovers.notAckedExiledIsLover = ((Lovers.lover1 != null && Lovers.lover1.PlayerId == EAFLJGMBLCH.FNPNJHNKEBK) || (Lovers.lover2 != null && Lovers.lover2.PlayerId == EAFLJGMBLCH.FNPNJHNKEBK));
}
}
static void onClick(int i, MeetingHud __instance)
{
- if (Swapper.swapper == null || PlayerControl.LocalPlayer != Swapper.swapper || Swapper.swapper.IDOFAMCIJKE.FGNJJFABIHJ) return;
- if (__instance.MJMOOPLLNPO == MeetingHud.DDMMMDGMFIK.Results) return;
- if (__instance.DHCOPOOJCLN[i].isDead) return;
+ if (Swapper.swapper == null || PlayerControl.LocalPlayer != Swapper.swapper || Swapper.swapper.PPMOEEPBHJO.IAGJEKLJCCI) return;
+ if (__instance.FOIGOPKABAA == MeetingHud.MANCENPNMAC.Results) return;
+ if (__instance.GBKFCOAKLAH[i].isDead) return;
int selectedCount = selections.Where(b => b).Count();
SpriteRenderer renderer = renderers[i];
for (int A = 0; A < selections.Length; A++) {
if (selections[A]) {
if (firstPlayer != null) {
- secondPlayer = __instance.DHCOPOOJCLN[A];
+ secondPlayer = __instance.GBKFCOAKLAH[A];
break;
} else {
- firstPlayer = __instance.DHCOPOOJCLN[A];
+ firstPlayer = __instance.GBKFCOAKLAH[A];
}
}
}
if (firstPlayer != null && secondPlayer != null) {
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.SwapperSwap, Hazel.SendOption.Reliable, -1);
- writer.Write((byte)firstPlayer.HMPHKKGPLAG);
- writer.Write((byte)secondPlayer.HMPHKKGPLAG);
+ writer.Write((byte)firstPlayer.GEIOMAPOPKA);
+ writer.Write((byte)secondPlayer.GEIOMAPOPKA);
AmongUsClient.Instance.FinishRpcImmediately(writer);
- RPCProcedure.swapperSwap((byte)firstPlayer.HMPHKKGPLAG, (byte)secondPlayer.HMPHKKGPLAG);
+ RPCProcedure.swapperSwap((byte)firstPlayer.GEIOMAPOPKA, (byte)secondPlayer.GEIOMAPOPKA);
}
}
}
}
- static void addSwapperSwapButtons(MeetingHud __instance) {
- if (Swapper.swapper == null || PlayerControl.LocalPlayer != Swapper.swapper || Swapper.swapper.IDOFAMCIJKE.FGNJJFABIHJ) return;
+ static void populateButtonsPostfix(MeetingHud __instance) {
+ // Reposition button if there are more than 10 players
+ float scale = 5f / 8f; // 8 rows are needed instead of 5
+ if (__instance.GBKFCOAKLAH != null && __instance.GBKFCOAKLAH.Length > 10) {
+ for (int i = 0; i < __instance.GBKFCOAKLAH.Length; i++) {
+ PlayerVoteArea area = __instance.GBKFCOAKLAH[i];
+ bool isLeft = i % 2 == 0;
+ int num2 = i / 2;
+ area.transform.localPosition = __instance.VoteOrigin + new Vector3(isLeft ? 1f : 3.9f, __instance.VoteButtonOffsets.y * (float)num2 * scale, area.transform.localPosition.z);
+ area.transform.localScale = new Vector3(area.transform.localScale.x * scale, area.transform.localScale.y * scale, area.transform.localScale.z);
+ }
+ }
- selections = new bool[__instance.DHCOPOOJCLN.Length];
- renderers = new SpriteRenderer[__instance.DHCOPOOJCLN.Length];
+ // Add Swapper Buttons
+ if (Swapper.swapper == null || PlayerControl.LocalPlayer != Swapper.swapper || Swapper.swapper.PPMOEEPBHJO.IAGJEKLJCCI) return;
+ selections = new bool[__instance.GBKFCOAKLAH.Length];
+ renderers = new SpriteRenderer[__instance.GBKFCOAKLAH.Length];
- for (int i = 0; i < __instance.DHCOPOOJCLN.Length; i++)
+ for (int i = 0; i < __instance.GBKFCOAKLAH.Length; i++)
{
- PlayerVoteArea playerVoteArea = __instance.DHCOPOOJCLN[i];
+ PlayerVoteArea playerVoteArea = __instance.GBKFCOAKLAH[i];
GameObject template = playerVoteArea.Buttons.transform.Find("CancelButton").gameObject;
GameObject checkbox = UnityEngine.Object.Instantiate(template);
checkbox.transform.SetParent(playerVoteArea.transform);
class MeetingServerStartPatch {
static void Postfix(MeetingHud __instance)
{
- // Add swapper buttons
- addSwapperSwapButtons(__instance);
+ populateButtonsPostfix(__instance);
}
}
[HarmonyPatch(typeof(MeetingHud), nameof(MeetingHud.Deserialize))]
class MeetingDeserializePatch {
- static void Postfix(MeetingHud __instance, MessageReader DOOILGKLBBF, bool IHJEKEOFMGJ)
+ static void Postfix(MeetingHud __instance, MessageReader JIGFBHFFNFI, bool DNMLJNIADHH)
{
// Add swapper buttons
- if (IHJEKEOFMGJ) {
- addSwapperSwapButtons(__instance);
+ if (DNMLJNIADHH) {
+ populateButtonsPostfix(__instance);
}
}
}
+
+ [HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.CoStartMeeting))]
+ class StartMeetingPatch {
+ public static void Prefix(PlayerControl __instance, GameData.LGBOMGHJELL DGDGDKCCKHJ) {
+ // Reset vampire bitten
+ Vampire.bitten = null;
+ // Count meetings
+ if (DGDGDKCCKHJ == null) meetingsCount++;
+ // Save the meeting target
+ target = DGDGDKCCKHJ;
+ }
+ }
+
+ [HarmonyPatch(typeof(MeetingHud), nameof(MeetingHud.Update))]
+ class MeetingHudUpdatePatch {
+ static void Postfix(MeetingHud __instance) {
+ // Deactivate skip Button if skipping on emergency meetings is disabled
+ if (target == null && !allowSkipOnEmergencyMeetings)
+ __instance.SkipVoteButton.gameObject.SetActive(false);
+ }
+ }
}
[HarmonyPatch(typeof(ExileController), "Begin")]
class ExileBeginPatch {
- public static void Prefix(ref GameData.OFKOJOKOOAK KLHCDCKJHKC, bool EMLKEPIBJLK) {
+ public static void Prefix(ref GameData.LGBOMGHJELL EAFLJGMBLCH, bool EMBDDLIPBME) {
// Shifter shift
- if (Shifter.shifter != null && AmongUsClient.Instance.CBKCIKKEJHI && 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)
+ if (Shifter.shifter != null && AmongUsClient.Instance.HHBLOCGKFAB && 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(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ShifterShift, Hazel.SendOption.Reliable, -1);
writer.Write(Shifter.futureShift.PlayerId);
AmongUsClient.Instance.FinishRpcImmediately(writer);
Shifter.futureShift = null;
// Eraser erase
- if (Eraser.eraser != null && AmongUsClient.Instance.CBKCIKKEJHI && 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)
+ if (Eraser.eraser != null && AmongUsClient.Instance.HHBLOCGKFAB && 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) {
if (target != null) {
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ErasePlayerRole, Hazel.SendOption.Reliable, -1);
}
}
Eraser.futureErased = new List<PlayerControl>();
+
+ // Trickster boxes
+ if (Trickster.trickster != null && JackInTheBox.hasJackInTheBoxLimitReached()) {
+ JackInTheBox.convertToVents();
+ }
}
}
// Reset custom button timers where necessary
CustomButton.MeetingEndedUpdate();
// Child set adapted cooldown
- if (Child.child != null && PlayerControl.LocalPlayer == Child.child && Child.child.IDOFAMCIJKE.CIDDOFDJHJH) {
+ if (Child.child != null && PlayerControl.LocalPlayer == Child.child && Child.child.PPMOEEPBHJO.FDNMBJOAPFL) {
var multiplier = Child.isGrownUp() ? 0.66f : 2f;
- Child.child.SetKillTimer(PlayerControl.GameOptions.ELBDIKIOHHH * multiplier);
+ Child.child.SetKillTimer(PlayerControl.GameOptions.DGOPNLEEAAJ * multiplier);
}
// Seer spawn souls
var rend = soul.AddComponent<SpriteRenderer>();
rend.sprite = Seer.getSoulSprite();
- PlayerControl.LocalPlayer.StartCoroutine(Effects.LDACHPMFOIF(Seer.soulDuration, new Action<float>((p) => {
- if (rend != null) {
- var tmp = rend.color;
- tmp.a = Mathf.Clamp01(1 - p);
- rend.color = tmp;
- }
- if (p == 1f && rend?.gameObject != null) UnityEngine.Object.Destroy(rend.gameObject);
- })));
+ if(Seer.limitSoulDuration) {
+ PlayerControl.LocalPlayer.StartCoroutine(Effects.DCHLMIDMBHG(Seer.soulDuration, new Action<float>((p) => {
+ if (rend != null) {
+ var tmp = rend.color;
+ tmp.a = Mathf.Clamp01(1 - p);
+ rend.color = tmp;
+ }
+ if (p == 1f && rend?.gameObject != null) UnityEngine.Object.Destroy(rend.gameObject);
+ })));
+ }
}
Seer.deadBodyPositions = new List<Vector3>();
}
[HarmonyPatch(typeof(TranslationController), nameof(TranslationController.GetString), new Type[] { typeof(StringNames), typeof(Il2CppReferenceArray<Il2CppSystem.Object>) })]
class MeetingExiledTextPatch
{
- static void Postfix(ref string __result, StringNames MKFNKGIBBHP, Il2CppReferenceArray<Il2CppSystem.Object> BPBFAAEIABN)
+ static void Postfix(ref string __result, StringNames AKGLBKHCEMI, Il2CppReferenceArray<Il2CppSystem.Object> FHLKFONKJLH)
{
- if (ExileController.Instance != null && ExileController.Instance.KLHCDCKJHKC != null)
+ if (ExileController.Instance != null && ExileController.Instance.EAFLJGMBLCH != null)
{
// Exile role text for roles that are being assigned to crewmates
- if (MKFNKGIBBHP == StringNames.ExileTextPN || MKFNKGIBBHP == StringNames.ExileTextSN)
+ if (AKGLBKHCEMI == StringNames.ExileTextPN || AKGLBKHCEMI == StringNames.ExileTextSN)
{
- if( Jester.jester != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Jester.jester.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Jester.";
- else if(Mayor.mayor != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Mayor.mayor.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Mayor.";
- else if(Engineer.engineer != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Engineer.engineer.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Engineer.";
- else if(Sheriff.sheriff != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Sheriff.sheriff.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Sheriff.";
- else if(Lighter.lighter != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Lighter.lighter.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Lighter.";
- else if(Detective.detective != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Detective.detective.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Detective.";
- else if(TimeMaster.timeMaster != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == TimeMaster.timeMaster.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Time Master.";
- else if(Medic.medic != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Medic.medic.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Medic.";
- else if(Shifter.shifter != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Shifter.shifter.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Shifter.";
- else if(Swapper.swapper != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Swapper.swapper.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Swapper.";
- else if(Lovers.lover1 != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Lovers.lover1.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Lover.";
- else if(Lovers.lover2 != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Lovers.lover2.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Lover.";
- else if(Seer.seer != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Seer.seer.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Seer.";
- else if(Hacker.hacker != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Hacker.hacker.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Hacker.";
- else if(Child.child != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Child.child.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Child.";
- else if(Tracker.tracker != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Tracker.tracker.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Tracker.";
- else if(Snitch.snitch != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Snitch.snitch.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Snitch.";
- else if(Jackal.jackal != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Jackal.jackal.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Jackal.";
- else if(Sidekick.sidekick != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Sidekick.sidekick.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Sidekick.";
- else if(Spy.spy != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Spy.spy.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Spy.";
+ if( Jester.jester != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Jester.jester.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Jester.";
+ else if(Mayor.mayor != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Mayor.mayor.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Mayor.";
+ else if(Engineer.engineer != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Engineer.engineer.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Engineer.";
+ else if(Sheriff.sheriff != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Sheriff.sheriff.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Sheriff.";
+ else if(Lighter.lighter != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Lighter.lighter.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Lighter.";
+ else if(Detective.detective != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Detective.detective.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Detective.";
+ else if(TimeMaster.timeMaster != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == TimeMaster.timeMaster.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Time Master.";
+ else if(Medic.medic != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Medic.medic.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Medic.";
+ else if(Shifter.shifter != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Shifter.shifter.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Shifter.";
+ else if(Swapper.swapper != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Swapper.swapper.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Swapper.";
+ else if(Lovers.lover1 != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Lovers.lover1.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Lover.";
+ else if(Lovers.lover2 != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Lovers.lover2.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Lover.";
+ else if(Seer.seer != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Seer.seer.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Seer.";
+ else if(Hacker.hacker != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Hacker.hacker.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Hacker.";
+ else if(Child.child != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Child.child.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Child.";
+ else if(Tracker.tracker != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Tracker.tracker.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Tracker.";
+ else if(Snitch.snitch != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Snitch.snitch.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Snitch.";
+ else if(Jackal.jackal != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Jackal.jackal.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Jackal.";
+ else if(Sidekick.sidekick != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Sidekick.sidekick.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Sidekick.";
+ else if(Spy.spy != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Spy.spy.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Spy.";
else
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was not The Impostor.";
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was not The Impostor.";
}
// Exile role text for roles that are being assigned to impostors
- if (MKFNKGIBBHP == StringNames.ExileTextPP || MKFNKGIBBHP == StringNames.ExileTextSP) {
- if(Godfather.godfather != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Godfather.godfather.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Godfather.";
- else if(Mafioso.mafioso != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Mafioso.mafioso.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Mafioso.";
- else if(Janitor.janitor != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Janitor.janitor.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Janitor.";
- else if(Morphling.morphling != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Morphling.morphling.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Morphling.";
- else if(Camouflager.camouflager != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Camouflager.camouflager.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Camouflager.";
- else if(Lovers.lover1 != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Lovers.lover1.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The ImpLover.";
- else if(Lovers.lover2 != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Lovers.lover2.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The ImpLover.";
- else if(Vampire.vampire != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Vampire.vampire.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Vampire.";
- else if (Eraser.eraser != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Eraser.eraser.PlayerId)
- __result = ExileController.Instance.KLHCDCKJHKC.HGGCLJHCDBM + " was The Eraser.";
+ if (AKGLBKHCEMI == StringNames.ExileTextPP || AKGLBKHCEMI == StringNames.ExileTextSP) {
+ if(Godfather.godfather != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Godfather.godfather.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Godfather.";
+ else if(Mafioso.mafioso != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Mafioso.mafioso.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Mafioso.";
+ else if(Janitor.janitor != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Janitor.janitor.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Janitor.";
+ else if(Morphling.morphling != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Morphling.morphling.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Morphling.";
+ else if(Camouflager.camouflager != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Camouflager.camouflager.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Camouflager.";
+ else if(Lovers.lover1 != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Lovers.lover1.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The ImpLover.";
+ else if(Lovers.lover2 != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Lovers.lover2.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The ImpLover.";
+ else if(Vampire.vampire != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Vampire.vampire.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Vampire.";
+ else if (Eraser.eraser != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Eraser.eraser.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Eraser.";
+ else if (Trickster.trickster != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Trickster.trickster.PlayerId)
+ __result = ExileController.Instance.EAFLJGMBLCH.PCLLABJCIPC + " was The Trickster.";
}
// Hide number of remaining impostors on Jester win
- if (MKFNKGIBBHP == StringNames.ImpostorsRemainP || MKFNKGIBBHP == StringNames.ImpostorsRemainS)
+ if (AKGLBKHCEMI == StringNames.ImpostorsRemainP || AKGLBKHCEMI == StringNames.ImpostorsRemainS)
{
- if (Jester.jester != null && ExileController.Instance.KLHCDCKJHKC.GPBBCHGPABL.PlayerId == Jester.jester.PlayerId)
+ if (Jester.jester != null && ExileController.Instance.EAFLJGMBLCH.GJPBCGFPMOD.PlayerId == Jester.jester.PlayerId)
__result = "";
}
}
using System.Threading.Tasks;
using static TheOtherRoles.TheOtherRoles;
using static TheOtherRoles.GameHistory;
-using static TheOtherRoles.MapOptions;
using UnityEngine;
-using SystemTypes = LGBKLKNAINN;
-using Palette = GLNPIJPGGNJ;
-using Constants = NFONDPLFBCP;
-using PhysicsHelpers = IEPBCHBGDOA;
-using DeathReason = KAPJFCMEBJE;
-using GameOptionsData = IGDMNKLDEPI;
-using Effects = HLPCBNMDEHF;
+using SystemTypes = BCPJLGGNHBC;
+using Palette = BLMBFIODBKL;
+using Constants = LNCOKMACBKP;
+using PhysicsHelpers = FJFJIDCFLDJ;
+using DeathReason = EGHDCAKGMKI;
+using GameOptionsData = CEIOGGEDKAN;
+using Effects = AEOEPNHOJDP;
namespace TheOtherRoles {
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.FixedUpdate))]
static PlayerControl setTarget(bool onlyCrewmates = false, bool targetPlayersInVents = false, List<PlayerControl> untargetablePlayers = null) {
PlayerControl result = null;
- float num = GameOptionsData.FECFGOOCIJL[Mathf.Clamp(PlayerControl.GameOptions.MLLMFMOMIAC, 0, 2)];
+ float num = GameOptionsData.DCAJHEGBLDD[Mathf.Clamp(PlayerControl.GameOptions.OCPGKHJJAHL, 0, 2)];
if (!ShipStatus.Instance) return result;
Vector2 truePosition = PlayerControl.LocalPlayer.GetTruePosition();
- Il2CppSystem.Collections.Generic.List<GameData.OFKOJOKOOAK> allPlayers = GameData.Instance.AllPlayers;
+ Il2CppSystem.Collections.Generic.List<GameData.LGBOMGHJELL> allPlayers = GameData.Instance.AllPlayers;
for (int i = 0; i < allPlayers.Count; i++)
{
- GameData.OFKOJOKOOAK OFKOJOKOOAK = allPlayers[i];
- if (!OFKOJOKOOAK.GBPMEHJFECK && OFKOJOKOOAK.GMBAIPNOKLP != PlayerControl.LocalPlayer.PlayerId && !OFKOJOKOOAK.FGNJJFABIHJ && (!onlyCrewmates || !OFKOJOKOOAK.CIDDOFDJHJH))
+ GameData.LGBOMGHJELL LGBOMGHJELL = allPlayers[i];
+ if (!LGBOMGHJELL.MFFAGDHDHLO && LGBOMGHJELL.FNPNJHNKEBK != PlayerControl.LocalPlayer.PlayerId && !LGBOMGHJELL.IAGJEKLJCCI && (!onlyCrewmates || !LGBOMGHJELL.FDNMBJOAPFL))
{
- PlayerControl @object = OFKOJOKOOAK.GPBBCHGPABL;
+ PlayerControl @object = LGBOMGHJELL.GJPBCGFPMOD;
if(untargetablePlayers != null && untargetablePlayers.Any(x => x == @object)) {
// if that player is not targetable: skip check
continue;
{
Vector2 vector = @object.GetTruePosition() - truePosition;
float magnitude = vector.magnitude;
- if (magnitude <= num && !PhysicsHelpers.HKFKKEKGLHF(truePosition, vector.normalized, magnitude, Constants.DHLPLBPJNBA))
+ if (magnitude <= num && !PhysicsHelpers.HLIEDNLNBBH(truePosition, vector.normalized, magnitude, Constants.LEOCDMEJGPA))
{
result = @object;
num = magnitude;
if (Detective.timer <= 0f) {
Detective.timer = Detective.footprintIntervall;
foreach (PlayerControl player in PlayerControl.AllPlayerControls) {
- if (player != null && player != PlayerControl.LocalPlayer && !player.IDOFAMCIJKE.FGNJJFABIHJ && !player.inVent) {
+ if (player != null && player != PlayerControl.LocalPlayer && !player.PPMOEEPBHJO.IAGJEKLJCCI && !player.inVent) {
new Footprint(Detective.footprintDuration, Detective.anonymousFootprints, player);
}
}
static void eraserSetTarget() {
if (Eraser.eraser == null || Eraser.eraser != PlayerControl.LocalPlayer) return;
- Eraser.currentTarget = setTarget();
+
+ List<PlayerControl> untargatables = new List<PlayerControl>();
+ if (Spy.spy != null) untargatables.Add(Spy.spy);
+ Eraser.currentTarget = setTarget(onlyCrewmates: !Eraser.canEraseAnyone, untargetablePlayers: Eraser.canEraseAnyone ? new List<PlayerControl>() : untargatables);
}
static void engineerUpdate() {
- if (PlayerControl.LocalPlayer.IDOFAMCIJKE.CIDDOFDJHJH && ShipStatus.Instance?.GIDPCPOEFBC != null) {
- foreach (Vent vent in ShipStatus.Instance.GIDPCPOEFBC) {
+ if (PlayerControl.LocalPlayer.PPMOEEPBHJO.FDNMBJOAPFL && ShipStatus.Instance?.GJHKPDGJHJN != null) {
+ foreach (Vent vent in ShipStatus.Instance.GJHKPDGJHJN) {
try {
- if (vent?.LNMJKMLHMIM?.material != null) {
+ if (vent?.KJAENOGGEOK?.material != null) {
if (Engineer.engineer != null && Engineer.engineer.inVent) {
- vent.LNMJKMLHMIM.material.SetFloat("_Outline", 1f);
- vent.LNMJKMLHMIM.material.SetColor("_OutlineColor", Engineer.color);
- } else if (vent.LNMJKMLHMIM.material.GetColor("_AddColor") != Color.red) {
- vent.LNMJKMLHMIM.material.SetFloat("_Outline", 0);
+ vent.KJAENOGGEOK.material.SetFloat("_Outline", 1f);
+ vent.KJAENOGGEOK.material.SetColor("_OutlineColor", Engineer.color);
+ } else if (vent.KJAENOGGEOK.material.GetColor("_AddColor") != Color.red) {
+ vent.KJAENOGGEOK.material.SetFloat("_Outline", 0);
}
}
} catch {}
}
static void impostorSetTarget() {
- if (!PlayerControl.LocalPlayer.IDOFAMCIJKE.CIDDOFDJHJH ||!PlayerControl.LocalPlayer.AMDJMEEHNIG || PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ) { // !isImpostor || !canMove || isDead
- HudManager.CMJOLNCMAPD.KillButton.SetTarget(null);
+ if (!PlayerControl.LocalPlayer.PPMOEEPBHJO.FDNMBJOAPFL ||!PlayerControl.LocalPlayer.POECPOEKKNO || PlayerControl.LocalPlayer.PPMOEEPBHJO.IAGJEKLJCCI) { // !isImpostor || !canMove || isDead
+ HudManager.CHNDKKBEIDG.KillButton.SetTarget(null);
return;
}
target = setTarget(true, true);
}
- HudManager.CMJOLNCMAPD.KillButton.SetTarget(target);
+ HudManager.CHNDKKBEIDG.KillButton.SetTarget(target);
}
static void trackerUpdate() {
return;
}
- if (Tracker.tracker != null && Tracker.tracked != null && PlayerControl.LocalPlayer == Tracker.tracker && !Tracker.tracker.IDOFAMCIJKE.FGNJJFABIHJ) {
+ if (Tracker.tracker != null && Tracker.tracked != null && PlayerControl.LocalPlayer == Tracker.tracker && !Tracker.tracker.PPMOEEPBHJO.IAGJEKLJCCI) {
Tracker.timeUntilUpdate -= Time.fixedDeltaTime;
if (Tracker.timeUntilUpdate <= 0f) {
- bool trackedOnMap = !Tracker.tracked.IDOFAMCIJKE.FGNJJFABIHJ;
+ bool trackedOnMap = !Tracker.tracked.PPMOEEPBHJO.IAGJEKLJCCI;
Vector3 position = Tracker.tracked.transform.position;
if (!trackedOnMap) { // Check for dead body
DeadBody body = UnityEngine.Object.FindObjectsOfType<DeadBody>().FirstOrDefault(b => b.ParentId == Tracker.tracked.PlayerId);
}
public static void playerSizeUpdate(PlayerControl p) {
+ // Set default player size
+ CircleCollider2D collider = p.GetComponent<CircleCollider2D>();
+
+ p.transform.localScale = new Vector3(0.7f, 0.7f, 1f);
+ collider.radius = Child.defaultColliderRadius;
+ collider.offset = Child.defaultColliderOffset * Vector2.down;
+
+ // Set adapted player size to Child and Morphling
if (Child.child == null || Camouflager.camouflageTimer > 0f) return;
float growingProgress = Child.growingProgress();
float scale = growingProgress * 0.35f + 0.35f;
-
- if (p == Child.child)
- Child.child.transform.localScale = new Vector3(scale, scale, 1f);
- if (Morphling.morphling != null && p == Morphling.morphling && Morphling.morphTarget == Child.child && Morphling.morphTimer > 0f)
+ float correctedColliderRadius = Child.defaultColliderRadius * 0.7f / scale; // scale / 0.7f is the factor by which we decrease the player size, hence we need to increase the collider size by 0.7f / scale
+
+ if (p == Child.child) {
+ p.transform.localScale = new Vector3(scale, scale, 1f);
+ collider.radius = correctedColliderRadius;
+ }
+ if (Morphling.morphling != null && p == Morphling.morphling && Morphling.morphTarget == Child.child && Morphling.morphTimer > 0f) {
p.transform.localScale = new Vector3(scale, scale, 1f);
+ collider.radius = correctedColliderRadius;
+ }
}
public static void Prefix(PlayerControl __instance) {
- if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.CJDCOJJNIGL.Started) return;
-
- // Reset player sizes
- __instance.transform.localScale = new Vector3(0.7f, 0.7f, 1f);
+ if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.GCDONLGCMIL.Started) return;
}
public static void Postfix(PlayerControl __instance) {
- if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.CJDCOJJNIGL.Started) return;
+ if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.GCDONLGCMIL.Started) return;
// Update Role Description
Helpers.refreshRoleDescription(__instance);
}
}
+ [HarmonyPatch(typeof(PlayerPhysics), nameof(PlayerPhysics.WalkPlayerTo))]
+ class PlayerPhysicsWalkPlayerToPatch {
+ private static Vector2 offset = Vector2.zero;
+ public static void Prefix(PlayerPhysics __instance) {
+ bool correctOffset = Camouflager.camouflageTimer <= 0f && (__instance.EMHCBDEIOLO == Child.child || (Morphling.morphling != null && __instance.EMHCBDEIOLO == Morphling.morphling && Morphling.morphTarget == Child.child && Morphling.morphTimer > 0f));
+ if (correctOffset) {
+ float currentScaling = (Child.growingProgress() + 1) * 0.5f;
+ __instance.EMHCBDEIOLO.Collider.offset = currentScaling * Child.defaultColliderOffset * Vector2.down;
+ }
+ }
+ }
+
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.CmdReportDeadBody))]
- class StartMeetingPatcher {
+ class PlayerControlCmdReportDeadBodyPatch {
public static void Prefix(PlayerControl __instance) {
// Murder the bitten player before the meeting starts or reset the bitten player
- if (Vampire.bitten != null && !Vampire.bitten.IDOFAMCIJKE.FGNJJFABIHJ && Helpers.handleMurderAttempt(Vampire.bitten, true)) {
+ if (Vampire.bitten != null && !Vampire.bitten.PPMOEEPBHJO.IAGJEKLJCCI && Helpers.handleMurderAttempt(Vampire.bitten, true)) {
MessageWriter killWriter = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.VampireTryKill, Hazel.SendOption.Reliable, -1);
AmongUsClient.Instance.FinishRpcImmediately(killWriter);
RPCProcedure.vampireTryKill();
}
}
}
-
- [HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.CoStartMeeting))]
- class StartMeetingPatch {
- public static void Prefix(PlayerControl __instance, GameData.OFKOJOKOOAK IGLDJOKKFJE) {
- // Reset vampire bitten
- Vampire.bitten = null;
- // Count meetings
- if (IGLDJOKKFJE == null) meetingsCount++;
- }
- }
-
[HarmonyPatch(typeof(KillButtonManager), nameof(KillButtonManager.PerformKill))]
class PerformKillPatch
{
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.LocalPlayer.CmdReportDeadBody))]
class BodyReportPatch
{
- static void Postfix(PlayerControl __instance, GameData.OFKOJOKOOAK IGLDJOKKFJE)
+ static void Postfix(PlayerControl __instance, GameData.LGBOMGHJELL DGDGDKCCKHJ)
{
// Medic or Detective report
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 == IGLDJOKKFJE?.GMBAIPNOKLP)?.FirstOrDefault();
+ DeadPlayer deadPlayer = deadPlayers?.Where(x => x.player?.PlayerId == DGDGDKCCKHJ?.FNPNJHNKEBK)?.FirstOrDefault();
if (deadPlayer != null && deadPlayer.killerIfExisting != null) {
float timeSinceDeath = ((float)(DateTime.UtcNow - deadPlayer.timeOfDeath).TotalMilliseconds);
if (timeSinceDeath < Detective.reportNameDuration * 1000) {
msg = $"Body Report: The killer appears to be {deadPlayer.killerIfExisting.name}!";
} else if (timeSinceDeath < Detective.reportColorDuration * 1000) {
- var typeOfColor = Helpers.isLighterColor(deadPlayer.killerIfExisting.IDOFAMCIJKE.JFHFMIKFHGG) ? "lighter" : "darker";
+ var typeOfColor = Helpers.isLighterColor(deadPlayer.killerIfExisting.PPMOEEPBHJO.IMMNCAGJJJC) ? "lighter" : "darker";
msg = $"Body Report: The killer appears to be a {typeOfColor} color!";
} else {
msg = $"Body Report: The corpse is too old to gain information from!";
if (!string.IsNullOrWhiteSpace(msg))
{
- if (AmongUsClient.Instance.HNMILJEOEKN && DestroyableSingleton<HudManager>.CMJOLNCMAPD)
+ if (AmongUsClient.Instance.BPADAHAOBLM && DestroyableSingleton<HudManager>.CHNDKKBEIDG)
{
- DestroyableSingleton<HudManager>.CMJOLNCMAPD.Chat.AddChat(PlayerControl.LocalPlayer, msg);
+ DestroyableSingleton<HudManager>.CHNDKKBEIDG.Chat.AddChat(PlayerControl.LocalPlayer, msg);
}
if (msg.IndexOf("who", StringComparison.OrdinalIgnoreCase) >= 0)
{
- DestroyableSingleton<Assets.CoreScripts.Telemetry>.CMJOLNCMAPD.SendWho();
+ DestroyableSingleton<Assets.CoreScripts.Telemetry>.CHNDKKBEIDG.SendWho();
}
}
}
public static bool resetToCrewmate = false;
public static bool resetToDead = false;
- public static void Prefix(PlayerControl __instance, PlayerControl IGLDJOKKFJE)
+ public static void Prefix(PlayerControl __instance, PlayerControl DGDGDKCCKHJ)
{
// Allow everyone to murder players
- resetToCrewmate = !__instance.IDOFAMCIJKE.CIDDOFDJHJH;
- resetToDead = __instance.IDOFAMCIJKE.FGNJJFABIHJ;
- __instance.IDOFAMCIJKE.CIDDOFDJHJH = true;
- __instance.IDOFAMCIJKE.FGNJJFABIHJ = false;
+ resetToCrewmate = !__instance.PPMOEEPBHJO.FDNMBJOAPFL;
+ resetToDead = __instance.PPMOEEPBHJO.IAGJEKLJCCI;
+ __instance.PPMOEEPBHJO.FDNMBJOAPFL = true;
+ __instance.PPMOEEPBHJO.IAGJEKLJCCI = false;
}
- public static void Postfix(PlayerControl __instance, PlayerControl IGLDJOKKFJE)
+ public static void Postfix(PlayerControl __instance, PlayerControl DGDGDKCCKHJ)
{
// Collect dead player info
- DeadPlayer deadPlayer = new DeadPlayer(IGLDJOKKFJE, DateTime.UtcNow, DeathReason.Kill, __instance);
+ DeadPlayer deadPlayer = new DeadPlayer(DGDGDKCCKHJ, DateTime.UtcNow, DeathReason.Kill, __instance);
GameHistory.deadPlayers.Add(deadPlayer);
// Reset killer to crewmate if resetToCrewmate
- if (resetToCrewmate) __instance.IDOFAMCIJKE.CIDDOFDJHJH = false;
- if (resetToDead) __instance.IDOFAMCIJKE.FGNJJFABIHJ = true;
+ if (resetToCrewmate) __instance.PPMOEEPBHJO.FDNMBJOAPFL = false;
+ if (resetToDead) __instance.PPMOEEPBHJO.IAGJEKLJCCI = true;
// Lover suicide trigger on murder
- if ((Lovers.lover1 != null && IGLDJOKKFJE == Lovers.lover1) || (Lovers.lover2 != null && IGLDJOKKFJE == Lovers.lover2)) {
- PlayerControl otherLover = IGLDJOKKFJE == Lovers.lover1 ? Lovers.lover2 : Lovers.lover1;
- if (PlayerControl.LocalPlayer == IGLDJOKKFJE && otherLover != null && !otherLover.IDOFAMCIJKE.FGNJJFABIHJ && Lovers.bothDie) { // Only the dead lover sends the rpc
+ if ((Lovers.lover1 != null && DGDGDKCCKHJ == Lovers.lover1) || (Lovers.lover2 != null && DGDGDKCCKHJ == Lovers.lover2)) {
+ PlayerControl otherLover = DGDGDKCCKHJ == Lovers.lover1 ? Lovers.lover2 : Lovers.lover1;
+ if (PlayerControl.LocalPlayer == DGDGDKCCKHJ && otherLover != null && !otherLover.PPMOEEPBHJO.IAGJEKLJCCI && Lovers.bothDie) { // Only the dead lover sends the rpc
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.LoverSuicide, Hazel.SendOption.Reliable, -1);
writer.Write(otherLover.PlayerId);
AmongUsClient.Instance.FinishRpcImmediately(writer);
}
// Sidekick promotion trigger on murder
- if (Sidekick.promotesToJackal && Sidekick.sidekick != null && !Sidekick.sidekick.IDOFAMCIJKE.FGNJJFABIHJ && IGLDJOKKFJE == Jackal.jackal && Jackal.jackal == PlayerControl.LocalPlayer) {
+ if (Sidekick.promotesToJackal && Sidekick.sidekick != null && !Sidekick.sidekick.PPMOEEPBHJO.IAGJEKLJCCI && DGDGDKCCKHJ == 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();
}
// Seer show flash and add dead player position
- if (Seer.seer != null && PlayerControl.LocalPlayer == Seer.seer && !Seer.seer.IDOFAMCIJKE.FGNJJFABIHJ && Seer.seer != IGLDJOKKFJE && Seer.mode <= 1) {
- HudManager.CMJOLNCMAPD.FullScreen.enabled = true;
- HudManager.CMJOLNCMAPD.StartCoroutine(Effects.LDACHPMFOIF(1f, new Action<float>((p) => {
- var renderer = HudManager.CMJOLNCMAPD.FullScreen;
+ if (Seer.seer != null && PlayerControl.LocalPlayer == Seer.seer && !Seer.seer.PPMOEEPBHJO.IAGJEKLJCCI && Seer.seer != DGDGDKCCKHJ && Seer.mode <= 1) {
+ HudManager.CHNDKKBEIDG.FullScreen.enabled = true;
+ HudManager.CHNDKKBEIDG.StartCoroutine(Effects.DCHLMIDMBHG(1f, new Action<float>((p) => {
+ var renderer = HudManager.CHNDKKBEIDG.FullScreen;
if (p < 0.5) {
if (renderer != null)
renderer.color = new Color(42f / 255f, 187f / 255f, 245f / 255f, Mathf.Clamp01(p * 2 * 0.75f));
if (p == 1f && renderer != null) renderer.enabled = false;
})));
}
- if (Seer.deadBodyPositions != null) Seer.deadBodyPositions.Add(IGLDJOKKFJE.transform.position);
+ if (Seer.deadBodyPositions != null) Seer.deadBodyPositions.Add(DGDGDKCCKHJ.transform.position);
// Child set adapted kill cooldown
- if (Child.child != null && PlayerControl.LocalPlayer == Child.child && Child.child.IDOFAMCIJKE.CIDDOFDJHJH) {
+ if (Child.child != null && PlayerControl.LocalPlayer == Child.child && Child.child.PPMOEEPBHJO.FDNMBJOAPFL) {
var multiplier = Child.isGrownUp() ? 0.66f : 2f;
- Child.child.SetKillTimer(PlayerControl.GameOptions.ELBDIKIOHHH * multiplier);
+ Child.child.SetKillTimer(PlayerControl.GameOptions.DGOPNLEEAAJ * multiplier);
}
}
}
- [HarmonyPatch(typeof(KillAnimation),nameof(KillAnimation.CoPerformKill))]
- class Test {
- public static void Prefix(KillAnimation __instance, ref PlayerControl KMMMAPHIMLH, ref PlayerControl IGLDJOKKFJE) {
- if (Vampire.vampire != null && Vampire.vampire == KMMMAPHIMLH && Vampire.bitten != null && Vampire.bitten == IGLDJOKKFJE)
- KMMMAPHIMLH = IGLDJOKKFJE;
+ [HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.SetKillTimer))]
+ class PlayerControlSetCoolDownPatch {
+ public static bool Prefix(PlayerControl __instance, float IHIOFAHBJKK) {
+ if (PlayerControl.GameOptions.DGOPNLEEAAJ <= 0f) return false;
+ float multiplier = 1f;
+ if (Child.child != null && PlayerControl.LocalPlayer == Child.child && Child.child.PPMOEEPBHJO.FDNMBJOAPFL) multiplier = Child.isGrownUp() ? 0.66f : 2f;
+
+ __instance.killTimer = Mathf.Clamp(IHIOFAHBJKK, 0f, PlayerControl.GameOptions.DGOPNLEEAAJ * multiplier);
+ DestroyableSingleton<HudManager>.CHNDKKBEIDG.KillButton.SetCoolDown(__instance.killTimer, PlayerControl.GameOptions.DGOPNLEEAAJ * multiplier);
+ return false;
+ }
+ }
+
+ [HarmonyPatch(typeof(KillAnimation), nameof(KillAnimation.CoPerformKill))]
+ class KillAnimationCoPerformKillPatch {
+ public static void Prefix(KillAnimation __instance, ref PlayerControl KIJHPICDEAD, ref PlayerControl DGDGDKCCKHJ) {
+ if (Vampire.vampire != null && Vampire.vampire == KIJHPICDEAD && Vampire.bitten != null && Vampire.bitten == DGDGDKCCKHJ)
+ KIJHPICDEAD = DGDGDKCCKHJ;
}
}
{
public static void Prefix(PlayerControl __instance) {
// Child exile lose condition
- if (Child.child != null && Child.child == __instance && !Child.isGrownUp() && !Child.child.IDOFAMCIJKE.CIDDOFDJHJH) {
+ if (Child.child != null && Child.child == __instance && !Child.isGrownUp() && !Child.child.PPMOEEPBHJO.FDNMBJOAPFL) {
Child.triggerChildLose = true;
}
// Jester win condition
// Lover suicide trigger on exile
if ((Lovers.lover1 != null && __instance == Lovers.lover1) || (Lovers.lover2 != null && __instance == Lovers.lover2)) {
PlayerControl otherLover = __instance == Lovers.lover1 ? Lovers.lover2 : Lovers.lover1;
- if (otherLover != null && !otherLover.IDOFAMCIJKE.FGNJJFABIHJ && Lovers.bothDie)
+ if (otherLover != null && !otherLover.PPMOEEPBHJO.IAGJEKLJCCI && Lovers.bothDie)
otherLover.Exiled();
}
// Sidekick promotion trigger on exile
- if (Sidekick.promotesToJackal && Sidekick.sidekick != null && !Sidekick.sidekick.IDOFAMCIJKE.FGNJJFABIHJ && __instance == Jackal.jackal && Jackal.jackal == PlayerControl.LocalPlayer) {
+ if (Sidekick.promotesToJackal && Sidekick.sidekick != null && !Sidekick.sidekick.PPMOEEPBHJO.IAGJEKLJCCI && __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();
}
}
}
+
+ [HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.POECPOEKKNO), MethodType.Getter)]
+ class PlayerControlCanMovePatch {
+ public static bool Prefix(PlayerControl __instance, ref bool __result)
+ {
+ __result = __instance.moveable &&
+ !Minigame.Instance &&
+ (!DestroyableSingleton<HudManager>.BMHJGNNOGDM || (!DestroyableSingleton<HudManager>.CHNDKKBEIDG.Chat.ENPNFFCCKON && !DestroyableSingleton<HudManager>.CHNDKKBEIDG.KillOverlay.ENPNFFCCKON && !DestroyableSingleton<HudManager>.CHNDKKBEIDG.GameMenu.ENPNFFCCKON)) &&
+ (!MapBehaviour.Instance || !MapBehaviour.Instance.FLLAHBDIMHD) &&
+ !MeetingHud.Instance &&
+ !CustomPlayerMenu.Instance &&
+ !ExileController.Instance &&
+ !IntroCutscene.Instance;
+ return false;
+ }
+ }
}
using static TheOtherRoles.GameHistory;
using static TheOtherRoles.MapOptions;
using System.Collections.Generic;
-using System.Collections;
using System.Linq;
using UnityEngine;
using System;
-using Palette = GLNPIJPGGNJ;
-using DeathReason = KAPJFCMEBJE;
-using SwitchSystem = FNEHFOPHPJO;
-using SystemTypes = LGBKLKNAINN;
-using Effects = HLPCBNMDEHF;
+using Palette = BLMBFIODBKL;
+using DeathReason = EGHDCAKGMKI;
+using SwitchSystem = ABIMJJMBJJM;
+using SystemTypes = BCPJLGGNHBC;
+using Effects = AEOEPNHOJDP;
namespace TheOtherRoles
{
Jackal,
Sidekick,
Eraser,
- Spy
+ Spy,
+ Trickster
}
enum CustomRPC
ShareOptionSelection,
ForceEnd,
SetRole,
+ SetUncheckedColor,
+ VersionHandshake,
+ UseUncheckedVent,
// Role functionality
SidekickPromotes,
ErasePlayerRole,
SetFutureErased,
- SetFutureShifted
+ SetFutureShifted,
+ PlaceJackInTheBox,
+ LightsOut
}
public static class RPCProcedure {
public static void resetVariables() {
Garlic.clearGarlics();
+ JackInTheBox.clearJackInTheBoxes();
clearAndReloadMapOptions();
clearAndReloadRoles();
clearGameHistory();
public static void forceEnd() {
foreach (PlayerControl player in PlayerControl.AllPlayerControls)
{
- if (!player.IDOFAMCIJKE.CIDDOFDJHJH)
+ if (!player.PPMOEEPBHJO.FDNMBJOAPFL)
{
player.RemoveInfected();
player.MurderPlayer(player);
- player.IDOFAMCIJKE.FGNJJFABIHJ = true;
+ player.PPMOEEPBHJO.IAGJEKLJCCI = true;
}
}
}
case RoleId.Spy:
Spy.spy = player;
break;
+ case RoleId.Trickster:
+ Trickster.trickster = player;
+ break;
}
}
}
+ public static void setUncheckedColor(byte colorId, byte playerId) {
+ var player = Helpers.playerById(playerId);
+ if (player != null) player.SetColor(colorId);
+ }
+
+ public static void versionHandshake(byte major, byte minor, byte patch, byte playerId) {
+ if (AmongUsClient.Instance.HHBLOCGKFAB) { // If lobby host
+ GameStartManagerPatch.playerVersions[playerId] = new Tuple<byte, byte, byte>(major, minor, patch);
+ }
+ }
+
+ public static void useUncheckedVent(int ventId, byte playerId, byte isEnter) {
+ PlayerControl player = Helpers.playerById(playerId);
+ if (player == null) return;
+ // Fill dummy MessageReader and call MyPhysics.HandleRpc as the corountines cannot be accessed
+ MessageReader reader = new MessageReader();
+ byte[] bytes = BitConverter.GetBytes(ventId);
+ if (!BitConverter.IsLittleEndian)
+ Array.Reverse(bytes);
+ reader.Buffer = bytes;
+ reader.Length = bytes.Length;
+ player.MyPhysics.HandleRpc(isEnter != 0 ? (byte)19 : (byte)20, reader);
+ }
+
// Role functionality
public static void engineerFixLights() {
SwitchSystem switchSystem = ShipStatus.Instance.Systems[SystemTypes.Electrical].Cast<SwitchSystem>();
- switchSystem.GNPBPJHLPAO = switchSystem.KNFBDAFFMGF;
+ switchSystem.BBCFBNPEPIE = switchSystem.FLDLDHLDCLM;
}
public static void engineerUsedRepair() {
public static void janitorClean(byte playerId) {
DeadBody[] array = UnityEngine.Object.FindObjectsOfType<DeadBody>();
for (int i = 0; i < array.Length; i++) {
- if (GameData.Instance.GetPlayerById(array[i].ParentId).GMBAIPNOKLP == playerId)
+ if (GameData.Instance.GetPlayerById(array[i].ParentId).FNPNJHNKEBK == playerId)
UnityEngine.Object.Destroy(array[i].gameObject);
}
}
}
public static void timeMasterRewindTime() {
- HudManager.CMJOLNCMAPD.FullScreen.color = new Color(0f, 0.5f, 0.8f, 0.3f);
- HudManager.CMJOLNCMAPD.FullScreen.enabled = true;
- PlayerControl.LocalPlayer.StartCoroutine(Effects.LDACHPMFOIF(TimeMaster.rewindTime / 2, new Action<float>((p) => {
- if (p == 1f) HudManager.CMJOLNCMAPD.FullScreen.enabled = false;
+ TimeMaster.shieldActive = false; // Shield is no longer active when rewinding
+ if(TimeMaster.timeMaster != null && TimeMaster.timeMaster == PlayerControl.LocalPlayer) {
+ resetTimeMasterButton();
+ }
+ HudManager.CHNDKKBEIDG.FullScreen.color = new Color(0f, 0.5f, 0.8f, 0.3f);
+ HudManager.CHNDKKBEIDG.FullScreen.enabled = true;
+ PlayerControl.LocalPlayer.StartCoroutine(Effects.DCHLMIDMBHG(TimeMaster.rewindTime / 2, new Action<float>((p) => {
+ if (p == 1f) HudManager.CHNDKKBEIDG.FullScreen.enabled = false;
})));
if (TimeMaster.timeMaster == null) return;
PlayerControl lp = PlayerControl.LocalPlayer;
- if (lp?.IDOFAMCIJKE != null && !lp.IDOFAMCIJKE.FGNJJFABIHJ && lp.inVent) {
+ if (lp?.PPMOEEPBHJO != null && !lp.PPMOEEPBHJO.IAGJEKLJCCI && lp.inVent) {
if ((float)(DateTime.UtcNow -localVentEnterTimePoint).TotalMilliseconds < 1000 * TimeMaster.rewindTime) {
- foreach (Vent vent in ShipStatus.Instance.GIDPCPOEFBC) {
+ foreach (Vent vent in ShipStatus.Instance.GJHKPDGJHJN) {
bool canUse;
bool couldUse;
- vent.CanUse(PlayerControl.LocalPlayer.IDOFAMCIJKE, out canUse, out couldUse);
+ vent.CanUse(PlayerControl.LocalPlayer.PPMOEEPBHJO, out canUse, out couldUse);
if (canUse) {
PlayerControl.LocalPlayer.MyPhysics.RpcExitVent(vent.Id);
vent.SetButtons(false);
public static void timeMasterShield() {
TimeMaster.shieldActive = true;
- PlayerControl.LocalPlayer.StartCoroutine(Effects.LDACHPMFOIF(TimeMaster.shieldDuration, new Action<float>((p) => {
+ PlayerControl.LocalPlayer.StartCoroutine(Effects.DCHLMIDMBHG(TimeMaster.shieldDuration, new Action<float>((p) => {
if (p == 1f) TimeMaster.shieldActive = false;
})));
}
}
public static void shieldedMurderAttempt() {
- if (Medic.shielded != null && Medic.shielded == PlayerControl.LocalPlayer && Medic.showAttemptToShielded && HudManager.CMJOLNCMAPD?.FullScreen != null) {
- HudManager.CMJOLNCMAPD.FullScreen.enabled = true;
- HudManager.CMJOLNCMAPD.StartCoroutine(Effects.LDACHPMFOIF(0.5f, new Action<float>((p) => {
- var renderer = HudManager.CMJOLNCMAPD.FullScreen;
- Color c = Palette.LDCHDOFJPGH;
+ if (Medic.shielded != null && Medic.shielded == PlayerControl.LocalPlayer && Medic.showAttemptToShielded && HudManager.CHNDKKBEIDG?.FullScreen != null) {
+ HudManager.CHNDKKBEIDG.FullScreen.enabled = true;
+ HudManager.CHNDKKBEIDG.StartCoroutine(Effects.DCHLMIDMBHG(0.5f, new Action<float>((p) => {
+ var renderer = HudManager.CHNDKKBEIDG.FullScreen;
+ Color c = Palette.JPCHLLEJNEH;
if (p < 0.5) {
if (renderer != null)
renderer.color = new Color(c.r, c.g, c.b, Mathf.Clamp01(p * 2 * 0.75f));
Shifter.clearAndReload();
// Suicide (exile) when impostor or impostor variants
- if (player.IDOFAMCIJKE.CIDDOFDJHJH || player == Jackal.jackal || player == Sidekick.sidekick) {
+ if (player.PPMOEEPBHJO.FDNMBJOAPFL || player == Jackal.jackal || player == Sidekick.sidekick) {
oldShifter.Exiled();
return;
}
// Switch shield
if (Medic.shielded != null && Medic.shielded == player) {
- Medic.shielded.LNMJKMLHMIM.material.SetFloat("_Outline", 0f);
+ Medic.shielded.KJAENOGGEOK.material.SetFloat("_Outline", 0f);
Medic.shielded = oldShifter;
} else if (Medic.shielded != null && Medic.shielded == oldShifter) {
- Medic.shielded.LNMJKMLHMIM.material.SetFloat("_Outline", 0f);
+ Medic.shielded.KJAENOGGEOK.material.SetFloat("_Outline", 0f);
Medic.shielded = player;
}
}
public static void loverSuicide(byte remainingLoverId) {
- if (Lovers.lover1 != null && !Lovers.lover1.IDOFAMCIJKE.FGNJJFABIHJ && Lovers.lover1.PlayerId == remainingLoverId) {
+ if (Lovers.lover1 != null && !Lovers.lover1.PPMOEEPBHJO.IAGJEKLJCCI && Lovers.lover1.PlayerId == remainingLoverId) {
Lovers.lover1.MurderPlayer(Lovers.lover1);
- } else if (Lovers.lover2 != null && !Lovers.lover2.IDOFAMCIJKE.FGNJJFABIHJ && Lovers.lover2.PlayerId == remainingLoverId) {
+ } else if (Lovers.lover2 != null && !Lovers.lover2.PPMOEEPBHJO.IAGJEKLJCCI && Lovers.lover2.PlayerId == remainingLoverId) {
Lovers.lover2.MurderPlayer(Lovers.lover2);
}
}
if (Vampire.vampire == null) return;
foreach (PlayerControl player in PlayerControl.AllPlayerControls) {
- if (player.PlayerId == targetId && !player.IDOFAMCIJKE.FGNJJFABIHJ) {
+ if (player.PlayerId == targetId && !player.PPMOEEPBHJO.IAGJEKLJCCI) {
Vampire.bitten = player;
}
}
}
public static void vampireTryKill() {
- if (Vampire.bitten != null && !Vampire.bitten.IDOFAMCIJKE.FGNJJFABIHJ) {
+ if (Vampire.bitten != null && !Vampire.bitten.PPMOEEPBHJO.IAGJEKLJCCI) {
Vampire.vampire.MurderPlayer(Vampire.bitten);
}
Vampire.bitten = null;
{
if (player.PlayerId == targetId)
{
- if(!Jackal.canCreateSidekickFromImpostor && player.IDOFAMCIJKE.CIDDOFDJHJH) {
+ if(!Jackal.canCreateSidekickFromImpostor && player.PPMOEEPBHJO.FDNMBJOAPFL) {
Jackal.fakeSidekick = player;
return;
}
if (player == Janitor.janitor) Janitor.clearAndReload();
if (player == Vampire.vampire) Vampire.clearAndReload();
if (player == Eraser.eraser) Eraser.clearAndReload();
+ if (player == Trickster.trickster) Trickster.clearAndReload();
// Other roles
if (player == Jester.jester) Jester.clearAndReload();
Lovers.clearAndReload();
}
if (player == Jackal.jackal) { // Promote Sidekick and hence override the the Jackal or erase Jackal
- if (Sidekick.promotesToJackal && Sidekick.sidekick != null && !Sidekick.sidekick.IDOFAMCIJKE.FGNJJFABIHJ) {
+ if (Sidekick.promotesToJackal && Sidekick.sidekick != null && !Sidekick.sidekick.PPMOEEPBHJO.IAGJEKLJCCI) {
RPCProcedure.sidekickPromotes();
} else {
Jackal.clearAndReload();
public static void setFutureShifted(byte playerId) {
Shifter.futureShift = Helpers.playerById(playerId);
}
+
+ public static void placeJackInTheBox(byte[] buff) {
+ Vector3 position = Vector3.zero;
+ position.x = BitConverter.ToSingle(buff, 0*sizeof(float));
+ position.y = BitConverter.ToSingle(buff, 1*sizeof(float));
+ new JackInTheBox(position);
+ }
+
+ public static void lightsOut() {
+ Trickster.lightsOutTimer = Trickster.lightsOutDuration;
+ // If the local player is impostor indicate lights out
+ if(PlayerControl.LocalPlayer.PPMOEEPBHJO.FDNMBJOAPFL) {
+ new CustomMessage("Lights are out", Trickster.lightsOutDuration);
+ }
+ }
}
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.HandleRpc))]
class RPCHandlerPatch
{
- static void Postfix(byte GIICFHKILOB, MessageReader DOOILGKLBBF)
+ static void Postfix(byte ONIABIILFGF, MessageReader JIGFBHFFNFI)
{
- byte packetId = GIICFHKILOB;
- MessageReader reader = DOOILGKLBBF;
+ byte packetId = ONIABIILFGF;
+ MessageReader reader = JIGFBHFFNFI;
switch (packetId) {
// Main Controls
RPCProcedure.resetVariables();
break;
case (byte)CustomRPC.ShareOptionSelection:
- uint id = DOOILGKLBBF.ReadPackedUInt32();
- uint selection = DOOILGKLBBF.ReadPackedUInt32();
+ uint id = JIGFBHFFNFI.ReadPackedUInt32();
+ uint selection = JIGFBHFFNFI.ReadPackedUInt32();
RPCProcedure.shareOptionSelection(id, selection);
break;
case (byte)CustomRPC.ForceEnd:
RPCProcedure.forceEnd();
break;
case (byte)CustomRPC.SetRole:
- byte roleId = DOOILGKLBBF.ReadByte();
- byte playerId = DOOILGKLBBF.ReadByte();
+ byte roleId = JIGFBHFFNFI.ReadByte();
+ byte playerId = JIGFBHFFNFI.ReadByte();
RPCProcedure.setRole(roleId, playerId);
break;
-
+ case (byte)CustomRPC.SetUncheckedColor:
+ byte c = JIGFBHFFNFI.ReadByte();
+ byte p = JIGFBHFFNFI.ReadByte();
+ RPCProcedure.setUncheckedColor(c, p);
+ break;
+ case (byte)CustomRPC.VersionHandshake:
+ byte major = JIGFBHFFNFI.ReadByte();
+ byte minor = JIGFBHFFNFI.ReadByte();
+ byte patch = JIGFBHFFNFI.ReadByte();
+ byte versionOwnerId = JIGFBHFFNFI.ReadByte();
+ RPCProcedure.versionHandshake(major, minor, patch, versionOwnerId);
+ break;
+ case (byte)CustomRPC.UseUncheckedVent:
+ int ventId = JIGFBHFFNFI.ReadPackedInt32();
+ byte ventingPlayer = JIGFBHFFNFI.ReadByte();
+ byte isEnter = JIGFBHFFNFI.ReadByte();
+ RPCProcedure.useUncheckedVent(ventId, ventingPlayer, isEnter);
+ break;
// Role functionality
RPCProcedure.engineerUsedRepair();
break;
case (byte)CustomRPC.JanitorClean:
- RPCProcedure.janitorClean(DOOILGKLBBF.ReadByte());
+ RPCProcedure.janitorClean(JIGFBHFFNFI.ReadByte());
break;
case (byte)CustomRPC.SheriffKill:
- RPCProcedure.sheriffKill(DOOILGKLBBF.ReadByte());
+ RPCProcedure.sheriffKill(JIGFBHFFNFI.ReadByte());
break;
case (byte)CustomRPC.TimeMasterRewindTime:
RPCProcedure.timeMasterRewindTime();
RPCProcedure.timeMasterShield();
break;
case (byte)CustomRPC.MedicSetShielded:
- RPCProcedure.medicSetShielded(DOOILGKLBBF.ReadByte());
+ RPCProcedure.medicSetShielded(JIGFBHFFNFI.ReadByte());
break;
case (byte)CustomRPC.ShieldedMurderAttempt:
RPCProcedure.shieldedMurderAttempt();
break;
case (byte)CustomRPC.ShifterShift:
- RPCProcedure.shifterShift(DOOILGKLBBF.ReadByte());
+ RPCProcedure.shifterShift(JIGFBHFFNFI.ReadByte());
break;
case (byte)CustomRPC.SwapperSwap:
- byte playerId1 = DOOILGKLBBF.ReadByte();
- byte playerId2 = DOOILGKLBBF.ReadByte();
+ byte playerId1 = JIGFBHFFNFI.ReadByte();
+ byte playerId2 = JIGFBHFFNFI.ReadByte();
RPCProcedure.swapperSwap(playerId1, playerId2);
break;
case (byte)CustomRPC.MorphlingMorph:
- RPCProcedure.morphlingMorph(DOOILGKLBBF.ReadByte());
+ RPCProcedure.morphlingMorph(JIGFBHFFNFI.ReadByte());
break;
case (byte)CustomRPC.CamouflagerCamouflage:
RPCProcedure.camouflagerCamouflage();
break;
case (byte)CustomRPC.LoverSuicide:
- RPCProcedure.loverSuicide(DOOILGKLBBF.ReadByte());
+ RPCProcedure.loverSuicide(JIGFBHFFNFI.ReadByte());
break;
case (byte)CustomRPC.VampireSetBitten:
- byte bittenId = DOOILGKLBBF.ReadByte();
- byte reset = DOOILGKLBBF.ReadByte();
+ byte bittenId = JIGFBHFFNFI.ReadByte();
+ byte reset = JIGFBHFFNFI.ReadByte();
RPCProcedure.vampireSetBitten(bittenId, reset);
break;
case (byte)CustomRPC.VampireTryKill:
RPCProcedure.vampireTryKill();
break;
case (byte)CustomRPC.PlaceGarlic:
- RPCProcedure.placeGarlic(DOOILGKLBBF.ReadBytesAndSize());
+ RPCProcedure.placeGarlic(JIGFBHFFNFI.ReadBytesAndSize());
break;
case (byte)CustomRPC.TrackerUsedTracker:
- RPCProcedure.trackerUsedTracker(DOOILGKLBBF.ReadByte());
+ RPCProcedure.trackerUsedTracker(JIGFBHFFNFI.ReadByte());
break;
case (byte)CustomRPC.JackalKill:
- RPCProcedure.jackalKill(DOOILGKLBBF.ReadByte());
+ RPCProcedure.jackalKill(JIGFBHFFNFI.ReadByte());
break;
case (byte)CustomRPC.SidekickKill:
- RPCProcedure.sidekickKill(DOOILGKLBBF.ReadByte());
+ RPCProcedure.sidekickKill(JIGFBHFFNFI.ReadByte());
break;
case (byte)CustomRPC.JackalCreatesSidekick:
- RPCProcedure.jackalCreatesSidekick(DOOILGKLBBF.ReadByte());
+ RPCProcedure.jackalCreatesSidekick(JIGFBHFFNFI.ReadByte());
break;
case (byte)CustomRPC.SidekickPromotes:
RPCProcedure.sidekickPromotes();
break;
case (byte)CustomRPC.ErasePlayerRole:
- RPCProcedure.erasePlayerRole(DOOILGKLBBF.ReadByte());
+ RPCProcedure.erasePlayerRole(JIGFBHFFNFI.ReadByte());
break;
case (byte)CustomRPC.SetFutureErased:
- RPCProcedure.setFutureErased(DOOILGKLBBF.ReadByte());
+ RPCProcedure.setFutureErased(JIGFBHFFNFI.ReadByte());
break;
case (byte)CustomRPC.SetFutureShifted:
- RPCProcedure.setFutureShifted(DOOILGKLBBF.ReadByte());
+ RPCProcedure.setFutureShifted(JIGFBHFFNFI.ReadByte());
+ break;
+ case (byte)CustomRPC.PlaceJackInTheBox:
+ RPCProcedure.placeJackInTheBox(JIGFBHFFNFI.ReadBytesAndSize());
+ break;
+ case (byte)CustomRPC.LightsOut:
+ RPCProcedure.lightsOut();
break;
}
}
RPCProcedure.setRole(roleId, playerId);
}
- public static void Postfix(Il2CppReferenceArray<GameData.OFKOJOKOOAK> LBJJHLMFDJL)
+ public static void Postfix(Il2CppReferenceArray<GameData.LGBOMGHJELL> BHNEINNHPIJ)
{
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.ResetVaribles, Hazel.SendOption.Reliable, -1);
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.resetVariables();
List<PlayerControl> crewmates = PlayerControl.AllPlayerControls.ToArray().ToList().OrderBy(x => Guid.NewGuid()).ToList();
- crewmates.RemoveAll(x => x.IDOFAMCIJKE.CIDDOFDJHJH);
+ crewmates.RemoveAll(x => x.PPMOEEPBHJO.FDNMBJOAPFL);
List<PlayerControl> impostors = PlayerControl.AllPlayerControls.ToArray().ToList().OrderBy(x => Guid.NewGuid()).ToList();
- impostors.RemoveAll(x => !x.IDOFAMCIJKE.CIDDOFDJHJH);
+ impostors.RemoveAll(x => !x.PPMOEEPBHJO.FDNMBJOAPFL);
float crewCountSettings = (float)CustomOptionHolder.crewmateRolesCount.getSelection() / 2;
float impCountSettings = (float)CustomOptionHolder.impostorRolesCount.getSelection() / 2;
impSettings.Add((byte)RoleId.Camouflager, CustomOptionHolder.camouflagerSpawnRate.getSelection());
impSettings.Add((byte)RoleId.Vampire, CustomOptionHolder.vampireSpawnRate.getSelection());
impSettings.Add((byte)RoleId.Eraser, CustomOptionHolder.eraserSpawnRate.getSelection());
+ impSettings.Add((byte)RoleId.Trickster, CustomOptionHolder.tricksterSpawnRate.getSelection());
crewSettings.Add((byte)RoleId.Jester, CustomOptionHolder.jesterSpawnRate.getSelection());
crewSettings.Add((byte)RoleId.Mayor, CustomOptionHolder.mayorSpawnRate.getSelection());
using static TheOtherRoles.TheOtherRoles;
using UnityEngine;
-using Palette = GLNPIJPGGNJ;
+using Palette = BLMBFIODBKL;
namespace TheOtherRoles
{
this.shortDescription = shortDescription;
}
- public string colorHexString() {
- return string.Format("[{0:X2}{1:X2}{2:X2}{3:X2}]", ToByte(color.r), ToByte(color.g), ToByte(color.b), ToByte(color.a));
- }
-
- private static byte ToByte(float f) {
- f = Mathf.Clamp01(f);
- return (byte)(f * 255);
- }
-
public static List<RoleInfo> getRoleInfoForPlayer(PlayerControl p) {
List<RoleInfo> infos = new List<RoleInfo>();
if (Sheriff.sheriff != null && p == Sheriff.sheriff) {
infos.Add(new RoleInfo("Sheriff",
Sheriff.color,
- "Shoot the [FF1919FF]Impostors",
+ "Shoot the <color=#FF1919FF>Impostors</color>",
"Shoot the Impostors"));
}
if (Lighter.lighter != null && p == Lighter.lighter) {
if (Mafioso.mafioso != null && p == Mafioso.mafioso) {
infos.Add(new RoleInfo("Mafioso",
Mafioso.color,
- "Work with the [FF1919FF]Mafia[] to kill the Crewmates",
+ "Work with the <color=#FF1919FF>Mafia</color> to kill the Crewmates",
"Kill all Crewmates"));
}
if (Janitor.janitor != null && p == Janitor.janitor) {
infos.Add(new RoleInfo("Janitor",
Janitor.color,
- "Work with the [FF1919FF]Mafia[] by hiding dead bodies",
+ "Work with the <color=#FF1919FF>Mafia</color> by hiding dead bodies",
"Hide dead bodies"));
}
if (Morphling.morphling != null && p == Morphling.morphling) {
"Kill the Crewmates and erase their roles",
"Erase the roles of your enemies"));
}
+ if (Trickster.trickster != null && p == Trickster.trickster) {
+ infos.Add(new RoleInfo("Trickster",
+ Trickster.color,
+ "Use your jack-in-the-boxes to surprise others",
+ "Surprise your enemies"));
+ }
if (Detective.detective != null && p == Detective.detective) {
infos.Add(new RoleInfo("Detective",
Detective.color,
- "Find the [FF1919FF]Impostors[] by examining footprints",
+ "Find the <color=#FF1919FF>Impostors</color> by examining footprints",
"Examine footprints"));
}
if (TimeMaster.timeMaster != null && p == TimeMaster.timeMaster) {
if (Swapper.swapper != null && p == Swapper.swapper) {
infos.Add(new RoleInfo("Swapper",
Swapper.color,
- "Swap votes to exile the [FF1919FF]Impostors",
+ "Swap votes to exile the <color=#FF1919FF>Impostors</color>",
"Swap votes"));
}
if (Seer.seer != null && p == Seer.seer) {
if (Hacker.hacker != null && p == Hacker.hacker) {
infos.Add(new RoleInfo("Hacker",
Hacker.color,
- "Hacker to find the [FF1919FF]Impostors",
- "Hacker to find the Impostors"));
+ "Hacke to find the <color=#FF1919FF>Impostors</color>",
+ "Hacke to find the Impostors"));
}
if (Child.child != null && p == Child.child) {
- infos.Add(new RoleInfo(p.IDOFAMCIJKE.CIDDOFDJHJH ? "Bad Child" : "Good Child",
- p.IDOFAMCIJKE.CIDDOFDJHJH ? Palette.LDCHDOFJPGH : Child.color,
+ infos.Add(new RoleInfo(p.PPMOEEPBHJO.FDNMBJOAPFL ? "Bad Child" : "Good Child",
+ p.PPMOEEPBHJO.FDNMBJOAPFL ? Palette.JPCHLLEJNEH : Child.color,
"No one will harm you until you grow up",
"No one will harm you"));
}
if (Tracker.tracker != null && p == Tracker.tracker) {
infos.Add(new RoleInfo("Tracker",
Tracker.color,
- "Track the [FF1919FF]Impostors[] down",
+ "Track the <color=#FF1919FF>Impostors</color> down",
"Track the Impostors down"));
}
if (Snitch.snitch != null && p == Snitch.snitch) {
infos.Add(new RoleInfo("Snitch",
Snitch.color,
- "Finish your tasks to find the [FF1919FF]Impostors[]",
+ "Finish your tasks to find the <color=#FF1919FF>Impostors</color>",
"Finish your tasks"));
}
if (Jackal.jackal != null && p == Jackal.jackal) {
infos.Add(new RoleInfo("Jackal",
Jackal.color,
- "Kill all Crewmates and [FF1919FF]Impostors[] to win",
+ "Kill all Crewmates and <color=#FF1919FF>Impostors</color> to win",
"Kill everyone"));
}
if (Sidekick.sidekick != null && p == Sidekick.sidekick) {
"Help your Jackal to kill everyone"));
}
if ((Lovers.lover1 != null && p == Lovers.lover1) || (Lovers.lover2 != null && p == Lovers.lover2)) {
- infos.Add(new RoleInfo(p.IDOFAMCIJKE.CIDDOFDJHJH ? "ImpLover" : "Lover",
- p.IDOFAMCIJKE.CIDDOFDJHJH ? Palette.LDCHDOFJPGH : Lovers.color,
- "You are in [FC03BEFF]Love[]",
+ infos.Add(new RoleInfo(p.PPMOEEPBHJO.FDNMBJOAPFL ? "ImpLover" : "Lover",
+ p.PPMOEEPBHJO.FDNMBJOAPFL ? Palette.JPCHLLEJNEH : Lovers.color,
+ "You are in <color=#FC03BEFF>Love</color>",
"You are in love"));
}
if (Spy.spy != null && p == Spy.spy) {
infos.Add(new RoleInfo("Spy",
Spy.color,
- "Confuse the [FF1919FF]Impostors[]",
+ "Confuse the <color=#FF1919FF>Impostors</color>",
"Confuse the Impostors"));
}
- if (infos.Count == 0 && p.IDOFAMCIJKE.CIDDOFDJHJH) { // Just Impostor
+ if (infos.Count == 0 && p.PPMOEEPBHJO.FDNMBJOAPFL) { // Just Impostor
infos.Add(new RoleInfo("Impostor",
- Palette.LDCHDOFJPGH,
+ Palette.JPCHLLEJNEH,
"",
"Sabotage and kill everyone"));
} else if (infos.Count == 0) { // Just Crewmate
using static TheOtherRoles.TheOtherRoles;
using UnityEngine;
-using SystemTypes = LGBKLKNAINN;
-using SwitchSystem = FNEHFOPHPJO;
-using ISystemType = CBFMKGACLNE;
+using SystemTypes = BCPJLGGNHBC;
+using SwitchSystem = ABIMJJMBJJM;
+using ISystemType = JBBCJFNFOBB;
namespace TheOtherRoles {
[HarmonyPostfix]
[HarmonyPatch(typeof(ShipStatus), nameof(ShipStatus.CalculateLightRadius))]
- public static bool Prefix(ref float __result, ShipStatus __instance, [HarmonyArgument(0)] GameData.OFKOJOKOOAK player) {
+ public static bool Prefix(ref float __result, ShipStatus __instance, [HarmonyArgument(0)] GameData.LGBOMGHJELL player) {
ISystemType systemType = __instance.Systems.ContainsKey(SystemTypes.Electrical) ? __instance.Systems[SystemTypes.Electrical] : null;
if (systemType == null) return true;
SwitchSystem switchSystem = systemType.TryCast<SwitchSystem>();
if (switchSystem == null) return true;
- float num = (float)switchSystem.OBNIGODIBIO / 255f;
+ float num = (float)switchSystem.FPHHBGCHEJG / 255f;
- if (player == null || player.FGNJJFABIHJ)
+ if (player == null || player.IAGJEKLJCCI) // IsDead
__result = __instance.MaxLightRadius;
- else if (player.CIDDOFDJHJH)
- __result = __instance.MaxLightRadius * PlayerControl.GameOptions.AFGNADFLBDB;
- else if (Lighter.lighter != null && Lighter.lighter.PlayerId == player.GMBAIPNOKLP && Lighter.lighterTimer > 0f)
+ else if (player.FDNMBJOAPFL) // IsImpostor
+ __result = __instance.MaxLightRadius * PlayerControl.GameOptions.EJPJACEEECE;
+ else if (Lighter.lighter != null && Lighter.lighter.PlayerId == player.FNPNJHNKEBK && Lighter.lighterTimer > 0f) // if player is Lighter and Lighter has his ability active
__result = Mathf.Lerp(__instance.MaxLightRadius * Lighter.lighterModeLightsOffVision, __instance.MaxLightRadius * Lighter.lighterModeLightsOnVision, num);
+ else if (Trickster.trickster != null && Trickster.lightsOutTimer > 0f) {
+ float lerpValue = 1f;
+ if (Trickster.lightsOutDuration - Trickster.lightsOutTimer < 0.5f) lerpValue = Mathf.Clamp01((Trickster.lightsOutDuration - Trickster.lightsOutTimer) * 2);
+ else if (Trickster.lightsOutTimer < 0.5) lerpValue = Mathf.Clamp01(Trickster.lightsOutTimer*2);
+ __result = Mathf.Lerp(__instance.MinLightRadius, __instance.MaxLightRadius, 1 - lerpValue) * PlayerControl.GameOptions.FAJGBBKDEHP; // Instant lights out? Maybe add a smooth transition?
+ }
else
- __result = Mathf.Lerp(__instance.MinLightRadius, __instance.MaxLightRadius, num) * PlayerControl.GameOptions.OJCJDCMDKKC;
+ __result = Mathf.Lerp(__instance.MinLightRadius, __instance.MaxLightRadius, num) * PlayerControl.GameOptions.FAJGBBKDEHP;
return false;
}
using System.IO;
using UnityEngine;
-using Palette = GLNPIJPGGNJ;
+using Palette = BLMBFIODBKL;
namespace TheOtherRoles
{
Sidekick.clearAndReload();
Eraser.clearAndReload();
Spy.clearAndReload();
+ Trickster.clearAndReload();
}
public static class Jester {
public static Color color = new Color(255f / 255f, 84f / 255f, 167f / 255f, 1);
public static bool triggerJesterWin = false;
+ public static bool canCallEmergency = true;
public static void clearAndReload() {
jester = null;
triggerJesterWin = false;
+ canCallEmergency = CustomOptionHolder.jesterCanCallEmergency.getBool();
}
}
public static class Godfather {
public static PlayerControl godfather;
- public static Color color = Palette.LDCHDOFJPGH;
+ public static Color color = Palette.JPCHLLEJNEH;
public static void clearAndReload() {
godfather = null;
public static class Mafioso {
public static PlayerControl mafioso;
- public static Color color = Palette.LDCHDOFJPGH;
+ public static Color color = Palette.JPCHLLEJNEH;
public static void clearAndReload() {
mafioso = null;
public static class Janitor {
public static PlayerControl janitor;
- public static Color color = Palette.LDCHDOFJPGH;
+ public static Color color = Palette.JPCHLLEJNEH;
public static float cooldown = 30f;
public static bool reviveDuringRewind = false;
public static float rewindTime = 3f;
- public static float shieldDuration = 3f; // Constant
+ public static float shieldDuration = 3f;
public static float cooldown = 30f;
public static bool shieldActive = false;
isRewinding = false;
shieldActive = false;
rewindTime = CustomOptionHolder.timeMasterRewindTime.getFloat();
+ shieldDuration = CustomOptionHolder.timeMasterShieldDuration.getFloat();
cooldown = CustomOptionHolder.timeMasterCooldown.getFloat();
}
}
public static void clearAndReload() {
medic = null;
- if (shielded?.LNMJKMLHMIM?.material != null) shielded.LNMJKMLHMIM.material.SetFloat("_Outline", 0f);
+ if (shielded?.KJAENOGGEOK?.material != null) shielded.KJAENOGGEOK.material.SetFloat("_Outline", 0f);
shielded = null;
currentTarget = null;
usedShield = false;
public static PlayerControl swapper;
public static Color color = new Color(240f / 255f, 128f / 255f, 72f / 255f, 1);
private static Sprite spriteCheck;
+ public static bool canCallEmergency = false;
public static byte playerId1 = Byte.MaxValue;
public static byte playerId2 = Byte.MaxValue;
swapper = null;
playerId1 = Byte.MaxValue;
playerId2 = Byte.MaxValue;
+ canCallEmergency = CustomOptionHolder.swapperCanCallEmergency.getBool();
}
}
public static bool notAckedExiledIsLover = false;
public static bool existingAndAlive() {
- return lover1 != null && lover2 != null && !lover1.IDOFAMCIJKE.FGNJJFABIHJ && !lover2.IDOFAMCIJKE.FGNJJFABIHJ && !lover1.IDOFAMCIJKE.GBPMEHJFECK && !lover2.IDOFAMCIJKE.GBPMEHJFECK && !notAckedExiledIsLover; // ADD NOT ACKED IS LOVER
+ return lover1 != null && lover2 != null && !lover1.PPMOEEPBHJO.IAGJEKLJCCI && !lover2.PPMOEEPBHJO.IAGJEKLJCCI && !lover1.PPMOEEPBHJO.MFFAGDHDHLO && !lover2.PPMOEEPBHJO.MFFAGDHDHLO && !notAckedExiledIsLover; // ADD NOT ACKED IS LOVER
}
- public static bool existingWithImpLover() {
- return lover1 != null && lover2 != null && !lover1.IDOFAMCIJKE.GBPMEHJFECK && !lover2.IDOFAMCIJKE.GBPMEHJFECK && (lover1.IDOFAMCIJKE.CIDDOFDJHJH || lover2.IDOFAMCIJKE.CIDDOFDJHJH);
+ public static bool existingAndCrewLovers() {
+ if (lover1 == null || lover2 == null || lover1.PPMOEEPBHJO.MFFAGDHDHLO || lover2.PPMOEEPBHJO.MFFAGDHDHLO) return false; // Null or disconnected
+ return !(lover1.PPMOEEPBHJO.FDNMBJOAPFL || lover2.PPMOEEPBHJO.FDNMBJOAPFL || lover1 == Jackal.jackal || lover2 == Jackal.jackal || lover1 == Sidekick.sidekick || lover2 == Sidekick.sidekick); // Not Impostor, Sidekick or Jackal
}
public static void clearAndReload() {
public static List<Vector3> deadBodyPositions = new List<Vector3>();
public static float soulDuration = 15f;
+ public static bool limitSoulDuration = false;
public static int mode = 0;
private static Sprite soulSprite;
public static void clearAndReload() {
seer = null;
deadBodyPositions = new List<Vector3>();
+ limitSoulDuration = CustomOptionHolder.seerLimitSoulDuration.getBool();
soulDuration = CustomOptionHolder.seerSoulDuration.getFloat();
mode = CustomOptionHolder.medicShowShielded.getSelection();
}
public static class Morphling {
public static PlayerControl morphling;
- public static Color color = Palette.LDCHDOFJPGH;
+ public static Color color = Palette.JPCHLLEJNEH;
private static Sprite sampleSprite;
private static Sprite morphSprite;
morphTarget = null;
morphTimer = 0f;
if (morphling == null) return;
- morphling.SetName(morphling.IDOFAMCIJKE.HGGCLJHCDBM);
- morphling.SetHat(morphling.IDOFAMCIJKE.MFIOGLKPMGD, (int)morphling.IDOFAMCIJKE.JFHFMIKFHGG);
- Helpers.setSkinWithAnim(morphling.MyPhysics, morphling.IDOFAMCIJKE.LFDAHOFPIAM);
- morphling.SetPet(morphling.IDOFAMCIJKE.GKFOHNJHFOE);
- morphling.CurrentPet.FHBHBMIJFID = morphling.FHBHBMIJFID;
- morphling.SetColor(morphling.IDOFAMCIJKE.JFHFMIKFHGG);
- morphling.LNMJKMLHMIM.material.SetFloat("_Outline", 0f);
+ morphling.SetName(morphling.PPMOEEPBHJO.PCLLABJCIPC);
+ morphling.SetHat(morphling.PPMOEEPBHJO.CPGFLBANALE, (int)morphling.PPMOEEPBHJO.IMMNCAGJJJC);
+ Helpers.setSkinWithAnim(morphling.MyPhysics, morphling.PPMOEEPBHJO.CGNMKICGLOG);
+ morphling.SetPet(morphling.PPMOEEPBHJO.LBHODBKCBKA);
+ morphling.CurrentPet.BDBDGFDELMB = morphling.BDBDGFDELMB;
+ morphling.SetColor(morphling.PPMOEEPBHJO.IMMNCAGJJJC);
+ morphling.KJAENOGGEOK.material.SetFloat("_Outline", 0f);
}
public static void clearAndReload() {
public static class Camouflager {
public static PlayerControl camouflager;
- public static Color color = Palette.LDCHDOFJPGH;
+ public static Color color = Palette.JPCHLLEJNEH;
public static float cooldown = 30f;
public static float camouflageTimer = 0f;
foreach (PlayerControl p in PlayerControl.AllPlayerControls) {
if (p == null) continue;
if (Morphling.morphling == null || Morphling.morphling != p) {
- p.SetName(p.IDOFAMCIJKE.HGGCLJHCDBM);
- p.SetHat(p.IDOFAMCIJKE.MFIOGLKPMGD, (int)p.IDOFAMCIJKE.JFHFMIKFHGG);
- Helpers.setSkinWithAnim(p.MyPhysics, p.IDOFAMCIJKE.LFDAHOFPIAM);
- p.SetPet(p.IDOFAMCIJKE.GKFOHNJHFOE);
- p.CurrentPet.FHBHBMIJFID = p.FHBHBMIJFID;
- p.SetColor(p.IDOFAMCIJKE.JFHFMIKFHGG);
+ p.SetName(p.PPMOEEPBHJO.PCLLABJCIPC);
+ p.SetHat(p.PPMOEEPBHJO.CPGFLBANALE, (int)p.PPMOEEPBHJO.IMMNCAGJJJC);
+ Helpers.setSkinWithAnim(p.MyPhysics, p.PPMOEEPBHJO.CGNMKICGLOG);
+ p.SetPet(p.PPMOEEPBHJO.LBHODBKCBKA);
+ p.CurrentPet.BDBDGFDELMB = p.BDBDGFDELMB;
+ p.SetColor(p.PPMOEEPBHJO.IMMNCAGJJJC);
}
}
}
public static class Child {
public static PlayerControl child;
public static Color color = Color.white;
-
+ public const float defaultColliderRadius = 0.2233912f;
+ public const float defaultColliderOffset = 0.3636057f;
+
public static float growingUpDuration = 400f;
public static DateTime timeOfGrowthStart = DateTime.UtcNow;
public static bool triggerChildLose = false;
public static class Vampire {
public static PlayerControl vampire;
- public static Color color = Palette.LDCHDOFJPGH;
+ public static Color color = Palette.JPCHLLEJNEH;
public static float delay = 10f;
public static float cooldown = 30f;
public static class Eraser {
public static PlayerControl eraser;
- public static Color color = Palette.LDCHDOFJPGH;
+ public static Color color = Palette.JPCHLLEJNEH;
public static List<PlayerControl> futureErased = new List<PlayerControl>();
public static PlayerControl currentTarget;
public static float cooldown = 30f;
+ public static bool canEraseAnyone = false;
private static Sprite buttonSprite;
public static Sprite getButtonSprite() {
futureErased = new List<PlayerControl>();
currentTarget = null;
cooldown = CustomOptionHolder.eraserCooldown.getFloat();
+ canEraseAnyone = CustomOptionHolder.eraserCanEraseAnyone.getBool();
}
}
-
+
public static class Spy {
public static PlayerControl spy;
- public static Color color = Palette.LDCHDOFJPGH;
+ public static Color color = Palette.JPCHLLEJNEH;
public static bool impostorsCanKillAnyone = true;
impostorsCanKillAnyone = CustomOptionHolder.spyImpostorsCanKillAnyone.getBool();
}
}
+
+ public static class Trickster {
+ public static PlayerControl trickster;
+ public static Color color = Palette.JPCHLLEJNEH;
+ public static float placeBoxCooldown = 30f;
+ public static float lightsOutCooldown = 30f;
+ public static float lightsOutDuration = 10f;
+ public static float lightsOutTimer = 0f;
+
+ private static Sprite placeBoxButtonSprite;
+ private static Sprite lightOutButtonSprite;
+ public static Sprite getPlaceBoxButtonSprite() {
+ if (placeBoxButtonSprite) return placeBoxButtonSprite;
+ placeBoxButtonSprite = Helpers.loadSpriteFromResources("TheOtherRoles.Resources.PlaceJackInTheBoxButton.png", 115f);
+ return placeBoxButtonSprite;
+ }
+ public static Sprite getLightsOutButtonSprite() {
+ if (lightOutButtonSprite) return lightOutButtonSprite;
+ lightOutButtonSprite = Helpers.loadSpriteFromResources("TheOtherRoles.Resources.LightsOutButton.png", 115f);
+ return lightOutButtonSprite;
+ }
+
+ public static void clearAndReload() {
+ trickster = null;
+ lightsOutTimer = 0f;
+ placeBoxCooldown = CustomOptionHolder.tricksterPlaceBoxCooldown.getFloat();
+ lightsOutCooldown = CustomOptionHolder.tricksterLightsOutCooldown.getFloat();
+ lightsOutDuration = CustomOptionHolder.tricksterLightsOutDuration.getFloat();
+ JackInTheBox.UpdateStates(); // if the role is erased, we might have to update the state of the created objects
+ }
+
+ }
}
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
- <Version>2.1.0</Version>
+ <Version>2.2.0</Version>
<Description>TheOtherRoles</Description>
<Authors>Eisbison</Authors>
</PropertyGroup>
<PropertyGroup Condition="'$(GamePlatform)' == 'Steam'">
- <GameVersion>2021.3.31.3s</GameVersion>
+ <GameVersion>2021.4.12s</GameVersion>
<DefineConstants>$(DefineConstants);STEAM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(GamePlatform)' == 'Itch'">
- <GameVersion>2021.3.31i</GameVersion>
+ <GameVersion>2021.4.21i</GameVersion>
<DefineConstants>$(DefineConstants);ITCH</DefineConstants>
</PropertyGroup>
<EmbeddedResource Include="Resources\AdminTableIcon.png" />
<EmbeddedResource Include="Resources\SwapperCheck.png" />
<EmbeddedResource Include="Resources\SidekickButton.png" />
+ <EmbeddedResource Include="Resources\PlaceJackInTheBoxButton.png" />
+ <EmbeddedResource Include="Resources\JackInTheBox.png" />
+ <EmbeddedResource Include="Resources\LightsOutButton.png" />
</ItemGroup>
<ItemGroup>
<Reference Include="Unity.ResourceManager">
<HintPath>$(AmongUs)\BepInEx\unhollowed\Unity.ResourceManager.dll</HintPath>
</Reference>
- <Reference Include="Unity.TextMeshPro">
- <HintPath>$(AmongUs)\BepInEx\unhollowed\Unity.TextMeshPro.dll</HintPath>
+ <Reference Include="Unity.textMeshPro">
+ <HintPath>$(AmongUs)\BepInEx\unhollowed\Unity.textMeshPro.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>$(AmongUs)\BepInEx\unhollowed\UnityEngine.dll</HintPath>
<Reference Include="UnityEngine.TerrainModule">
<HintPath>$(AmongUs)\BepInEx\unhollowed\UnityEngine.TerrainModule.dll</HintPath>
</Reference>
- <Reference Include="UnityEngine.TextCoreModule">
- <HintPath>$(AmongUs)\BepInEx\unhollowed\UnityEngine.TextCoreModule.dll</HintPath>
+ <Reference Include="UnityEngine.textCoreModule">
+ <HintPath>$(AmongUs)\BepInEx\unhollowed\UnityEngine.textCoreModule.dll</HintPath>
</Reference>
- <Reference Include="UnityEngine.TextRenderingModule">
- <HintPath>$(AmongUs)\BepInEx\unhollowed\UnityEngine.TextRenderingModule.dll</HintPath>
+ <Reference Include="UnityEngine.textRenderingModule">
+ <HintPath>$(AmongUs)\BepInEx\unhollowed\UnityEngine.textRenderingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TilemapModule">
<HintPath>$(AmongUs)\BepInEx\unhollowed\UnityEngine.TilemapModule.dll</HintPath>
using System.Collections.Generic;
using System.Linq;
-using Palette = GLNPIJPGGNJ;
+using Palette = BLMBFIODBKL;
namespace TheOtherRoles
{
Dictionary<byte, PlayerControl> playersById = Helpers.allPlayersById();
foreach (PlayerControl player in PlayerControl.AllPlayerControls) {
- player.nameText.Text = player.IDOFAMCIJKE.HGGCLJHCDBM;
- if (PlayerControl.LocalPlayer.IDOFAMCIJKE.CIDDOFDJHJH && player.IDOFAMCIJKE.CIDDOFDJHJH) {
- player.nameText.Color = Palette.LDCHDOFJPGH;
+ player.nameText.text = player.PPMOEEPBHJO.PCLLABJCIPC;
+ if (PlayerControl.LocalPlayer.PPMOEEPBHJO.FDNMBJOAPFL && player.PPMOEEPBHJO.FDNMBJOAPFL) {
+ player.nameText.color = Palette.JPCHLLEJNEH;
} else {
- player.nameText.Color = Color.white;
+ player.nameText.color = Color.white;
}
}
if (MeetingHud.Instance != null) {
- foreach (PlayerVoteArea player in MeetingHud.Instance.DHCOPOOJCLN) {
- PlayerControl playerControl = playersById.ContainsKey((byte)player.HMPHKKGPLAG) ? playersById[(byte)player.HMPHKKGPLAG] : null;
+ foreach (PlayerVoteArea player in MeetingHud.Instance.GBKFCOAKLAH) {
+ PlayerControl playerControl = playersById.ContainsKey((byte)player.GEIOMAPOPKA) ? playersById[(byte)player.GEIOMAPOPKA] : null;
if (playerControl != null) {
- player.NameText.Text = playerControl.IDOFAMCIJKE.HGGCLJHCDBM;
- if (PlayerControl.LocalPlayer.IDOFAMCIJKE.CIDDOFDJHJH && playerControl.IDOFAMCIJKE.CIDDOFDJHJH) {
- player.NameText.Color = Palette.LDCHDOFJPGH;
+ player.NameText.text = playerControl.PPMOEEPBHJO.PCLLABJCIPC;
+ if (PlayerControl.LocalPlayer.PPMOEEPBHJO.FDNMBJOAPFL && playerControl.PPMOEEPBHJO.FDNMBJOAPFL) {
+ player.NameText.color = Palette.JPCHLLEJNEH;
} else {
- player.NameText.Color = Color.white;
+ player.NameText.color = Color.white;
}
}
}
}
- if (PlayerControl.LocalPlayer.IDOFAMCIJKE.CIDDOFDJHJH) {
+ if (PlayerControl.LocalPlayer.PPMOEEPBHJO.FDNMBJOAPFL) {
List<PlayerControl> impostors = PlayerControl.AllPlayerControls.ToArray().ToList();
- impostors.RemoveAll(x => !x.IDOFAMCIJKE.CIDDOFDJHJH);
+ impostors.RemoveAll(x => !x.PPMOEEPBHJO.FDNMBJOAPFL);
foreach (PlayerControl player in impostors)
- player.nameText.Color = Palette.LDCHDOFJPGH;
+ player.nameText.color = Palette.JPCHLLEJNEH;
if (MeetingHud.Instance != null)
- foreach (PlayerVoteArea player in MeetingHud.Instance.DHCOPOOJCLN) {
- PlayerControl playerControl = Helpers.playerById((byte)player.HMPHKKGPLAG);
- if (playerControl != null && playerControl.IDOFAMCIJKE.CIDDOFDJHJH)
- player.NameText.Color = Palette.LDCHDOFJPGH;
+ foreach (PlayerVoteArea player in MeetingHud.Instance.GBKFCOAKLAH) {
+ PlayerControl playerControl = Helpers.playerById((byte)player.GEIOMAPOPKA);
+ if (playerControl != null && playerControl.PPMOEEPBHJO.FDNMBJOAPFL)
+ player.NameText.color = Palette.JPCHLLEJNEH;
}
}
}
static void setPlayerNameColor(PlayerControl p, Color color) {
- p.nameText.Color = color;
+ p.nameText.color = color;
if (MeetingHud.Instance != null)
- foreach (PlayerVoteArea player in MeetingHud.Instance.DHCOPOOJCLN)
- if (player.NameText != null && p.PlayerId == player.HMPHKKGPLAG)
- player.NameText.Color = color;
+ foreach (PlayerVoteArea player in MeetingHud.Instance.GBKFCOAKLAH)
+ if (player.NameText != null && p.PlayerId == player.GEIOMAPOPKA)
+ player.NameText.color = color;
}
static void setNameColors() {
}
// No else if here, as the Impostors need the Spy name to be colored
- if (Spy.spy != null && PlayerControl.LocalPlayer.IDOFAMCIJKE.CIDDOFDJHJH) {
+ if (Spy.spy != null && PlayerControl.LocalPlayer.PPMOEEPBHJO.FDNMBJOAPFL) {
setPlayerNameColor(Spy.spy, Spy.color);
}
}
static void setMafiaNameTags() {
- if (PlayerControl.LocalPlayer != null && PlayerControl.LocalPlayer.IDOFAMCIJKE.CIDDOFDJHJH) {
+ if (PlayerControl.LocalPlayer != null && PlayerControl.LocalPlayer.PPMOEEPBHJO.FDNMBJOAPFL) {
foreach (PlayerControl player in PlayerControl.AllPlayerControls)
if (Godfather.godfather != null && Godfather.godfather == player)
- player.nameText.Text = player.IDOFAMCIJKE.HGGCLJHCDBM + " (G)";
+ player.nameText.text = player.PPMOEEPBHJO.PCLLABJCIPC + " (G)";
else if (Mafioso.mafioso != null && Mafioso.mafioso == player)
- player.nameText.Text = player.IDOFAMCIJKE.HGGCLJHCDBM + " (M)";
+ player.nameText.text = player.PPMOEEPBHJO.PCLLABJCIPC + " (M)";
else if (Janitor.janitor != null && Janitor.janitor == player)
- player.nameText.Text = player.IDOFAMCIJKE.HGGCLJHCDBM + " (J)";
+ player.nameText.text = player.PPMOEEPBHJO.PCLLABJCIPC + " (J)";
if (MeetingHud.Instance != null)
- foreach (PlayerVoteArea player in MeetingHud.Instance.DHCOPOOJCLN)
- if (Godfather.godfather != null && Godfather.godfather.PlayerId == player.HMPHKKGPLAG)
- player.NameText.Text = Godfather.godfather.IDOFAMCIJKE.HGGCLJHCDBM + " (G)";
- else if (Mafioso.mafioso != null && Mafioso.mafioso.PlayerId == player.HMPHKKGPLAG)
- player.NameText.Text = Mafioso.mafioso.IDOFAMCIJKE.HGGCLJHCDBM + " (M)";
- else if (Janitor.janitor != null && Janitor.janitor.PlayerId == player.HMPHKKGPLAG)
- player.NameText.Text = Janitor.janitor.IDOFAMCIJKE.HGGCLJHCDBM + " (J)";
+ foreach (PlayerVoteArea player in MeetingHud.Instance.GBKFCOAKLAH)
+ if (Godfather.godfather != null && Godfather.godfather.PlayerId == player.GEIOMAPOPKA)
+ player.NameText.text = Godfather.godfather.PPMOEEPBHJO.PCLLABJCIPC + " (G)";
+ else if (Mafioso.mafioso != null && Mafioso.mafioso.PlayerId == player.GEIOMAPOPKA)
+ player.NameText.text = Mafioso.mafioso.PPMOEEPBHJO.PCLLABJCIPC + " (M)";
+ else if (Janitor.janitor != null && Janitor.janitor.PlayerId == player.GEIOMAPOPKA)
+ player.NameText.text = Janitor.janitor.PPMOEEPBHJO.PCLLABJCIPC + " (J)";
}
}
if(Medic.showShielded == 0) // Everyone
{
- Medic.shielded.LNMJKMLHMIM.material.SetFloat("_Outline", 1f);
- Medic.shielded.LNMJKMLHMIM.material.SetColor("_OutlineColor", Medic.shieldedColor);
+ Medic.shielded.KJAENOGGEOK.material.SetFloat("_Outline", 1f);
+ Medic.shielded.KJAENOGGEOK.material.SetColor("_OutlineColor", Medic.shieldedColor);
}
else if (Medic.showShielded == 1 && PlayerControl.LocalPlayer == Medic.shielded) // Shielded + Medic
{
- Medic.shielded.LNMJKMLHMIM.material.SetFloat("_Outline", 1f);
- Medic.shielded.LNMJKMLHMIM.material.SetColor("_OutlineColor", Medic.shieldedColor);
+ Medic.shielded.KJAENOGGEOK.material.SetFloat("_Outline", 1f);
+ Medic.shielded.KJAENOGGEOK.material.SetColor("_OutlineColor", Medic.shieldedColor);
}
else if(PlayerControl.LocalPlayer == Medic.medic) // Medic
{
- Medic.shielded.LNMJKMLHMIM.material.SetFloat("_Outline", 1f);
- Medic.shielded.LNMJKMLHMIM.material.SetColor("_OutlineColor", Medic.shieldedColor);
+ Medic.shielded.KJAENOGGEOK.material.SetFloat("_Outline", 1f);
+ Medic.shielded.KJAENOGGEOK.material.SetColor("_OutlineColor", Medic.shieldedColor);
}
// Break shield
- if (Medic.shielded.IDOFAMCIJKE.FGNJJFABIHJ || Medic.medic == null || Medic.medic.IDOFAMCIJKE.FGNJJFABIHJ) {
- Medic.shielded.LNMJKMLHMIM.material.SetFloat("_Outline", 0f);
+ if (Medic.shielded.PPMOEEPBHJO.IAGJEKLJCCI || Medic.medic == null || Medic.medic.PPMOEEPBHJO.IAGJEKLJCCI) {
+ Medic.shielded.KJAENOGGEOK.material.SetFloat("_Outline", 0f);
Medic.shielded = null;
}
}
- static void mafiosoDeactivateKillButtonIfNecessary(HudManager __instance) {
- if (Mafioso.mafioso == null || Mafioso.mafioso != PlayerControl.LocalPlayer) return;
-
- if (!PlayerControl.LocalPlayer.IDOFAMCIJKE.FGNJJFABIHJ && __instance.UseButton.isActiveAndEnabled && Godfather.godfather != null && Godfather.godfather.IDOFAMCIJKE.FGNJJFABIHJ) {
- __instance.KillButton.gameObject.SetActive(true);
- __instance.KillButton.renderer.enabled = true;
- __instance.KillButton.isActive = true;
- __instance.KillButton.enabled = true;
- } else {
- __instance.KillButton.gameObject.SetActive(false);
- __instance.KillButton.renderer.enabled = false;
- __instance.KillButton.isActive = false;
- __instance.KillButton.enabled = false;
- }
- }
-
- static void janitorDeactivateKillButton(HudManager __instance) {
- if (Janitor.janitor != null && Janitor.janitor == PlayerControl.LocalPlayer) {
- __instance.KillButton.gameObject.SetActive(false);
- __instance.KillButton.renderer.enabled = false;
- __instance.KillButton.isActive = false;
- __instance.KillButton.enabled = false;
- }
- }
-
static void timerUpdate() {
Hacker.hackerTimer -= Time.deltaTime;
Lighter.lighterTimer -= Time.deltaTime;
+ Trickster.lightsOutTimer -= Time.deltaTime;
}
static void camouflageAndMorphActions() {
// Set morphling morphed look
if (Morphling.morphTimer > 0f && Camouflager.camouflageTimer <= 0f) {
if (Morphling.morphling != null && Morphling.morphTarget != null) {
- Morphling.morphling.nameText.Text = Morphling.morphTarget.IDOFAMCIJKE.HGGCLJHCDBM;
- Morphling.morphling.LNMJKMLHMIM.material.SetColor("_BackColor", Palette.CHIIBPFJACF[Morphling.morphTarget.IDOFAMCIJKE.JFHFMIKFHGG]);
- Morphling.morphling.LNMJKMLHMIM.material.SetColor("_BodyColor", Palette.CALCLMEEPGL[Morphling.morphTarget.IDOFAMCIJKE.JFHFMIKFHGG]);
- Morphling.morphling.LNMJKMLHMIM.material.SetFloat("_Outline", Morphling.morphTarget.LNMJKMLHMIM.material.GetFloat("_Outline"));
- Morphling.morphling.LNMJKMLHMIM.material.SetColor("_OutlineColor", Morphling.morphTarget.LNMJKMLHMIM.material.GetColor("_OutlineColor"));
- Morphling.morphling.HatRenderer.SetHat(Morphling.morphTarget.IDOFAMCIJKE.MFIOGLKPMGD, Morphling.morphTarget.IDOFAMCIJKE.JFHFMIKFHGG);
- Morphling.morphling.nameText.transform.localPosition = new Vector3(0f, (Morphling.morphTarget.IDOFAMCIJKE.MFIOGLKPMGD == 0U) ? 0.7f : 1.05f, -0.5f);
-
- if (Morphling.morphling.MyPhysics.Skin.skin.ProdId != DestroyableSingleton<HatManager>.CMJOLNCMAPD.AllSkins[(int)Morphling.morphTarget.IDOFAMCIJKE.LFDAHOFPIAM].ProdId) {
- Helpers.setSkinWithAnim(Morphling.morphling.MyPhysics, Morphling.morphTarget.IDOFAMCIJKE.LFDAHOFPIAM);
+ Morphling.morphling.nameText.text = Morphling.morphTarget.PPMOEEPBHJO.PCLLABJCIPC;
+ Morphling.morphling.KJAENOGGEOK.material.SetColor("_BackColor", Palette.PHFOPNDOEMD[Morphling.morphTarget.PPMOEEPBHJO.IMMNCAGJJJC]);
+ Morphling.morphling.KJAENOGGEOK.material.SetColor("_BodyColor", Palette.AEDCMKGJKAG[Morphling.morphTarget.PPMOEEPBHJO.IMMNCAGJJJC]);
+ Morphling.morphling.KJAENOGGEOK.material.SetFloat("_Outline", Morphling.morphTarget.KJAENOGGEOK.material.GetFloat("_Outline"));
+ Morphling.morphling.KJAENOGGEOK.material.SetColor("_OutlineColor", Morphling.morphTarget.KJAENOGGEOK.material.GetColor("_OutlineColor"));
+ Morphling.morphling.HatRenderer.SetHat(Morphling.morphTarget.PPMOEEPBHJO.CPGFLBANALE, Morphling.morphTarget.PPMOEEPBHJO.IMMNCAGJJJC);
+ Morphling.morphling.nameText.transform.localPosition = new Vector3(0f, (Morphling.morphTarget.PPMOEEPBHJO.CPGFLBANALE == 0U) ? 0.7f : 1.05f, -0.5f);
+
+ if (Morphling.morphling.MyPhysics.Skin.skin.ProdId != DestroyableSingleton<HatManager>.CHNDKKBEIDG.AllSkins[(int)Morphling.morphTarget.PPMOEEPBHJO.CGNMKICGLOG].ProdId) {
+ Helpers.setSkinWithAnim(Morphling.morphling.MyPhysics, Morphling.morphTarget.PPMOEEPBHJO.CGNMKICGLOG);
}
- if (Morphling.morphling.CurrentPet == null || Morphling.morphling.CurrentPet.EKONGILOOPE != DestroyableSingleton<HatManager>.CMJOLNCMAPD.AllPets[(int)Morphling.morphTarget.IDOFAMCIJKE.GKFOHNJHFOE].EKONGILOOPE) {
+ if (Morphling.morphling.CurrentPet == null || Morphling.morphling.CurrentPet.OPADMIKFGHK != DestroyableSingleton<HatManager>.CHNDKKBEIDG.AllPets[(int)Morphling.morphTarget.PPMOEEPBHJO.LBHODBKCBKA].OPADMIKFGHK) {
if (Morphling.morphling.CurrentPet) UnityEngine.Object.Destroy(Morphling.morphling.CurrentPet.gameObject);
- Morphling.morphling.CurrentPet = UnityEngine.Object.Instantiate<PetBehaviour>(DestroyableSingleton<HatManager>.CMJOLNCMAPD.AllPets[(int)Morphling.morphTarget.IDOFAMCIJKE.GKFOHNJHFOE]);
+ Morphling.morphling.CurrentPet = UnityEngine.Object.Instantiate<PetBehaviour>(DestroyableSingleton<HatManager>.CHNDKKBEIDG.AllPets[(int)Morphling.morphTarget.PPMOEEPBHJO.LBHODBKCBKA]);
Morphling.morphling.CurrentPet.transform.position = Morphling.morphling.transform.position;
Morphling.morphling.CurrentPet.Source = Morphling.morphling;
- Morphling.morphling.CurrentPet.FHBHBMIJFID = Morphling.morphling.FHBHBMIJFID;
- PlayerControl.SetPlayerMaterialColors(Morphling.morphTarget.IDOFAMCIJKE.JFHFMIKFHGG, Morphling.morphling.CurrentPet.rend);
+ Morphling.morphling.CurrentPet.BDBDGFDELMB = Morphling.morphling.BDBDGFDELMB;
+ PlayerControl.SetPlayerMaterialColors(Morphling.morphTarget.PPMOEEPBHJO.IMMNCAGJJJC, Morphling.morphling.CurrentPet.rend);
} else if (Morphling.morphling.CurrentPet) {
- PlayerControl.SetPlayerMaterialColors(Morphling.morphTarget.IDOFAMCIJKE.JFHFMIKFHGG, Morphling.morphling.CurrentPet.rend);
+ PlayerControl.SetPlayerMaterialColors(Morphling.morphTarget.PPMOEEPBHJO.IMMNCAGJJJC, Morphling.morphling.CurrentPet.rend);
}
}
}
// Set camouflaged look (overrides morphling morphed look if existent)
if (Camouflager.camouflageTimer > 0f) {
foreach (PlayerControl p in PlayerControl.AllPlayerControls) {
- p.nameText.Text = "";
- p.LNMJKMLHMIM.material.SetColor("_BackColor", Palette.CALCLMEEPGL[6]);
- p.LNMJKMLHMIM.material.SetColor("_BodyColor", Palette.CALCLMEEPGL[6]);
- p.LNMJKMLHMIM.material.SetFloat("_Outline", 0f);
+ p.nameText.text = "";
+ p.KJAENOGGEOK.material.SetColor("_BackColor", Palette.AEDCMKGJKAG[6]);
+ p.KJAENOGGEOK.material.SetColor("_BodyColor", Palette.AEDCMKGJKAG[6]);
+ p.KJAENOGGEOK.material.SetFloat("_Outline", 0f);
p.HatRenderer.SetHat(0, 0);
Helpers.setSkinWithAnim(p.MyPhysics, 0);
bool spawnPet = false;
if (p.CurrentPet == null) spawnPet = true;
- else if (p.CurrentPet.EKONGILOOPE != DestroyableSingleton<HatManager>.CMJOLNCMAPD.AllPets[0].EKONGILOOPE) {
+ else if (p.CurrentPet.OPADMIKFGHK != DestroyableSingleton<HatManager>.CHNDKKBEIDG.AllPets[0].OPADMIKFGHK) {
UnityEngine.Object.Destroy(p.CurrentPet.gameObject);
spawnPet = true;
}
if (spawnPet) {
- p.CurrentPet = UnityEngine.Object.Instantiate<PetBehaviour>(DestroyableSingleton<HatManager>.CMJOLNCMAPD.AllPets[0]);
+ p.CurrentPet = UnityEngine.Object.Instantiate<PetBehaviour>(DestroyableSingleton<HatManager>.CHNDKKBEIDG.AllPets[0]);
p.CurrentPet.transform.position = p.transform.position;
p.CurrentPet.Source = p;
}
float scale = growingProgress * 0.35f + 0.35f;
string suffix = "";
if (growingProgress != 1f)
- suffix = " [FAD934FF](" + Mathf.FloorToInt(growingProgress * 18) + ")";
+ suffix = " <color=#FAD934FF>(" + Mathf.FloorToInt(growingProgress * 18) + ")</color>";
- Child.child.nameText.Text += suffix;
+ Child.child.nameText.text += suffix;
if (MeetingHud.Instance != null) {
- foreach (PlayerVoteArea player in MeetingHud.Instance.DHCOPOOJCLN)
- if (player.NameText != null && Child.child.PlayerId == player.HMPHKKGPLAG)
- player.NameText.Text += suffix;
+ foreach (PlayerVoteArea player in MeetingHud.Instance.GBKFCOAKLAH)
+ if (player.NameText != null && Child.child.PlayerId == player.GEIOMAPOPKA)
+ player.NameText.text += suffix;
}
if (Morphling.morphling != null && Morphling.morphTarget == Child.child && Morphling.morphTimer > 0f)
- Morphling.morphling.nameText.Text += suffix;
+ Morphling.morphling.nameText.text += suffix;
}
- static void vampireDeactivateKillButton(HudManager __instance) {
- if (Vampire.vampire != null && Vampire.vampire == PlayerControl.LocalPlayer) {
- __instance.KillButton.gameObject.SetActive(false);
- __instance.KillButton.renderer.enabled = false;
- __instance.KillButton.isActive = false;
- __instance.KillButton.enabled = false;
- }
+ static void updateImpostorKillButton(HudManager __instance) {
+ if (!PlayerControl.LocalPlayer.PPMOEEPBHJO.FDNMBJOAPFL) return;
+ bool enabled = true;
+ if (Vampire.vampire != null && Vampire.vampire == PlayerControl.LocalPlayer)
+ enabled = false;
+ else if (Mafioso.mafioso != null && Mafioso.mafioso == PlayerControl.LocalPlayer && Godfather.godfather != null && !Godfather.godfather.PPMOEEPBHJO.IAGJEKLJCCI)
+ enabled = false;
+ else if (Janitor.janitor != null && Janitor.janitor == PlayerControl.LocalPlayer)
+ enabled = false;
+ enabled &= __instance.UseButton.isActiveAndEnabled;
+
+ __instance.KillButton.gameObject.SetActive(enabled);
+ __instance.KillButton.renderer.enabled = enabled;
+ __instance.KillButton.isActive = enabled;
+ __instance.KillButton.enabled = enabled;
}
static void snitchUpdate() {
foreach (Arrow arrow in Snitch.localArrows) arrow.arrow.SetActive(false);
- if (Snitch.snitch == null || Snitch.snitch.IDOFAMCIJKE.FGNJJFABIHJ) return;
+ if (Snitch.snitch == null || Snitch.snitch.PPMOEEPBHJO.IAGJEKLJCCI) return;
int numberOfTasks = 0;
- GameData.OFKOJOKOOAK OFKOJOKOOAK = Snitch.snitch.IDOFAMCIJKE;
- if (!OFKOJOKOOAK.GBPMEHJFECK && OFKOJOKOOAK.CLLMDIJHALO != null) {
- for (int i = 0; i < OFKOJOKOOAK.CLLMDIJHALO.Count; i++) {
- if (!OFKOJOKOOAK.CLLMDIJHALO[i].FNCBODEIJCN)
+ GameData.LGBOMGHJELL LGBOMGHJELL = Snitch.snitch.PPMOEEPBHJO;
+ if (!LGBOMGHJELL.MFFAGDHDHLO && LGBOMGHJELL.PHGPJMKOKMC != null) {
+ for (int i = 0; i < LGBOMGHJELL.PHGPJMKOKMC.Count; i++) {
+ if (!LGBOMGHJELL.PHGPJMKOKMC[i].LBBFBHJINJK)
numberOfTasks++;
}
}
- if (PlayerControl.LocalPlayer.IDOFAMCIJKE.CIDDOFDJHJH && numberOfTasks <= Snitch.taskCountForImpostors) {
+ if (PlayerControl.LocalPlayer.PPMOEEPBHJO.FDNMBJOAPFL && numberOfTasks <= Snitch.taskCountForImpostors) {
if (Snitch.localArrows.Count == 0) Snitch.localArrows.Add(new Arrow(Color.blue));
if (Snitch.localArrows.Count != 0 && Snitch.localArrows[0] != null) {
Snitch.localArrows[0].arrow.SetActive(true);
} else if (PlayerControl.LocalPlayer == Snitch.snitch && numberOfTasks == 0) {
int arrowIndex = 0;
foreach (PlayerControl p in PlayerControl.AllPlayerControls) {
- if (p.IDOFAMCIJKE.CIDDOFDJHJH && !p.IDOFAMCIJKE.FGNJJFABIHJ) {
+ if (p.PPMOEEPBHJO.FDNMBJOAPFL && !p.PPMOEEPBHJO.IAGJEKLJCCI) {
if (arrowIndex >= Snitch.localArrows.Count) Snitch.localArrows.Add(new Arrow(Color.blue));
if (arrowIndex < Snitch.localArrows.Count && Snitch.localArrows[arrowIndex] != null) {
Snitch.localArrows[arrowIndex].arrow.SetActive(true);
static void Postfix(HudManager __instance)
{
- if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.CJDCOJJNIGL.Started) return;
+ if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.GCDONLGCMIL.Started) return;
CustomButton.HudUpdate();
resetNameTagsAndColors();
setMafiaNameTags();
// Jester
Helpers.removeTasksFromPlayer(Jester.jester);
- // Mafioso
- mafiosoDeactivateKillButtonIfNecessary(__instance);
- // Janitor
- janitorDeactivateKillButton(__instance);
+ // Impostors
+ updateImpostorKillButton(__instance);
// Timer updates
timerUpdate();
// Camouflager and Morphling
camouflageAndMorphActions();
// Child
childUpdate();
- // Vampire
- vampireDeactivateKillButton(__instance);
// Snitch
snitchUpdate();
// Jackal
using HarmonyLib;
using System;
-using System.IO;
-using System.Net.Http;
+using Hazel;
using UnityEngine;
using System.Linq;
using static TheOtherRoles.TheOtherRoles;
using static TheOtherRoles.MapOptions;
using System.Collections.Generic;
-using SystemTypes = LGBKLKNAINN;
-using Palette = GLNPIJPGGNJ;
-using Constants = NFONDPLFBCP;
-using PhysicsHelpers = IEPBCHBGDOA;
-using TaskTypes = CBFIAGIGOFA;
-using ImageNames = IKHMOFOFDHI;
+using SystemTypes = BCPJLGGNHBC;
+using Palette = BLMBFIODBKL;
+using Constants = LNCOKMACBKP;
+using PhysicsHelpers = FJFJIDCFLDJ;
+using TaskTypes = DMOAGPGAFKM;
+using ImageNames = DLBCMCKGOMN;
namespace TheOtherRoles
{
[HarmonyPatch(typeof(Vent), "CanUse")]
public static class VentCanUsePatch
{
- public static bool Prefix(Vent __instance, ref float __result, [HarmonyArgument(0)] GameData.OFKOJOKOOAK pc, [HarmonyArgument(1)] out bool canUse, [HarmonyArgument(2)] out bool couldUse)
+ public static bool Prefix(Vent __instance, ref float __result, [HarmonyArgument(0)] GameData.LGBOMGHJELL pc, [HarmonyArgument(1)] out bool canUse, [HarmonyArgument(2)] out bool couldUse)
{
float num = float.MaxValue;
- PlayerControl @object = pc.GPBBCHGPABL;
+ PlayerControl @object = pc.GJPBCGFPMOD;
bool roleCouldUse = false;
roleCouldUse = true;
else if (Sidekick.canUseVents && Sidekick.sidekick != null && Sidekick.sidekick == @object)
roleCouldUse = true;
- else if (pc.CIDDOFDJHJH) {
+ else if (pc.FDNMBJOAPFL) {
if (Janitor.janitor != null && Janitor.janitor == PlayerControl.LocalPlayer)
roleCouldUse = false;
- else if (Mafioso.mafioso != null && Mafioso.mafioso == PlayerControl.LocalPlayer && Godfather.godfather != null && !Godfather.godfather.IDOFAMCIJKE.FGNJJFABIHJ)
+ else if (Mafioso.mafioso != null && Mafioso.mafioso == PlayerControl.LocalPlayer && Godfather.godfather != null && !Godfather.godfather.PPMOEEPBHJO.IAGJEKLJCCI)
roleCouldUse = false;
else
roleCouldUse = true;
}
- couldUse = ((@object.inVent || roleCouldUse) && !pc.FGNJJFABIHJ && (@object.AMDJMEEHNIG || @object.inVent));
+ var usableDistance = __instance.KNKPIDOGFFC;
+ if (__instance.name.StartsWith("JackInTheBoxVent_")) {
+ if(Trickster.trickster != PlayerControl.LocalPlayer) {
+ // Only the Trickster can use the Jack-In-The-Boxes!
+ canUse = false;
+ couldUse = false;
+ __result = num;
+ return false;
+ } else {
+ // Reduce the usable distance to reduce the risk of gettings stuck while trying to jump into the box if it's placed near objects
+ usableDistance = 0.4f;
+ }
+ }
+
+ couldUse = ((@object.inVent || roleCouldUse) && !pc.IAGJEKLJCCI && (@object.POECPOEKKNO || @object.inVent));
canUse = couldUse;
if (canUse)
{
Vector2 truePosition = @object.GetTruePosition();
Vector3 position = __instance.transform.position;
num = Vector2.Distance(truePosition, position);
- canUse &= (num <= __instance.GBFKHOCBAOF && !PhysicsHelpers.GCFCONMBBOF(truePosition, position, Constants.NCOONMPDEDB, false));
+
+ canUse &= (num <= usableDistance && !PhysicsHelpers.DOAHONIIFJD(truePosition, position, Constants.KOMPKLHCHJI, false));
}
__result = num;
return false;
[HarmonyPatch(typeof(Vent), "Use")]
public static class VentUsePatch {
- public static void Prefix(Vent __instance) {
+ public static bool Prefix(Vent __instance) {
bool flag;
bool flag2;
- __instance.CanUse(PlayerControl.LocalPlayer.IDOFAMCIJKE, out flag, out flag2);
- if (flag && !PlayerControl.LocalPlayer.inVent)
- localVentEnterTimePoint = DateTime.UtcNow;
+ __instance.CanUse(PlayerControl.LocalPlayer.PPMOEEPBHJO, out flag, out flag2);
+
+ if (!flag) return true; // Continue with default method
+
+ bool isEnter = !PlayerControl.LocalPlayer.inVent;
+ if (isEnter) localVentEnterTimePoint = DateTime.UtcNow;
+
+ if (!__instance.name.StartsWith("JackInTheBoxVent_")) return true; // Continue with default method
+
+ __instance.SetButtons(isEnter);
+ MessageWriter writer = AmongUsClient.Instance.StartRpc(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UseUncheckedVent, Hazel.SendOption.Reliable);
+ writer.WritePacked(__instance.Id);
+ writer.Write(PlayerControl.LocalPlayer.PlayerId);
+ writer.Write(isEnter ? byte.MaxValue : (byte)0);
+ writer.EndMessage();
+ RPCProcedure.useUncheckedVent(__instance.Id, PlayerControl.LocalPlayer.PlayerId, isEnter ? byte.MaxValue : (byte)0);
+
+ return false;
}
}
[HarmonyPatch(typeof(UseButtonManager), nameof(UseButtonManager.SetTarget))]
class UseButtonSetTargetPatch {
static void Postfix(UseButtonManager __instance) {
- if (__instance.FKANCEFMKPH != null) return;
+ if (__instance.LHAKKAAOLLM != null) return;
// Mafia sabotage button render patch
bool blockSabotageJanitor = (Janitor.janitor != null && Janitor.janitor == PlayerControl.LocalPlayer);
- bool blockSabotageMafioso = (Mafioso.mafioso != null && Mafioso.mafioso == PlayerControl.LocalPlayer && Godfather.godfather != null && !Godfather.godfather.IDOFAMCIJKE.FGNJJFABIHJ);
+ bool blockSabotageMafioso = (Mafioso.mafioso != null && Mafioso.mafioso == PlayerControl.LocalPlayer && Godfather.godfather != null && !Godfather.godfather.PPMOEEPBHJO.IAGJEKLJCCI);
if (blockSabotageJanitor || blockSabotageMafioso) {
- __instance.UseButton.sprite = DestroyableSingleton<TranslationController>.CMJOLNCMAPD.GetImage(ImageNames.UseButton);
+ __instance.UseButton.sprite = DestroyableSingleton<TranslationController>.CHNDKKBEIDG.GetImage(ImageNames.UseButton);
__instance.UseButton.color = new Color(1f, 1f, 1f, 0.3f);
}
[HarmonyPatch(typeof(UseButtonManager), nameof(UseButtonManager.DoClick))]
class UseButtonDoClickPatch {
static bool Prefix(UseButtonManager __instance) {
- if (__instance.FKANCEFMKPH != null) return true;
+ if (__instance.LHAKKAAOLLM != null) return true;
// Mafia sabotage button click patch
bool blockSabotageJanitor = (Janitor.janitor != null && Janitor.janitor == PlayerControl.LocalPlayer);
- bool blockSabotageMafioso = (Mafioso.mafioso != null && Mafioso.mafioso == PlayerControl.LocalPlayer && Godfather.godfather != null && !Godfather.godfather.IDOFAMCIJKE.FGNJJFABIHJ);
+ bool blockSabotageMafioso = (Mafioso.mafioso != null && Mafioso.mafioso == PlayerControl.LocalPlayer && Godfather.godfather != null && !Godfather.godfather.PPMOEEPBHJO.IAGJEKLJCCI);
if (blockSabotageJanitor || blockSabotageMafioso) return false;
return true;
[HarmonyPatch(typeof(EmergencyMinigame), nameof(EmergencyMinigame.Update))]
class EmergencyMinigameUpdatePatch {
static void Postfix(EmergencyMinigame __instance) {
- // Swapper deactivate emergency button
- if (Swapper.swapper != null && Swapper.swapper == PlayerControl.LocalPlayer) {
- __instance.StatusText.Text = "The Swapper can't start an emergency meeting";
- __instance.NumberText.Text = string.Empty;
+ var roleCanCallEmergency = true;
+ var statusText = "";
+
+ // Deactivate emergency button for Swapper
+ 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 == PlayerControl.LocalPlayer && !Jester.canCallEmergency) {
+ roleCanCallEmergency = false;
+ statusText = "The Jester can't start an emergency meeting";
+ }
+
+ if (!roleCanCallEmergency) {
+ __instance.StatusText.text = statusText;
+ __instance.NumberText.text = string.Empty;
__instance.ClosedLid.gameObject.SetActive(true);
__instance.OpenLid.gameObject.SetActive(false);
__instance.ButtonActive = false;
+ return;
}
// Handle max number of meetings
- if (__instance.MJMOOPLLNPO == 1) {
+ if (__instance.FOIGOPKABAA == 1) {
int localRemaining = PlayerControl.LocalPlayer.RemainingEmergencies;
int teamRemaining = Mathf.Max(0, maxNumberOfMeetings - meetingsCount);
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.NumberText.text = $"{localRemaining.ToString()} and the ship has {teamRemaining.ToString()}";
__instance.ButtonActive = remaining > 0;
__instance.ClosedLid.gameObject.SetActive(!__instance.ButtonActive);
__instance.OpenLid.gameObject.SetActive(__instance.ButtonActive);
}
}
+ [HarmonyPatch(typeof(VitalsMinigame), nameof(VitalsMinigame.Begin))]
+ class VitalsMinigameBeginPatch {
+ static void Postfix(VitalsMinigame __instance) {
+
+ if (__instance.PMKNJGLKGDD.Length > 10) {
+ for (int i = 0; i < __instance.PMKNJGLKGDD.Length; i++) {
+ var vitalsPanel = __instance.PMKNJGLKGDD[i];
+ var player = GameData.Instance.AllPlayers[i];
+ vitalsPanel.Text.text = player.PCLLABJCIPC.Length >= 4 ? player.PCLLABJCIPC.Substring(0, 4).ToUpper() : player.PCLLABJCIPC.ToUpper();
+ }
+ }
+ }
+ }
+
+
[HarmonyPatch(typeof(VitalsMinigame), nameof(VitalsMinigame.Update))]
- class VitalsMinigamePatch {
+ class VitalsMinigameUpdatePatch {
+
static void Postfix(VitalsMinigame __instance) {
// Hacker show time since death
bool showHackerInfo = Hacker.hacker != null && Hacker.hacker == PlayerControl.LocalPlayer && Hacker.hackerTimer > 0;
- for (int k = 0; k < __instance.MCCBOPIEOEC.Length; k++)
+ for (int k = 0; k < __instance.PMKNJGLKGDD.Length; k++)
{
- VitalsPanel vitalsPanel = __instance.MCCBOPIEOEC[k];
- GameData.OFKOJOKOOAK OFKOJOKOOAK = GameData.Instance.AllPlayers[k];
+ VitalsPanel vitalsPanel = __instance.PMKNJGLKGDD[k];
+ GameData.LGBOMGHJELL player = GameData.Instance.AllPlayers[k];
+ // Crowded scaling
+ float scale = 10f / Mathf.Max(10, __instance.PMKNJGLKGDD.Length);
+ vitalsPanel.transform.localPosition = new Vector3((float)k * 0.6f * scale + -2.7f, 0.2f, -1f);
+ vitalsPanel.transform.localScale = new Vector3(scale, scale, vitalsPanel.transform.localScale.z);
+
+ // Hacker update
if (vitalsPanel.IsDead) {
- DeadPlayer deadPlayer = deadPlayers?.Where(x => x.player?.PlayerId == OFKOJOKOOAK?.GMBAIPNOKLP)?.FirstOrDefault();
+ DeadPlayer deadPlayer = deadPlayers?.Where(x => x.player?.PlayerId == player?.FNPNJHNKEBK)?.FirstOrDefault();
if (deadPlayer != null && deadPlayer.timeOfDeath != null) {
float timeSinceDeath = ((float)(DateTime.UtcNow - deadPlayer.timeOfDeath).TotalMilliseconds);
if (showHackerInfo)
- vitalsPanel.Text.Text = Math.Round(timeSinceDeath / 1000) + "s";
- else
- vitalsPanel.Text.Text = DestroyableSingleton<TranslationController>.CMJOLNCMAPD.GetString(Palette.OCCIKHJPJPK[(int)OFKOJOKOOAK.JFHFMIKFHGG], new UnhollowerBaseLib.Il2CppReferenceArray<Il2CppSystem.Object>(0));
+ vitalsPanel.Text.text = Math.Round(timeSinceDeath / 1000) + "s";
+ else if (__instance.PMKNJGLKGDD.Length > 10)
+ vitalsPanel.Text.text = player.PCLLABJCIPC.Length >= 4 ? player.PCLLABJCIPC.Substring(0, 4).ToUpper() : player.PCLLABJCIPC.ToUpper();
+ else
+ vitalsPanel.Text.text = DestroyableSingleton<TranslationController>.CHNDKKBEIDG.GetString(Palette.MBDDHJCCLBP[(int)player.IMMNCAGJJJC], new UnhollowerBaseLib.Il2CppReferenceArray<Il2CppSystem.Object>(0));
}
}
}
class MapCountOverlayUpdatePatch {
static bool Prefix(MapCountOverlay __instance) {
// Save colors for the Hacker
- __instance.HAHFHCCIEGH += Time.deltaTime;
- if (__instance.HAHFHCCIEGH < 0.1f)
+ __instance.PPKFBIONLAL += Time.deltaTime;
+ if (__instance.PPKFBIONLAL < 0.1f)
{
return false;
}
- __instance.HAHFHCCIEGH = 0f;
+ __instance.PPKFBIONLAL = 0f;
players = new Dictionary<SystemTypes, List<Color>>();
bool commsActive = false;
foreach (PlayerTask task in PlayerControl.LocalPlayer.myTasks)
if (task.TaskType == TaskTypes.FixComms) commsActive = true;
- if (!__instance.KGMLJDGMIND && commsActive)
+ if (!__instance.PIMGCOPFDBG && commsActive)
{
- __instance.KGMLJDGMIND = true;
- __instance.BackgroundColor.SetColor(Palette.JMELLHINKGM);
+ __instance.PIMGCOPFDBG = true;
+ __instance.BackgroundColor.SetColor(Palette.EGHCBLDNCGP);
__instance.SabotageText.gameObject.SetActive(true);
return false;
}
- if (__instance.KGMLJDGMIND && !commsActive)
+ if (__instance.PIMGCOPFDBG && !commsActive)
{
- __instance.KGMLJDGMIND = false;
+ __instance.PIMGCOPFDBG = false;
__instance.BackgroundColor.SetColor(Color.green);
__instance.SabotageText.gameObject.SetActive(false);
}
if (!commsActive)
{
- PlainShipRoom plainShipRoom = ShipStatus.Instance.EMIBABGLHIO[counterArea.RoomType];
+ PlainShipRoom plainShipRoom = ShipStatus.Instance.DFAAPCDKCCO[counterArea.RoomType];
if (plainShipRoom != null && plainShipRoom.roomArea)
{
- int num = plainShipRoom.roomArea.OverlapCollider(__instance.CGAANOHJEKD, __instance.BLDONECDJFJ);
+ int num = plainShipRoom.roomArea.OverlapCollider(__instance.CMCPAKBKLDP, __instance.HMNBGCJAGLM);
int num2 = num;
for (int j = 0; j < num; j++)
{
- Collider2D collider2D = __instance.BLDONECDJFJ[j];
+ Collider2D collider2D = __instance.HMNBGCJAGLM[j];
if (!(collider2D.tag == "DeadBody"))
{
PlayerControl component = collider2D.GetComponent<PlayerControl>();
- if (!component || component.IDOFAMCIJKE == null || component.IDOFAMCIJKE.GBPMEHJFECK || component.IDOFAMCIJKE.FGNJJFABIHJ)
+ if (!component || component.PPMOEEPBHJO == null || component.PPMOEEPBHJO.MFFAGDHDHLO || component.PPMOEEPBHJO.IAGJEKLJCCI)
{
num2--;
- } else if (component?.LNMJKMLHMIM?.material != null) {
- Color color = component.LNMJKMLHMIM.material.GetColor("_BodyColor");
+ } else if (component?.KJAENOGGEOK?.material != null) {
+ Color color = component.KJAENOGGEOK.material.GetColor("_BodyColor");
if (Hacker.onlyColorType) {
- var id = Mathf.Max(0, Palette.CALCLMEEPGL.IndexOf(color));
- color = Helpers.isLighterColor((byte)id) ? Palette.CALCLMEEPGL[7] : Palette.CALCLMEEPGL[6];
+ var id = Mathf.Max(0, Palette.AEDCMKGJKAG.IndexOf(color));
+ color = Helpers.isLighterColor((byte)id) ? Palette.AEDCMKGJKAG[7] : Palette.AEDCMKGJKAG[6];
}
roomColors.Add(color);
}
} else {
DeadBody component = collider2D.GetComponent<DeadBody>();
if (component) {
- GameData.OFKOJOKOOAK OFKOJOKOOAK = GameData.Instance.GetPlayerById(component.ParentId);
- if (OFKOJOKOOAK != null) {
- var color = Palette.CALCLMEEPGL[OFKOJOKOOAK.JFHFMIKFHGG];
+ GameData.LGBOMGHJELL LGBOMGHJELL = GameData.Instance.GetPlayerById(component.ParentId);
+ if (LGBOMGHJELL != null) {
+ var color = Palette.AEDCMKGJKAG[LGBOMGHJELL.IMMNCAGJJJC];
if (Hacker.onlyColorType)
- color = Helpers.isLighterColor(OFKOJOKOOAK.JFHFMIKFHGG) ? Palette.CALCLMEEPGL[7] : Palette.CALCLMEEPGL[6];
+ color = Helpers.isLighterColor(LGBOMGHJELL.IMMNCAGJJJC) ? Palette.AEDCMKGJKAG[7] : Palette.AEDCMKGJKAG[6];
roomColors.Add(color);
}
}
if (players.ContainsKey(__instance.RoomType)) {
List<Color> colors = players[__instance.RoomType];
- for (int i = 0; i < __instance.KIFEIHAMMJC.Count; i++) {
- PoolableBehavior icon = __instance.KIFEIHAMMJC[i];
+ for (int i = 0; i < __instance.OHFFOMPLFLL.Count; i++) {
+ PoolableBehavior icon = __instance.OHFFOMPLFLL[i];
SpriteRenderer renderer = icon.GetComponent<SpriteRenderer>();
if (renderer != null) {