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