mirror of
https://github.com/ApeMV/AmongUsRevamped.git
synced 2026-10-20 01:46:28 +00:00
Not even gonna try summing this up
This commit is contained in:
1 parent
7dafbcf479
commit
00e2a384c9
20 files changed
+700
-458
No files matched your search
@@ -83,7 +83,6 @@ internal static class CommandHelper
|
||||
new Cmd { Name = new[] { "/clearseeker" }, Prompt = "/clearseeker", Description = Translator.Get("clearSeekerDesc"), HasVariable = false },
|
||||
|
||||
new Cmd { Name = new[] { "/mapvote" }, Prompt = "/mapvote", Description = Translator.Get("mapVoteDesc"), HasVariable = false },
|
||||
new Cmd { Name = new[] { "/allmapvote" }, Prompt = "/allmapvote", Description = Translator.Get("allMapVoteDesc"), HasVariable = false },
|
||||
new Cmd { Name = new[] { "/gmvote" }, Prompt = "/gmvote", Description = Translator.Get("modeVoteDesc"), HasVariable = false },
|
||||
|
||||
new Cmd { Name = new[] { "/private" }, Prompt = "/private", Description = Translator.Get("privateDesc"), HasVariable = false },
|
||||
|
||||
@@ -61,6 +61,11 @@ namespace AmongUsRevamped
|
||||
Translator.Get("kick"), Translator.Get("ban"), Translator.Get("notifyMe")
|
||||
};
|
||||
|
||||
public static readonly string[] cheatingPenalties =
|
||||
{
|
||||
Translator.Get("ban"), Translator.Get("kick"), Translator.Get("notifyMe")
|
||||
};
|
||||
|
||||
|
||||
|
||||
//System
|
||||
@@ -102,8 +107,6 @@ namespace AmongUsRevamped
|
||||
public static OptionItem MessagePerPlayerNum;
|
||||
public static OptionItem AutomaticMapPoll;
|
||||
public static OptionItem TimeBeforeMapPoll;
|
||||
public static OptionItem AutomaticAllMapPoll;
|
||||
public static OptionItem TimeBeforeAllMapPoll;
|
||||
public static OptionItem AutomaticModePoll;
|
||||
public static OptionItem TimeBeforeModePoll;
|
||||
|
||||
@@ -123,12 +126,37 @@ namespace AmongUsRevamped
|
||||
|
||||
public static OptionItem TabGroupMisc;
|
||||
public static OptionItem MapVoteDuration;
|
||||
public static OptionItem CustomizeMapVote;
|
||||
public static OptionItem IncludeSkeld;
|
||||
public static OptionItem IncludeMira;
|
||||
public static OptionItem IncludePolus;
|
||||
public static OptionItem IncludeAirship;
|
||||
public static OptionItem IncludeFungle;
|
||||
public static OptionItem IncludeDleks;
|
||||
|
||||
public static OptionItem ModeVoteDuration;
|
||||
public static OptionItem CustomizeModeVote;
|
||||
public static OptionItem IncludeStandard;
|
||||
public static OptionItem IncludeNoKillCooldown;
|
||||
public static OptionItem IncludeShiftAndSeek;
|
||||
public static OptionItem IncludePoofAndSeek;
|
||||
public static OptionItem IncludeSpeedrun;
|
||||
|
||||
public static OptionItem StartCountdown;
|
||||
public static OptionItem ColorCommandLevel;
|
||||
public static OptionItem AllowFortegreen;
|
||||
public static OptionItem NoGameEnd;
|
||||
|
||||
public static OptionItem TabGroupAnticheat;
|
||||
public static OptionItem HackingPunishment;
|
||||
public static OptionItem DetectBadRPC;
|
||||
public static OptionItem DetectBadSabotage;
|
||||
public static OptionItem DetectBadVent;
|
||||
public static OptionItem DetectBadTask;
|
||||
public static OptionItem DetectBadKill;
|
||||
public static OptionItem DetectBadAnimation;
|
||||
public static OptionItem DetectBadMeeting;
|
||||
|
||||
public static OptionItem TabGroupAccess;
|
||||
public static OptionItem SlashColorCmd;
|
||||
public static OptionItem SlashRolesAndGamemodeCmd;
|
||||
@@ -167,6 +195,8 @@ namespace AmongUsRevamped
|
||||
public static OptionItem ShieldFirstDeath;
|
||||
public static OptionItem ShieldFirstDeathDuration;
|
||||
public static OptionItem DisableAnnoyingMeetingCalls;
|
||||
|
||||
public static OptionItem TabGroupGameplayMapModifications;
|
||||
public static OptionItem ChangeDecontaminationTime;
|
||||
public static OptionItem DecontaminationTimeOnMiraHQ;
|
||||
public static OptionItem DecontaminationDoorOpenTimeOnMiraHQ;
|
||||
@@ -424,18 +454,14 @@ namespace AmongUsRevamped
|
||||
TimeBeforeMapPoll = IntegerOptionItem.Create(60155, Translator.Get("timeBeforeMapPoll"), new(10, 300, 5), 10, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetParent(AutomaticMapPoll);
|
||||
AutomaticAllMapPoll = BooleanOptionItem.Create(60156, Translator.Get("automaticAllMapPoll"), false, TabGroup.SystemSettings, false);
|
||||
TimeBeforeAllMapPoll = IntegerOptionItem.Create(60157, Translator.Get("timeBeforeMapPoll"), new(10, 300, 5), 10, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetParent(AutomaticAllMapPoll);
|
||||
AutomaticModePoll = BooleanOptionItem.Create(60158, Translator.Get("automaticModePoll"), false, TabGroup.SystemSettings, false);
|
||||
TimeBeforeModePoll = IntegerOptionItem.Create(60159, Translator.Get("timeBeforeMapPoll"), new(10, 300, 5), 20, TabGroup.SystemSettings, false)
|
||||
AutomaticModePoll = BooleanOptionItem.Create(60156, Translator.Get("automaticModePoll"), false, TabGroup.SystemSettings, false);
|
||||
TimeBeforeModePoll = IntegerOptionItem.Create(60157, Translator.Get("timeBeforeMapPoll"), new(10, 300, 5), 20, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetParent(AutomaticModePoll);
|
||||
|
||||
TabGroupAutostart = TextOptionItem.Create(64425, Translator.Get("tabGroupAutostart"), TabGroup.SystemSettings)
|
||||
.SetColor(Color.yellow);
|
||||
AutoStartTimer = IntegerOptionItem.Create(64426, Translator.Get("autoStartTimer"), new(1, 5, 1), 5, TabGroup.SystemSettings, false)
|
||||
AutoStartTimer = IntegerOptionItem.Create(64426, Translator.Get("autoStartTimer"), new(2, 5, 1), 5, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
WaitAutoStart = IntegerOptionItem.Create(64427, Translator.Get("waitAutoStart"), new(10, 600, 10), 300, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
@@ -457,19 +483,64 @@ namespace AmongUsRevamped
|
||||
|
||||
TabGroupMisc = TextOptionItem.Create(60378, Translator.Get("tabGroupMisc"), TabGroup.SystemSettings)
|
||||
.SetColor(Color.yellow);
|
||||
|
||||
MapVoteDuration = IntegerOptionItem.Create(60379, Translator.Get("mapVoteDuration"), new(5, 60, 5), 20, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
CustomizeMapVote = BooleanOptionItem.Create(60380, Translator.Get("customizeMapVote"), false, TabGroup.SystemSettings, false);
|
||||
IncludeSkeld = BooleanOptionItem.Create(60381, Translator.Get("includeSkeld"), true, TabGroup.SystemSettings, false)
|
||||
.SetParent(CustomizeMapVote);
|
||||
IncludeMira = BooleanOptionItem.Create(60382, Translator.Get("includeMira"), true, TabGroup.SystemSettings, false)
|
||||
.SetParent(CustomizeMapVote);
|
||||
IncludePolus = BooleanOptionItem.Create(60383, Translator.Get("includePolus"), true, TabGroup.SystemSettings, false)
|
||||
.SetParent(CustomizeMapVote);
|
||||
IncludeAirship = BooleanOptionItem.Create(60384, Translator.Get("includeAirship"), true, TabGroup.SystemSettings, false)
|
||||
.SetParent(CustomizeMapVote);
|
||||
IncludeFungle = BooleanOptionItem.Create(60385, Translator.Get("includeFungle"), true, TabGroup.SystemSettings, false)
|
||||
.SetParent(CustomizeMapVote);
|
||||
IncludeDleks = BooleanOptionItem.Create(60386, Translator.Get("includeDleks"), true, TabGroup.SystemSettings, false)
|
||||
.SetParent(CustomizeMapVote);
|
||||
|
||||
ModeVoteDuration = IntegerOptionItem.Create(60389, Translator.Get("modeVoteDuration"), new(5, 60, 5), 20, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
CustomizeModeVote = BooleanOptionItem.Create(60390, Translator.Get("customizeModeVote"), false, TabGroup.SystemSettings, false);
|
||||
IncludeStandard = BooleanOptionItem.Create(60391, Translator.Get("includeStandard"), true, TabGroup.SystemSettings, false)
|
||||
.SetParent(CustomizeModeVote);
|
||||
IncludeNoKillCooldown = BooleanOptionItem.Create(60392, Translator.Get("includeNoKillCooldown"), true, TabGroup.SystemSettings, false)
|
||||
.SetParent(CustomizeModeVote);
|
||||
IncludeShiftAndSeek = BooleanOptionItem.Create(60393, Translator.Get("includeShiftAndSeek"), true, TabGroup.SystemSettings, false)
|
||||
.SetParent(CustomizeModeVote);
|
||||
IncludePoofAndSeek = BooleanOptionItem.Create(60394, Translator.Get("includePoofAndSeek"), true, TabGroup.SystemSettings, false)
|
||||
.SetParent(CustomizeModeVote);
|
||||
IncludeSpeedrun = BooleanOptionItem.Create(60395, Translator.Get("includeSpeedrun"), true, TabGroup.SystemSettings, false)
|
||||
.SetParent(CustomizeModeVote);
|
||||
StartCountdown = IntegerOptionItem.Create(60396, Translator.Get("startCountdown"), new(2, 5, 1), 5, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(Color.red);
|
||||
ModeVoteDuration = IntegerOptionItem.Create(60380, Translator.Get("modeVoteDuration"), new(5, 60, 5), 20, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
AllowFortegreen = BooleanOptionItem.Create(60397, Translator.Get("allowFortegreen"), false, TabGroup.SystemSettings, false)
|
||||
.SetColor(Color.red);
|
||||
StartCountdown = IntegerOptionItem.Create(60381, Translator.Get("startCountdown"), new(1, 5, 1), 5, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
NoGameEnd = BooleanOptionItem.Create(60398, Translator.Get("noGameEnd"), false, TabGroup.SystemSettings, false)
|
||||
.SetColor(Color.red);
|
||||
AllowFortegreen = BooleanOptionItem.Create(60382, Translator.Get("allowFortegreen"), false, TabGroup.SystemSettings, false)
|
||||
|
||||
TabGroupAnticheat = TextOptionItem.Create(60400, Translator.Get("tabGroupAnticheat"), TabGroup.SystemSettings)
|
||||
.SetColor(Color.yellow);
|
||||
HackingPunishment = StringOptionItem.Create(60401, Translator.Get("hackingPunishment"), cheatingPenalties, 0, TabGroup.SystemSettings, false)
|
||||
.SetColor(Color.red);
|
||||
NoGameEnd = BooleanOptionItem.Create(60383, Translator.Get("noGameEnd"), false, TabGroup.SystemSettings, false)
|
||||
DetectBadRPC = BooleanOptionItem.Create(60402, Translator.Get("detectBadRPC"), true, TabGroup.SystemSettings, false)
|
||||
.SetColor(Color.red);
|
||||
DetectBadSabotage = BooleanOptionItem.Create(60403, Translator.Get("detectBadSabotage"), true, TabGroup.SystemSettings, false)
|
||||
.SetColor(Color.red);
|
||||
DetectBadVent = BooleanOptionItem.Create(60404, Translator.Get("detectBadVent"), true, TabGroup.SystemSettings, false)
|
||||
.SetColor(Color.red);
|
||||
DetectBadTask = BooleanOptionItem.Create(60405, Translator.Get("detectBadTask"), true, TabGroup.SystemSettings, false)
|
||||
.SetColor(Color.red);
|
||||
DetectBadKill = BooleanOptionItem.Create(60406, Translator.Get("detectBadKill"), true, TabGroup.SystemSettings, false)
|
||||
.SetColor(Color.red);
|
||||
DetectBadAnimation = BooleanOptionItem.Create(60407, Translator.Get("detectBadAnimation"), true, TabGroup.SystemSettings, false)
|
||||
.SetColor(Color.red);
|
||||
DetectBadMeeting = BooleanOptionItem.Create(60408, Translator.Get("detectBadMeeting"), true, TabGroup.SystemSettings, false)
|
||||
.SetColor(Color.red);
|
||||
|
||||
|
||||
|
||||
// Gamemode Settings
|
||||
|
||||
@@ -628,6 +699,8 @@ namespace AmongUsRevamped
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
DisableAnnoyingMeetingCalls = BooleanOptionItem.Create(60567, Translator.Get("disableAnnoyingMeetingCalls"), false, TabGroup.ModSettings, false);
|
||||
|
||||
TabGroupGameplayMapModifications = TextOptionItem.Create(60549, Translator.Get("tabGroupGameplayMapModifications"), TabGroup.ModSettings)
|
||||
.SetColor(Color.blue);
|
||||
ChangeDecontaminationTime = BooleanOptionItem.Create(60550, Translator.Get("changeDecontaminationTime"), false, TabGroup.ModSettings, false);
|
||||
DecontaminationTimeOnMiraHQ = FloatOptionItem.Create(60551, Translator.Get("decontaminationTimeOnMiraHQ"), new(0.5f, 10f, 0.25f), 3f, TabGroup.ModSettings, false)
|
||||
.SetParent(ChangeDecontaminationTime)
|
||||
|
||||
+89
-76
@@ -8,23 +8,22 @@ internal class EACR
|
||||
{
|
||||
public static bool PlayerControlReceiveRpc(PlayerControl pc, byte callId, MessageReader reader)
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return false;
|
||||
if (pc == null || reader == null) return false;
|
||||
if (!AmongUsClient.Instance.AmHost || pc == null || reader == null) return false;
|
||||
|
||||
try
|
||||
{
|
||||
MessageReader sr = MessageReader.Get(reader);
|
||||
var rpc = (RpcCalls)callId;
|
||||
|
||||
switch (rpc)
|
||||
{
|
||||
case RpcCalls.StartMeeting:
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(pc.Data.ClientId, true);
|
||||
Logger.SendInGame($"{pc.Data.PlayerName} was banned for being calling an invalid meeting (cheating)");
|
||||
Logger.Info($" {pc.Data.PlayerName} was banned for being calling an invalid meeting (cheating)", "EACR");
|
||||
MeetingCheat(pc);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
switch (callId)
|
||||
{
|
||||
case 101: // Aum Chat
|
||||
@@ -38,9 +37,7 @@ internal class EACR
|
||||
|
||||
if (!flag)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(pc.Data.ClientId, true);
|
||||
Logger.SendInGame($"{pc.Data.PlayerName} was banned for AUM chat CallId (cheating)");
|
||||
Logger.Info($" {pc.Data.PlayerName} was banned for AUM chat CallId (cheating)", "EACR");
|
||||
RPCCheat(pc, "Among Us Menu Chat");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -56,9 +53,7 @@ internal class EACR
|
||||
|
||||
if (aumid == pc.PlayerId)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(pc.Data.ClientId, true);
|
||||
Logger.SendInGame($"{pc.Data.PlayerName} was banned for AUM CallId (cheating)");
|
||||
Logger.Info($" {pc.Data.PlayerName} was banned for AUM CallId (cheating)", "EACR");
|
||||
RPCCheat(pc, "Among Us Menu");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -78,9 +73,7 @@ internal class EACR
|
||||
|
||||
if (!flag)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(pc.Data.ClientId, true);
|
||||
Logger.SendInGame($"{pc.Data.PlayerName} was banned for KN chat CallId (cheating)");
|
||||
Logger.Info($" {pc.Data.PlayerName} was banned for KN chat CallId (cheating)", "EACR");
|
||||
RPCCheat(pc, "KillNetwork Chat");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -92,27 +85,14 @@ internal class EACR
|
||||
case 250: // KN
|
||||
if (sr.BytesRemaining == 0)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(pc.Data.ClientId, true);
|
||||
Logger.SendInGame($"{pc.Data.PlayerName} was banned for KN CallId (cheating)");
|
||||
Logger.Info($" {pc.Data.PlayerName} was banned for KN CallId (cheating)", "EACR");
|
||||
RPCCheat(pc, "KillNetwork");
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case unchecked((byte)420): // 164 Sicko
|
||||
if (sr.BytesRemaining == 0)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(pc.Data.ClientId, true);
|
||||
Logger.SendInGame($"{pc.Data.PlayerName} was banned for Sickomenu RPC (cheating)");
|
||||
Logger.Info($" {pc.Data.PlayerName} was banned for Sickomenu RPC (cheating)", "EACR");
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case 202: // SMC
|
||||
try
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(pc.Data.ClientId, true);
|
||||
Logger.SendInGame($"{pc.Data.PlayerName} was banned for MMC CallId (cheating)");
|
||||
Logger.Info($" {pc.Data.PlayerName} was banned for MMC CallId (cheating)", "EACR");
|
||||
RPCCheat(pc, "SickoMenu");
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
@@ -120,7 +100,18 @@ internal class EACR
|
||||
|
||||
}
|
||||
break;
|
||||
case 201:
|
||||
case 202: // SMC
|
||||
try
|
||||
{
|
||||
RPCCheat(pc, "SlopMenuCrew");
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case 201: // SMC Chat
|
||||
try
|
||||
{
|
||||
var firstString = sr.ReadString();
|
||||
@@ -131,9 +122,7 @@ internal class EACR
|
||||
|
||||
if (!flag)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(pc.Data.ClientId, true);
|
||||
Logger.SendInGame($"{pc.Data.PlayerName} was banned for MMC chat CallId (cheating)");
|
||||
Logger.Info($" {pc.Data.PlayerName} was banned for MMC chat CallId (cheating)", "EACR");
|
||||
RPCCheat(pc, "SlopMenuCrew Chat");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -150,6 +139,7 @@ internal class EACR
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool RpcUpdateSystemCheck(PlayerControl player, SystemTypes systemType, byte amount)
|
||||
{
|
||||
var Mapid = Utils.GetActiveMapId();
|
||||
@@ -167,108 +157,131 @@ internal class EACR
|
||||
|
||||
if (systemType == SystemTypes.Sabotage)
|
||||
{
|
||||
if (!player.Data.Role.IsImpostor && !player.isNew)
|
||||
if (!player.Data.Role.IsImpostor)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(player.Data.ClientId, true);
|
||||
Logger.SendInGame($"{player.Data.PlayerName} was banned for invalid sabotage (cheating)");
|
||||
Logger.Info($" {player.Data.PlayerName} was banned for invalid sabotage", "EACR");
|
||||
SabotageCheat(player);
|
||||
}
|
||||
}
|
||||
else if (systemType == SystemTypes.LifeSupp)
|
||||
{
|
||||
if (Mapid != 0 && Mapid != 1 && Mapid != 3) goto YesCheat;
|
||||
else if (amount != 64 && amount != 65) goto YesCheat;
|
||||
if (Mapid != 0 && Mapid != 1 && Mapid != 3) SabotageCheat(player);
|
||||
else if (amount != 64 && amount != 65) SabotageCheat(player);
|
||||
}
|
||||
else if (systemType == SystemTypes.Comms)
|
||||
{
|
||||
if (amount == 0)
|
||||
{
|
||||
if (Mapid == 1 || Mapid == 5) goto YesCheat;
|
||||
if (Mapid == 1 || Mapid == 5) SabotageCheat(player);
|
||||
}
|
||||
else if (amount == 64 || amount == 65 || amount == 32 || amount == 33 || amount == 16 || amount == 17)
|
||||
{
|
||||
if (!(Mapid == 1 || Mapid == 5)) goto YesCheat;
|
||||
if (!(Mapid == 1 || Mapid == 5)) SabotageCheat(player);
|
||||
}
|
||||
else goto YesCheat;
|
||||
else SabotageCheat(player);
|
||||
}
|
||||
else if (systemType == SystemTypes.Electrical)
|
||||
{
|
||||
if (Mapid == 5) goto YesCheat;
|
||||
if (amount >= 5)
|
||||
{
|
||||
goto YesCheat;
|
||||
}
|
||||
if (Mapid == 5 || amount >= 5) SabotageCheat(player);
|
||||
}
|
||||
else if (systemType == SystemTypes.Laboratory)
|
||||
{
|
||||
if (Mapid != 2) goto YesCheat;
|
||||
else if (!(amount == 64 || amount == 65 || amount == 32 || amount == 33)) goto YesCheat;
|
||||
if (Mapid != 2) SabotageCheat(player);
|
||||
else if (!(amount == 64 || amount == 65 || amount == 32 || amount == 33)) SabotageCheat(player);
|
||||
}
|
||||
else if (systemType == SystemTypes.Reactor)
|
||||
{
|
||||
if (Mapid == 2 || Mapid == 4) goto YesCheat;
|
||||
else if (!(amount == 64 || amount == 65 || amount == 32 || amount == 33)) goto YesCheat;
|
||||
if (Mapid == 2 || Mapid == 4) SabotageCheat(player);
|
||||
else if (!(amount == 64 || amount == 65 || amount == 32 || amount == 33)) SabotageCheat(player);
|
||||
}
|
||||
else if (systemType == SystemTypes.HeliSabotage)
|
||||
{
|
||||
if (Mapid != 4) goto YesCheat;
|
||||
else if (!(amount == 64 || amount == 65 || amount == 16 || amount == 17 || amount == 32 || amount == 33)) goto YesCheat;
|
||||
if (Mapid != 4) SabotageCheat(player);
|
||||
else if (!(amount == 64 || amount == 65 || amount == 16 || amount == 17 || amount == 32 || amount == 33)) SabotageCheat(player);
|
||||
}
|
||||
else if (systemType == SystemTypes.MushroomMixupSabotage)
|
||||
{
|
||||
goto YesCheat;
|
||||
SabotageCheat(player);
|
||||
}
|
||||
|
||||
if (Utils.IsMeeting && MeetingHud.Instance.state != MeetingHud.MeetingStates.Animating)
|
||||
{
|
||||
Logger.SendInGame($"{player.Data.PlayerName} might have called an invalid sabotage (cheating)");
|
||||
Logger.Info($" {player.Data.PlayerName} might have called an invalid sabotage (cheating)", "EACR");
|
||||
SabotageCheat(player);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
YesCheat:
|
||||
}
|
||||
|
||||
public static void RPCCheat(PlayerControl player, string input)
|
||||
{
|
||||
if (Options.DetectBadRPC.GetBool())
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(player.Data.ClientId, true);
|
||||
Logger.SendInGame($"{player.Data.PlayerName} was banned for an invalid sabotage (cheating)");
|
||||
Logger.Info($" {player.Data.PlayerName} was banned for an invalid sabotage", "EACR");
|
||||
return true;
|
||||
HackingPunishment(player, $"{player.Data.PlayerName} Sent invalid RPC: {input} (hacking)");
|
||||
}
|
||||
}
|
||||
|
||||
public static void SabotageCheat(PlayerControl player)
|
||||
{
|
||||
if (Options.DetectBadSabotage.GetBool())
|
||||
{
|
||||
HackingPunishment(player, $"{player.Data.PlayerName} invalidly sabotaged (hacking)");
|
||||
}
|
||||
}
|
||||
|
||||
public static void VentCheat(PlayerControl player, Vent __instance)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(player.Data.ClientId, true);
|
||||
Logger.SendInGame($"{player.Data.PlayerName} was banned for invalid venting (cheating)");
|
||||
Logger.Info($" {player.Data.PlayerName} was banned for invalid venting", "EACR");
|
||||
if (Options.DetectBadVent.GetBool())
|
||||
{
|
||||
HackingPunishment(player, $"{player.Data.PlayerName} invalidly vented (hacking)");
|
||||
}
|
||||
}
|
||||
|
||||
public static void PlayAnimationCheat(PlayerControl player)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(player.Data.ClientId, true);
|
||||
Logger.SendInGame($"{player.Data.PlayerName} was banned for an invalid animation (cheating)");
|
||||
Logger.Info($" {player.Data.PlayerName} was banned for an invalid animation", "EACR");
|
||||
if (Options.DetectBadAnimation.GetBool())
|
||||
{
|
||||
HackingPunishment(player, $"{player.Data.PlayerName} sent an invalid animation (hacking)");
|
||||
}
|
||||
}
|
||||
|
||||
public static void TaskCheat(PlayerControl player)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(player.Data.ClientId, true);
|
||||
Logger.SendInGame($"{player.Data.PlayerName} was banned for invalidly completing a task (cheating)");
|
||||
Logger.Info($" {player.Data.PlayerName} was banned for invalidly completing a task", "EACR");
|
||||
if (Options.DetectBadTask.GetBool())
|
||||
{
|
||||
HackingPunishment(player, $"{player.Data.PlayerName} invalidly completed a task (hacking)");
|
||||
}
|
||||
}
|
||||
|
||||
public static void MurderCheat(PlayerControl player)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(player.Data.ClientId, true);
|
||||
Logger.SendInGame($"{player.Data.PlayerName} was banned for invalidly murdering a player (cheating)");
|
||||
Logger.Info($" {player.Data.PlayerName} was banned for invalidly murdering a player", "EACR");
|
||||
if (Options.DetectBadKill.GetBool())
|
||||
{
|
||||
HackingPunishment(player, $"{player.Data.PlayerName} invalidly murdered a player (hacking)");
|
||||
}
|
||||
}
|
||||
|
||||
public static void MeetingCheat(PlayerControl player)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(player.Data.ClientId, true);
|
||||
Logger.SendInGame($"{player.Data.PlayerName} was banned for invalidly calling a meeting (cheating)");
|
||||
Logger.Info($" {player.Data.PlayerName} was banned for invalidly calling a meeting", "EACR");
|
||||
if (Options.DetectBadMeeting.GetBool())
|
||||
{
|
||||
HackingPunishment(player, $"{player.Data.PlayerName} invalidly called a meeting (hacking)");
|
||||
}
|
||||
}
|
||||
|
||||
public static void HackingPunishment(PlayerControl player, string input)
|
||||
{
|
||||
if (Options.HackingPunishment.GetValue() == 0)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(player.Data.ClientId, true);
|
||||
}
|
||||
|
||||
if (Options.HackingPunishment.GetValue() == 1)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(player.Data.ClientId, false);
|
||||
}
|
||||
|
||||
Logger.SendInGame($"{input}");
|
||||
Logger.Info($" {input}", "EACR");
|
||||
}
|
||||
}
|
||||
+106
-31
@@ -605,25 +605,30 @@ public static class Utils
|
||||
public static int fungleVotes;
|
||||
public static int dleksVotes;
|
||||
public static bool MapVoteActive;
|
||||
public static bool DleksEnabled;
|
||||
public static readonly List<byte> HasVoted = [];
|
||||
public static void MapVote(bool dleks, bool moderator)
|
||||
public static void MapVote(bool moderator)
|
||||
{
|
||||
if (MapVoteActive || ModeVoteActive) return;
|
||||
|
||||
DleksEnabled = dleks;
|
||||
MapVoteActive = true;
|
||||
|
||||
if (dleks && moderator) Utils.ModeratorChatCommand("A map vote is active!\n\nA: Skeld\nB: Mira\nC: Polus\nD: Airship\nE: Fungle\nF: Eht Dleks\n\nType /vote 'letter' to vote.", "", false);
|
||||
else if (moderator) Utils.ModeratorChatCommand("A map vote is active!\n\nA: The Skeld\nB: Mira HQ\nC: Polus\nD: The Airship\nE: The Fungle\n\nType /vote 'letter' to vote.", "", false);
|
||||
string voteMessage = "A map vote is active!\n\n";
|
||||
if (!Options.CustomizeMapVote.GetBool()) voteMessage += "A: Skeld\nB: Mira\nC: Polus\nD: Airship\nE: Fungle\nF: Dleks\n";
|
||||
if (Options.IncludeSkeld.GetBool()) voteMessage += "A: Skeld\n";
|
||||
if (Options.IncludeMira.GetBool()) voteMessage += "B: Mira\n";
|
||||
if (Options.IncludePolus.GetBool()) voteMessage += "C: Polus\n";
|
||||
if (Options.IncludeAirship.GetBool()) voteMessage += "D: Airship\n";
|
||||
if (Options.IncludeFungle.GetBool()) voteMessage += "E: Fungle\n";
|
||||
if (Options.IncludeDleks.GetBool()) voteMessage += "F: Dleks\n";
|
||||
voteMessage += "\nType /vote 'letter' to vote.";
|
||||
|
||||
if (dleks && !moderator) Utils.ChatCommand(DestroyableSingleton<HudManager>.Instance.Chat, "A map vote is active!\n\nA: Skeld\nB: Mira\nC: Polus\nD: Airship\nE: Fungle\nF: Eht Dleks\n\nType /vote 'letter' to vote.", "", false);
|
||||
else if (!moderator) Utils.ChatCommand(DestroyableSingleton<HudManager>.Instance.Chat, "A map vote is active!\n\nA: The Skeld\nB: Mira HQ\nC: Polus\nD: The Airship\nE: The Fungle\n\nType /vote 'letter' to vote.", "", false);
|
||||
if (moderator) Utils.ModeratorChatCommand(voteMessage, "", false);
|
||||
else Utils.ChatCommand(DestroyableSingleton<HudManager>.Instance.Chat, voteMessage, "", false);
|
||||
|
||||
new LateTask(() =>
|
||||
{
|
||||
int highest = skeldVotes;
|
||||
string winner = "Skeld";
|
||||
int highest = -1;
|
||||
string winner = "";
|
||||
byte mapId = 0;
|
||||
bool tie = false;
|
||||
|
||||
@@ -642,16 +647,47 @@ public static class Utils
|
||||
}
|
||||
}
|
||||
|
||||
Check(miraVotes, "Mira HQ", 1);
|
||||
Check(polusVotes, "Polus", 2);
|
||||
Check(airshipVotes, "Airship", 4);
|
||||
Check(fungleVotes, "The Fungle", 5);
|
||||
if (DleksEnabled) Check(dleksVotes, "Eht Dleks", 3);
|
||||
if (!Options.CustomizeMapVote.GetBool())
|
||||
{
|
||||
Check(skeldVotes, "Skeld", 0);
|
||||
Check(miraVotes, "Mira", 1);
|
||||
Check(polusVotes, "Polus", 2);
|
||||
Check(airshipVotes, "Airship", 4);
|
||||
Check(fungleVotes, "Fungle", 5);
|
||||
Check(dleksVotes, "Dleks", 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Options.IncludeSkeld.GetBool()) Check(skeldVotes, "Skeld", 0);
|
||||
if (Options.IncludeMira.GetBool()) Check(miraVotes, "Mira", 1);
|
||||
if (Options.IncludePolus.GetBool()) Check(polusVotes, "Polus", 2);
|
||||
if (Options.IncludeAirship.GetBool()) Check(airshipVotes, "Airship", 4);
|
||||
if (Options.IncludeFungle.GetBool()) Check(fungleVotes, "Fungle", 5);
|
||||
if (Options.IncludeDleks.GetBool()) Check(dleksVotes, "Dleks", 3);
|
||||
}
|
||||
|
||||
string voteResults = $"Skeld: {skeldVotes}\n" + $"Mira: {miraVotes}\n" + $"Polus: {polusVotes}\n" + $"Airship: {airshipVotes}\n" + $"Fungle: {fungleVotes}";
|
||||
if (DleksEnabled) voteResults += $"\nEht Dleks: {dleksVotes}";
|
||||
string voteResults = "";
|
||||
if (!Options.CustomizeMapVote.GetBool())
|
||||
{
|
||||
voteResults += $"Skeld: {skeldVotes}\n";
|
||||
voteResults += $"Mira: {miraVotes}\n";
|
||||
voteResults += $"Polus: {polusVotes}\n";
|
||||
voteResults += $"Airship: {airshipVotes}\n";
|
||||
voteResults += $"Fungle: {fungleVotes}\n";
|
||||
voteResults += $"Dleks: {dleksVotes}\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Options.IncludeSkeld.GetBool()) voteResults += $"Skeld: {skeldVotes}\n";
|
||||
if (Options.IncludeMira.GetBool()) voteResults += $"Mira: {miraVotes}\n";
|
||||
if (Options.IncludePolus.GetBool()) voteResults += $"Polus: {polusVotes}\n";
|
||||
if (Options.IncludeAirship.GetBool()) voteResults += $"Airship: {airshipVotes}\n";
|
||||
if (Options.IncludeFungle.GetBool()) voteResults += $"Fungle: {fungleVotes}\n";
|
||||
if (Options.IncludeDleks.GetBool()) voteResults += $"Dleks: {dleksVotes}\n";
|
||||
}
|
||||
voteResults = voteResults.TrimEnd();
|
||||
|
||||
if (highest == 0)
|
||||
if (highest <= 0)
|
||||
{
|
||||
ModeratorChatCommand("Lol, no one voted. Hooray for democracy?", "", false);
|
||||
}
|
||||
@@ -663,7 +699,7 @@ public static class Utils
|
||||
{
|
||||
ModeratorChatCommand(SendChatPatch.ConvertNum($"Winner: {winner} ({highest})\n\n{voteResults}"), "", false);
|
||||
|
||||
if (winner == "Eht Dleks")
|
||||
if (winner == "Dleks")
|
||||
{
|
||||
CreateOptionsPickerPatch.ApplyDleks(Utils.isHideNSeek);
|
||||
}
|
||||
@@ -701,13 +737,22 @@ public static class Utils
|
||||
|
||||
ModeVoteActive = true;
|
||||
|
||||
if (moderator) Utils.ModeratorChatCommand("A Gamemode vote is active!\n\nA: None\nB: No Kill Cooldown\nC: Speedrun\nD: SnS\nE: PnS\n\nType /vote 'letter' to vote.", "", false);
|
||||
else Utils.ChatCommand(DestroyableSingleton<HudManager>.Instance.Chat, "A Gamemode vote is active!\n\nA: None\nB: No Kill Cooldown\nC: Speedrun\nD: SnS\nE: PnS\n\nType /vote 'letter' to vote.", "", false);
|
||||
string voteMessage = "A Gamemode vote is active!\n\n";
|
||||
if (!Options.CustomizeModeVote.GetBool()) voteMessage += "A: None\nB: No Kill Cooldown\nC: Speedrun\nD: SnS\nE: PnS\n";
|
||||
if (Options.IncludeStandard.GetBool()) voteMessage += "A: None\n";
|
||||
if (Options.IncludeNoKillCooldown.GetBool()) voteMessage += "B: No Kill Cooldown\n";
|
||||
if (Options.IncludeSpeedrun.GetBool()) voteMessage += "C: Speedrun\n";
|
||||
if (Options.IncludeShiftAndSeek.GetBool()) voteMessage += "D: SnS\n";
|
||||
if (Options.IncludePoofAndSeek.GetBool()) voteMessage += "E: PnS\n";
|
||||
voteMessage += "\nType /vote 'letter' to vote.";
|
||||
|
||||
if (moderator) Utils.ModeratorChatCommand(voteMessage, "", false);
|
||||
else Utils.ChatCommand(DestroyableSingleton<HudManager>.Instance.Chat, voteMessage, "", false);
|
||||
|
||||
new LateTask(() =>
|
||||
{
|
||||
int highest = standardVotes;
|
||||
string winner = "None";
|
||||
int highest = -1;
|
||||
string winner = "";
|
||||
byte modeId = 0;
|
||||
bool tie = false;
|
||||
|
||||
@@ -726,13 +771,43 @@ public static class Utils
|
||||
}
|
||||
}
|
||||
|
||||
Check(noKillCooldownVotes, "0 Kill Cooldown", 0);
|
||||
Check(speedrunVotes, "Speedrun", 2);
|
||||
Check(shiftAndSeekVotes, "Shift and Seek", 1);
|
||||
Check(poofAndSeekVotes, "Poof and Seek", 3);
|
||||
if (!Options.CustomizeModeVote.GetBool())
|
||||
{
|
||||
Check(standardVotes, "None", 0);
|
||||
Check(noKillCooldownVotes, "0 Kill Cooldown", 0);
|
||||
Check(speedrunVotes, "Speedrun", 2);
|
||||
Check(shiftAndSeekVotes, "Shift and Seek", 1);
|
||||
Check(poofAndSeekVotes, "Poof and Seek", 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Options.IncludeStandard.GetBool()) Check(standardVotes, "None", 0);
|
||||
if (Options.IncludeNoKillCooldown.GetBool()) Check(noKillCooldownVotes, "0 Kill Cooldown", 0);
|
||||
if (Options.IncludeSpeedrun.GetBool()) Check(speedrunVotes, "Speedrun", 2);
|
||||
if (Options.IncludeShiftAndSeek.GetBool()) Check(shiftAndSeekVotes, "Shift and Seek", 1);
|
||||
if (Options.IncludePoofAndSeek.GetBool()) Check(poofAndSeekVotes, "Poof and Seek", 3);
|
||||
}
|
||||
|
||||
string voteResults = $"Standard: {standardVotes}\n" + $"No Kill Cooldown: {noKillCooldownVotes}\n" + $"Speedrun: {speedrunVotes}\n" + $"Shift and Seek: {shiftAndSeekVotes}\n" + $"Poof and Seek: {poofAndSeekVotes}";
|
||||
if (highest == 0)
|
||||
string voteResults = "";
|
||||
if (!Options.CustomizeModeVote.GetBool())
|
||||
{
|
||||
voteResults += $"Standard: {standardVotes}\n";
|
||||
voteResults += $"No Kill Cooldown: {noKillCooldownVotes}\n";
|
||||
voteResults += $"Speedrun: {speedrunVotes}\n";
|
||||
voteResults += $"Shift and Seek: {shiftAndSeekVotes}\n";
|
||||
voteResults += $"Poof and Seek: {poofAndSeekVotes}\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Options.IncludeStandard.GetBool()) voteResults += $"Standard: {standardVotes}\n";
|
||||
if (Options.IncludeNoKillCooldown.GetBool()) voteResults += $"No Kill Cooldown: {noKillCooldownVotes}\n";
|
||||
if (Options.IncludeSpeedrun.GetBool()) voteResults += $"Speedrun: {speedrunVotes}\n";
|
||||
if (Options.IncludeShiftAndSeek.GetBool()) voteResults += $"Shift and Seek: {shiftAndSeekVotes}\n";
|
||||
if (Options.IncludePoofAndSeek.GetBool()) voteResults += $"Poof and Seek: {poofAndSeekVotes}\n";
|
||||
}
|
||||
voteResults = voteResults.TrimEnd();
|
||||
|
||||
if (highest <= 0)
|
||||
{
|
||||
ModeratorChatCommand("We have a winner! Just kidding. No one voted.", "", false);
|
||||
}
|
||||
@@ -744,10 +819,10 @@ public static class Utils
|
||||
{
|
||||
ModeratorChatCommand(SendChatPatch.ConvertNum($"Winner: {winner} ({highest})\n\n{voteResults}"), "", false);
|
||||
Options.Gamemode.SetValue(modeId);
|
||||
|
||||
|
||||
if (winner == "0 Kill Cooldown")
|
||||
{
|
||||
Main.NormalOptions.KillCooldown = 0.01f;
|
||||
Main.NormalOptions.KillCooldown = 0.001f;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -756,7 +831,7 @@ public static class Utils
|
||||
speedrunVotes = 0;
|
||||
shiftAndSeekVotes = 0;
|
||||
poofAndSeekVotes = 0;
|
||||
HasVoted.Clear();
|
||||
HasModeVoted.Clear();
|
||||
|
||||
ModeVoteActive = false;
|
||||
}, Options.ModeVoteDuration.GetInt(), "ModePoll");
|
||||
|
||||
Reference in new issue
Block a user