mirror of
https://github.com/ApeMV/AmongUsRevamped.git
synced 2026-10-19 15:51:59 +00:00
Customize Sabotages, fixes, anticheat upgrades
This commit is contained in:
1 parent
2e9d32b50d
commit
7dafbcf479
16 files changed
+435
-21
No files matched your search
+1
-1
@@ -44,7 +44,7 @@ public partial class Main : BasePlugin
|
||||
|
||||
public static bool HasArgumentException;
|
||||
public static string CredentialsText;
|
||||
public const string ModVersion = "v2.0.3";
|
||||
public const string ModVersion = "v2.0.4";
|
||||
|
||||
public static float GameTimer;
|
||||
public static float AfkTimer;
|
||||
|
||||
@@ -84,7 +84,10 @@ internal static class CommandHelper
|
||||
|
||||
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[] { "/gmvote" }, Prompt = "/gmvote", Description = Translator.Get("modeVoteDesc"), HasVariable = false },
|
||||
|
||||
new Cmd { Name = new[] { "/private" }, Prompt = "/private", Description = Translator.Get("privateDesc"), HasVariable = false },
|
||||
new Cmd { Name = new[] { "/public" }, Prompt = "/public", Description = Translator.Get("publicDesc"), HasVariable = false }
|
||||
};
|
||||
|
||||
[HarmonyPostfix]
|
||||
|
||||
@@ -151,6 +151,18 @@ namespace AmongUsRevamped
|
||||
public static OptionItem DisableMushroomMixup;
|
||||
public static OptionItem DisableCloseDoor;
|
||||
|
||||
public static OptionItem TabGroupCustomizeSabotages;
|
||||
public static OptionItem CustomizeSabotages;
|
||||
public static OptionItem SabotageCooldown;
|
||||
public static OptionItem SkeldReactorDuration;
|
||||
public static OptionItem SkeldO2Duration;
|
||||
public static OptionItem MiraReactorDuration;
|
||||
public static OptionItem MiraO2Duration;
|
||||
public static OptionItem PolusReactorDuration;
|
||||
public static OptionItem AirshipReactorDuration;
|
||||
public static OptionItem FungleReactorDuration;
|
||||
public static OptionItem FungleMushroomMixupDuration;
|
||||
|
||||
public static OptionItem TabGroupGameplayGeneral;
|
||||
public static OptionItem ShieldFirstDeath;
|
||||
public static OptionItem ShieldFirstDeathDuration;
|
||||
@@ -570,6 +582,44 @@ namespace AmongUsRevamped
|
||||
DisableCloseDoor = BooleanOptionItem.Create(60463, Translator.Get("disableCloseDoor"), false, TabGroup.ModSettings, false)
|
||||
.SetColor(Color.red);
|
||||
|
||||
|
||||
TabGroupCustomizeSabotages = TextOptionItem.Create(60500, Translator.Get("tabGroupCustomizeSabotages"), TabGroup.ModSettings)
|
||||
.SetColor(Color.blue);
|
||||
CustomizeSabotages = BooleanOptionItem.Create(60501, Translator.Get("customizeSabotages"), false, TabGroup.ModSettings, false);
|
||||
|
||||
SabotageCooldown = IntegerOptionItem.Create(60502, Translator.Get("sabotageCooldown"), new(5, 60, 5), 30, TabGroup.ModSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetParent(CustomizeSabotages);
|
||||
|
||||
SkeldReactorDuration = IntegerOptionItem.Create(60503, Translator.Get("skeldReactorDuration"), new(15, 60, 5), 30, TabGroup.ModSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetParent(CustomizeSabotages);
|
||||
SkeldO2Duration = IntegerOptionItem.Create(60504, Translator.Get("skeldO2Duration"), new(15, 60, 5), 30, TabGroup.ModSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetParent(CustomizeSabotages);
|
||||
|
||||
MiraReactorDuration = IntegerOptionItem.Create(60505, Translator.Get("miraReactorDuration"), new(15, 90, 5), 45, TabGroup.ModSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetParent(CustomizeSabotages);
|
||||
MiraO2Duration = IntegerOptionItem.Create(60506, Translator.Get("miraO2Duration"), new(15, 90, 5), 45, TabGroup.ModSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetParent(CustomizeSabotages);
|
||||
|
||||
PolusReactorDuration = IntegerOptionItem.Create(60507, Translator.Get("polusReactorDuration"), new(20, 90, 5), 60, TabGroup.ModSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetParent(CustomizeSabotages);
|
||||
|
||||
AirshipReactorDuration = IntegerOptionItem.Create(60508, Translator.Get("airshipReactorDuration"), new(30, 90, 5), 90, TabGroup.ModSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetParent(CustomizeSabotages);
|
||||
|
||||
FungleReactorDuration = IntegerOptionItem.Create(60509, Translator.Get("fungleReactorDuration"), new(15, 90, 5), 60, TabGroup.ModSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetParent(CustomizeSabotages);
|
||||
FungleMushroomMixupDuration = IntegerOptionItem.Create(60510, Translator.Get("fungleMushroomMixupDuration"), new(5, 30, 5), 10, TabGroup.ModSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetParent(CustomizeSabotages);
|
||||
|
||||
TabGroupGameplayGeneral = TextOptionItem.Create(60564, Translator.Get("tabGroupGameplayGeneral"), TabGroup.ModSettings)
|
||||
.SetColor(Color.blue);
|
||||
ShieldFirstDeath = BooleanOptionItem.Create(60565, Translator.Get("shieldFirstDeath"), false, TabGroup.ModSettings, false);
|
||||
|
||||
+50
-1
@@ -107,7 +107,42 @@ internal class 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");
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case 201:
|
||||
try
|
||||
{
|
||||
var firstString = sr.ReadString();
|
||||
var secondString = sr.ReadString();
|
||||
sr.ReadInt32();
|
||||
|
||||
var flag = string.IsNullOrEmpty(firstString) && string.IsNullOrEmpty(secondString);
|
||||
|
||||
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");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -222,4 +257,18 @@ internal class EACR
|
||||
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");
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
@@ -147,6 +147,24 @@ internal static class SendChatPatch
|
||||
return false;
|
||||
}
|
||||
|
||||
if (text == "/private")
|
||||
{
|
||||
__instance.freeChatField.textArea.Clear();
|
||||
__instance.freeChatField.textArea.SetText(string.Empty);
|
||||
|
||||
if (Utils.InGame) return false;
|
||||
AmongUsClient.Instance.ChangeGamePublic(false);
|
||||
}
|
||||
|
||||
if (text == "/public")
|
||||
{
|
||||
__instance.freeChatField.textArea.Clear();
|
||||
__instance.freeChatField.textArea.SetText(string.Empty);
|
||||
|
||||
if (Utils.InGame) return false;
|
||||
AmongUsClient.Instance.ChangeGamePublic(true);
|
||||
}
|
||||
|
||||
if (text.StartsWith("/vip "))
|
||||
{
|
||||
PlayerControl target = null;
|
||||
@@ -831,6 +849,18 @@ public static class RPCHandlerPatch
|
||||
}
|
||||
}
|
||||
|
||||
if (text == "/private")
|
||||
{
|
||||
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashStartAndEndGameCmd.GetValue() || Utils.InGame) return;
|
||||
AmongUsClient.Instance.ChangeGamePublic(false);
|
||||
}
|
||||
|
||||
if (text == "/public")
|
||||
{
|
||||
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashStartAndEndGameCmd.GetValue() || Utils.InGame) return;
|
||||
AmongUsClient.Instance.ChangeGamePublic(true);
|
||||
}
|
||||
|
||||
if (text == "/s" || text == "/start")
|
||||
{
|
||||
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashStartAndEndGameCmd.GetValue()) return;
|
||||
|
||||
@@ -28,7 +28,7 @@ class NormalGameEndChecker
|
||||
public static string LastWinReason = "";
|
||||
public static List<PlayerControl> imps = new List<PlayerControl>();
|
||||
public static string firstDeath;
|
||||
public static string firstDeathString => firstDeath != null ? $"\n\nFirst death: {firstDeath}" : "";
|
||||
public static string firstDeathString => firstDeath != "" ? $"\n\nFirst death: {firstDeath}" : "";
|
||||
|
||||
public static bool Prefix()
|
||||
{
|
||||
@@ -50,20 +50,21 @@ class NormalGameEndChecker
|
||||
public static string customRoles { get; set; }
|
||||
public static void CheckWinnerText(string Winner)
|
||||
{
|
||||
var impostorList = string.Join(", ", imps.Select(p => p.Data.PlayerName));
|
||||
string impostorList = string.Join(", ", imps.Select(p => p.Data.PlayerName));
|
||||
string impostorString = impostorList != "" ? $"\n\n Impostors: {impostorList}" : "";
|
||||
|
||||
if (!canUpdateWinnerText) return;
|
||||
|
||||
if (Winner == "SnSTimer")
|
||||
{
|
||||
LastWinReason = $"Crewmates Win! (Survived {Options.CrewAutoWinsGameAfter.GetInt()}s)\n\n Impostors: " + impostorList + firstDeathString;
|
||||
LastWinReason = $"Crewmates Win! (Survived {Options.CrewAutoWinsGameAfter.GetInt()}s)" + impostorString + firstDeathString;
|
||||
canUpdateWinnerText = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Winner == "PnSTimer")
|
||||
{
|
||||
LastWinReason = $"Crewmates Win! (Survived {Options.CrewAutoWinsGameAfter.GetInt()}s)\n\n Impostors: " + impostorList + firstDeathString;
|
||||
LastWinReason = $"Crewmates Win! (Survived {Options.CrewAutoWinsGameAfter.GetInt()}s)" + impostorString + firstDeathString;
|
||||
canUpdateWinnerText = false;
|
||||
return;
|
||||
}
|
||||
@@ -77,22 +78,22 @@ class NormalGameEndChecker
|
||||
|
||||
if ((Options.Gamemode.GetValue() != 2 && Utils.AliveImpostors == 0) || Winner == "Crewmate")
|
||||
{
|
||||
LastWinReason = "Crewmates Win!\n\nImpostors: " + impostorList + firstDeathString;
|
||||
LastWinReason = "Crewmates Win!" + impostorString + firstDeathString;
|
||||
canUpdateWinnerText = false;
|
||||
}
|
||||
else if ((Options.Gamemode.GetValue() != 2 && Utils.AliveImpostors >= Utils.AliveCrewmates) || Winner == "Impostor")
|
||||
{
|
||||
LastWinReason = "Impostors Win!\n\nImpostors: " + impostorList + firstDeathString;
|
||||
LastWinReason = "Impostors Win!" + impostorString + firstDeathString;
|
||||
canUpdateWinnerText = false;
|
||||
}
|
||||
else if (GameData.Instance != null && GameData.Instance.TotalTasks > 0 && GameData.Instance.CompletedTasks >= GameData.Instance.TotalTasks || Winner == "CrewmateTasks")
|
||||
{
|
||||
LastWinReason = $"Crewmates Win! ({Options.TaskPercentNeededToWin.GetInt()}% tasks completed)\n\nImpostors: " + impostorList + firstDeathString;
|
||||
LastWinReason = $"Crewmates Win! ({Options.TaskPercentNeededToWin.GetInt()}% tasks completed)" + impostorString + firstDeathString;
|
||||
canUpdateWinnerText = false;
|
||||
}
|
||||
else if (Options.Gamemode.GetValue() < 1 || Winner == "ImpostorSabotage")
|
||||
{
|
||||
LastWinReason = "Impostors Win! (Sabotage)\n\n Impostors: " + impostorList + firstDeathString;
|
||||
LastWinReason = "Impostors Win! (Sabotage)" + impostorString + firstDeathString;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,16 @@ class ExileControllerWrapUpPatch
|
||||
PlayerControl.LocalPlayer.RpcSetRole(RoleTypes.CrewmateGhost);
|
||||
}
|
||||
}
|
||||
|
||||
if (Options.Gamemode.GetValue() == 1)
|
||||
{
|
||||
foreach (var p in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
if (p.Data == null || p.Data.IsDead || p.Data.RoleType == RoleTypes.Shapeshifter) continue;
|
||||
p.RpcProtectPlayer(p, p.cosmetics.ColorId);
|
||||
p.Data.MarkDirty();
|
||||
}
|
||||
}
|
||||
|
||||
if (ejectedPlayer == null) return;
|
||||
|
||||
|
||||
@@ -23,6 +23,12 @@ class ReportDeadBodyPatch
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!OnGameStartPatch.PastStartScreen && __instance != PlayerControl.LocalPlayer)
|
||||
{
|
||||
EACR.MeetingCheat(__instance);
|
||||
return false;
|
||||
}
|
||||
|
||||
// target == null means meeting
|
||||
|
||||
if (Options.Gamemode.GetValue() == 1 || Options.Gamemode.GetValue() == 2 || Options.Gamemode.GetValue() == 3)
|
||||
@@ -78,6 +84,16 @@ internal static class MurderPlayerPatch
|
||||
Utils.HasMurdered = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (target.Data.RoleType == RoleTypes.Impostor ||
|
||||
target.Data.RoleType == RoleTypes.Shapeshifter ||
|
||||
target.Data.RoleType == RoleTypes.Phantom ||
|
||||
target.Data.RoleType == RoleTypes.Viper ||
|
||||
target.Data.IsDead)
|
||||
{
|
||||
if (__instance != PlayerControl.LocalPlayer) return;
|
||||
EACR.MurderCheat(__instance);
|
||||
}
|
||||
}
|
||||
|
||||
if ((target == PlayerControl.LocalPlayer || PlayerControl.LocalPlayer.Data.IsDead) && !Main.DisableInfoWhenDead.Value && resultFlags.HasFlag(MurderResultFlags.Succeeded))
|
||||
@@ -96,7 +112,7 @@ internal static class MurderPlayerPatch
|
||||
}
|
||||
|
||||
//1 = Shift and Seek
|
||||
if (Options.Gamemode.GetValue() == 1 && !Utils.isHideNSeek && !resultFlags.HasFlag(MurderResultFlags.Succeeded))
|
||||
if (Options.Gamemode.GetValue() == 1 && !Utils.isHideNSeek && resultFlags.HasFlag(MurderResultFlags.FailedProtected))
|
||||
{
|
||||
if (target.Data.PlayerId == __instance.shapeshiftTargetPlayerId)
|
||||
{
|
||||
|
||||
@@ -70,6 +70,14 @@ public static class SabotageSystemTypeRepairDamagePatch
|
||||
}
|
||||
else return true;
|
||||
}
|
||||
|
||||
public static void Postfix(SabotageSystemType __instance)
|
||||
{
|
||||
if (!Options.CustomizeSabotages.GetBool() || !AmongUsClient.Instance.AmHost) return;
|
||||
|
||||
__instance.Timer = Options.SabotageCooldown.GetInt();
|
||||
__instance.IsDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(ShipStatus), nameof(ShipStatus.CloseDoorsOfType))]
|
||||
@@ -113,4 +121,155 @@ public static class MessageReaderUpdateSystemPatch
|
||||
}
|
||||
else return true;
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(ReactorSystemType))]
|
||||
public static class ReactorSystemTypePatch
|
||||
{
|
||||
private static bool SetDuration = true;
|
||||
|
||||
[HarmonyPatch(nameof(ReactorSystemType.Deteriorate))]
|
||||
[HarmonyPrefix]
|
||||
public static void Deteriorate_Prefix(ReactorSystemType __instance)
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost || Main.NormalOptions.MapId == 4 || !Options.CustomizeSabotages.GetBool()) return;
|
||||
|
||||
if (!__instance.IsActive || !ShipStatus.Instance || !SetDuration)
|
||||
{
|
||||
if (!SetDuration && !__instance.IsActive) SetDuration = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.Info($" {ShipStatus.Instance.Type} - {SetDuration}", "ReactorSystemTypePatch");
|
||||
SetDuration = false;
|
||||
|
||||
switch (ShipStatus.Instance.Type)
|
||||
{
|
||||
case ShipStatus.MapType.Ship:
|
||||
__instance.Countdown = Options.SkeldReactorDuration.GetFloat();
|
||||
return;
|
||||
case ShipStatus.MapType.Hq:
|
||||
__instance.Countdown = Options.MiraReactorDuration.GetFloat();
|
||||
return;
|
||||
case ShipStatus.MapType.Pb:
|
||||
__instance.Countdown = Options.PolusReactorDuration.GetFloat();
|
||||
return;
|
||||
case ShipStatus.MapType.Fungle:
|
||||
__instance.Countdown = Options.FungleReactorDuration.GetFloat();
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
[HarmonyPatch(nameof(ReactorSystemType.Deteriorate))]
|
||||
[HarmonyPostfix]
|
||||
public static void Deteriorate_Postfix(ReactorSystemType __instance)
|
||||
{
|
||||
if (__instance.IsActive && __instance.Countdown <= 0 && !Utils.HandlingGameEnd)
|
||||
{
|
||||
Utils.ContinueEndGame((byte)GameOverReason.ImpostorsBySabotage);
|
||||
NormalGameEndChecker.CheckWinnerText("ImpostorSabotage");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(HeliSabotageSystem))]
|
||||
public static class HeliSabotageSystemPatch
|
||||
{
|
||||
private static bool SetDuration = true;
|
||||
|
||||
[HarmonyPatch(nameof(HeliSabotageSystem.Deteriorate))]
|
||||
[HarmonyPrefix]
|
||||
public static void Deteriorate_Prefix(HeliSabotageSystem __instance)
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost || Main.NormalOptions.MapId != 4 || !Options.CustomizeSabotages.GetBool()) return;
|
||||
|
||||
if (!__instance.IsActive || !ShipStatus.Instance || !SetDuration)
|
||||
{
|
||||
if (!SetDuration && !__instance.IsActive) SetDuration = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.Info($" {ShipStatus.Instance.Type} - {SetDuration}", "HeliSabotageSystemPatch");
|
||||
SetDuration = false;
|
||||
|
||||
__instance.Countdown = Options.AirshipReactorDuration.GetFloat();
|
||||
}
|
||||
[HarmonyPatch(nameof(HeliSabotageSystem.Deteriorate))]
|
||||
[HarmonyPostfix]
|
||||
public static void Deteriorate_Postfix(HeliSabotageSystem __instance)
|
||||
{
|
||||
if (__instance.IsActive && __instance.Countdown <= 0 && !Utils.HandlingGameEnd)
|
||||
{
|
||||
Utils.ContinueEndGame((byte)GameOverReason.ImpostorsBySabotage);
|
||||
NormalGameEndChecker.CheckWinnerText("ImpostorSabotage");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(LifeSuppSystemType))]
|
||||
public static class LifeSuppSystemTypePatch
|
||||
{
|
||||
private static bool SetDuration = true;
|
||||
|
||||
[HarmonyPatch(nameof(LifeSuppSystemType.Deteriorate))]
|
||||
[HarmonyPrefix]
|
||||
public static void Deteriorate_Prefix(LifeSuppSystemType __instance)
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost || Main.NormalOptions.MapId == 2 || Main.NormalOptions.MapId == 4 || Main.NormalOptions.MapId == 5 || !Options.CustomizeSabotages.GetBool()) return;
|
||||
|
||||
if (!__instance.IsActive || !ShipStatus.Instance || !SetDuration)
|
||||
{
|
||||
if (!SetDuration && !__instance.IsActive) SetDuration = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.Info($" {ShipStatus.Instance.Type} - {SetDuration}", "LifeSuppSystemType");
|
||||
SetDuration = false;
|
||||
|
||||
switch (ShipStatus.Instance.Type)
|
||||
{
|
||||
case ShipStatus.MapType.Ship:
|
||||
__instance.Countdown = Options.SkeldO2Duration.GetFloat();
|
||||
return;
|
||||
case ShipStatus.MapType.Hq:
|
||||
__instance.Countdown = Options.MiraO2Duration.GetFloat();
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
[HarmonyPatch(nameof(LifeSuppSystemType.Deteriorate))]
|
||||
[HarmonyPostfix]
|
||||
public static void Deteriorate_Postfix(LifeSuppSystemType __instance)
|
||||
{
|
||||
if (__instance.IsActive && __instance.Countdown <= 0 && !Utils.HandlingGameEnd)
|
||||
{
|
||||
Utils.ContinueEndGame((byte)GameOverReason.ImpostorsBySabotage);
|
||||
NormalGameEndChecker.CheckWinnerText("ImpostorSabotage");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(MushroomMixupSabotageSystem), nameof(MushroomMixupSabotageSystem.Deteriorate))]
|
||||
public static class MushroomMixupSabotageSystemPatch
|
||||
{
|
||||
private static bool SetDuration = true;
|
||||
public static void Prefix(MushroomMixupSabotageSystem __instance, ref bool __state)
|
||||
{
|
||||
__state = __instance.IsActive;
|
||||
|
||||
if (!AmongUsClient.Instance.AmHost || Main.NormalOptions.MapId != 5 || !Options.CustomizeSabotages.GetBool()) return;
|
||||
|
||||
if (!__instance.IsActive || !ShipStatus.Instance || !SetDuration)
|
||||
{
|
||||
if (!SetDuration && !__instance.IsActive) SetDuration = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.Info($" {ShipStatus.Instance.Type} - {SetDuration}", "MushroomMixupSabotageSystem");
|
||||
SetDuration = false;
|
||||
|
||||
__instance.currentSecondsUntilHeal = Options.FungleMushroomMixupDuration.GetFloat();
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@
|
||||
<img src="https://github.com/astra1dev/AUnlocker/assets/90265231/14226f03-a003-4efc-b27b-6df53fb394d6" width=410 height=240>****
|
||||
|
||||
|
||||
# 🎮 Features (v2.0.3):
|
||||
# 🎮 Features (v2.0.4):
|
||||
|
||||
## <b>♠️ Client Side settings:</b>
|
||||
- Toggle Game Master (Spectator)
|
||||
@@ -63,6 +63,7 @@
|
||||
- Automatically Send Map Votes
|
||||
- Enable (configurable) Welcome Messages from Templates.txt
|
||||
## <b>🔧 Gameplay Settings:</b>
|
||||
- Change sabotage cooldown and durations
|
||||
- Dead impostors can sabotage
|
||||
- Disable critical sabotages (invividual)
|
||||
- Disable door sabotages
|
||||
@@ -84,8 +85,9 @@
|
||||
- Detect invalid sabotages
|
||||
- Detect malformed RPC's
|
||||
- Detect invalid venting
|
||||
- Detect Invalid animations
|
||||
- Detect Invalid task completions
|
||||
- Detect invalid animations
|
||||
- Detect invalid task completions
|
||||
- Detect invalid kills
|
||||
- Detect immortality cheats
|
||||
- Block attempted votekicks
|
||||
- These are all enabled by default
|
||||
@@ -141,6 +143,8 @@
|
||||
| /mapvote | Starts a vote for the map. Default maps only |
|
||||
| /allmapvote | Starts a vote for the map. Includes Eht Dleks |
|
||||
| /gmvote | Starts a vote for the gamemode |
|
||||
| /private | Sets lobby to private |
|
||||
| /public | Sets lobby to public |
|
||||
|
||||
|
||||
**Credit to these mods and their developers for their code:**
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
"slashKickCmd": "Who Can Use /kick & /ckick",
|
||||
"slashBanCmd": "Who Can Use /ban & /cban",
|
||||
"slashEndMeetingCmd": "Who Can Use /endmeeting",
|
||||
"slashStartAndEndGameCmd": "Who Can Use /startgame & /endgame",
|
||||
"slashStartAndEndGameCmd": "Who Can Use /start & /endgame",
|
||||
|
||||
"tabGroupCrewmate": "Crewmate Roles",
|
||||
"tabGroupNeutral": "Neutral Roles",
|
||||
@@ -98,12 +98,25 @@
|
||||
"snsDisableHeli": "Disable Crash Course Sabotage",
|
||||
"snsDisableMushroomMixup": "Disable Mushroom Mixup Sabotage",
|
||||
"snsDisableCloseDoor": "Disable SnS Door Sabotages",
|
||||
|
||||
"tabGroupCustomizeSabotages": "Customize Sabotages",
|
||||
"customizeSabotages": "Enable Sabotage Customizations",
|
||||
"sabotageCooldown": "Critical Sabotage Cooldown",
|
||||
"skeldReactorDuration": "Skeld Reactor Duration",
|
||||
"skeldO2Duration": "Skeld O2 Duration",
|
||||
"miraReactorDuration": "Mira Reactor Duration",
|
||||
"miraO2Duration": "Mira O2 Duration",
|
||||
"polusReactorDuration": "Polus Reactor Duration",
|
||||
"airshipReactorDuration": "Airship Reactor Duration",
|
||||
"fungleReactorDuration": "Fungle Reactor Duration",
|
||||
"fungleMushroomMixupDuration": "Fungle Mixup Duration",
|
||||
|
||||
"tabGroupSpeedrun": "Speedrun",
|
||||
"speedrunSettingsOverride": "Auto Update Settings",
|
||||
"gameAutoEndsAfter": "Game automatically ends after",
|
||||
"engineerMode": "Everyone Is Engineer",
|
||||
|
||||
"tabGroupSabotages": "Sabotages",
|
||||
"tabGroupSabotages": "Disable Sabotages",
|
||||
"deadImpostorsCanSabotage": "Dead Impostors Can Sabotage",
|
||||
"disableSabotage": "Disable Critical Sabotages",
|
||||
"disableReactor": "Disable Reactor Sabotage",
|
||||
@@ -298,6 +311,8 @@
|
||||
"mapVoteDesc": "Starts a vote between the 5 core maps.",
|
||||
"allMapVoteDesc": "Starts a vote between all 6 maps, including Eht Dleks.",
|
||||
"modeVoteDesc": "Starts a vote between all gamemodes.",
|
||||
"privateDesc": "Changes lobby visibility to private.",
|
||||
"publicDesc": "Changes lobby visibility to public.",
|
||||
|
||||
"banWordKick": "{0} was kicked because they sent a word in DeniedWords.txt {1} time(s)",
|
||||
"startWordKick": "{0} was kicked because they sent a word in StartWords.txt {1} time(s)",
|
||||
|
||||
@@ -73,6 +73,19 @@
|
||||
"snsDisableHeli": "Disabilita Sabotaggio Collisione",
|
||||
"snsDisableMushroomMixup": "Disabilita Sabotaggio Caos dei Funghi",
|
||||
"snsDisableCloseDoor": "Disabilita Sabotaggio Porte in Modalità Clone",
|
||||
|
||||
"tabGroupCustomizeSabotages": "Customize Sabotages",
|
||||
"customizeSabotages": "Enable Sabotage Customizations",
|
||||
"sabotageCooldown": "Critical Sabotage Cooldown",
|
||||
"skeldReactorDuration": "Skeld Reactor Duration",
|
||||
"skeldO2Duration": "Skeld O2 Duration",
|
||||
"miraReactorDuration": "Mira Reactor Duration",
|
||||
"miraO2Duration": "Mira O2 Duration",
|
||||
"polusReactorDuration": "Polus Reactor Duration",
|
||||
"airshipReactorDuration": "Airship Reactor Duration",
|
||||
"fungleReactorDuration": "Fungle Reactor Duration",
|
||||
"fungleMushroomMixupDuration": "Fungle Mixup Duration",
|
||||
|
||||
"tabGroupSpeedrun": "Speedrun",
|
||||
"speedrunSettingsOverride": "Aggiorna Automaticamente Impostazioni",
|
||||
"gameAutoEndsAfter": "La partita finisce automaticamente dopo",
|
||||
|
||||
@@ -76,6 +76,19 @@
|
||||
"snsDisableHeli": "墜落危険サボタージュを無効化",
|
||||
"snsDisableMushroomMixup": "キノコシャッフルサボタージュを無効化",
|
||||
"snsDisableCloseDoor": "SnSドア閉鎖を無効化",
|
||||
|
||||
"tabGroupCustomizeSabotages": "Customize Sabotages",
|
||||
"customizeSabotages": "Enable Sabotage Customizations",
|
||||
"sabotageCooldown": "Critical Sabotage Cooldown",
|
||||
"skeldReactorDuration": "Skeld Reactor Duration",
|
||||
"skeldO2Duration": "Skeld O2 Duration",
|
||||
"miraReactorDuration": "Mira Reactor Duration",
|
||||
"miraO2Duration": "Mira O2 Duration",
|
||||
"polusReactorDuration": "Polus Reactor Duration",
|
||||
"airshipReactorDuration": "Airship Reactor Duration",
|
||||
"fungleReactorDuration": "Fungle Reactor Duration",
|
||||
"fungleMushroomMixupDuration": "Fungle Mixup Duration",
|
||||
|
||||
"tabGroupSpeedrun": "スピードラン",
|
||||
"speedrunSettingsOverride": "設定を自動更新",
|
||||
"gameAutoEndsAfter": "ゲームの自動終了時間",
|
||||
@@ -349,5 +362,8 @@
|
||||
"shieldFirstDeathDuration": "シールド持続時間",
|
||||
"snsTwoDesc": "Shift and Seekの拡張説明を送信。",
|
||||
"modeVoteDesc": "すべてのゲームモードから投票を開始します。",
|
||||
"automaticModePoll": "再参加後に自動で /gmvote を実行"
|
||||
"automaticModePoll": "再参加後に自動で /gmvote を実行",
|
||||
|
||||
"privateDesc": "Changes lobby visibility to private.",
|
||||
"publicDesc": "Changes lobby visibility to public."
|
||||
}
|
||||
@@ -73,6 +73,19 @@
|
||||
"snsDisableHeli": "Выключить Сабботаж Столкновения",
|
||||
"snsDisableMushroomMixup": "Выключить Сабботаж Грибного Переполоха",
|
||||
"snsDisableCloseDoor": "Выключить Сабботаж Дверей в Режиме Клона",
|
||||
|
||||
"tabGroupCustomizeSabotages": "Customize Sabotages",
|
||||
"customizeSabotages": "Enable Sabotage Customizations",
|
||||
"sabotageCooldown": "Critical Sabotage Cooldown",
|
||||
"skeldReactorDuration": "Skeld Reactor Duration",
|
||||
"skeldO2Duration": "Skeld O2 Duration",
|
||||
"miraReactorDuration": "Mira Reactor Duration",
|
||||
"miraO2Duration": "Mira O2 Duration",
|
||||
"polusReactorDuration": "Polus Reactor Duration",
|
||||
"airshipReactorDuration": "Airship Reactor Duration",
|
||||
"fungleReactorDuration": "Fungle Reactor Duration",
|
||||
"fungleMushroomMixupDuration": "Fungle Mixup Duration",
|
||||
|
||||
"tabGroupSpeedrun": "Спидран",
|
||||
"speedrunSettingsOverride": "Автоматически Обновлять Настройки",
|
||||
"gameAutoEndsAfter": "Игра автоматически заканчивается после",
|
||||
@@ -350,5 +363,8 @@
|
||||
"shieldFirstDeathDuration": "Длительность Щита",
|
||||
"snsTwoDesc": "Отправить Увеличенное Описание Клона.",
|
||||
"modeVoteDesc": "Начать Голосование между всеми режимами.",
|
||||
"automaticModePoll": "Автоматический /gmvote После Перезахода"
|
||||
"automaticModePoll": "Автоматический /gmvote После Перезахода",
|
||||
|
||||
"privateDesc": "Changes lobby visibility to private.",
|
||||
"publicDesc": "Changes lobby visibility to public."
|
||||
}
|
||||
@@ -76,6 +76,19 @@
|
||||
"snsDisableHeli": "禁用坠机危机破坏",
|
||||
"snsDisableMushroomMixup": "禁用迷幻蘑菇破坏",
|
||||
"snsDisableCloseDoor": "禁用 SnS 关门破坏",
|
||||
|
||||
"tabGroupCustomizeSabotages": "Customize Sabotages",
|
||||
"customizeSabotages": "Enable Sabotage Customizations",
|
||||
"sabotageCooldown": "Critical Sabotage Cooldown",
|
||||
"skeldReactorDuration": "Skeld Reactor Duration",
|
||||
"skeldO2Duration": "Skeld O2 Duration",
|
||||
"miraReactorDuration": "Mira Reactor Duration",
|
||||
"miraO2Duration": "Mira O2 Duration",
|
||||
"polusReactorDuration": "Polus Reactor Duration",
|
||||
"airshipReactorDuration": "Airship Reactor Duration",
|
||||
"fungleReactorDuration": "Fungle Reactor Duration",
|
||||
"fungleMushroomMixupDuration": "Fungle Mixup Duration",
|
||||
|
||||
"tabGroupSpeedrun": "速通模式 (Speedrun)",
|
||||
"speedrunSettingsOverride": "自动更新设置",
|
||||
"gameAutoEndsAfter": "游戏在此时间后自动结束",
|
||||
@@ -336,5 +349,8 @@
|
||||
"shieldFirstDeathDuration": "护盾持续时间",
|
||||
"snsTwoDesc": "发送 Shift and Seek 扩展说明。",
|
||||
"modeVoteDesc": "在所有游戏模式之间发起投票。",
|
||||
"automaticModePoll": "重新加入后自动执行 /gmvote"
|
||||
"automaticModePoll": "重新加入后自动执行 /gmvote",
|
||||
|
||||
"privateDesc": "Changes lobby visibility to private.",
|
||||
"publicDesc": "Changes lobby visibility to public."
|
||||
}
|
||||
@@ -94,6 +94,19 @@
|
||||
"snsDisableHeli": "Desactivar sabotaje de Crash Course",
|
||||
"snsDisableMushroomMixup": "Desactivar sabotaje de mezcla de hongos",
|
||||
"snsDisableCloseDoor": "Desactivar sabotajes de puertas de SnS",
|
||||
|
||||
"tabGroupCustomizeSabotages": "Customize Sabotages",
|
||||
"customizeSabotages": "Enable Sabotage Customizations",
|
||||
"sabotageCooldown": "Critical Sabotage Cooldown",
|
||||
"skeldReactorDuration": "Skeld Reactor Duration",
|
||||
"skeldO2Duration": "Skeld O2 Duration",
|
||||
"miraReactorDuration": "Mira Reactor Duration",
|
||||
"miraO2Duration": "Mira O2 Duration",
|
||||
"polusReactorDuration": "Polus Reactor Duration",
|
||||
"airshipReactorDuration": "Airship Reactor Duration",
|
||||
"fungleReactorDuration": "Fungle Reactor Duration",
|
||||
"fungleMushroomMixupDuration": "Fungle Mixup Duration",
|
||||
|
||||
"tabGroupSpeedrun": "Speedrun",
|
||||
"speedrunSettingsOverride": "Actualizar configuración automáticamente",
|
||||
"gameAutoEndsAfter": "La partida termina automáticamente después de",
|
||||
@@ -306,5 +319,8 @@
|
||||
"shieldFirstDeathDuration": "Duración de la protección",
|
||||
"snsTwoDesc": "Enviar la descripción ampliada de Shift and Seek.",
|
||||
"modeVoteDesc": "Inicia una votación entre todos los modos de juego.",
|
||||
"automaticModePoll": "/gmvote automático al volver a la sala"
|
||||
"automaticModePoll": "/gmvote automático al volver a la sala",
|
||||
|
||||
"privateDesc": "Changes lobby visibility to private.",
|
||||
"publicDesc": "Changes lobby visibility to public."
|
||||
}
|
||||
Reference in new issue
Block a user