Setting fallbacks, GitHub templates, GM fix

This commit is contained in:
Ape committed 2026-08-26 14:02:31 +02:00
1 parent f18dc3fa31
commit f4d9d8101f
10 files changed
+77 -32

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
### REQUIRED
* [ ] I confirm this Issue is relevant to Among Us Revamped
* [ ] I confirm this Issue is not a duplicate
* [ ] I have read the main GitHub page for potential answers to my Issue
### INFO
Please tick all the boxes above by typing "x" between them.
If your Issue does not match these requirements, please do not post it.
Issues ignoring or falsifying these requirements will be closed without warning.
Support based questions are preferred to be asked on Discord, but not prohibited.
### ISSUE TYPE (tick 1)
* [ ] Bug Report
* [ ] Suggestion
* [ ] Support
* [ ] other
### WRITE YOUR ISSUE BELOW:
+17
View File
@@ -0,0 +1,17 @@
### REQUIRED
* [ ] I confirm this PR was not fully made by AI
* [ ] I confirm this PR is fitting for Among Us Revamped
* [ ] I confirm this PR has been tested and properly functions
### INFO
Please tick all the boxes above by typing "x" between them.
If your Pull Request does not match these requirements, please do not post it.
Pull Requests ignoring or falsifying these requirements will be closed without warning.
### PR TYPE
* [ ] Bug Fix
* [ ] New Feature
* [ ] Refactor/Optimization
* [ ] Documentation Update
### WRITE YOUR PULL REQUEST BELOW:
+1 -1
View File
@@ -44,7 +44,7 @@ public partial class Main : BasePlugin
public static bool HasArgumentException;
public static string CredentialsText;
public const string ModVersion = "v2.0.2";
public const string ModVersion = "v2.0.3";
public static float GameTimer;
public static float AfkTimer;
+1 -11
View File
@@ -128,8 +128,8 @@ public static class FixedUpdate
if (p.protectedByGuardianId == -1)
{
p.RpcProtectPlayer(p, p.cosmetics.ColorId);
p.Data.MarkDirty();
}
p.Data.MarkDirty();
}
}
}
@@ -270,16 +270,6 @@ class FixedUpdateInGamePatch
NormalGameEndChecker.CheckWinnerText("PnSTimer");
}
}
if ((Options.SNSChatInGameFast.GetBool() && Options.Gamemode.GetValue() == 1) || (Options.PNSChatInGameFast.GetBool() && Options.Gamemode.GetValue() == 3))
{
if (Main.GM.Value && !Utils.IsDead)
{
Logger.Info($" Game Master Successful", "StartGame");
PlayerControl.LocalPlayer.Exiled();
PlayerControl.LocalPlayer.RpcSetRole(RoleTypes.CrewmateGhost);
}
}
}
}
}
+10 -7
View File
@@ -7,7 +7,8 @@ namespace AmongUsRevamped;
public static class OptionManager
{
private static OptionBackupData CachedOptions;
private static float OldKillCooldown;
public static void SyncGameOptions()
{
if (!AmongUsClient.Instance.AmHost) return;
@@ -29,17 +30,19 @@ public static class OptionManager
{
if (!AmongUsClient.Instance.AmHost) return;
CachedOptions = new OptionBackupData(GameOptionsManager.Instance.CurrentGameOptions);
OldKillCooldown = Main.NormalOptions.KillCooldown;
}
public static void RestoreOptions()
{
if (!AmongUsClient.Instance.AmHost || CachedOptions == null) return;
var restored = CachedOptions.Restore(GameOptionsManager.Instance.CurrentGameOptions);
GameOptionsManager.Instance.CurrentGameOptions = restored;
if (!AmongUsClient.Instance.AmHost) return;
if (Main.NormalOptions.KillCooldown != OldKillCooldown)
{
Main.NormalOptions.KillCooldown = OldKillCooldown;
Logger.Info("Force overrided Kill Cooldown back to original", "RestoreOptions");
}
SyncGameOptions();
}
}
+2 -2
View File
@@ -11,9 +11,9 @@ public static class EndGameManagerPatch
public static void Postfix(EndGameManager __instance)
{
Logger.Info(" -------- GAME ENDED --------", "EndGame");
Utils.ClearLeftoverData();
//OptionManager.RestoreOptions();
Utils.ClearLeftoverData();
OptionManager.RestoreOptions();
EndGameNavigation navigation = __instance.Navigation;
if (!AmongUsClient.Instance.AmHost || __instance == null || navigation == null || !Options.AutoRejoinLobby.GetBool()) return;
+11
View File
@@ -20,6 +20,17 @@ class ExileControllerWrapUpPatch
public static void AfterExile(NetworkedPlayerInfo ejectedPlayer)
{
if (!AmongUsClient.Instance.AmHost) return;
if ((Options.SNSChatInGameFast.GetBool() && Options.Gamemode.GetValue() == 1) || (Options.PNSChatInGameFast.GetBool() && Options.Gamemode.GetValue() == 3))
{
if (Main.GM.Value && !Utils.IsDead)
{
Logger.Info($" Game Master Successful", "StartGame");
PlayerControl.LocalPlayer.Exiled();
PlayerControl.LocalPlayer.RpcSetRole(RoleTypes.CrewmateGhost);
}
}
if (ejectedPlayer == null) return;
PlayerControl pc = null;
+1 -1
View File
@@ -15,7 +15,7 @@ internal static class CoShowIntroPatch
if (!AmongUsClient.Instance.AmHost) return;
//OptionManager.CacheOptions();
OptionManager.CacheOptions();
foreach (var p in PlayerControl.AllPlayerControls)
{
+11 -9
View File
@@ -62,20 +62,22 @@ internal static class MurderPlayerPatch
if (resultFlags.HasFlag(MurderResultFlags.Succeeded))
{
killCount[playerId]++;
Logger.Info($" {__instance.Data.PlayerName} killed {target.Data.PlayerName}", "MurderPlayer");
if (string.IsNullOrEmpty(NormalGameEndChecker.firstDeath))
{
NormalGameEndChecker.firstDeath = target.Data.PlayerName;
Utils.HasMurdered = true;
}
if (Options.Gamemode.GetValue() == 1 && !Utils.isHideNSeek)
{
if (target.Data.PlayerId == __instance.shapeshiftTargetPlayerId) return;
Logger.Info($" {__instance.Data.PlayerName} directly killed {target.Data.PlayerName} in SnS, forcing suicide. (Are they hacking?)", "MurderPlayer");
__instance.RpcSetRole(RoleTypes.ImpostorGhost);
}
else
{
killCount[playerId]++;
Logger.Info($" {__instance.Data.PlayerName} killed {target.Data.PlayerName}", "MurderPlayer");
if (string.IsNullOrEmpty(NormalGameEndChecker.firstDeath))
{
NormalGameEndChecker.firstDeath = target.Data.PlayerName;
Utils.HasMurdered = true;
}
}
}
if ((target == PlayerControl.LocalPlayer || PlayerControl.LocalPlayer.Data.IsDead) && !Main.DisableInfoWhenDead.Value && resultFlags.HasFlag(MurderResultFlags.Succeeded))
@@ -94,7 +96,7 @@ internal static class MurderPlayerPatch
}
//1 = Shift and Seek
if (Options.Gamemode.GetValue() == 1 && !Utils.isHideNSeek)
if (Options.Gamemode.GetValue() == 1 && !Utils.isHideNSeek && !resultFlags.HasFlag(MurderResultFlags.Succeeded))
{
if (target.Data.PlayerId == __instance.shapeshiftTargetPlayerId)
{
+5 -1
View File
@@ -17,6 +17,10 @@
<img src="https://img.shields.io/github/downloads/ApeMV/AmongUsRevamped/latest/total?style=for-the-badge">
</a>
<a href="https://ko-fi.com/apemv">
<img src="https://img.shields.io/badge/Donate-Ko--fi-ff5f5f?style=flat&logo=ko-fi" alt="Ko-fi">
</a>
</p>
@@ -37,7 +41,7 @@
<img src="https://github.com/astra1dev/AUnlocker/assets/90265231/14226f03-a003-4efc-b27b-6df53fb394d6" width=410 height=240>****
‎
# 🎮 Features (v2.0.2):
# 🎮 Features (v2.0.3):
## <b>♠️ Client Side settings:</b>
- Toggle Game Master (Spectator)