Skip to content

Commit 1964997

Browse files
committed
v3.1.1
1 parent c62ac89 commit 1964997

8 files changed

+737
-12
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein
3838
# Releases
3939
| Among Us - Version| Mod Version | Link |
4040
|----------|-------------|-----------------|
41+
| 2021.11.9.5s| v3.1.1| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v3.1.1/TheOtherRoles.zip)
4142
| 2021.11.9.5s| v3.1.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v3.1.0/TheOtherRoles.zip)
4243
| 2021.11.9.5s| v3.0.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v3.0.0/TheOtherRoles.zip)
4344
| 2021.6.30s| v2.9.2| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.9.2/TheOtherRoles.zip)
@@ -81,6 +82,12 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein
8182
<details>
8283
<summary>Click to show the Changelog</summary>
8384

85+
**Hotfix 3.1.1**
86+
- Bug fix: You're again able to connect to custom servers
87+
- Bug fix: The option "Guesses Visible In Ghost Chat" doesn't result in a ban of the Guesser anymore
88+
- Bug fix: The position of the Spy on the intro screen is again random
89+
- Bug fix: Readded some venting rules that were lost (Spy can't move between vents, only Trickster can use boxes, ...)
90+
8491
**Version 3.1.0**
8592
- Hopefully temporary fixing the issue of being kicked by Innersloth servers for regular kills, until Innersloth fixes it on their side.
8693
- **NOTE:** Do not combine modded and unmodded versions of the game (even if you don't activate anything). Because of the kicking fix, your kills won't be performed for players that do not share the exact same modded version. Due to this you now can't start a game as the host, if not everyone in the lobby has the same version of the mod. Additionally you'll be kicked out of a lobby after 10 seconds, if the host doesn't have the mod installed (or the same mod version).

TheOtherRoles/Main.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace TheOtherRoles
2121
public class TheOtherRolesPlugin : BasePlugin
2222
{
2323
public const string Id = "me.eisbison.theotherroles";
24-
public const string VersionString = "3.1.0";
24+
public const string VersionString = "3.1.1";
2525
public static System.Version Version = System.Version.Parse(VersionString);
2626
internal static BepInEx.Logging.ManualLogSource Logger;
2727

TheOtherRoles/Patches/CustomServerPatch.cs

+705
Large diffs are not rendered by default.

TheOtherRoles/Patches/IntroPatch.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ public static void setupIntroTeamIcons(IntroCutscene __instance, ref Il2CppSyst
6767
// Add the Spy to the Impostor team (for the Impostors)
6868
if (Spy.spy != null && PlayerControl.LocalPlayer.Data.Role.IsImpostor) {
6969
List<PlayerControl> players = PlayerControl.AllPlayerControls.ToArray().ToList().OrderBy(x => Guid.NewGuid()).ToList();
70-
var fakeImpostorTeam = new Il2CppSystem.Collections.Generic.List<PlayerControl>();
70+
var fakeImpostorTeam = new Il2CppSystem.Collections.Generic.List<PlayerControl>(); // The local player always has to be the first one in the list (to be displayed in the center)
71+
fakeImpostorTeam.Add(PlayerControl.LocalPlayer);
7172
foreach (PlayerControl p in players) {
72-
if (p == Spy.spy || p.Data.Role.IsImpostor)
73+
if (PlayerControl.LocalPlayer != p && (p == Spy.spy || p.Data.Role.IsImpostor))
7374
fakeImpostorTeam.Add(p);
7475
}
7576
yourTeam = fakeImpostorTeam;

TheOtherRoles/Patches/MeetingPatch.cs

-4
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,6 @@ static void guesserOnClick(int buttonTarget, MeetingHud __instance) {
306306
writer.Write(target.PlayerId);
307307
AmongUsClient.Instance.FinishRpcImmediately(writer);
308308
RPCProcedure.guesserShoot(target.PlayerId);
309-
if (Guesser.showInfoInGhostChat) {
310-
string msg = $"Guesser guessed the role {roleInfo.name} for {target.name}!";
311-
target.RpcSendChat(msg); // As the target is dead at this point, only ghosts will see the message.
312-
}
313309
}
314310
}));
315311

TheOtherRoles/Patches/UsablesPatch.cs

+11-4
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,24 @@ public static bool Prefix(Vent __instance, ref float __result, [HarmonyArgument(
5454
}
5555
}
5656

57+
[HarmonyPatch(typeof(VentButton), nameof(VentButton.DoClick))]
58+
class VentButtonDoClickPatch {
59+
static bool Prefix(VentButton __instance) {
60+
// Manually modifying the VentButton to use Vent.Use again in order to trigger the Vent.Use prefix patch
61+
if (__instance.currentTarget != null) __instance.currentTarget.Use();
62+
return false;
63+
}
64+
}
65+
5766
[HarmonyPatch(typeof(Vent), nameof(Vent.Use))]
5867
public static class VentUsePatch {
5968
public static bool Prefix(Vent __instance) {
6069
bool canUse;
6170
bool couldUse;
6271
__instance.CanUse(PlayerControl.LocalPlayer.Data, out canUse, out couldUse);
63-
bool canMoveInVents = true;
72+
bool canMoveInVents = PlayerControl.LocalPlayer != Spy.spy;
6473
if (!canUse) return false; // No need to execute the native method as using is disallowed anyways
65-
if (Spy.spy == PlayerControl.LocalPlayer) {
66-
canMoveInVents = false;
67-
}
74+
6875
bool isEnter = !PlayerControl.LocalPlayer.inVent;
6976

7077
if (__instance.name.StartsWith("JackInTheBoxVent_")) {

TheOtherRoles/RPC.cs

+9
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,15 @@ public static void guesserShoot(byte playerId) {
687687
HudManager.Instance.KillOverlay.ShowKillAnimation(Guesser.guesser.Data, target.Data);
688688
else if (dyingLoverPartner != null && PlayerControl.LocalPlayer == dyingLoverPartner)
689689
HudManager.Instance.KillOverlay.ShowKillAnimation(dyingLoverPartner.Data, dyingLoverPartner.Data);
690+
691+
var mainRoleInfo = RoleInfo.getRoleInfoForPlayer(target).FirstOrDefault();
692+
if (Guesser.showInfoInGhostChat && mainRoleInfo != null && PlayerControl.LocalPlayer.Data.IsDead) {
693+
string msg = $"Guesser guessed the role {mainRoleInfo.name} for {target.Data.PlayerName}!";
694+
if (AmongUsClient.Instance.AmClient && DestroyableSingleton<HudManager>.Instance)
695+
DestroyableSingleton<HudManager>.Instance.Chat.AddChat(Guesser.guesser, msg);
696+
if (msg.IndexOf("who", StringComparison.OrdinalIgnoreCase) >= 0)
697+
DestroyableSingleton<Assets.CoreScripts.Telemetry>.Instance.SendWho();
698+
}
690699
}
691700
}
692701

TheOtherRoles/TheOtherRoles.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFramework>netstandard2.1</TargetFramework>
4-
<Version>3.1.0</Version>
4+
<Version>3.1.1</Version>
55
<Description>TheOtherRoles</Description>
66
<Authors>Eisbison</Authors>
77
</PropertyGroup>

0 commit comments

Comments
 (0)