Skip to content

Commit

Permalink
v3.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Eisbison committed Dec 1, 2021
1 parent b184098 commit eea137b
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 29 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein
# Releases
| Among Us - Version| Mod Version | Link |
|----------|-------------|-----------------|
| 2021.11.9.5s| v3.2.4| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v3.2.4/TheOtherRoles.zip)
| 2021.11.9.5s| v3.2.3| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v3.2.3/TheOtherRoles.zip)
| 2021.11.9.5s| v3.2.2| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v3.2.2/TheOtherRoles.zip)
| 2021.11.9.5s| v3.2.1| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v3.2.1/TheOtherRoles.zip)
Expand Down Expand Up @@ -87,11 +88,15 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein
<details>
<summary>Click to show the Changelog</summary>

**Version 3.2.4**
- Fixed a bug where the Vampire teleported when the bitten player died
- The settings UI has been improved by [Amsyar Rasyiq](https://github.com/amsyarasyiq)
- New option to the Bait "Warn The Killer With A Flash", created by [gendelo3](https://github.com/gendelo3)

**Version 3.2.3**
- Fixed a bug where the role of a dead client was visible to the Pursuer
- Fixed a bug where the Morphling changed their color when killing players
- Fixed a bug where voting the Lover partner of a Lover Witch did not safe the spellbound players
- Fixed a bug where the Vampire would teleport to the bitten player in some cases
- When the Lawyer dies, the client doesn't have the client mark (§) anymore, making the client aware of the fact that the Lawyer can't steal the win anymore (only relevant if the "Client Knows" option is on)

**Version 3.2.2**
Expand Down Expand Up @@ -1263,6 +1268,7 @@ an outline or all vents do).
| Bait Spawn Chance | -
| Bait Highlight All Vents | If set to true, all vents will be highlighted if a player is inside of one of them. If set to false, only the vents where players are siting in will be highlighted.
| Bait Report Delay | -
| Warn The Killer With A Flash | -
-----------------------

## Medium
Expand Down
15 changes: 3 additions & 12 deletions TheOtherRoles/Buttons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public static void Postfix(HudManager __instance)
HudManager.Instance.StartCoroutine(Effects.Lerp(Vampire.delay, new Action<float>((p) => { // Delayed action
if (p == 1f) {
// Perform kill if possible and reset bitten (regardless whether the kill was successful or not)
Helpers.checkMuderAttemptAndKill(Vampire.vampire, Vampire.bitten);
Helpers.checkMuderAttemptAndKill(Vampire.vampire, Vampire.bitten, showAnimation: false);
MessageWriter writer = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.VampireSetBitten, Hazel.SendOption.Reliable, -1);
writer.Write(byte.MaxValue);
writer.Write(byte.MaxValue);
Expand Down Expand Up @@ -676,19 +676,10 @@ public static void Postfix(HudManager __instance)
warlockCurseButton.Sprite = Warlock.getCurseKillButtonSprite();
warlockCurseButton.Timer = 1f;
} else if (Warlock.curseVictim != null && Warlock.curseVictimTarget != null) {
MurderAttemptResult murder = Helpers.checkMuderAttempt(Warlock.warlock, Warlock.curseVictimTarget);
MurderAttemptResult murder = Helpers.checkMuderAttemptAndKill(Warlock.warlock, Warlock.curseVictimTarget, showAnimation: false);
if (murder == MurderAttemptResult.SuppressKill) return;

// Curse Kill
if (murder == MurderAttemptResult.PerformKill) {
MessageWriter killWriter = AmongUsClient.Instance.StartRpcImmediately(PlayerControl.LocalPlayer.NetId, (byte)CustomRPC.UncheckedMurderPlayer, Hazel.SendOption.Reliable, -1);
killWriter.Write(Warlock.warlock.Data.PlayerId);
killWriter.Write(Warlock.curseVictimTarget.PlayerId);
killWriter.Write((byte)0);
AmongUsClient.Instance.FinishRpcImmediately(killWriter);
RPCProcedure.uncheckedMurderPlayer(Warlock.warlock.Data.PlayerId, Warlock.curseVictimTarget.PlayerId, (byte)0);
}

// If blanked or killed
if(Warlock.rootTime > 0) {
PlayerControl.LocalPlayer.moveable = false;
PlayerControl.LocalPlayer.NetTransform.Halt(); // Stop current movement so the warlock is not just running straight into the next object
Expand Down
2 changes: 1 addition & 1 deletion TheOtherRoles/CustomOptionHolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public static void Load() {
baitSpawnRate = CustomOption.Create(330, cs(Bait.color, "Bait"), rates, null, true);
baitHighlightAllVents = CustomOption.Create(331, "Highlight All Vents If A Vent Is Occupied", false, baitSpawnRate);
baitReportDelay = CustomOption.Create(332, "Bait Report Delay", 0f, 0f, 10f, 1f, baitSpawnRate);
baitShowKillFlash = CustomOption.Create(335, "Show Flash to Baits Killer", true, baitSpawnRate);
baitShowKillFlash = CustomOption.Create(333, "Warn The Killer With A Flash", true, baitSpawnRate);

mediumSpawnRate = CustomOption.Create(360, cs(Medium.color, "Medium"), rates, null, true);
mediumCooldown = CustomOption.Create(361, "Medium Questioning Cooldown", 30f, 5f, 120f, 5f, mediumSpawnRate);
Expand Down
2 changes: 1 addition & 1 deletion TheOtherRoles/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace TheOtherRoles
public class TheOtherRolesPlugin : BasePlugin
{
public const string Id = "me.eisbison.theotherroles";
public const string VersionString = "3.2.3";
public const string VersionString = "3.2.4";
public static System.Version Version = System.Version.Parse(VersionString);
internal static BepInEx.Logging.ManualLogSource Logger;

Expand Down
10 changes: 5 additions & 5 deletions TheOtherRoles/Patches/ClientOptionsPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ public static class ClientOptionsPatch
{
private static SelectionBehaviour[] AllOptions = {
new SelectionBehaviour("Streamer Mode", () => TheOtherRolesPlugin.StreamerMode.Value = !TheOtherRolesPlugin.StreamerMode.Value, TheOtherRolesPlugin.StreamerMode.Value),
new SelectionBehaviour("Ghosts See Tasks", () => TheOtherRolesPlugin.GhostsSeeTasks.Value = !TheOtherRolesPlugin.GhostsSeeTasks.Value, TheOtherRolesPlugin.GhostsSeeTasks.Value),
new SelectionBehaviour("Vote Visible For Ghosts", () => TheOtherRolesPlugin.GhostsSeeVotes.Value = !TheOtherRolesPlugin.GhostsSeeVotes.Value, TheOtherRolesPlugin.GhostsSeeVotes.Value),
new SelectionBehaviour("Ghosts Can See Roles", () => TheOtherRolesPlugin.GhostsSeeRoles.Value = !TheOtherRolesPlugin.GhostsSeeRoles.Value, TheOtherRolesPlugin.GhostsSeeRoles.Value),
new SelectionBehaviour("Show Role Summary", () => TheOtherRolesPlugin.ShowRoleSummary.Value = !TheOtherRolesPlugin.ShowRoleSummary.Value, TheOtherRolesPlugin.ShowRoleSummary.Value),
new SelectionBehaviour("Ghosts See Remaining Tasks", () => MapOptions.ghostsSeeTasks = TheOtherRolesPlugin.GhostsSeeTasks.Value = !TheOtherRolesPlugin.GhostsSeeTasks.Value, TheOtherRolesPlugin.GhostsSeeTasks.Value),
new SelectionBehaviour("Ghosts Can See Votes", () => MapOptions.ghostsSeeVotes = TheOtherRolesPlugin.GhostsSeeVotes.Value = !TheOtherRolesPlugin.GhostsSeeVotes.Value, TheOtherRolesPlugin.GhostsSeeVotes.Value),
new SelectionBehaviour("Ghosts Can See Roles", () => MapOptions.ghostsSeeRoles = TheOtherRolesPlugin.GhostsSeeRoles.Value = !TheOtherRolesPlugin.GhostsSeeRoles.Value, TheOtherRolesPlugin.GhostsSeeRoles.Value),
new SelectionBehaviour("Show Role Summary", () => MapOptions.showRoleSummary = TheOtherRolesPlugin.ShowRoleSummary.Value = !TheOtherRolesPlugin.ShowRoleSummary.Value, TheOtherRolesPlugin.ShowRoleSummary.Value),
};

private static GameObject popUp;
Expand Down Expand Up @@ -93,7 +93,7 @@ private static void InitializeMoreButton(OptionsMenuBehaviour __instance)
moreOptions.transform.localPosition = _origin.Value + Vector3.right * 1.3f;

moreOptions.gameObject.SetActive(true);
moreOptions.Text.text = "More Options...";
moreOptions.Text.text = "Mod Options...";
var moreOptionsButton = moreOptions.GetComponent<PassiveButton>();
moreOptionsButton.OnClick = new ButtonClickedEvent();
moreOptionsButton.OnClick.AddListener((Action) (() =>
Expand Down
2 changes: 1 addition & 1 deletion TheOtherRoles/Patches/CredentialsPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static class CredentialsPatch {
$@"Modded by <color=#FCCE03FF>Eisbison</color>, <color=#FCCE03FF>Thunderstorm584</color>, <color=#FCCE03FF>EndOfFile</color> & <color=#FCCE03FF>Mallöris</color>
Design by <color=#FCCE03FF>Bavari</color>";

public static string contributorsCredentials = "<size=80%>GitHub Contributors: Alex2911, gendelo3</size>";
public static string contributorsCredentials = "<size=80%>GitHub Contributors: Alex2911, amsyarasyiq, gendelo3</size>";

[HarmonyPatch(typeof(VersionShower), nameof(VersionShower.Start))]
private static class VersionShowerPatch
Expand Down
2 changes: 1 addition & 1 deletion TheOtherRoles/Patches/EndGamePatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static void Postfix(AmongUsClient __instance, [HarmonyArgument(0)]ref End
TempData.winners.Add(new WinningPlayerData(p.Data));
else if (p == Pursuer.pursuer && !Pursuer.pursuer.Data.IsDead)
TempData.winners.Add(new WinningPlayerData(p.Data));
else if (p != Jester.jester && p != Jackal.jackal && p != Sidekick.sidekick && p != Arsonist.arsonist && !Jackal.formerJackals.Contains(p) && !p.Data.Role.IsImpostor)
else if (p != Jester.jester && p != Jackal.jackal && p != Sidekick.sidekick && p != Arsonist.arsonist && p != Vulture.vulture && !Jackal.formerJackals.Contains(p) && !p.Data.Role.IsImpostor)
TempData.winners.Add(new WinningPlayerData(p.Data));
}
}
Expand Down
9 changes: 3 additions & 6 deletions TheOtherRoles/Patches/PlayerControlPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -944,18 +944,15 @@ public static void Postfix(PlayerControl __instance, [HarmonyArgument(0)]PlayerC
}

// Show flash on bait kill to the killer if enabled
if (Bait.bait != null && PlayerControl.LocalPlayer == deadPlayer.killerIfExisting && target == Bait.bait
&& CustomOptionHolder.baitShowKillFlash.getBool() && __instance == PlayerControl.LocalPlayer) {
if (Bait.bait != null && target == Bait.bait && Bait.showKillFlash && __instance == PlayerControl.LocalPlayer) {
HudManager.Instance.FullScreen.enabled = true;
HudManager.Instance.StartCoroutine(Effects.Lerp(1f, new Action<float>((p) => {
var renderer = HudManager.Instance.FullScreen;
if (p < 0.5)
{
if (p < 0.5) {
if (renderer != null)
renderer.color = new Color(204f / 255f, 102f / 255f, 0f / 255f, Mathf.Clamp01(p * 2 * 0.75f));
}
else
{
else {
if (renderer != null)
renderer.color = new Color(204f / 255f, 102f / 255f, 0f / 255f, Mathf.Clamp01((1 - p) * 2 * 0.75f));
}
Expand Down
2 changes: 2 additions & 0 deletions TheOtherRoles/TheOtherRoles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@ public static class Bait {

public static bool highlightAllVents = false;
public static float reportDelay = 0f;
public static bool showKillFlash = true;

public static bool reported = false;

Expand All @@ -1047,6 +1048,7 @@ public static void clearAndReload() {
reported = false;
highlightAllVents = CustomOptionHolder.baitHighlightAllVents.getBool();
reportDelay = CustomOptionHolder.baitReportDelay.getFloat();
showKillFlash = CustomOptionHolder.baitShowKillFlash.getBool();
}
}

Expand Down
2 changes: 1 addition & 1 deletion TheOtherRoles/TheOtherRoles.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Version>3.2.3</Version>
<Version>3.2.4</Version>
<Description>TheOtherRoles</Description>
<Authors>Eisbison</Authors>
</PropertyGroup>
Expand Down

0 comments on commit eea137b

Please sign in to comment.