Okay, I suppose

This commit is contained in:
Ape committed 2026-11-07 13:03:17 +01:00
1 parent e3d8c23482
commit d86aa2343a
7 files changed
+37 -28

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ public partial class Main : BasePlugin
public static bool HasArgumentException;
public static string CredentialsText;
public const string ModVersion = "v2.2.3";
public const string ModVersion = "v2.3.0";
public static float GameTimer;
public static float AfkTimer;
+8 -1
View File
@@ -192,11 +192,18 @@ class FixedUpdateInGamePatch
}
if ( !Main.DisableLobbyInfo.Value && __instance.cosmetics.nameText.text != $"<size=70%><color=#00ffff>Lv.{__instance.Data.PlayerLevel}</color> | <color=yellow>{AmongUsClient.Instance.GetClientFromCharacter(__instance).PlatformData.Platform}</size>\n<color={color}>{__instance.Data.PlayerName}</color>")
{
__instance.cosmetics.nameText.text = $"<size=70%><color=#00ffff>Lv.{__instance.Data.PlayerLevel}</color> | <color=yellow>{AmongUsClient.Instance.GetClientFromCharacter(__instance).PlatformData.Platform}</size>\n<color={color}>{__instance.Data.PlayerName}</color>";
__instance.cosmetics.nameText.text = $"<size=60%><color=#00ffff>Lv.{__instance.Data.PlayerLevel + 1}</color> | <color=yellow>{Utils.ConvertPlatform(AmongUsClient.Instance.GetClientFromCharacter(__instance).PlatformData.Platform)}</size>\n<color={color}>{__instance.Data.PlayerName}</color> ";
}
LastColors[__instance.PlayerId] = color;
}
}
if (Utils.InGame)
{
if (__instance.cosmetics.nameText.text != __instance.Data.PlayerName)
{
__instance.cosmetics.nameText.text = __instance.Data.PlayerName;
}
}
if (!AmongUsClient.Instance.AmHost) return;
+1 -3
View File
@@ -28,9 +28,7 @@ internal class Hotkeys
if (Input.GetKey(KeyCode.L) && Shift && Enter)
{
MessageWriter writer = AmongUsClient.Instance.StartEndGame();
writer.Write((byte)GameOverReason.ImpostorDisconnect);
AmongUsClient.Instance.FinishEndGame(writer);
GameManager.Instance.RpcEndGame(GameOverReason.ImpostorDisconnect, false);
}
if (Input.GetKey(KeyCode.M) && Shift && Enter && Utils.InGame)
+21 -13
View File
@@ -460,17 +460,18 @@ public static class Utils
{
foreach (PlayerControl pc in PlayerControl.AllPlayerControls)
{
CustomGameOverReason = (byte)GameOverReason.ImpostorsByVote;
pc.RpcSetRole(AmongUs.GameOptions.RoleTypes.CrewmateGhost, false);
}
new LateTask(() =>
{
ContinueEndGame(GameOverReason.ImpostorsByVote);
}, 1f, "CustomWinnerEndGame");
}
if (winnerType == 1)
{
foreach (PlayerControl pc in PlayerControl.AllPlayerControls)
{
CustomGameOverReason = (byte)GameOverReason.ImpostorsByVote;
if (pc != winner)
{
pc.RpcSetRole(AmongUs.GameOptions.RoleTypes.CrewmateGhost, false);
@@ -480,19 +481,16 @@ public static class Utils
pc.RpcSetRole(AmongUs.GameOptions.RoleTypes.ImpostorGhost, false);
}
}
}
new LateTask(() =>
{
ContinueEndGame((byte)CustomGameOverReason);
}, 1f, "CustomWinnerEndGame");
new LateTask(() =>
{
ContinueEndGame(GameOverReason.ImpostorsByVote);
}, 1f, "CustomWinnerEndGame");
}
}
public static void ContinueEndGame(byte gameOverReason)
public static void ContinueEndGame(GameOverReason gameOverReason)
{
MessageWriter writer = AmongUsClient.Instance.StartEndGame();
writer.Write(gameOverReason);
AmongUsClient.Instance.FinishEndGame(writer);
GameManager.Instance.RpcEndGame(gameOverReason, false);
HandlingGameEnd = false;
Logger.Info($"{gameOverReason}", "ContinueEndGame");
}
@@ -913,4 +911,14 @@ public static class Utils
return newText;
}
public static string ConvertPlatform(Platforms input)
{
if (input == Platforms.StandaloneSteamPC) return "Steam";
if (input == Platforms.Playstation) return "PS";
if (input == Platforms.StandaloneWin10) return "Win10";
if (input == Platforms.StandaloneEpicPC) return "Epic";
return input.ToString();
}
}
+2 -6
View File
@@ -149,9 +149,7 @@ internal static class SendChatPatch
__instance.freeChatField.textArea.SetText(string.Empty);
if (!Utils.InGame) return false;
MessageWriter writer = AmongUsClient.Instance.StartEndGame();
writer.Write((byte)GameOverReason.ImpostorDisconnect);
AmongUsClient.Instance.FinishEndGame(writer);
GameManager.Instance.RpcEndGame(GameOverReason.ImpostorDisconnect, false);
return false;
}
@@ -859,9 +857,7 @@ public static class RPCHandlerPatch
if (text == "/eg" || text == "/endgame")
{
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashStartAndEndGameCmd.GetValue()) return;
MessageWriter writer = AmongUsClient.Instance.StartEndGame();
writer.Write((byte)GameOverReason.ImpostorDisconnect);
AmongUsClient.Instance.FinishEndGame(writer);
GameManager.Instance.RpcEndGame(GameOverReason.ImpostorDisconnect, false);
}
if (text == "/em" || text == "/endmeeting")
+3 -3
View File
@@ -167,7 +167,7 @@ public static class ReactorSystemTypePatch
{
if (__instance.IsActive && __instance.Countdown <= 0 && !Utils.HandlingGameEnd)
{
Utils.ContinueEndGame((byte)GameOverReason.ImpostorsBySabotage);
Utils.ContinueEndGame(GameOverReason.ImpostorsBySabotage);
NormalGameEndChecker.CheckWinnerText("ImpostorSabotage");
}
}
@@ -201,7 +201,7 @@ public static class HeliSabotageSystemPatch
{
if (__instance.IsActive && __instance.Countdown <= 0 && !Utils.HandlingGameEnd)
{
Utils.ContinueEndGame((byte)GameOverReason.ImpostorsBySabotage);
Utils.ContinueEndGame(GameOverReason.ImpostorsBySabotage);
NormalGameEndChecker.CheckWinnerText("ImpostorSabotage");
}
}
@@ -245,7 +245,7 @@ public static class LifeSuppSystemTypePatch
{
if (__instance.IsActive && __instance.Countdown <= 0 && !Utils.HandlingGameEnd)
{
Utils.ContinueEndGame((byte)GameOverReason.ImpostorsBySabotage);
Utils.ContinueEndGame(GameOverReason.ImpostorsBySabotage);
NormalGameEndChecker.CheckWinnerText("ImpostorSabotage");
}
}
+1 -1
View File
@@ -36,7 +36,7 @@
<img src="https://github.com/astra1dev/AUnlocker/assets/90265231/14226f03-a003-4efc-b27b-6df53fb394d6" width=410 height=240>****
‎
# 🎮 Features (v2.2.3):
# 🎮 Features (v2.3.0):
## <b>♠️ Client Side settings:</b>
- Toggle Game Master (Spectator)