Compare commits

...
8 Commits
Author SHA1 Message Date
Ape 7da659af7b 1.6.6 2026-03-30 17:42:23 +02:00
Ape 58df006f07 Yeah I still can't fix the dumb level stuff 2026-03-30 17:38:29 +02:00
Ape 0f373b8328 Super important change 2026-03-27 20:08:15 +01:00
Ape 16ed549de4 Update ExilePatch.cs 2026-03-27 20:06:29 +01:00
Ape bc2aa74046 .. Why did it do that? 2026-03-27 19:58:41 +01:00
Ape 45859032bd Merge branch 'main' of https://github.com/ApeMV/AmongUsRevamped 2026-03-27 19:57:32 +01:00
Ape 66a5eb0b09 Small fixes and optimize FixedUpdate 2026-03-27 19:55:57 +01:00
Ape 95306ba8a9 1.6.4 2026-03-22 13:30:08 +01:00
6 changed files with 98 additions and 70 deletions

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.6.4";
public const string ModVersion = "v1.6.6";
public static float GameTimer;
+54 -52
View File
@@ -36,71 +36,73 @@ public static class FixedUpdate
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.FixedUpdate))]
class FixedUpdateInGamePatch
{
private static Dictionary<byte, string> LastColors = new();
private static float t;
private static GameObject settingsLabel;
public static void Postfix(PlayerControl __instance)
{
if (__instance == null || __instance.PlayerId == 255 || !AmongUsClient.Instance.AmHost) return;
t += Time.deltaTime;
if (t < 0.2f) return;
t = 0f;
int access = Utils.CheckAccessLevel(__instance.Data.FriendCode);
string color = access switch
if (Utils.IsLobby)
{
1 => "yellow",
2 => "purple",
3 => "red",
_ => "white"
};
if (!__instance.cosmetics.nameText.text.Contains($"{color}") && Utils.IsLobby)
{
__instance.cosmetics.nameText.text = $"<color={color}>{__instance.Data.PlayerName}</color>";
}
GameObject g = GameObject.Find("GameSettingsLabel");
// 0Kc
if (Options.Gamemode.GetValue() == 1 && !Utils.isHideNSeek && Main.NormalOptions.KillCooldown != 0.01f)
{
Main.NormalOptions.KillCooldown = 0.01f;
if (Options.NoKcdSettingsOverride.GetBool() && g == null)
int access = Utils.CheckAccessLevel(__instance.Data.FriendCode);
string color = access switch
{
Main.NormalOptions.EmergencyCooldown = 0;
1 => "yellow",
2 => "purple",
3 => "red",
_ => "white"
};
Main.NormalOptions.TaskBarMode = 0;
if (!LastColors.TryGetValue(__instance.PlayerId, out var lastColor) || lastColor != color || !__instance.cosmetics.nameText.text.Contains($"<color={color}>"))
{
__instance.cosmetics.nameText.text = $"<color={color}>{__instance.Data.PlayerName}</color>";
LastColors[__instance.PlayerId] = color;
}
}
// SnS
if (Options.Gamemode.GetValue() == 2 && !Utils.isHideNSeek && Main.NormalOptions.KillCooldown != 2.5f)
{
Main.NormalOptions.KillCooldown = 2.5f;
if (settingsLabel == null) settingsLabel = GameObject.Find("GameSettingsLabel");
if (Options.SNSSettingsOverride.GetBool() && g == null)
{
Main.NormalOptions.TaskBarMode = 0;
}
int gamemode = Options.Gamemode.GetValue();
switch (gamemode)
{
case 1: // 0Kc
if (Main.NormalOptions.KillCooldown != 0.01f)
Main.NormalOptions.KillCooldown = 0.01f;
if (Options.NoKcdSettingsOverride.GetBool() && settingsLabel == null)
{
Main.NormalOptions.EmergencyCooldown = 0;
Main.NormalOptions.TaskBarMode = 0;
}
break;
case 2: // SnS
if (Main.NormalOptions.KillCooldown != 2.5f)
Main.NormalOptions.KillCooldown = 2.5f;
if (Options.SNSSettingsOverride.GetBool() && settingsLabel == null)
Main.NormalOptions.TaskBarMode = 0;
break;
case 3: // Speedrun
if (settingsLabel == null)
Main.NormalOptions.TaskBarMode = 0;
break;
case 0: // Reset
if (Main.NormalOptions.KillCooldown <= 0.01f)
Main.NormalOptions.KillCooldown = 25f;
break;
}
// Speedrun
if (Options.Gamemode.GetValue() == 3 && !Utils.isHideNSeek && g == null)
{
Main.NormalOptions.TaskBarMode = 0;
if (__instance.AllTasksCompleted() && Utils.InGame && Utils.GamePastRoleSelection && !Utils.HandlingGameEnd)
{
if (__instance == PlayerControl.LocalPlayer && Main.GM.Value) return;
Utils.CustomWinnerEndGame(__instance, 1);
NormalGameEndChecker.LastWinReason = $"{__instance.Data.PlayerName} Wins! (Completed tasks first)";
}
}
if (Options.Gamemode.GetValue() == 0 && Main.NormalOptions.KillCooldown <= 0.01f)
{
Main.NormalOptions.KillCooldown = 25f;
}
if (__instance.Data.PlayerLevel != 0 && __instance.Data.PlayerLevel < Options.KickLowLevelPlayer.GetInt() && __instance.Data.ClientId != AmongUsClient.Instance.HostId)
if (__instance.Data.PlayerLevel != 0 && __instance.Data.PlayerLevel < Options.KickLowLevelPlayer.GetInt() - 1 && __instance.Data.ClientId != AmongUsClient.Instance.HostId)
{
if (!Options.TempBanLowLevelPlayer.GetBool())
{
+26 -1
View File
@@ -6,10 +6,14 @@ class ExileControllerWrapUpPatch
class ExileControllerPatch
{
public static void Postfix(ExileController __instance)
{
AfterExile(__instance.initData.networkedPlayer);
}
public static void AfterExile(NetworkedPlayerInfo ejectedPlayer)
{
if (!AmongUsClient.Instance.AmHost) return;
var ejectedPlayer = __instance.initData?.networkedPlayer;
if (ejectedPlayer == null) return;
PlayerControl pc = null;
@@ -60,4 +64,25 @@ class ExileControllerWrapUpPatch
}
}
}
#if ANDROID
[HarmonyPatch(typeof(AirshipExileController), nameof(AirshipExileController.WrapUpAndSpawn))]
class AirshipExileControllerPatchAndroid
{
public static void Postfix(AirshipExileController __instance)
{
ExileControllerPatch.AfterExile(__instance.initData.networkedPlayer);
}
}
#else
[HarmonyPatch(typeof(AirshipExileController._WrapUpAndSpawn_d__11), nameof(AirshipExileController._WrapUpAndSpawn_d__11.MoveNext))]
class AirshipExileControllerPatchPC
{
public static void Postfix(AirshipExileController._WrapUpAndSpawn_d__11 __instance, ref bool __result)
{
var instance = __instance.__4__this;
ExileControllerPatch.AfterExile(instance.initData.networkedPlayer);
}
}
#endif
}
+10 -10
View File
@@ -47,6 +47,16 @@ internal static class CoShowIntroPatch
Utils.CanCallMeetings = true;
}, Options.ChatBeforeFirstMeeting.GetBool() ? 39.5f : 33f, "MeetingEnabled");
}
if (Options.Gamemode.GetValue() == 2 && Options.SNSChatInGame.GetBool() || Options.Gamemode.GetValue() == 0 && Options.ChatBeforeFirstMeeting.GetBool())
{
_ = new LateTask(() =>
{
PlayerControl.LocalPlayer.CmdReportDeadBody(null);
if (MeetingHud.Instance != null) MeetingHud.Instance.RpcClose();
}, 9f, "SetChatVisible");
}
}
}
@@ -57,16 +67,6 @@ class BeginCrewmatePatch
{
if (!AmongUsClient.Instance.AmHost) return;
if (Options.Gamemode.GetValue() == 2 && Options.SNSChatInGame.GetBool() || Options.Gamemode.GetValue() == 0 && Options.ChatBeforeFirstMeeting.GetBool())
{
_ = new LateTask(() =>
{
PlayerControl.LocalPlayer.CmdReportDeadBody(null);
if (MeetingHud.Instance != null) MeetingHud.Instance.RpcClose();
}, 7f, "SetChatVisible");
}
if (Main.GM.Value)
{
__instance.TeamTitle.text = "Game Master";
+4 -4
View File
@@ -62,7 +62,7 @@ internal static class MurderPlayerPatch
{
if (p.Data.Role.IsImpostor)
{
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=red><size=90%>({killCount[__instance.Data.PlayerId]}†)";
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=red><size=90%>({killCount[p.Data.PlayerId]}†)";
}
else
{
@@ -106,8 +106,8 @@ internal static class MurderPlayerPatch
if (misfireCount[__instance.Data.PlayerId] >= Options.MisfiresToSuicide.GetFloat())
{
__instance.RpcSetRole(RoleTypes.ImpostorGhost);
Logger.Info($" {__instance.Data.PlayerName} misfired {misfireCount[playerId]} times and suicided", "SNSKillManager");
Logger.SendInGame($" {__instance.Data.PlayerName} misfired {misfireCount[playerId]} times and suicided");
Logger.Info($" {__instance.Data.PlayerName} misfired {misfireCount[playerId]} time(s) and suicided", "SNSKillManager");
Logger.SendInGame($" {__instance.Data.PlayerName} misfired {misfireCount[playerId]} time(s) and suicided");
}
}
@@ -183,7 +183,7 @@ class PlayerControlCompleteTaskPatch
public static void CalculateTaskWin()
{
if (!Utils.GamePastRoleSelection || Utils.isHideNSeek) return;
if (!Utils.GamePastRoleSelection || Utils.isHideNSeek || Options.NoGameEnd.GetBool()) return;
//Logger.Info($" Checking if {GameData.Instance.CompletedTasks} - {ignoredCompletedTasks} >= ({GameData.Instance.TotalTasks} - {ignoredTasks}) * 0.01 * {Options.TaskPercentNeededToWin.GetInt()}", "TaskPatch");
+3 -2
View File
@@ -1,4 +1,4 @@
# Welcome to AmongUsRevamped!
# Welcome to Among Us Revamped!
<br>
</p>
@@ -29,7 +29,7 @@
<img src="https://github.com/astra1dev/AUnlocker/assets/90265231/14226f03-a003-4efc-b27b-6df53fb394d6" width=410 height=240>****
‎
# 🎮 Features (v1.6.2):
# 🎮 Features (v1.6.6):
## <b> 🌟 Custom Roles:</b>
- Mayor (Crewmate)
- The mayor has extra votes and can call meetings by venting, depending on settings.
@@ -50,6 +50,7 @@
- Banlist system
- DenyName system
- Multi layer moderator system
- To add Admins, Moderators and VIP's, type the user's Friendcode in the designated files located in AUR-DATA
- Enable No Game End
- Custom starting countdown
## <b>♻️ Automation settings:</b>