This commit is contained in:
Ape committed 2026-05-14 21:59:09 +02:00
1 parent 3e4d833b66
commit de4f057899
18 files changed
+86 -57

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ public partial class Main : BasePlugin
public static bool HasArgumentException;
public static string CredentialsText;
public const string ModVersion = "v1.7.1";
public const string ModVersion = "v1.7.2";
public static float GameTimer;
+9 -5
View File
@@ -256,9 +256,10 @@ namespace AmongUsRevamped
public static OptionItem DisableUploadData;
// Gamemode
/*
public static OptionItem TabGroupStandard;
public static OptionItem ChatBeforeFirstMeeting;
*/
public static OptionItem TabGroupHNS;
public static OptionItem NumSeekers;
@@ -285,6 +286,7 @@ namespace AmongUsRevamped
public static OptionItem GameAutoEndsAfter;
// Roles
/*
public static OptionItem TabGroupCrewmate;
public static OptionItem MayorPerc;
public static OptionItem MayorExtraVoteCount;
@@ -295,7 +297,7 @@ namespace AmongUsRevamped
public static OptionItem JesterCanVent;
public static OptionItem TabGroupImpostor;
*/
public static bool IsLoaded = false;
public static void Load()
@@ -345,7 +347,7 @@ namespace AmongUsRevamped
TabGroupMisc = TextOptionItem.Create(60379, Translator.Get("tabGroupMisc"), TabGroup.SystemSettings)
.SetColor(Color.green);
StartCountdown = IntegerOptionItem.Create(60380, Translator.Get("startCountdown"), new(1, 600, 1), 5, TabGroup.SystemSettings, false)
StartCountdown = IntegerOptionItem.Create(60380, Translator.Get("startCountdown"), new(1, 5, 1), 5, TabGroup.SystemSettings, false)
.SetValueFormat(OptionFormat.Seconds);
AllowFortegreen = BooleanOptionItem.Create(60382, Translator.Get("allowFortegreen"), false, TabGroup.SystemSettings, false);
NoGameEnd = BooleanOptionItem.Create(60383, Translator.Get("noGameEnd"), false, TabGroup.SystemSettings, false)
@@ -364,6 +366,7 @@ namespace AmongUsRevamped
// Custom role settings
/*
TabGroupCrewmate = TextOptionItem.Create(100000, Translator.Get("tabGroupCrewmate"), TabGroup.CustomRoleSettings)
.SetColor(CL.Hex("#8cffff"));
MayorPerc = IntegerOptionItem.Create(100001, Translator.Get("Mayor"), new(0, 100, 5), 0, TabGroup.CustomRoleSettings, false)
@@ -385,12 +388,13 @@ namespace AmongUsRevamped
TabGroupImpostor = TextOptionItem.Create(102000, Translator.Get("tabGroupImpostor"), TabGroup.CustomRoleSettings)
.SetColor(CL.Hex("#ff1919"));
*/
// Gamemode Settings
/*
TabGroupStandard = TextOptionItem.Create(69998, Translator.Get("tabGroupStandard"), TabGroup.GamemodeSettings)
.SetColor(Color.white);
ChatBeforeFirstMeeting = BooleanOptionItem.Create(69999, Translator.Get("chatBeforeFirstMeeting"), false, TabGroup.GamemodeSettings, false);
*/
TabGroupHNS = TextOptionItem.Create(70000, Translator.Get("tabGroupHNS"), TabGroup.GamemodeSettings)
.SetColor(Color.green);
NumSeekers = IntegerOptionItem.Create(70001, Translator.Get("numSeekers"), new(1, 15, 1), 1, TabGroup.GamemodeSettings, false)
+4 -1
View File
@@ -5,7 +5,9 @@ using InnerNet;
using UnityEngine;
namespace AmongUsRevamped;
// It was a fun ride, but this won't last.
/*
public static class CustomRoleManagement
{
public static Dictionary<byte, string> PlayerRoles = new Dictionary<byte, string>();
@@ -206,4 +208,5 @@ public static class CustomRoleManagement
}
return string.Join("\n", lines);
}
}
}
*/
-16
View File
@@ -102,22 +102,6 @@ class FixedUpdateInGamePatch
break;
}
if (__instance.Data.PlayerLevel != 0 && __instance.Data.PlayerLevel < Options.KickLowLevelPlayer.GetInt() - 1 && __instance.Data.ClientId != AmongUsClient.Instance.HostId)
{
if (!Options.TempBanLowLevelPlayer.GetBool())
{
AmongUsClient.Instance.KickPlayer(__instance.Data.ClientId, false);
Logger.Info($" {__instance.Data.PlayerName} was kicked for being under level {Options.KickLowLevelPlayer.GetInt()}", "KickLowLevelPlayer");
Logger.SendInGame($" {__instance.Data.PlayerName} was kicked for being under level {Options.KickLowLevelPlayer.GetInt()}");
}
else
{
AmongUsClient.Instance.KickPlayer(__instance.Data.ClientId, true);
Logger.Info($" {__instance.Data.PlayerName} was banned for being under level {Options.KickLowLevelPlayer.GetInt()} ", "BanLowLevelPlayer");
Logger.SendInGame($" {__instance.Data.PlayerName} was banned for being under level {Options.KickLowLevelPlayer.GetInt()}");
}
}
if (Utils.InGame && !Utils.IsMeeting && !ExileController.Instance)
{
// 2 = Shift and Seek
+1 -1
View File
@@ -214,7 +214,7 @@ namespace AmongUsRevamped
public enum TabGroup
{
SystemSettings,
CustomRoleSettings,
//CustomRoleSettings,
ModSettings,
GamemodeSettings,
+4 -2
View File
@@ -73,8 +73,10 @@ public static class Utils
{
case TabGroup.SystemSettings:
return "System Settings";
/*
case TabGroup.CustomRoleSettings:
return "Custom Roles";
*/
case TabGroup.ModSettings:
return "Gameplay Settings";
case TabGroup.GamemodeSettings:
@@ -210,9 +212,9 @@ public static class Utils
LateTask.Tasks.Clear();
NormalGameEndChecker.ImpCheckComplete = false;
CreateOptionsPickerPatch.SetDleks2 = false;
//CreateOptionsPickerPatch.SetDleks2 = false;
CanCallMeetings = true;
CustomRoleManagement.HandlingRoleMessages = false;
//CustomRoleManagement.HandlingRoleMessages = false;
PlayerControlSetRolePatch.FirstAssign = true;
PlayerControlCompleteTaskPatch.playerTasksCompleted.Clear();
+8 -8
View File
@@ -143,7 +143,7 @@ internal static class SendChatPatch
return false;
}
if (__instance.timeSinceLastMessage < 3f || OnGameJoinedPatch.WaitingForChat || CustomRoleManagement.HandlingRoleMessages) return false;
if (__instance.timeSinceLastMessage < 3f || OnGameJoinedPatch.WaitingForChat /*|| CustomRoleManagement.HandlingRoleMessages*/) return false;
if (text == "/l" || text == "/lastgame" || text == "/win" || text == "/winner")
{
@@ -151,7 +151,7 @@ internal static class SendChatPatch
Utils.ChatCommand(__instance, $"{NormalGameEndChecker.LastWinReason}", "", false);
return false;
}
/*
if (text == "/r jester"){
Utils.ChatCommand(__instance, Translator.Get("jesterPublic"), "", false);
return false;}
@@ -159,7 +159,7 @@ internal static class SendChatPatch
if (text == "/r mayor"){
Utils.ChatCommand(__instance, Translator.Get("mayorPublic", Options.MayorExtraVoteCount.GetInt()), "", false);
return false;}
*/
if (text == "/aur" || text == "/amongusrevamped" || text == "/socials")
{
Utils.ChatCommand(__instance, Translator.Get("socialsAll"), "", false);
@@ -189,7 +189,7 @@ internal static class SendChatPatch
switch (Options.Gamemode.GetValue())
{
case 0:
Utils.ChatCommand(__instance, $"Enabled Custom Roles:\n\n{CustomRoleManagement.GetActiveRoles()}", "", false);
//Utils.ChatCommand(__instance, $"Enabled Custom Roles:\n\n{CustomRoleManagement.GetActiveRoles()}", "", false);
break;
case 1:
@@ -400,7 +400,7 @@ public static class RPCHandlerPatch
}
}
if (CustomRoleManagement.HandlingRoleMessages || OnGameJoinedPatch.WaitingForChat) return;
if (/*CustomRoleManagement.HandlingRoleMessages || */OnGameJoinedPatch.WaitingForChat) return;
if (text == "/h" || text == "/help")
{
@@ -476,7 +476,7 @@ public static class RPCHandlerPatch
switch (Options.Gamemode.GetValue())
{
case 0:
Utils.ModeratorChatCommand($"Enabled Custom Roles:\n\n{CustomRoleManagement.GetActiveRoles()}", "", false);
//Utils.ModeratorChatCommand($"Enabled Custom Roles:\n\n{CustomRoleManagement.GetActiveRoles()}", "", false);
break;
case 1:
@@ -493,13 +493,13 @@ public static class RPCHandlerPatch
}
}
/*
if (text == "/r jester"){
Utils.ModeratorChatCommand(Translator.Get("jesterPublic"), "", false);}
if (text == "/r mayor"){
Utils.ModeratorChatCommand(Translator.Get("mayorPublic", Options.MayorExtraVoteCount.GetInt()), "", false);}
*/
break;
}
}
+1 -1
View File
@@ -148,7 +148,7 @@ public class RemoveDisableDevicesPatch
{
public static void Postfix()
{
if (!Options.DisableDevices.GetBool()) return;
if (!Options.DisableDevices.GetBool() || !AmongUsClient.Instance.AmHost) return;
UpdateDisableDevices();
}
+5 -1
View File
@@ -4,6 +4,9 @@ using UnityEngine.SceneManagement;
namespace AmongUsRevamped;
// DateTime spoofing is patched as of April 2026
/*
[HarmonyPatch(typeof(AmongUsDateTime), nameof(AmongUsDateTime.UtcNow), MethodType.Getter)]
public static class AmongUsDateTime_UtcNow
{
@@ -227,4 +230,5 @@ class CreateOptionsPickerPatch
transform2.position = position2;
}
}
}
}
*/
+2 -1
View File
@@ -42,7 +42,7 @@ class ExileControllerWrapUpPatch
}
Logger.Info($" {ejectedPlayer.PlayerName} was ejected", "ExileController");
/*
if (CustomRoleManagement.PlayerRoles.TryGetValue(ejectedPlayer.PlayerId, out var role) && role == "Jester")
{
Utils.CustomWinnerEndGame(pc, 1);
@@ -62,6 +62,7 @@ class ExileControllerWrapUpPatch
{ "Mayor", Translator.Get("mayorPriv", Options.MayorExtraVoteCount.GetInt())},
});
}
*/
}
}
+2
View File
@@ -115,9 +115,11 @@ namespace AmongUsRevamped
case TabGroup.SystemSettings:
__instance.MenuDescriptionText.text = "Quality settings to improve comfort and testing.";
break;
/*
case TabGroup.CustomRoleSettings:
__instance.MenuDescriptionText.text = "Custom Role enabling and settings.";
break;
*/
case TabGroup.ModSettings:
__instance.MenuDescriptionText.text = "Gameplay Settings to improve the in-game experience.";
break;
+4 -4
View File
@@ -14,7 +14,7 @@ internal static class CoShowIntroPatch
Logger.Info(" Intro initiated", "CoShowIntro");
if (!AmongUsClient.Instance.AmHost) return;
/*
NormalGameEndChecker.customRoles = CustomRoleManagement.PlayerToCustomRole();
if (CustomRoleManagement.PlayerRoles.Count != 0 && !Utils.isHideNSeek && Options.Gamemode.GetValue() < 2)
@@ -28,7 +28,7 @@ internal static class CoShowIntroPatch
});
}, 1f, "BlockACKick");
}
*/
foreach (var p in PlayerControl.AllPlayerControls)
{
p.cosmetics.nameText.text = p.Data.PlayerName;
@@ -45,10 +45,10 @@ internal static class CoShowIntroPatch
_ = new LateTask(() =>
{
Utils.CanCallMeetings = true;
}, Options.ChatBeforeFirstMeeting.GetBool() ? 39.5f : 33f, "MeetingEnabled");
}, 33f, "MeetingEnabled");
}
if (Options.Gamemode.GetValue() == 2 && Options.SNSChatInGame.GetBool() || Options.Gamemode.GetValue() == 0 && Options.ChatBeforeFirstMeeting.GetBool())
if (Options.Gamemode.GetValue() == 2 && Options.SNSChatInGame.GetBool() /*|| Options.Gamemode.GetValue() == 0 && Options.ChatBeforeFirstMeeting.GetBool()*/)
{
_ = new LateTask(() =>
{
+27
View File
@@ -111,4 +111,31 @@ class OnPlayerLeftPatch
PlayerControlCompleteTaskPatch.CalculateTaskWin();
}
}
}
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.SetLevel))]
public static class SetLevelPatch
{
public static List<PlayerControl> HandledLevelKicks = [];
public static void Prefix(PlayerControl __instance, uint level)
{
if (AmongUsClient.Instance.AmHost && level < Options.KickLowLevelPlayer.GetInt() - 1 && __instance.Data.ClientId != AmongUsClient.Instance.HostId)
{
if (HandledLevelKicks.Contains(__instance)) return;
if (!Options.TempBanLowLevelPlayer.GetBool())
{
AmongUsClient.Instance.KickPlayer(__instance.Data.ClientId, false);
Logger.Info($" {__instance.Data.PlayerName} was kicked for being under level {Options.KickLowLevelPlayer.GetInt()}", "KickLowLevelPlayer");
Logger.SendInGame($" {__instance.Data.PlayerName} was kicked for being under level {Options.KickLowLevelPlayer.GetInt()}");
}
else
{
AmongUsClient.Instance.KickPlayer(__instance.Data.ClientId, true);
Logger.Info($" {__instance.Data.PlayerName} was banned for being under level {Options.KickLowLevelPlayer.GetInt()} ", "BanLowLevelPlayer");
Logger.SendInGame($" {__instance.Data.PlayerName} was banned for being under level {Options.KickLowLevelPlayer.GetInt()}");
}
HandledLevelKicks.Add(__instance);
}
}
}
+3 -1
View File
@@ -2,6 +2,8 @@
namespace AmongUsRevamped;
//Old Patch for Mayor
/*
[HarmonyPatch(typeof(MeetingHud), nameof(MeetingHud.CheckForEndVoting))]
public static class CheckForEndVotingPatch
{
@@ -44,7 +46,7 @@ public static class CheckForEndVotingPatch
return false;
}
}
*/
[HarmonyPatch(typeof(MeetingHud), nameof(MeetingHud.Start))]
class MeetingHudStartPatch
+4 -3
View File
@@ -15,11 +15,12 @@ internal class CoStartGamePatch
Logger.Info(" -------- GAME STARTED --------", "StartGame");
Logger.Info($" Gamemode: {Options.Gamemode.GetValue()}", "StartGame");
Logger.Info($" Players: {PlayerControl.AllPlayerControls.Count}", "StartGame");
/*
if ((Options.Gamemode.GetValue() == 0 || Options.Gamemode.GetValue() == 1) && !Utils.isHideNSeek)
{
CustomRoleManagement.AssignRoles();
}
*/
NormalGameEndChecker.imps.Clear();
NormalGameEndChecker.LastWinReason = "";
@@ -47,7 +48,7 @@ class PlayerControlSetRolePatch
roleType = RoleTypes.CrewmateGhost;
return true;
}
/*
if (CustomRoleManagement.PlayerRoles.TryGetValue(__instance.PlayerId, out var role) && role == "Mayor" && Options.Gamemode.GetValue() < 2)
{
if (Options.MayorVentToMeeting.GetBool())
@@ -74,7 +75,7 @@ class PlayerControlSetRolePatch
}
Logger.Info($" {__instance.Data.PlayerName} | {oldRole} -> {roleType}", "ChangedRoleBase");
}
*/
if (Utils.isHideNSeek && i == 0)
{
int seekersCount = Options.NumSeekers.GetInt();
+5 -4
View File
@@ -16,7 +16,7 @@ class ReportDeadBodyPatch
{
if (!AmongUsClient.Instance.AmHost || __instance == null) return true;
if (Options.DisableAnnoyingMeetingCalls.GetBool() && !Utils.CanCallMeetings && !Options.ChatBeforeFirstMeeting.GetBool() && target == null)
if (Options.DisableAnnoyingMeetingCalls.GetBool() && !Utils.CanCallMeetings /*&& !Options.ChatBeforeFirstMeeting.GetBool()*/ && target == null)
{
Logger.Info($" {__instance.Data.PlayerName} is calling a meeting too fast, attempt blocked", "ReportDeadBodyPatch");
return false;
@@ -151,12 +151,13 @@ class PlayerControlCompleteTaskPatch
foreach (var p in PlayerControl.AllPlayerControls)
{
/*
if (ignoredRoles.Contains(CustomRoleManagement.GetRole(p.PlayerId)) && !tasksInitiated)
{
ignoredTasks += p.Data.Tasks.Count;
tasksInitiated = true;
}
*/
if (!playerTasksCompleted.ContainsKey(p))
{
playerTasksCompleted[p] = 0;
@@ -165,12 +166,12 @@ class PlayerControlCompleteTaskPatch
}
playerTasksCompleted[__instance]++;
/*
if (ignoredRoles.Contains(CustomRoleManagement.GetRole(__instance.PlayerId)))
{
ignoredCompletedTasks = playerTasksCompleted[__instance];
}
*/
Logger.Info($" {__instance.Data.PlayerName} completed {idx}", "TaskPatch");
if (Options.Gamemode.GetValue() != 3) CalculateTaskWin();
+5 -1
View File
@@ -1,5 +1,8 @@
namespace AmongUsRevamped;
//Old Patch for Mayor
/*
[HarmonyPatch(typeof(Vent), nameof(Vent.EnterVent))]
class EnterVentPatch
{
@@ -13,4 +16,5 @@ class EnterVentPatch
Logger.Info($" The Mayor, {pc.Data.PlayerName}, called a meeting by venting", "EnterVent");
}
}
}
}
*/
+1 -7
View File
@@ -29,12 +29,7 @@
<img src="https://github.com/astra1dev/AUnlocker/assets/90265231/14226f03-a003-4efc-b27b-6df53fb394d6" width=410 height=240>****
‎
# 🎮 Features (v1.7.1):
## <b> 🌟 Custom Roles:</b>
- Mayor (Crewmate)
- The mayor has extra votes and can call meetings by venting, depending on settings.
- Jester (Neutral)
- The jester has to get voted to win alone and does not win with any other team.
# 🎮 Features (v1.7.2):
## <b>♠️ Client Side settings:</b>
- Game Master
- Unlock FPS
@@ -75,7 +70,6 @@
- Shift and Seek
- Speedrun
## <b>❓ Other Improvements:</b>
- ehT dlekS map (reverse Skeld)
- Ability to cancel starting countdown
- Improved main menu
- Faster startup time