Compare commits

...
11 Commits
Author SHA1 Message Date
Ape cbc66948c0 1.8.2 2026-06-15 15:51:36 +02:00
Ape f456eb63d5 1.8.1 2026-06-12 11:51:57 +02:00
Ape 8e013830b6 1.8.0 2026-06-07 13:52:31 +02:00
Ape 5e74dd1f84 1.7.7 2026-06-05 12:56:13 +02:00
Ape ca39da4d64 fix (3) 2026-06-04 15:35:43 +02:00
Ape 5558350749 fix (2) 2026-06-04 15:34:20 +02:00
Ape 9a0b38c276 Fix 2026-06-04 15:31:03 +02:00
Ape 0f2516fdf5 Mostly bug fixes, some changes 2026-06-04 15:17:19 +02:00
Ape 3ead1b0a69 Whoops 2026-06-02 21:30:07 +02:00
Ape 4e912082db A few small changes 2026-06-02 17:42:13 +02:00
Ape 3c380c1b51 1.7.4 2026-05-31 00:54:48 +02:00
22 changed files with 938 additions and 306 deletions

No files matched your search

+8 -2
View File
@@ -35,6 +35,7 @@ public partial class Main : BasePlugin
public static ConfigEntry<bool> DarkTheme { get; private set; }
public static ConfigEntry<bool> LobbyMusic { get; private set; }
public static ConfigEntry<bool> DisableInfoWhenDead { get; private set; }
public static ConfigEntry<bool> DisableCommandHelper { get; private set; }
public static NormalGameOptionsV10 NormalOptions => GameOptionsManager.Instance != null ? GameOptionsManager.Instance.currentNormalGameOptions : null;
public static HideNSeekGameOptionsV10 HideNSeekOptions => GameOptionsManager.Instance != null ? GameOptionsManager.Instance.currentHideNSeekGameOptions : null;
@@ -42,11 +43,12 @@ public partial class Main : BasePlugin
public static bool HasArgumentException;
public static string CredentialsText;
public const string ModVersion = "v1.7.3";
public const string ModVersion = "v1.8.2";
public static float GameTimer;
public static readonly Dictionary<int, int> SayStartTimes = [];
public static readonly Dictionary<int, int> SayDeniedWordTimes = [];
public static PlayerControl[] AllPlayerControls
{
@@ -90,11 +92,15 @@ public partial class Main : BasePlugin
DarkTheme = Config.Bind("Client Options", "Dark Theme", false);
LobbyMusic = Config.Bind("Client Options", "Lobby Music", false);
DisableInfoWhenDead = Config.Bind("Client Options", "Disable Task/Kill View", false);
DisableCommandHelper = Config.Bind("Client Options", "Disable Command Helper", false);
Translator.Init();
Translator.Reload();
BanManager.Init();
Harmony.PatchAll();
ConsoleManager.DetachConsole();
}
[HarmonyPatch(typeof(ModManager), nameof(ModManager.LateUpdate))]
+1 -1
View File
@@ -18,7 +18,7 @@
<ItemGroup>
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.735" ExcludeAssets="runtime;native" />
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2026.3.31" PrivateAssets="all" Condition="'$(Configuration)' == 'Release'"/>
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2026.6.5" PrivateAssets="all" Condition="'$(Configuration)' == 'Release'"/>
<PackageReference Include="AmongUs.GameLibs.Android" Version="2025.10.14" PrivateAssets="all" Condition="'$(Configuration)' == 'Android'"/>
<PackageReference Include="BepInEx.AutoPlugin" Version="1.1.0" PrivateAssets="all" />
+56 -49
View File
@@ -23,9 +23,9 @@ public static class BanManager
private static readonly string DenyNameListPath = $"{DataPath}/AUR-DATA/Deniednames.txt";
private static string BanListPath = $"{DataPath}/AUR-DATA/Banlist.txt";
private static string BanWordPath = $"{DataPath}/AUR-DATA/Deniedwords.txt";
private static string VipListPath = $"{DataPath}/AUR-DATA/VIP.txt";
private static string ModeratorListPath = $"{DataPath}/AUR-DATA/Moderator.txt";
private static string AdminListPath = $"{DataPath}/AUR-DATA/Admin.txt";
public static string VipListPath = $"{DataPath}/AUR-DATA/VIP.txt";
public static string ModeratorListPath = $"{DataPath}/AUR-DATA/Moderator.txt";
public static string AdminListPath = $"{DataPath}/AUR-DATA/Admin.txt";
private static string TemplatePath = $"{DataPath}/AUR-DATA/Templates.txt";
public static Dictionary<string, string> Templates = new();
public static List<string> TempBanWhiteList = [];
@@ -35,48 +35,13 @@ public static class BanManager
{
if (!Directory.Exists($"{DataPath}/AUR-DATA")) Directory.CreateDirectory($"{DataPath}/AUR-DATA");
if (!File.Exists(DenyNameListPath))
{
Logger.Warn("Creating a new DenyNameList.txt file", "BanManager");
File.Create(DenyNameListPath).Close();
File.WriteAllText(DenyNameListPath, Translator.Get("bannameWelcome"));
}
if (!File.Exists(BanListPath))
{
Logger.Warn("Creating a new Banlist.txt file", "BanManager");
File.Create(BanListPath).Close();
File.WriteAllText(BanListPath, Translator.Get("banlistWelcome"));
}
if (!File.Exists(BanWordPath))
{
Logger.Warn("Creating a new Banlist.txt file", "BanManager");
File.Create(BanWordPath).Close();
File.WriteAllText(BanWordPath, Translator.Get("banwordWelcome"));
}
if (!File.Exists(VipListPath))
{
Logger.Warn("Creating a new VIP.txt file", "BanManager");
File.Create(VipListPath).Close();
File.WriteAllText(VipListPath, Translator.Get("vipWelcome"));
}
if (!File.Exists(ModeratorListPath))
{
Logger.Warn("Creating a new Moderator.txt file", "BanManager");
File.Create(ModeratorListPath).Close();
File.WriteAllText(ModeratorListPath, Translator.Get("moderatorWelcome"));
}
if (!File.Exists(AdminListPath))
{
Logger.Warn("Creating a new Admin.txt file", "BanManager");
File.Create(AdminListPath).Close();
File.WriteAllText(AdminListPath, Translator.Get("adminWelcome"));
}
if (!File.Exists(TemplatePath))
{
Logger.Warn("Creating a new Templates.txt file", "BanManager");
File.Create(TemplatePath).Close();
File.WriteAllText(TemplatePath, Translator.Get("templateWelcome"));
}
CheckFile(DenyNameListPath, Translator.Get("bannameWelcome"), "DeniedNames.txt");
CheckFile(BanListPath, Translator.Get("banlistWelcome"), "Banlist.txt");
CheckFile(BanWordPath, Translator.Get("banwordWelcome"), "DeniedWords.txt");
CheckFile(VipListPath, Translator.Get("vipWelcome"), "VIP.txt");
CheckFile(ModeratorListPath, Translator.Get("moderatorWelcome"), "Moderator.txt");
CheckFile(AdminListPath, Translator.Get("adminWelcome"), "Admin.txt");
CheckFile(TemplatePath, Translator.Get("templateWelcome"), "Templates.txt");
LoadTemplates();
@@ -205,17 +170,28 @@ public static class BanManager
{
if (input == "" || !AmongUsClient.Instance.AmHost || Utils.CheckAccessLevel(player.Data.FriendCode) > 0) return false;
int clientId = player.Data.ClientId;
var bannedWords = File.ReadAllLines(BanWordPath).Where(x => !x.StartsWith("#"));
if (bannedWords.Where(code => !string.IsNullOrWhiteSpace(code)).Any(code => input.Contains(code, StringComparison.OrdinalIgnoreCase)))
{
AmongUsClient.Instance.KickPlayer(player.Data.ClientId, false);
Logger.Info($" {player.Data.PlayerName} was kicked because they sent a banned word", "Kick");
Logger.SendInGame($"{player.Data.PlayerName} was kicked because they sent a banned word");
if (!Main.SayDeniedWordTimes.ContainsKey(clientId))
{
Main.SayDeniedWordTimes.Add(clientId, 0);
}
Main.SayDeniedWordTimes[clientId]++;
if (Main.SayDeniedWordTimes[clientId] >= Options.DeniedWordsToKick.GetInt())
{
AmongUsClient.Instance.KickPlayer(clientId, false);
Logger.Info(Translator.Get("banWordKick", player.Data.PlayerName, Options.DeniedWordsToKick.GetInt()), "DeniedWordKick");
Logger.SendInGame(Translator.Get("banWordKick", player.Data.PlayerName, Options.DeniedWordsToKick.GetInt()));
}
return true;
}
else return false;
}
[HarmonyPatch(typeof(BanMenu), nameof(BanMenu.Select))]
@@ -252,4 +228,35 @@ public static class BanManager
if (!Templates.ContainsKey(key)) Templates.Add(key, value);
}
}
private static void CheckFile(string path, string defaultContent, string name)
{
try
{
if (!File.Exists(path))
{
Logger.Warn($"Creating a new {name} file", "BanManager");
File.WriteAllText(path, defaultContent);
}
}
catch (Exception ex)
{
Logger.Exception(ex, "BanManager");
}
}
public static string CheckTemplate(string text)
{
Dictionary<string, string> variables = new()
{
{ "ModVersion", Main.ModVersion }
};
foreach (var kvp in variables)
{
text = text.Replace($"{{{kvp.Key}}}", kvp.Value);
}
return text;
}
}
+156
View File
@@ -0,0 +1,156 @@
using InnerNet;
using System;
using System.IO;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
namespace AmongUsRevamped;
[HarmonyPatch(typeof(TextBoxTMP), nameof(TextBoxTMP.SetText))]
internal static class CommandHelper
{
private static TextMeshPro HelperText;
public class Cmd
{
public string[] Name;
public string Prompt;
public string Description;
public bool HasVariable;
}
static readonly List<Cmd> Commands = new()
{
new Cmd { Name = new[] { "/help" }, Prompt = "/help", Description = Translator.Get("helpDesc"), HasVariable = false },
new Cmd { Name = new[] { "/sns" }, Prompt = "/sns", Description = Translator.Get("snsDesc"), HasVariable = false },
new Cmd { Name = new[] { "/shiftandseek" }, Prompt = "/shiftandseek", Description = Translator.Get("snsDesc"), HasVariable = false },
new Cmd { Name = new[] { "/0kc" }, Prompt = "/0kc", Description = Translator.Get("0kcDesc"), HasVariable = false },
new Cmd { Name = new[] { "/0killcooldown" }, Prompt = "/0killcooldown", Description = Translator.Get("0kcDesc"), HasVariable = false },
new Cmd { Name = new[] { "/sr" }, Prompt = "/sr", Description = Translator.Get("SrDesc"), HasVariable = false },
new Cmd { Name = new[] { "/speedrun" }, Prompt = "/speedrun", Description = Translator.Get("SrDesc"), HasVariable = false },
new Cmd { Name = new[] { "/eg" }, Prompt = "/eg", Description = Translator.Get("egDesc"), HasVariable = false },
new Cmd { Name = new[] { "/endgame" }, Prompt = "/endgame", Description = Translator.Get("egDesc"), HasVariable = false },
new Cmd { Name = new[] { "/em" }, Prompt = "/em", Description = Translator.Get("emDesc"), HasVariable = false },
new Cmd { Name = new[] { "/endmeeting" }, Prompt = "/endmeeting", Description = Translator.Get("emDesc"), HasVariable = false },
new Cmd { Name = new[] { "/aur" }, Prompt = "/aur", Description = Translator.Get("aurDesc"), HasVariable = false },
new Cmd { Name = new[] { "/socials" }, Prompt = "/socials", Description = Translator.Get("aurDesc"), HasVariable = false },
new Cmd { Name = new[] { "/s" }, Prompt = "/s", Description = Translator.Get("sDesc"), HasVariable = false },
new Cmd { Name = new[] { "/start" }, Prompt = "/start", Description = Translator.Get("sDesc"), HasVariable = false },
new Cmd { Name = new[] { "/r" }, Prompt = "/r {role}", Description = Translator.Get("rDesc"), HasVariable = true },
new Cmd { Name = new[] { "/roles" }, Prompt = "/roles", Description = Translator.Get("rolesDesc"), HasVariable = false },
new Cmd { Name = new[] { "/kick" }, Prompt = "/kick {name}", Description = Translator.Get("kickDesc"), HasVariable = true },
new Cmd { Name = new[] { "/ckick" }, Prompt = "/ckick {color}", Description = Translator.Get("ckickDesc"), HasVariable = true },
new Cmd { Name = new[] { "/ban" }, Prompt = "/ban {name}", Description = Translator.Get("banDesc"), HasVariable = true },
new Cmd { Name = new[] { "/cban" }, Prompt = "/cban {color}", Description = Translator.Get("cbanDesc"), HasVariable = true },
new Cmd { Name = new[] { "/dump" }, Prompt = "/dump", Description = Translator.Get("dumpDesc"), HasVariable = false },
new Cmd { Name = new[] { "/col" }, Prompt = "/col {color}", Description = Translator.Get("colDesc"), HasVariable = true },
new Cmd { Name = new[] { "/color" }, Prompt = "/color {color}", Description = Translator.Get("colDesc"), HasVariable = true },
new Cmd { Name = new[] { "/colour" }, Prompt = "/colour {color}", Description = Translator.Get("colDesc"), HasVariable = true },
new Cmd { Name = new[] { "/reload" }, Prompt = "/reload", Description = Translator.Get("reloadDesc"), HasVariable = false },
new Cmd { Name = new[] { "/vip" }, Prompt = "/vip {name}", Description = Translator.Get("vipDesc"), HasVariable = true },
new Cmd { Name = new[] { "/moderator" }, Prompt = "/moderator {name}", Description = Translator.Get("moderatorDesc"), HasVariable = true },
new Cmd { Name = new[] { "/admin" }, Prompt = "/admin {name}", Description = Translator.Get("adminDesc"), HasVariable = true },
new Cmd { Name = new[] { "/removevip" }, Prompt = "/removevip {name}", Description = Translator.Get("cremoveVipDesc"), HasVariable = true },
new Cmd { Name = new[] { "/removemoderator" }, Prompt = "/removemoderator {name}", Description = Translator.Get("removeModeratorDesc"), HasVariable = true },
new Cmd { Name = new[] { "/removeadmin" }, Prompt = "/removeadmin {name}", Description = Translator.Get("removeAdminDesc"), HasVariable = true },
new Cmd { Name = new[] { "/lastgame" }, Prompt = "/lastgame", Description = Translator.Get("lastgameDesc"), HasVariable = false },
new Cmd { Name = new[] { "/t" }, Prompt = "/t {template}", Description = Translator.Get("templateDesc"), HasVariable = true }
};
[HarmonyPostfix]
public static void Postfix(TextBoxTMP __instance)
{
if (!HudManager.InstanceExists || HudManager.Instance.Chat == null || HudManager.Instance.Chat.freeChatField == null || HudManager.Instance.Chat.freeChatField.textArea == null || __instance != HudManager.Instance.Chat.freeChatField.textArea) return;
if (Main.DisableCommandHelper.Value || !AmongUsClient.Instance.AmHost)
{
if (HelperText != null) HelperText.enabled = false;
return;
}
if (!HelperText)
{
HelperText = Object.Instantiate(__instance.outputText, __instance.outputText.transform.parent);
HelperText.name = "HelperText";
HelperText.color = new Color(0.7f, 0.7f, 0.7f, 0.7f);
HelperText.transform.localPosition = __instance.outputText.transform.localPosition;
HelperText.enabled = false;
}
string t = __instance.text;
if (string.IsNullOrEmpty(t) || !t.StartsWith("/"))
{
HelperText.enabled = false;
return;
}
string textCmd = t.Split(' ')[0];
Cmd u = null;
Cmd v = null;
foreach (var cmd in Commands)
{
foreach (var a in cmd.Name)
{
string aliasCmd = a;
if (aliasCmd.Equals(textCmd))
{
v = cmd;
u = cmd;
break;
}
if (aliasCmd.StartsWith(textCmd))
{
u ??= cmd;
}
}
if (v != null) break;
}
if (v != null && !v.HasVariable && t.Length > textCmd.Length)
{
HelperText.enabled = false;
return;
}
__instance.outputText.enabled = true;
if (v != null && textCmd.Equals(v.Name[0]))
{
HelperText.text = $"\n\n<size=80%><color=#FF0000>{v.Description}</color></size>";
}
else if (u != null)
{
HelperText.text = u.Prompt;
}
else
{
HelperText.enabled = false;
return;
}
HelperText.enabled = true;
}
}
+24 -15
View File
@@ -58,24 +58,34 @@ namespace AmongUsRevamped
public static readonly string[] crewmateAbilities =
{
"Mayor", "Workhorse", "Jester", "Speedrunner", "None"
"Mayor", "Workhorse", "Jester", "Tasker", "None"
};
public static readonly string[] impostorAbilities =
{
"Tyrant", "Stealer", "Juggernaut", "None"
};
public static readonly string[] languages =
{
"English", "French"
};
//System
public static OptionItem Language;
public static OptionItem Gamemode;
public static OptionItem TabGroupMain;
public static OptionItem KickLowLevelPlayer;
public static OptionItem DontKickLevelOnes;
public static OptionItem TempBanLowLevelPlayer;
public static OptionItem KickInvalidFriendCodes;
public static OptionItem TempBanInvalidFriendCodes;
public static OptionItem DeniedWordsToKick;
public static OptionItem AutoKickStart;
public static OptionItem AutoKickStartAsBan;
public static OptionItem AutoKickStartTimes;
@@ -88,6 +98,8 @@ namespace AmongUsRevamped
public static OptionItem AutoStartTimer;
public static OptionItem WaitAutoStart;
public static OptionItem PlayerAutoStart;
public static OptionItem EnableJoinMessages;
public static OptionItem MessagePerPlayerNum;
public static OptionItem TabGroupMisc;
@@ -100,7 +112,6 @@ namespace AmongUsRevamped
public static OptionItem SlashColorCmd;
public static OptionItem SlashRolesAndGamemodeCmd;
public static OptionItem SlashLastGameCmd;
public static OptionItem SlashHelpAndAurCmd;
public static OptionItem SlashKickCmd;
public static OptionItem SlashBanCmd;
public static OptionItem SlashEndMeetingCmd;
@@ -258,11 +269,6 @@ namespace AmongUsRevamped
public static OptionItem DisableSubmitScan;
public static OptionItem DisableUploadData;
// Gamemode
/*
public static OptionItem TabGroupStandard;
public static OptionItem ChatBeforeFirstMeeting;
*/
public static OptionItem TabGroupHNS;
public static OptionItem NumSeekers;
@@ -352,10 +358,15 @@ namespace AmongUsRevamped
TabGroupMain = TextOptionItem.Create(60000, Translator.Get("tabGroupMain"), TabGroup.SystemSettings)
.SetColor(Color.blue);
DeniedWordsToKick = IntegerOptionItem.Create(60049, Translator.Get("deniedWordsToKick"), new(1, 5, 1), 1, TabGroup.SystemSettings, false)
.SetValueFormat(OptionFormat.Level);
KickLowLevelPlayer = IntegerOptionItem.Create(60050, Translator.Get("kickLowLevelPlayer"), new(0, 100, 1), 0, TabGroup.SystemSettings, false)
.SetValueFormat(OptionFormat.Level);
TempBanLowLevelPlayer = BooleanOptionItem.Create(60051, Translator.Get("tempBanLowLevelPlayer"), false, TabGroup.SystemSettings, false)
.SetParent(KickLowLevelPlayer);
DontKickLevelOnes = BooleanOptionItem.Create(60052, Translator.Get("dontKickLevelOnes"), false, TabGroup.SystemSettings, false)
.SetParent(KickLowLevelPlayer);
KickInvalidFriendCodes = BooleanOptionItem.Create(60080, Translator.Get("kickInvalidFriendCodes"), true, TabGroup.SystemSettings, false);
TempBanInvalidFriendCodes = BooleanOptionItem.Create(60081, Translator.Get("tempBanInvalidFriendCodes"), false, TabGroup.SystemSettings, false)
@@ -380,6 +391,9 @@ namespace AmongUsRevamped
WaitAutoStart = IntegerOptionItem.Create(64421, Translator.Get("waitAutoStart"), new(10, 600, 10), 300, TabGroup.SystemSettings, false)
.SetValueFormat(OptionFormat.Seconds);
PlayerAutoStart = IntegerOptionItem.Create(64422, Translator.Get("playerAutoStart"), new(1, 15, 1), 1, TabGroup.SystemSettings, false);
EnableJoinMessages = BooleanOptionItem.Create(64423, Translator.Get("enableJoinMessages"), true, TabGroup.SystemSettings, false);
MessagePerPlayerNum = IntegerOptionItem.Create(64424, Translator.Get("messagePerPlayerNum"), new(1, 15, 1), 5, TabGroup.SystemSettings, false)
.SetParent(EnableJoinMessages);
TabGroupMisc = TextOptionItem.Create(60379, Translator.Get("tabGroupMisc"), TabGroup.SystemSettings)
.SetColor(Color.green);
@@ -395,7 +409,6 @@ namespace AmongUsRevamped
SlashColorCmd = StringOptionItem.Create(60401, Translator.Get("slashColorCmd"), accessLevels, 1, TabGroup.SystemSettings, false);
SlashRolesAndGamemodeCmd = StringOptionItem.Create(60402, Translator.Get("slashRolesAndGamemodeCmd"), accessLevels, 1, TabGroup.SystemSettings, false);
SlashLastGameCmd = StringOptionItem.Create(60403, Translator.Get("slashLastGameCmd"), accessLevels, 1, TabGroup.SystemSettings, false);
SlashHelpAndAurCmd = StringOptionItem.Create(60404, Translator.Get("slashHelpAndAurCmd"), accessLevels, 1, TabGroup.SystemSettings, false);
SlashKickCmd = StringOptionItem.Create(60405, Translator.Get("slashKickCmd"), accessLevels, 2, TabGroup.SystemSettings, false);
SlashBanCmd = StringOptionItem.Create(60406, Translator.Get("slashBanCmd"), accessLevels, 2, TabGroup.SystemSettings, false);
SlashEndMeetingCmd = StringOptionItem.Create(60407, Translator.Get("slashEndMeetingCmd"), accessLevels, 3, TabGroup.SystemSettings, false);
@@ -405,7 +418,7 @@ namespace AmongUsRevamped
TabGroupCrewmate = TextOptionItem.Create(100000, Translator.Get("tabGroupCrewmate"), TabGroup.AbilitySettings)
.SetColor(CL.Hex("#8cffff"));
CrewmateAbility = StringOptionItem.Create(100002, Translator.Get("crewmateAbility"), crewmateAbilities, 4, TabGroup.AbilitySettings, false)
CrewmateAbility = StringOptionItem.Create(100001, Translator.Get("crewmateAbility"), crewmateAbilities, 4, TabGroup.AbilitySettings, false)
.SetColor(CL.Hex("#8cffff"));
ScientistAbility = StringOptionItem.Create(100101, Translator.Get("scientistAbility"), crewmateAbilities, 4, TabGroup.AbilitySettings, false)
@@ -429,9 +442,9 @@ namespace AmongUsRevamped
.SetValueFormat(OptionFormat.Level);
ExtraVotesPerTask = FloatOptionItem.Create(101002, Translator.Get("extraVotesPerTask"), new(0.25f, 3f, 0.25f), 0.5f, TabGroup.AbilitySettings, false)
.SetValueFormat(OptionFormat.Level);
SpeedrunnerShortTasks = IntegerOptionItem.Create(101003, Translator.Get("speedrunnerShortTasks"), new(0, 15, 1), 1, TabGroup.AbilitySettings, false)
SpeedrunnerShortTasks = IntegerOptionItem.Create(101003, Translator.Get("speedrunnerShortTasks"), new(0, 15, 1), 4, TabGroup.AbilitySettings, false)
.SetValueFormat(OptionFormat.Level);
SpeedrunnerLongTasks = IntegerOptionItem.Create(101004, Translator.Get("speedrunnerLongTasks"), new(0, 15, 1), 1, TabGroup.AbilitySettings, false)
SpeedrunnerLongTasks = IntegerOptionItem.Create(101004, Translator.Get("speedrunnerLongTasks"), new(0, 15, 1), 3, TabGroup.AbilitySettings, false)
.SetValueFormat(OptionFormat.Level);
TabGroupImpostor = TextOptionItem.Create(102000, Translator.Get("tabGroupImpostor"), TabGroup.AbilitySettings)
@@ -620,10 +633,6 @@ namespace AmongUsRevamped
.SetParent(DisableDevices)
.SetColor(new Color32(255, 153, 153, byte.MaxValue));
DisableFungleCamera = BooleanOptionItem.Create(22926, Translator.Get("disableFungleCamera"), false, TabGroup.ModSettings, false)
.SetParent(DisableFungleDevices)
.SetColor(new Color32(255, 153, 153, byte.MaxValue));
DisableFungleVital = BooleanOptionItem.Create(22927, Translator.Get("disableFungleVital"), false, TabGroup.ModSettings, false)
.SetParent(DisableFungleDevices)
.SetColor(new Color32(255, 153, 153, byte.MaxValue));
+86 -15
View File
@@ -104,30 +104,32 @@ public static class AbilityManagement
public static string RoleList()
{
var firstLines = new List<string>();
if (!AmongUsClient.Instance.AmHost) return "";
if (Options.CrewmateAbility.GetValue() != 4) firstLines.Add($"Crewmate: {Options.CrewmateAbility.GetString()}");
if (Options.ScientistAbility.GetValue() != 4) firstLines.Add($"Scientist: {Options.ScientistAbility.GetString()}");
if (Options.EngineerAbility.GetValue() != 4) firstLines.Add($"Engineer: {Options.EngineerAbility.GetString()}");
if (Options.NoisemakerAbility.GetValue() != 4) firstLines.Add($"Noisemaker: {Options.NoisemakerAbility.GetString()}");
if (Options.TrackerAbility.GetValue() != 4) firstLines.Add($"Tracker: {Options.TrackerAbility.GetString()}");
var lines = new List<string>();
var secondLines = new List<string>();
if (Options.CrewmateAbility.GetValue() != 4) lines.Add($"Crewmate: {Options.CrewmateAbility.GetString()}");
if (Options.ScientistAbility.GetValue() != 4) lines.Add($"Scientist: {Options.ScientistAbility.GetString()}");
if (Options.EngineerAbility.GetValue() != 4) lines.Add($"Engineer: {Options.EngineerAbility.GetString()}");
if (Options.NoisemakerAbility.GetValue() != 4) lines.Add($"Noisemaker: {Options.NoisemakerAbility.GetString()}");
if (Options.TrackerAbility.GetValue() != 4) lines.Add($"Tracker: {Options.TrackerAbility.GetString()}");
if (Options.DetectiveAbility.GetValue() != 4) lines.Add($"Detective: {Options.DetectiveAbility.GetString()}");
if (Options.DetectiveAbility.GetValue() != 4) secondLines.Add($"Detective: {Options.DetectiveAbility.GetString()}");
if (Options.ImpostorAbility.GetValue() != 3) secondLines.Add($"Impostor: {Options.ImpostorAbility.GetString()}");
if (Options.ShapeshifterAbility.GetValue() != 3) secondLines.Add($"Shapeshifter: {Options.ShapeshifterAbility.GetString()}");
if (Options.PhantomAbility.GetValue() != 3) secondLines.Add($"Phantom: {Options.PhantomAbility.GetString()}");
if (Options.ViperAbility.GetValue() != 3) secondLines.Add($"Viper: {Options.ViperAbility.GetString()}");
if (Options.ImpostorAbility.GetValue() != 3) lines.Add($"Impostor: {Options.ImpostorAbility.GetString()}");
if (Options.ShapeshifterAbility.GetValue() != 3) lines.Add($"Shapeshifter: {Options.ShapeshifterAbility.GetString()}");
if (Options.PhantomAbility.GetValue() != 3) lines.Add($"Phantom: {Options.PhantomAbility.GetString()}");
if (Options.ViperAbility.GetValue() != 3) lines.Add($"Viper: {Options.ViperAbility.GetString()}");
string firstText = firstLines.Count > 0 ? "ABILITIES:\n\n" + string.Join("\n", firstLines) : "";
string secondText = secondLines.Count > 0 ? "\n" + string.Join("\n", secondLines) : "";
if (lines.Count == 0) return "";
return firstText + secondText;
return "ABILITIES:\n\n" + string.Join("\n", lines);
}
public static void SendRoleList(ChatController c, string text, bool moderator)
{
if (!AmongUsClient.Instance.AmHost) return;
if (string.IsNullOrEmpty(RoleList()) || Utils.isHideNSeek) return;
if (text.Length <= 120)
{
if (moderator) Utils.ModeratorChatCommand(text, "", false);
@@ -145,6 +147,75 @@ public static class AbilityManagement
if (moderator) Utils.ModeratorChatCommand(first, second, true);
else Utils.ChatCommand(c, first, second, true);
}
public static string RoleInfoString(PlayerControl player)
{
if (!AmongUsClient.Instance.AmHost) return "";
if (IsMayor(player)) return $"Your Ability: Mayor\n\nYou are a Crewmate with {Options.ExtraVotesCrewmate.GetInt()} additional vote(s). Use them wisely.";
if (IsWorkhorse(player)) return $"Your Ability: Workhorse\n\nYou gain {Options.ExtraVotesPerTask.GetFloat()} additional vote(s) per completed task. Votes are rounded down.";
if (IsJester(player)) return "Your Ability: Jester\n\nYou can optionally win alone by getting voted, you are still a Crewmate.";
if (IsSpeedrunner(player)) return "Your Ability: Tasker\n\nThe Crewmates win if you complete tasks while being alive. You have more tasks.";
if (IsTyrant(player)) return $"Your Ability: Tyrant\n\nYou are an Impostor with {Options.ExtraVotesImpostor.GetInt()} additional vote(s). Use them wisely.";
if (IsStealer(player)) return $"Your Ability: Stealer\n\nYou gain {Options.ExtraVotesPerKill.GetFloat()} additional vote(s) per killed player. Votes are rounded down.";
if (IsJuggernaut(player)) return $"Your Ability: Juggernaut\n\nThe Impostor team instantly wins if you gain {Options.KillsNeededForJuggernaut.GetInt()} kills.";
else return "";
}
public static bool HandlingRoleMessages = false;
private static int PendingRoleMessages = 0;
public static void SendRoleMessages()
{
if (!AmongUsClient.Instance.AmHost || Options.Gamemode.GetValue() > 1) return;
if (string.IsNullOrEmpty(RoleList()) || PlayerControl.LocalPlayer.Data.IsDead)
{
HandlingRoleMessages = false;
PendingRoleMessages = 0;
return;
}
var players = PlayerControl.AllPlayerControls.ToArray().ToList();
float delay = 6.6f;
PendingRoleMessages = 0;
HandlingRoleMessages = true;
SendRoleList(DestroyableSingleton<HudManager>.Instance.Chat, AbilityManagement.RoleList(), true);
foreach (var player in players)
{
if (string.IsNullOrEmpty(RoleInfoString(player))) continue;
PendingRoleMessages++;
new LateTask(() =>
{
if (Utils.InGame)
{
Utils.SendPrivateMessage(player, RoleInfoString(player));
}
else
{
Logger.Info("Role sending was forcefully canceled. This should not happen.", "SendRoleMessages");
}
PendingRoleMessages--;
if (PendingRoleMessages <= 0)
{
PendingRoleMessages = 0;
HandlingRoleMessages = false;
}
}, delay, "SendRoleMessage");
delay += 2.2f;
}
if (PendingRoleMessages == 0)
{
HandlingRoleMessages = false;
}
}
}
/*
public static class CustomRoleManagement
+2 -4
View File
@@ -92,8 +92,6 @@ class FixedUpdateInGamePatch
break;
case 3: // Speedrun
if (settingsLabel == null)
Main.NormalOptions.TaskBarMode = 0;
break;
case 0: // Reset
@@ -113,7 +111,7 @@ class FixedUpdateInGamePatch
Utils.ContinueEndGame((byte)GameOverReason.CrewmatesByVote);
Logger.Info($" Crewmates won because the game took longer than {Options.CrewAutoWinsGameAfter.GetInt()}s", "SNSManager");
NormalGameEndChecker.LastWinReason = $"Crewmates win! (Timer)\n\nImpostors:\n" + string.Join("\n", NormalGameEndChecker.imps.Select(p => p.Data.PlayerName));
NormalGameEndChecker.CheckWinnerText("SnSTimer");
}
}
// 3 = Speedrun
@@ -125,7 +123,7 @@ class FixedUpdateInGamePatch
Utils.CustomWinnerEndGame(PlayerControl.LocalPlayer, 0);
Logger.Info($" No one won because the game took longer than {Options.GameAutoEndsAfter.GetInt()}s", "SpeedrunManager");
NormalGameEndChecker.LastWinReason = $"No one wins! (Timer)";
NormalGameEndChecker.CheckWinnerText("NoOneWin");
}
}
}
+4 -2
View File
@@ -10,15 +10,17 @@ public static class Translator
{
public enum SupportedLangs
{
English
English,
French
}
private static readonly Dictionary<SupportedLangs, Dictionary<string, string>> _languages = new();
private static SupportedLangs _currentLang = SupportedLangs.English;
public static SupportedLangs _currentLang;
private static string LanguageFolder => $"{BanManager.DataPath}/Language";
public static void Init()
{
Logger.Info($" Among Us Revamped {Main.ModVersion}", "Init");
CheckLanguageFile(_currentLang);
LoadLanguage(_currentLang);
}
+26 -2
View File
@@ -216,7 +216,7 @@ public static class Utils
NormalGameEndChecker.ImpCheckComplete = false;
CreateOptionsPickerPatch.SetDleks2 = false;
CanCallMeetings = true;
//CustomRoleManagement.HandlingRoleMessages = false;
AbilityManagement.HandlingRoleMessages = false;
PlayerControlSetRolePatch.FirstAssign = true;
PlayerControlSetRolePatch.Jesters.Clear();
@@ -226,6 +226,14 @@ public static class Utils
PlayerControlCompleteTaskPatch.ignoredCompletedTasks = 0;
PlayerControlCompleteTaskPatch.ignoredTasks = 0;
OnPlayerJoinedPatch.JoinNum = 0;
PlayerControlSetRolePatch.Seekers.Clear();
PlayerControlSetRolePatch.Jesters.Clear();
PlayerControlSetRolePatch.FirstAssign = true;
OnGameStartPatch.ScheduleExile = false;
CoShowIntroPatch.IntroInitiated = false;
}
public static PlayerControl[] AllAlivePlayerControls
@@ -376,6 +384,8 @@ public static class Utils
public static void ChatCommand(ChatController __instance, string msg, string msg2, bool multi)
{
if (OnGameJoinedPatch.WaitingForChat) return;
OnGameJoinedPatch.WaitingForChat = true;
__instance.freeChatField.textArea.Clear();
@@ -406,6 +416,8 @@ public static class Utils
public static void ModeratorChatCommand(string msg, string msg2, bool multi)
{
if (OnGameJoinedPatch.WaitingForChat) return;
OnGameJoinedPatch.WaitingForChat = true;
new LateTask(() =>
@@ -566,7 +578,19 @@ public static class Utils
return null;
}
Logger.Info($"Found {methodName}.MoveNext", "GetStateMachineMoveNext");
// Logger.Info($"Found {methodName}.MoveNext", "GetStateMachineMoveNext");
return moveNext;
}
public static readonly Dictionary<byte, string> StoredRoleText = new();
public static string GetRoleText(PlayerControl p)
{
if (p == null) return "";
if (p.Data.RoleType == RoleTypes.Impostor || p.Data.RoleType == RoleTypes.Shapeshifter || p.Data.RoleType == RoleTypes.Phantom || p.Data.RoleType == RoleTypes.Viper || p.Data.RoleType == RoleTypes.ImpostorGhost)
{
return $"<color=#ff1919>{p.Data.RoleType}</color>";
}
else return $"<color=#8cffff>{p.Data.RoleType}</color>";
}
}
+272 -65
View File
@@ -1,6 +1,7 @@
using Hazel;
using InnerNet;
using System;
using System.IO;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
@@ -107,7 +108,7 @@ internal static class SendChatPatch
__instance.freeChatField.textArea.SetText(string.Empty);
return false;
}
if (text == "/h" || text == "/help")
if (text == "/help")
{
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, $"{Translator.Get("allCommandsFull")}");
__instance.freeChatField.textArea.Clear();
@@ -118,6 +119,8 @@ internal static class SendChatPatch
if (text == "/s" || text == "/start")
{
GameStartManager.Instance.BeginGame();
__instance.freeChatField.textArea.Clear();
__instance.freeChatField.textArea.SetText(string.Empty);
return false;
}
@@ -143,67 +146,251 @@ internal static class SendChatPatch
return false;
}
if (__instance.timeSinceLastMessage < 3f || OnGameJoinedPatch.WaitingForChat /*|| CustomRoleManagement.HandlingRoleMessages*/) return false;
if (text.StartsWith("/vip "))
{
PlayerControl target = null;
string arg = text.Substring(5).Trim();
if (text == "/l" || text == "/lastgame" || text == "/win" || text == "/winner")
foreach (PlayerControl p in PlayerControl.AllPlayerControls)
{
if (p.Data == null || p == PlayerControl.LocalPlayer) continue;
if (p.Data.PlayerName.Equals(arg, StringComparison.OrdinalIgnoreCase))
{
target = p;
break;
}
}
if (target == null)
{
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("permFail", arg));
}
else
{
File.AppendAllText(BanManager.VipListPath, "\n" + target.Data.FriendCode);
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("vipAdd", target.Data.PlayerName));
}
__instance.freeChatField.textArea.Clear();
__instance.freeChatField.textArea.SetText(string.Empty);
return false;
}
if (text.StartsWith("/moderator "))
{
PlayerControl target = null;
string arg = text.Substring(11).Trim();
foreach (PlayerControl p in PlayerControl.AllPlayerControls)
{
if (p.Data == null || p == PlayerControl.LocalPlayer) continue;
if (p.Data.PlayerName.Equals(arg, StringComparison.OrdinalIgnoreCase))
{
target = p;
break;
}
}
if (target == null)
{
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("permFail", arg));
}
else
{
File.AppendAllText(BanManager.ModeratorListPath, "\n" + target.Data.FriendCode);
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("moderatorAdd", target.Data.PlayerName));
}
__instance.freeChatField.textArea.Clear();
__instance.freeChatField.textArea.SetText(string.Empty);
return false;
}
if (text.StartsWith("/admin "))
{
PlayerControl target = null;
string arg = text.Substring(7).Trim();
foreach (PlayerControl p in PlayerControl.AllPlayerControls)
{
if (p.Data == null || p == PlayerControl.LocalPlayer) continue;
if (p.Data.PlayerName.Equals(arg, StringComparison.OrdinalIgnoreCase))
{
target = p;
break;
}
}
if (target == null)
{
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("permFail", arg));
}
else
{
File.AppendAllText(BanManager.AdminListPath, "\n" + target.Data.FriendCode);
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("adminAdd", target.Data.PlayerName));
}
__instance.freeChatField.textArea.Clear();
__instance.freeChatField.textArea.SetText(string.Empty);
return false;
}
if (text.StartsWith("/removevip "))
{
PlayerControl target = null;
string arg = text.Substring(11).Trim();
foreach (PlayerControl p in PlayerControl.AllPlayerControls)
{
if (p.Data == null || p == PlayerControl.LocalPlayer) continue;
if (p.Data.PlayerName.Equals(arg, StringComparison.OrdinalIgnoreCase))
{
target = p;
break;
}
}
if (target == null)
{
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("permFail", arg));
}
else
{
File.WriteAllLines(BanManager.VipListPath, File.ReadAllLines(BanManager.VipListPath).Where(x => x.Trim() != target.Data.FriendCode));
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("vipRemove", target.Data.PlayerName));
}
__instance.freeChatField.textArea.Clear();
__instance.freeChatField.textArea.SetText(string.Empty);
return false;
}
if (text.StartsWith("/removemoderator "))
{
PlayerControl target = null;
string arg = text.Substring(17).Trim();
foreach (PlayerControl p in PlayerControl.AllPlayerControls)
{
if (p.Data == null || p == PlayerControl.LocalPlayer) continue;
if (p.Data.PlayerName.Equals(arg, StringComparison.OrdinalIgnoreCase))
{
target = p;
break;
}
}
if (target == null)
{
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("permFail", arg));
}
else
{
File.WriteAllLines(BanManager.ModeratorListPath, File.ReadAllLines(BanManager.ModeratorListPath).Where(x => x.Trim() != target.Data.FriendCode));
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("moderatorRemove", target.Data.PlayerName));
}
__instance.freeChatField.textArea.Clear();
__instance.freeChatField.textArea.SetText(string.Empty);
return false;
}
if (text.StartsWith("/removeadmin "))
{
PlayerControl target = null;
string arg = text.Substring(13).Trim();
foreach (PlayerControl p in PlayerControl.AllPlayerControls)
{
if (p.Data == null || p == PlayerControl.LocalPlayer) continue;
if (p.Data.PlayerName.Equals(arg, StringComparison.OrdinalIgnoreCase))
{
target = p;
break;
}
}
if (target == null)
{
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("permFail", arg));
}
else
{
File.WriteAllLines(BanManager.AdminListPath, File.ReadAllLines(BanManager.AdminListPath).Where(x => x.Trim() != target.Data.FriendCode));
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("adminRemove", target.Data.PlayerName));
}
__instance.freeChatField.textArea.Clear();
__instance.freeChatField.textArea.SetText(string.Empty);
return false;
}
if (__instance.timeSinceLastMessage < 3f || OnGameJoinedPatch.WaitingForChat || AbilityManagement.HandlingRoleMessages) return false;
if (text == "/l" || text == "/lastgame")
{
if (string.IsNullOrEmpty(NormalGameEndChecker.LastWinReason) || Utils.InGame) return false;
Utils.ChatCommand(__instance, $"{NormalGameEndChecker.LastWinReason}", "", false);
return false;
}
if (text == "/r jester"){
Utils.ChatCommand(__instance, Translator.Get("jesterPublic"), "", false);
Utils.ChatCommand(__instance, "Jester:\n\nThe Jester is a Crewmate who can also win alone by getting voted.", "", false);
return false;}
if (text == "/r mayor"){
Utils.ChatCommand(__instance, Translator.Get("mayorPublic", Options.ExtraVotesCrewmate.GetInt()), "", false);
Utils.ChatCommand(__instance, $"Mayor:\n\nThe Mayor is a Crewmate with {Options.ExtraVotesCrewmate.GetInt()} additional vote(s). Use them wisely.", "", false);
return false;}
if (text == "/r tyrant"){
Utils.ChatCommand(__instance, Translator.Get("tyrantPublic", Options.ExtraVotesImpostor.GetInt()), "", false);
Utils.ChatCommand(__instance, $"Tyrant:\n\nThe Tyrant is an Impostor with {Options.ExtraVotesImpostor.GetInt()} additional vote(s). Use them wisely.", "", false);
return false;}
if (text == "/r workhorse"){
Utils.ChatCommand(__instance, Translator.Get("workhorsePublic", Options.ExtraVotesPerTask.GetFloat()), "", false);
Utils.ChatCommand(__instance, $"Workhorse:\n\nThe Workhorse gains {Options.ExtraVotesPerTask.GetInt()} additional vote(s) per completed task. Votes are rounded down.", "", false);
return false;}
if (text == "/r stealer"){
Utils.ChatCommand(__instance, Translator.Get("stealerPublic", Options.ExtraVotesPerKill.GetFloat()), "", false);
Utils.ChatCommand(__instance, $"Stealer:\n\nThe Stealer gains {Options.ExtraVotesPerKill.GetInt()} additional vote(s) per killed player. Votes are rounded down.", "", false);
return false;}
if (text == "/r juggernaut"){
Utils.ChatCommand(__instance, Translator.Get("juggernautPublic", Options.KillsNeededForJuggernaut.GetInt()), "", false);
Utils.ChatCommand(__instance, $"Juggernaut:\n\nThe Impostors instantly win if the Juggernaut gains {Options.KillsNeededForJuggernaut.GetInt()} kills.", "", false);
return false;}
if (text == "/r speedrunner"){
Utils.ChatCommand(__instance, Translator.Get("speedrunnerPublic"), "", false);
if (text == "/r tasker"){
Utils.ChatCommand(__instance, "Tasker:\n\nThe Crewmates win if the Tasker completes tasks and is alive. The Tasker has more tasks.", "", false);
return false;}
if (text == "/aur" || text == "/amongusrevamped" || text == "/socials")
if (text == "/aur" || text == "/socials")
{
Utils.ChatCommand(__instance, Translator.Get("socialsAll"), "", false);
Utils.ChatCommand(__instance, "AUR socials:\n\ng i t h u b . c o m /\nApeMV/AmongUsRevamped\n\nd i s c o r d . g g /\n83Zhzhyhya", "", false);
return false;
}
if (text == "/0kc" || text == "/0killcooldown")
{
Utils.ChatCommand(__instance, Translator.Get("noKcdMode"), "", false);
Utils.ChatCommand(__instance, "0 Kill Cooldown:\n\nImpostors have no kill cooldown, Crewmates have low tasks\nThink fast and pay attention!", "", false);
return false;
}
if (text == "/sns" || text == "/shiftandseek")
{
Utils.ChatCommand(__instance, Translator.Get("SnSModeOne"), Translator.Get("SnSModeTwo", Options.CrewAutoWinsGameAfter.GetInt(), Options.CantKillTime.GetInt(), Options.MisfiresToSuicide.GetInt()), true);
if (Options.MisfiresToSuicide.GetInt() == 1 || Options.CantKillTime.GetInt() == 0)
{
Utils.ChatCommand(__instance, "Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nEmergency Meetings = Off", $"Crewmates win by doing tasks or surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing everyone\n{Options.MisfiresToSuicide.GetInt()} wrong kill(s) = suicide", true);
}
else
{
Utils.ChatCommand(__instance, "Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nEmergency Meetings = Off", $"Crew wins by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImp wins by killing\nOne wrong kill = Can't kill for {Options.CantKillTime.GetInt()}s\n{Options.MisfiresToSuicide.GetInt()} wrong kills = suicide", true);
}
return false;
}
if (text == "/sp" || text == "/sr" || text == "/speedrun")
if (text == "/sr" || text == "/speedrun")
{
Utils.ChatCommand(__instance, Translator.Get("speedrunMode", Options.GameAutoEndsAfter.GetInt()), "", false);
Utils.ChatCommand(__instance, $"Speedrun:\n\nEveryone is a crewmate. The 1st player to finish tasks wins the game. Game auto ends after {Options.GameAutoEndsAfter.GetInt()}s", "", false);
return false;
}
if (text == "/r" || text == "/roles" || text == "/gamemode" || text == "/gm")
if (text == "/r" || text == "/roles")
{
switch (Options.Gamemode.GetValue())
{
@@ -212,15 +399,22 @@ internal static class SendChatPatch
break;
case 1:
Utils.ChatCommand(__instance, Translator.Get("noKcdMode"), "", false);
Utils.ChatCommand(__instance, "0 Kill Cooldown:\n\nImpostors have no kill cooldown, Crewmates have low tasks\nThink fast and pay attention!", "", false);
break;
case 2:
Utils.ChatCommand(__instance, Translator.Get("SnSModeOne"), Translator.Get("SnSModeTwo", Options.CrewAutoWinsGameAfter.GetInt(), Options.CantKillTime.GetInt(), Options.MisfiresToSuicide.GetInt()), true);
if (Options.MisfiresToSuicide.GetInt() == 1 || Options.CantKillTime.GetInt() == 0)
{
Utils.ChatCommand(__instance, "Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nEmergency Meetings = Off", $"Crewmates win by doing tasks or surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing everyone\n{Options.MisfiresToSuicide.GetInt()} wrong kill(s) = suicide", true);
}
else
{
Utils.ChatCommand(__instance, "Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nEmergency Meetings = Off", $"Crew wins by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImp wins by killing\nOne wrong kill = Can't kill for {Options.CantKillTime.GetInt()}s\n{Options.MisfiresToSuicide.GetInt()} wrong kills = suicide", true);
}
break;
case 3:
Utils.ChatCommand(__instance, Translator.Get("speedrunMode", Options.GameAutoEndsAfter.GetInt()), "", false);
Utils.ChatCommand(__instance, $"Speedrun:\n\nEveryone is a crewmate. The 1st player to finish tasks wins the game. Game auto ends after {Options.GameAutoEndsAfter.GetInt()}s", "", false);
break;
}
@@ -236,7 +430,14 @@ internal static class SendChatPatch
if (BanManager.Templates.TryGetValue(templateName, out string templateMessage))
{
Utils.ChatCommand(__instance, templateMessage, "", false);
if (templateMessage.Length < 121)
{
Utils.ChatCommand(__instance, BanManager.CheckTemplate(templateMessage), "", false);
}
else
{
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("tooLongTemplate"));
}
}
else
{
@@ -248,7 +449,7 @@ internal static class SendChatPatch
return false;
}
bool col1 = text.StartsWith("/col ") || text.StartsWith("/cor ");
bool col1 = text.StartsWith("/col ");
bool col2 = text.StartsWith("/color ");
bool col3 = text.StartsWith("/colour ");
@@ -373,7 +574,7 @@ public static class RPCHandlerPatch
BanManager.IsWordBanned(__instance, text);
bool col1 = text.StartsWith("/col ") || text.StartsWith("/cor ");
bool col1 = text.StartsWith("/col ");
bool col2 = text.StartsWith("/color ");
bool col3 = text.StartsWith("/colour ");
@@ -437,28 +638,7 @@ public static class RPCHandlerPatch
}
}
if (/*CustomRoleManagement.HandlingRoleMessages || */OnGameJoinedPatch.WaitingForChat || GameStartManagerUpdatePatch.CountingDown) return;
if (text == "/h" || text == "/help")
{
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashHelpAndAurCmd.GetValue()) return;
OnGameJoinedPatch.WaitingForChat = true;
new LateTask(() =>
{
Utils.SendPrivateMessage(__instance, Translator.Get("allCommandsOne"));
}, 2.2f, "MHP1");
new LateTask(() =>
{
Utils.SendPrivateMessage(__instance, Translator.Get("allCommandsTwo"));
}, 4.4f, "MHP2");
new LateTask(() =>
{
OnGameJoinedPatch.WaitingForChat = false;
}, 6.6f, "MHP3");
}
if (AbilityManagement.HandlingRoleMessages || OnGameJoinedPatch.WaitingForChat || GameStartManagerUpdatePatch.CountingDown) return;
if (text == "/eg" || text == "/endgame")
{
@@ -483,31 +663,45 @@ public static class RPCHandlerPatch
GameStartManager.Instance.BeginGame();
}
if (text == "/l" || text == "/lastgame" || text == "/win" || text == "/winner")
if (text == "/l" || text == "/lastgame")
{
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashLastGameCmd.GetValue()) return;
if (string.IsNullOrEmpty(NormalGameEndChecker.LastWinReason) || Utils.InGame) return;
Utils.ModeratorChatCommand($"{NormalGameEndChecker.LastWinReason}", "", false);
}
if (text == "/aur" || text == "/socials")
{
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashLastGameCmd.GetValue()) return;
Utils.ModeratorChatCommand("AUR socials:\n\ng i t h u b . c o m /\nApeMV/AmongUsRevamped\n\nd i s c o r d . g g /\n83Zhzhyhya", "", false);
}
if (text == "/0kc" || text == "/0killcooldown")
{
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashRolesAndGamemodeCmd.GetValue()) return;
Utils.ModeratorChatCommand(Translator.Get("noKcdMode"), "", false);
Utils.ModeratorChatCommand("0 Kill Cooldown:\n\nImpostors have no kill cooldown, Crewmates have low tasks\nThink fast and pay attention!", "", false);
}
if (text == "/sns" || text == "/shiftandseek")
{
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashRolesAndGamemodeCmd.GetValue()) return;
Utils.ModeratorChatCommand(Translator.Get("SnSModeOne"), Translator.Get("SnSModeTwo", Options.CrewAutoWinsGameAfter.GetInt(), Options.CantKillTime.GetInt(), Options.MisfiresToSuicide.GetInt()), true);
if (Options.MisfiresToSuicide.GetInt() == 1 || Options.CantKillTime.GetInt() == 0)
{
Utils.ModeratorChatCommand("Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nEmergency Meetings = Off", $"Crewmates win by doing tasks or surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing everyone\n{Options.MisfiresToSuicide.GetInt()} wrong kill(s) = suicide", true);
}
else
{
Utils.ModeratorChatCommand("Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nEmergency Meetings = Off", $"Crew wins by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImp wins by killing\nOne wrong kill = Can't kill for {Options.CantKillTime.GetInt()}s\n{Options.MisfiresToSuicide.GetInt()} wrong kills = suicide", true);
}
}
if (text == "/sp" || text == "/sr" || text == "/speedrun")
if (text == "/sr" || text == "/speedrun")
{
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashRolesAndGamemodeCmd.GetValue()) return;
Utils.ModeratorChatCommand(Translator.Get("speedrunMode", Options.GameAutoEndsAfter.GetInt()), "", false);
Utils.ModeratorChatCommand($"Speedrun:\n\nEveryone is a crewmate. The 1st player to finish tasks wins the game. Game auto ends after {Options.GameAutoEndsAfter.GetInt()}s", "", false);
}
if (text == "/r" || text == "/roles" || text == "/gamemode" || text == "/gm")
if (text == "/r" || text == "/roles")
{
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashRolesAndGamemodeCmd.GetValue()) return;
switch (Options.Gamemode.GetValue())
@@ -517,15 +711,22 @@ public static class RPCHandlerPatch
break;
case 1:
Utils.ModeratorChatCommand(Translator.Get("noKcdMode"), "", false);
Utils.ModeratorChatCommand("0 Kill Cooldown:\n\nImpostors have no kill cooldown, Crewmates have low tasks\nThink fast and pay attention!", "", false);
break;
case 2:
Utils.ModeratorChatCommand(Translator.Get("SnSModeOne"), Translator.Get("SnSModeTwo", Options.CrewAutoWinsGameAfter.GetInt(), Options.CantKillTime.GetInt(), Options.MisfiresToSuicide.GetInt()), true);
if (Options.MisfiresToSuicide.GetInt() == 1 || Options.CantKillTime.GetInt() == 0)
{
Utils.ModeratorChatCommand("Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nEmergency Meetings = Off", $"Crewmates win by doing tasks or surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImpostors win by killing everyone\n{Options.MisfiresToSuicide.GetInt()} wrong kill(s) = suicide", true);
}
else
{
Utils.ModeratorChatCommand("Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nEmergency Meetings = Off", $"Crew wins by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s\nImp wins by killing\nOne wrong kill = Can't kill for {Options.CantKillTime.GetInt()}s\n{Options.MisfiresToSuicide.GetInt()} wrong kills = suicide", true);
}
break;
case 3:
Utils.ModeratorChatCommand(Translator.Get("speedrunMode", Options.GameAutoEndsAfter.GetInt()), "", false);
Utils.ModeratorChatCommand($"Speedrun:\n\nEveryone is a crewmate. The 1st player to finish tasks wins the game. Game auto ends after {Options.GameAutoEndsAfter.GetInt()}s", "", false);
break;
}
@@ -534,25 +735,25 @@ public static class RPCHandlerPatch
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashRolesAndGamemodeCmd.GetValue()) return;
if (text == "/r jester"){
Utils.ModeratorChatCommand(Translator.Get("jesterPublic"), "", false);}
Utils.ModeratorChatCommand("Jester:\n\nThe Jester is a Crewmate who can also win alone by getting voted.", "", false);}
if (text == "/r mayor"){
Utils.ModeratorChatCommand(Translator.Get("mayorPublic", Options.ExtraVotesCrewmate.GetInt()), "", false);}
Utils.ModeratorChatCommand($"Mayor:\n\nThe Mayor is a Crewmate with {Options.ExtraVotesCrewmate.GetInt()} additional vote(s). Use them wisely.", "", false);}
if (text == "/r tyrant"){
Utils.ModeratorChatCommand(Translator.Get("tyrantPublic", Options.ExtraVotesImpostor.GetInt()), "", false);}
Utils.ModeratorChatCommand($"Tyrant:\n\nThe Tyrant is an Impostor with {Options.ExtraVotesImpostor.GetInt()} additional vote(s). Use them wisely.", "", false);}
if (text == "/r workhorse"){
Utils.ModeratorChatCommand(Translator.Get("workhorsePublic", Options.ExtraVotesPerTask.GetFloat()), "", false);}
Utils.ModeratorChatCommand($"Workhorse:\n\nThe Workhorse gains {Options.ExtraVotesPerTask.GetInt()} additional vote(s) per completed task. Votes are rounded down.", "", false);}
if (text == "/r stealer"){
Utils.ModeratorChatCommand(Translator.Get("stealerPublic", Options.ExtraVotesPerKill.GetFloat()), "", false);}
Utils.ModeratorChatCommand($"Stealer:\n\nThe Stealer gains {Options.ExtraVotesPerKill.GetInt()} additional vote(s) per killed player. Votes are rounded down.", "", false);}
if (text == "/r juggernaut"){
Utils.ModeratorChatCommand(Translator.Get("juggernautPublic", Options.KillsNeededForJuggernaut.GetInt()), "", false);}
Utils.ModeratorChatCommand($"Juggernaut:\n\nThe Impostors instantly win if the Juggernaut gains {Options.KillsNeededForJuggernaut.GetInt()} kills.", "", false);}
if (text == "/r speedrunner"){
Utils.ModeratorChatCommand(Translator.Get("speedrunnerPublic"), "", false);}
if (text == "/r tasker"){
Utils.ModeratorChatCommand("Tasker:\n\nThe Crewmates win if the Tasker completes tasks and is alive. The Tasker has more tasks.", "", false);}
if (text.StartsWith("/t "))
{
@@ -560,10 +761,16 @@ public static class RPCHandlerPatch
if (BanManager.Templates.TryGetValue(templateName, out string templateMessage))
{
Utils.ModeratorChatCommand(templateMessage, "", false);
if (templateMessage.Length < 121)
{
Utils.ModeratorChatCommand(BanManager.CheckTemplate(templateMessage), "", false);
}
else
{
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("tooLongTemplate"));
}
}
}
break;
}
}
+4
View File
@@ -15,6 +15,7 @@ namespace AmongUsRevamped
private static ClientOptionItem DarkTheme;
private static ClientOptionItem LobbyMusic;
private static ClientOptionItem DisableInfoWhenDead;
private static ClientOptionItem DisableCommandHelper;
public static void Postfix(OptionsMenuBehaviour __instance)
{
@@ -57,6 +58,9 @@ namespace AmongUsRevamped
if (LobbyMusic == null || LobbyMusic.ToggleButton == null)
LobbyMusic = ClientOptionItem.Create(Translator.Get("enableLobbyMusic"), Main.LobbyMusic, __instance);
if (DisableCommandHelper == null || DisableCommandHelper.ToggleButton == null)
DisableCommandHelper = ClientOptionItem.Create(Translator.Get("disableCommandHelper"), Main.DisableCommandHelper, __instance);
}
}
+58 -2
View File
@@ -1,4 +1,5 @@
using System;
using BepInEx.Unity.IL2CPP;
using System;
using System.Text;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using TMPro;
@@ -180,6 +181,7 @@ namespace AmongUsRevamped
private static PassiveButton template;
private static PassiveButton discordButton;
private static PassiveButton gitHubButton;
private static PassiveButton animationSceneButton;
private static Transform buttonParent;
public static void Postfix(MainMenuManager __instance)
{
@@ -212,6 +214,18 @@ namespace AmongUsRevamped
"GitHub");
}
if (animationSceneButton == null)
{
animationSceneButton = CreateButton(
__instance,
"AnimationTestSceneButton",
new(0f, 2.65f, 1f),
new(139, 0, 0, byte.MaxValue),
new(255, 127, 127, byte.MaxValue),
() => SceneChanger.ChangeScene("AnimationTestScene"),
"Animation Tester");
}
var bg = GameObject.Find("BackgroundTexture");
if (bg != null)
{
@@ -230,6 +244,24 @@ namespace AmongUsRevamped
div.SetActive(false);
}
var logo = GameObject.Find("MainUI/AspectScaler/LeftPanel/Sizer/LOGO-AU");
if (logo != null)
{
logo.SetActive(false);
}
var h1 = GameObject.Find("AccountManager/AccountTab/GameHeader/BarSprite/FriendsButton/Highlight/NewRequestActive/Text_TMP");
if (h1 != null)
{
Object.Destroy(h1);
}
var h2 = GameObject.Find("AccountManager/AccountTab/GameHeader/BarSprite/FriendsButton/Highlight/NewRequestActive/Background");
if (h2 != null)
{
Object.Destroy(h2);
}
Transform tintTrans = __instance.transform.Find("MainUI/Tint");
var tint = tintTrans.gameObject;
@@ -290,7 +322,14 @@ namespace AmongUsRevamped
button.name = name;
button.transform.localPosition = localPosition;
button.transform.localScale = new Vector3(0.8f, 1f, 1f);
if (name == "GitHubButton" || name == "DiscordButton")
{
button.transform.localScale = new Vector3(0.8f, 1f, 1f);
}
else
{
button.transform.localScale = new Vector3(1.8f, 1.6f, 1f);
}
var aspect = button.GetComponent<AspectPosition>();
if (aspect != null)
@@ -317,6 +356,23 @@ namespace AmongUsRevamped
return button;
}
}
[HarmonyPatch(typeof(SignInStatusComponent), nameof(SignInStatusComponent.SetOnline))]
public static class SignInStatusComponentSetOnlinePatch
{
private static void Postfix()
{
int pluginCount = IL2CPPChainloader.Instance.Plugins.Count;
Logger.Info($" {pluginCount} Plugins detected", "PluginCheck");
if (pluginCount > 1)
{
DisconnectPopup.Instance.gameObject.SetActive(true);
DisconnectPopup.Instance._textArea.enableWordWrapping = false;
DisconnectPopup.Instance._textArea.text = Translator.Get("pluginWarning");
}
}
}
}
#if !ANDROID
+1 -4
View File
@@ -27,7 +27,6 @@ internal static class DisableDevice
["AirshipRecordsAdmin"] = new(19.89f, 12.60f),
["AirshipCamera"] = new(8.10f, -9.63f),
["AirshipVital"] = new(25.24f, -7.94f),
["FungleCamera"] = new(6.20f, 0.10f),
["FungleVital"] = new(-2.50f, -9.80f),
["SubmergedVital"] = new(5f, 32.54f),
["SubmergedLeftAdmin"] = new(-9.45f, 10.16f),
@@ -58,7 +57,7 @@ internal static class DisableDevice
foreach (PlayerControl pc in Main.AllPlayerControls)
{
if (pc.Data.IsDead || Main.GM.Value && pc == PlayerControl.LocalPlayer) return;
if (pc.Data.IsDead || (Main.GM.Value && pc == PlayerControl.LocalPlayer)) continue;
try
{
@@ -98,7 +97,6 @@ internal static class DisableDevice
if (Options.DisableAirshipVital.GetBool()) doComms |= Vector2.Distance(PlayerPos, DevicePos["AirshipVital"]) <= UsableDistance;
break;
case 5:
if (Options.DisableFungleCamera.GetBool()) doComms |= Vector2.Distance(PlayerPos, DevicePos["FungleCamera"]) <= UsableDistance;
if (Options.DisableFungleVital.GetBool()) doComms |= Vector2.Distance(PlayerPos, DevicePos["FungleVital"]) <= UsableDistance;
break;
}
@@ -190,7 +188,6 @@ public class RemoveDisableDevicesPatch
if (Options.DisableAirshipVital.GetBool()) consoles.DoIf(x => x.name == "panel_vitals", x => x.gameObject.GetComponent<CircleCollider2D>().enabled = false);
break;
case 5:
if (Options.DisableFungleCamera.GetBool()) consoles.DoIf(x => x.name == "BinocularsSecurityConsole", x => x.gameObject.GetComponent<PolygonCollider2D>().enabled = false);
if (Options.DisableFungleVital.GetBool()) consoles.DoIf(x => x.name == "VitalsConsole", x => x.gameObject.GetComponent<BoxCollider2D>().enabled = false);
break;
}
+21 -7
View File
@@ -53,43 +53,57 @@ class NormalGameEndChecker
if (Winner == "Jester")
{
LastWinReason = $"Jester wins! (Voted)\n\nImpostors: {impostorList}";
LastWinReason = "Jester wins! (voted)\n\nImpostors: " + impostorList;
canUpdateWinnerText = false;
return;
}
if (Winner == "Juggernaut")
{
LastWinReason = $"Impostors win! (Juggernaut killed {Options.KillsNeededForJuggernaut.GetInt()} players)\n\nImpostor: {impostorList}";
LastWinReason = $"Impostors win! (Juggernaut killed {Options.KillsNeededForJuggernaut.GetInt()} players)\n\nImpostors: " + impostorList;
canUpdateWinnerText = false;
return;
}
if (Winner == "Speedrunner")
{
LastWinReason = $"Crewmates win! (Speedrunner finished tasks)\n\nImpostor: {impostorList}";
LastWinReason = "Crewmates win! (Tasker finished tasks)\n\nImpostors: " + impostorList;
canUpdateWinnerText = false;
return;
}
if (Winner == "SnSTimer")
{
LastWinReason = $"Crewmates Win! (Survived {Options.CrewAutoWinsGameAfter.GetInt()}s)\n\n Impostors: " + impostorList;
canUpdateWinnerText = false;
return;
}
if (Winner == "NoOneWinsSpeedrun")
{
LastWinReason = $"No one wins. ({Options.GameAutoEndsAfter.GetInt()}s Timer)";
canUpdateWinnerText = false;
return;
}
if (Utils.AliveImpostors == 0 || Winner == "Crewmate")
{
LastWinReason = $"Crewmates win!\n\nImpostors: {impostorList}";
LastWinReason = "Crewmates Win!\n\nImpostors: " + impostorList;
canUpdateWinnerText = false;
}
else if (Utils.AliveImpostors >= Utils.AliveCrewmates || Winner == "Impostor")
{
LastWinReason = $"Impostors win!\n\nImpostor: {impostorList}";
LastWinReason = "Impostors Win!\n\nImpostors: " + impostorList;
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)\n\nImpostors: {impostorList}";
LastWinReason = $"Crewmates Win! ({Options.TaskPercentNeededToWin.GetInt()}% tasks completed)\n\nImpostors: " + impostorList;
canUpdateWinnerText = false;
}
else if (Options.Gamemode.GetValue() < 2 || Winner == "ImpostorSabotage")
{
LastWinReason = $"Impostors win! (Sabotage)\n\nImpostors: {impostorList}" + (string.IsNullOrEmpty(customRoles) ? "" : "\n\n" + customRoles);
LastWinReason = "Impostors Win! (Sabotage)\n\n Impostors: " + impostorList;
}
}
}
+4 -4
View File
@@ -34,15 +34,15 @@ class ExileControllerWrapUpPatch
{
if (p.Data.Role.IsImpostor)
{
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=red><size=90%>({MurderPlayerPatch.killCount[p.Data.PlayerId]}†)";
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=red><size=90%>({MurderPlayerPatch.killCount[p.Data.PlayerId]}† - {Utils.StoredRoleText[p.PlayerId]})";
}
else
{
if (!PlayerControlCompleteTaskPatch.playerTasksCompleted.ContainsKey(p))
if (!PlayerControlCompleteTaskPatch.playerTasksCompleted.ContainsKey(p.PlayerId))
{
PlayerControlCompleteTaskPatch.playerTasksCompleted[p] = 0;
PlayerControlCompleteTaskPatch.playerTasksCompleted[p.PlayerId] = 0;
}
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=green><size=90%>({PlayerControlCompleteTaskPatch.playerTasksCompleted[p]}/{PlayerControlCompleteTaskPatch.tasksPerPlayer[p]})";
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=green><size=90%>({PlayerControlCompleteTaskPatch.playerTasksCompleted[p.PlayerId]}/{PlayerControlCompleteTaskPatch.tasksPerPlayer[p.PlayerId]} - {Utils.StoredRoleText[p.PlayerId]})";
}
}
}
+8 -15
View File
@@ -9,22 +9,25 @@ namespace AmongUsRevamped;
[HarmonyPatch(typeof(HudManager), nameof(HudManager.CoShowIntro))]
internal static class CoShowIntroPatch
{
public static bool IntroInitiated;
public static void Postfix(IntroCutscene __instance)
{
Logger.Info(" Intro initiated", "CoShowIntro");
if (!AmongUsClient.Instance.AmHost) return;
//Utils.ModeratorChatCommand(Translator.Get("abilitiesGenericOne", Options.CrewmateAbility.GetString(), Options.ScientistAbility.GetString(), Options.EngineerAbility.GetString(), Options.NoisemakerAbility.GetString(), Options.TrackerAbility.GetString()), Translator.Get("abilitiesGenericTwo", Options.DetectiveAbility.GetString(), Options.ImpostorAbility.GetString(), Options.ShapeshifterAbility.GetString(), Options.PhantomAbility.GetString(), Options.ViperAbility.GetString()), true);
IntroInitiated = true;
AbilityManagement.SendRoleMessages();
foreach (var p in PlayerControl.AllPlayerControls)
{
p.cosmetics.nameText.text = p.Data.PlayerName;
MurderPlayerPatch.killCount[p.Data.PlayerId] = 0;
MurderPlayerPatch.misfireCount[p.Data.PlayerId] = 0;
PlayerControlCompleteTaskPatch.playerTasksCompleted[p] = 0;
PlayerControlCompleteTaskPatch.tasksPerPlayer[p] = 0;
MurderPlayerPatch.killCount[p.PlayerId] = 0;
MurderPlayerPatch.misfireCount[p.PlayerId] = 0;
PlayerControlCompleteTaskPatch.playerTasksCompleted[p.PlayerId] = 0;
PlayerControlCompleteTaskPatch.tasksPerPlayer[p.PlayerId] = 0;
Logger.Info($" {p.Data.PlayerName} -> {p.Data.RoleType}", "RoleInfo");
}
@@ -39,16 +42,6 @@ internal static class CoShowIntroPatch
Utils.CanCallMeetings = true;
}, 33f, "MeetingEnabled");
}
if (Options.Gamemode.GetValue() == 2 && Options.SNSChatInGame.GetBool() /*|| Options.Gamemode.GetValue() == 0 && Options.ChatBeforeFirstMeeting.GetBool()*/)
{
_ = new LateTask(() =>
{
PlayerControl.LocalPlayer.CmdReportDeadBody(null);
if (MeetingHud.Instance != null) MeetingHud.Instance.RpcClose();
}, 9f, "SetChatVisible");
}
}
}
+39 -12
View File
@@ -51,6 +51,7 @@ internal static class OnGameJoinedPatch
[HarmonyPatch(typeof(AmongUsClient), nameof(AmongUsClient.OnPlayerJoined))]
class OnPlayerJoinedPatch
{
public static int JoinNum;
public static bool HasInvalidFriendCode(string friendcode)
{
if (string.IsNullOrEmpty(friendcode))
@@ -87,14 +88,27 @@ class OnPlayerJoinedPatch
if (!Options.TempBanInvalidFriendCodes.GetBool())
{
AmongUsClient.Instance.KickPlayer(Client.Id, false);
Logger.Info($" {Client.PlayerName} Was kicked for having an invalid FriendCode", "KickInvalidFriendCode");
Logger.SendInGame($" {Client.PlayerName} Was kicked for having an invalid FriendCode");
Logger.Info(Translator.Get("invalidFriendCodeKick", Client.PlayerName), "KickInvalidFriendCode");
Logger.SendInGame(Translator.Get("invalidFriendCodeKick", Client.PlayerName));
}
else
{
if (!BanManager.TempBanWhiteList.Contains(Client.GetHashedPuid())) BanManager.TempBanWhiteList.Add(Client.GetHashedPuid());
AmongUsClient.Instance.KickPlayer(Client.Id, true);
Logger.Info($" {Client.PlayerName} Was banned for having an invalid FriendCode", "BanInvalidFriendCode");
Logger.SendInGame($" {Client.PlayerName} Was banned for having an invalid FriendCode");
Logger.Info(Translator.Get("invalidFriendCodeBan", Client.PlayerName), "BanInvalidFriendCode");
Logger.SendInGame(Translator.Get("invalidFriendCodeBan", Client.PlayerName));
}
}
if (Options.EnableJoinMessages.GetBool())
{
JoinNum++;
BanManager.Templates.TryGetValue("welcome", out string msg);
if (JoinNum >= Options.MessagePerPlayerNum.GetInt())
{
JoinNum = 0;
Utils.ModeratorChatCommand(BanManager.CheckTemplate(msg), "", false);
}
}
}
@@ -106,10 +120,11 @@ class OnPlayerLeftPatch
{
static void Postfix([HarmonyArgument(0)] ClientData client)
{
if (!AmongUsClient.Instance.AmHost || !Utils.InGame) return;
{
PlayerControlCompleteTaskPatch.CalculateTaskWin();
}
if (!AmongUsClient.Instance.AmHost) return;
Logger.Info($" {client.PlayerName} left the game", "OnPlayerLeft");
if (!Utils.InGame) return;
PlayerControlCompleteTaskPatch.CalculateTaskWin();
}
}
@@ -121,21 +136,33 @@ public static class SetLevelPatch
{
if (AmongUsClient.Instance.AmHost && level < Options.KickLowLevelPlayer.GetInt() - 1 && __instance.Data.ClientId != AmongUsClient.Instance.HostId)
{
if (level == 0 && Options.DontKickLevelOnes.GetBool()) return;
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()}");
Logger.Info($" {__instance.Data.PlayerName} (level {level}) was kicked for being under level {Options.KickLowLevelPlayer.GetInt()}", "KickLowLevelPlayer");
Logger.SendInGame($" {__instance.Data.PlayerName} (level {level}) 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()}");
Logger.Info($" {__instance.Data.PlayerName} (level {level}) was banned for being under level {Options.KickLowLevelPlayer.GetInt()} ", "BanLowLevelPlayer");
Logger.SendInGame($" {__instance.Data.PlayerName} (level {level}) was banned for being under level {Options.KickLowLevelPlayer.GetInt()}");
}
HandledLevelKicks.Add(__instance);
}
}
}
[HarmonyPatch(typeof(GameStartManager), nameof(GameStartManager.Start))]
public static class ShowLobbyTimer_GameStartManager_Start_Postfix
{
public static void Postfix(GameStartManager __instance)
{
if (__instance == null || !GameData.Instance || !AmongUsClient.Instance || AmongUsClient.Instance.NetworkMode == NetworkModes.LocalGame || !AmongUsClient.Instance.AmHost) return;
HudManager.Instance.ShowLobbyTimer(600);
}
}
+4 -4
View File
@@ -27,13 +27,13 @@ public static class CheckForEndVotingPatch
visualVotes.Add(new MeetingHud.VoterState { VoterId = voterId, VotedForId = votedFor });
if (!PlayerControlCompleteTaskPatch.playerTasksCompleted.ContainsKey(pc)) PlayerControlCompleteTaskPatch.playerTasksCompleted[pc] = 0;
if (!PlayerControlCompleteTaskPatch.playerTasksCompleted.ContainsKey(voterId)) PlayerControlCompleteTaskPatch.playerTasksCompleted[voterId] = 0;
if (!MurderPlayerPatch.killCount.ContainsKey(voterId)) MurderPlayerPatch.killCount[voterId] = 0;
int extraVotes = 0;
int extraVotesCrewmate = Options.ExtraVotesCrewmate.GetInt();
int extraVotesImpostor = Options.ExtraVotesImpostor.GetInt();
int extraVotesPerTask = (int)(Options.ExtraVotesPerTask.GetFloat()*PlayerControlCompleteTaskPatch.playerTasksCompleted[pc]+0.1f);
int extraVotesPerTask = (int)(Options.ExtraVotesPerTask.GetFloat()*PlayerControlCompleteTaskPatch.playerTasksCompleted[voterId]+0.1f);
int extraVotesPerKill = (int)(Options.ExtraVotesPerKill.GetFloat()*MurderPlayerPatch.killCount[voterId]+0.1f);
if (!votes.TryGetValue(votedFor, out int currentVotes)) currentVotes = 0;
@@ -107,11 +107,11 @@ class MeetingHudStartPatch
totalTasks++;
if (task.Complete) tasksCompleted++;
}
return $"<color=green>({tasksCompleted}/{totalTasks})</color>";
return $"<color=green>({tasksCompleted}/{totalTasks})</color> - {Utils.GetRoleText(player)}";
}
else
{
return $"<color=red>({MurderPlayerPatch.killCount[player.Data.PlayerId]}†)</color>";
return $"<color=red>({MurderPlayerPatch.killCount[player.Data.PlayerId]}†)</color> - {Utils.GetRoleText(player)}";
}
}
}
+42 -17
View File
@@ -13,8 +13,9 @@ internal class CoStartGamePatch
if (!AmongUsClient.Instance.AmHost) return;
Logger.Info(" -------- GAME STARTED --------", "StartGame");
Logger.Info($" Gamemode: {Options.Gamemode.GetValue()}", "StartGame");
Logger.Info($" Gamemode: {Options.Gamemode.GetString()}", "StartGame");
Logger.Info($" Players: {PlayerControl.AllPlayerControls.Count}", "StartGame");
Logger.Info($" Map: {(MapNames)GameOptionsManager.Instance.CurrentGameOptions.MapId}", "StartGame");
NormalGameEndChecker.imps.Clear();
NormalGameEndChecker.LastWinReason = "";
@@ -25,9 +26,9 @@ internal class CoStartGamePatch
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.RpcSetRole))]
class PlayerControlSetRolePatch
{
private static int i;
public static bool FirstAssign;
private static HashSet<byte> Seekers = new();
private static readonly HashSet<byte> ProcessedPlayers = new();
public static HashSet<byte> Seekers = new();
public static HashSet<PlayerControl> Jesters = new();
private static readonly System.Random rand = new System.Random();
@@ -35,17 +36,17 @@ class PlayerControlSetRolePatch
{
if (!FirstAssign || !AmongUsClient.Instance.AmHost) return true;
var oldRole = roleType;
if (!ProcessedPlayers.Add(__instance.PlayerId)) return true;
canOverrideRole = false;
if (Main.GM.Value && __instance == PlayerControl.LocalPlayer)
{
roleType = RoleTypes.CrewmateGhost;
return true;
roleType = RoleTypes.Crewmate;
OnGameStartPatch.ScheduleExile = true;
}
if (Utils.isHideNSeek && i == 0)
if (Utils.isHideNSeek && Seekers.Count() == 0)
{
int seekersCount = Options.NumSeekers.GetInt();
@@ -77,22 +78,21 @@ class PlayerControlSetRolePatch
if (Options.Gamemode.GetValue() == 3 && !Utils.isHideNSeek)
{
if (__instance == PlayerControl.LocalPlayer && Main.GM.Value)
{
PlayerControl.LocalPlayer.myTasks.Clear();
return true;
}
if (Options.EngineerMode.GetBool()) roleType = RoleTypes.Engineer;
else roleType = RoleTypes.Crewmate;
}
i++;
if (i >= PlayerControl.AllPlayerControls.Count)
if (Options.Gamemode.GetValue() == 2 && !Utils.isHideNSeek)
{
if (roleType == RoleTypes.Impostor || roleType == RoleTypes.Phantom || roleType == RoleTypes.Viper) roleType = RoleTypes.Shapeshifter;
}
if (ProcessedPlayers.Count >= PlayerControl.AllPlayerControls.Count)
{
Seekers.Clear();
ProcessedPlayers.Clear();
FirstAssign = false;
i = 0;
Logger.Info("PCSRP successful", "RoleManaging");
}
@@ -105,7 +105,32 @@ class PlayerControlSetRolePatch
{
Jesters.Add(__instance);
}
return true;
}
}
[HarmonyPatch(typeof(HudManager), nameof(HudManager.OnGameStart))]
internal static class OnGameStartPatch
{
public static bool ScheduleExile;
public static void Postfix()
{
if (Options.Gamemode.GetValue() == 2 && Options.SNSChatInGame.GetBool())
{
PlayerControl.LocalPlayer.CmdReportDeadBody(null);
if (MeetingHud.Instance != null) MeetingHud.Instance.RpcClose();
}
if (ScheduleExile)
{
PlayerControl.LocalPlayer.Exiled();
ScheduleExile = false;
}
foreach (var p in PlayerControl.AllPlayerControls)
{
Utils.StoredRoleText[p.PlayerId] = Utils.GetRoleText(p);
}
}
}
+31 -24
View File
@@ -15,8 +15,9 @@ class ReportDeadBodyPatch
public static bool Prefix(PlayerControl __instance, [HarmonyArgument(0)] NetworkedPlayerInfo target)
{
if (!AmongUsClient.Instance.AmHost || __instance == null) return true;
if (Utils.isHideNSeek) return false;
if (Options.DisableAnnoyingMeetingCalls.GetBool() && !Utils.CanCallMeetings /*&& !Options.ChatBeforeFirstMeeting.GetBool()*/ && target == null)
if (Options.DisableAnnoyingMeetingCalls.GetBool() && !Utils.CanCallMeetings && target == null && Options.Gamemode.GetValue() < 2)
{
Logger.Info($" {__instance.Data.PlayerName} is calling a meeting too fast, attempt blocked", "ReportDeadBodyPatch");
return false;
@@ -26,10 +27,17 @@ class ReportDeadBodyPatch
if (Options.Gamemode.GetValue() == 2 || Options.Gamemode.GetValue() == 3)
{
if (target != null) Logger.Info($" Stopped {__instance.Data.PlayerName} reporting the body of {target.PlayerName}", "ReportDeadBodyPatch");
else Logger.Info($" Stopped {__instance.Data.PlayerName} trying to call a meeting", "ReportDeadBodyPatch");
return false;
if (target != null)
{
Logger.Info($" Stopped {__instance.Data.PlayerName} reporting the body of {target.PlayerName}", "ReportDeadBodyPatch");
return false;
}
if (__instance != PlayerControl.LocalPlayer)
{
Logger.Info($" Stopped {__instance.Data.PlayerName} trying to call a meeting", "ReportDeadBodyPatch");
return false;
}
return true;
}
else return true;
}
@@ -63,11 +71,11 @@ internal static class MurderPlayerPatch
{
if (p.Data.Role.IsImpostor)
{
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=red><size=90%>({killCount[p.Data.PlayerId]}†)";
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=red><size=90%>({killCount[p.Data.PlayerId]}†)</color> - {Utils.StoredRoleText[p.PlayerId]}";
}
else
{
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=green><size=90%>({PlayerControlCompleteTaskPatch.playerTasksCompleted[p]}/{PlayerControlCompleteTaskPatch.tasksPerPlayer[p]})";
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=green><size=90%>({PlayerControlCompleteTaskPatch.playerTasksCompleted[p.PlayerId]}/{PlayerControlCompleteTaskPatch.tasksPerPlayer[p.PlayerId]})</color> - {Utils.StoredRoleText[p.PlayerId]}";
}
}
}
@@ -145,8 +153,8 @@ internal static class CheckShapeshiftPatch
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.CompleteTask))]
class PlayerControlCompleteTaskPatch
{
public static Dictionary<PlayerControl, int> playerTasksCompleted = new Dictionary<PlayerControl, int>();
public static Dictionary<PlayerControl, int> tasksPerPlayer = new Dictionary<PlayerControl, int>();
public static Dictionary<byte, int> playerTasksCompleted = new Dictionary<byte, int>();
public static Dictionary<byte, int> tasksPerPlayer = new Dictionary<byte, int>();
public static List<string> ignoredRoles = new List<string> {"Jester"};
public static int ignoredTasks;
public static int ignoredCompletedTasks;
@@ -158,32 +166,31 @@ class PlayerControlCompleteTaskPatch
foreach (var p in PlayerControl.AllPlayerControls)
{
/*
if (ignoredRoles.Contains(CustomRoleManagement.GetRole(p.PlayerId)) && !tasksInitiated)
if (AbilityManagement.IsJester(p) && !tasksInitiated)
{
ignoredTasks += p.Data.Tasks.Count;
tasksInitiated = true;
}
*/
if (!playerTasksCompleted.ContainsKey(p))
if (!playerTasksCompleted.ContainsKey(p.PlayerId))
{
playerTasksCompleted[p] = 0;
playerTasksCompleted[p.PlayerId] = 0;
}
tasksPerPlayer[p] = p.Data.Tasks.Count;
tasksPerPlayer[p.PlayerId] = p.Data.Tasks.Count;
}
playerTasksCompleted[__instance]++;
/*
if (ignoredRoles.Contains(CustomRoleManagement.GetRole(__instance.PlayerId)))
playerTasksCompleted[__instance.PlayerId]++;
if (AbilityManagement.IsJester(__instance))
{
ignoredCompletedTasks = playerTasksCompleted[__instance];
ignoredCompletedTasks = playerTasksCompleted[__instance.PlayerId];
}
*/
Logger.Info($" {__instance.Data.PlayerName} completed {idx}", "TaskPatch");
if (Options.Gamemode.GetValue() < 2)
{
if (AbilityManagement.IsSpeedrunner(__instance) && !__instance.Data.IsDead && playerTasksCompleted[__instance] >= __instance.Data.Tasks.Count)
if (AbilityManagement.IsSpeedrunner(__instance) && !__instance.Data.IsDead && playerTasksCompleted[__instance.PlayerId] >= __instance.Data.Tasks.Count)
{
Logger.Info($"Speedrunner {__instance.Data.PlayerName} won", "TaskPatch");
Utils.ContinueEndGame((byte)GameOverReason.CrewmatesByVote);
@@ -195,7 +202,7 @@ class PlayerControlCompleteTaskPatch
if (Options.Gamemode.GetValue() == 3)
{
if (!__instance.Data.IsDead && playerTasksCompleted[__instance] >= __instance.Data.Tasks.Count)
if (!__instance.Data.IsDead && playerTasksCompleted[__instance.PlayerId] >= __instance.Data.Tasks.Count)
{
Utils.CustomWinnerEndGame(__instance, 1);
NormalGameEndChecker.LastWinReason = $"{__instance.Data.PlayerName} wins! (Completed tasks)";
@@ -206,13 +213,13 @@ class PlayerControlCompleteTaskPatch
if (PlayerControl.LocalPlayer.Data.IsDead && !Main.DisableInfoWhenDead.Value)
{
TMP_Text nameText = __instance.cosmetics.nameText;
nameText.text = $"{__instance.Data.PlayerName}<color=green><size=90%>({playerTasksCompleted[__instance]}/{tasksPerPlayer[__instance]})</color>";
nameText.text = $"{__instance.Data.PlayerName}<color=green><size=90%>({playerTasksCompleted[__instance.PlayerId]}/{tasksPerPlayer[__instance.PlayerId]})</color> - {Utils.StoredRoleText[__instance.PlayerId]}";
}
}
public static void CalculateTaskWin()
{
if (!Utils.GamePastRoleSelection || Utils.isHideNSeek || Options.NoGameEnd.GetBool()) return;
if (!Utils.GamePastRoleSelection || Utils.isHideNSeek || Options.NoGameEnd.GetBool() || !CoShowIntroPatch.IntroInitiated) return;
//Logger.Info($" Checking if {GameData.Instance.CompletedTasks} - {ignoredCompletedTasks} >= ({GameData.Instance.TotalTasks} - {ignoredTasks}) * 0.01 * {Options.TaskPercentNeededToWin.GetInt()}", "TaskPatch");
+30 -23
View File
@@ -29,14 +29,14 @@
<img src="https://github.com/astra1dev/AUnlocker/assets/90265231/14226f03-a003-4efc-b27b-6df53fb394d6" width=410 height=240>****
‎
# 🎮 Features (v1.7.3):
# 🎮 Features (v1.8.2):
## <b> 🌟 Custom Abilities:</b>
- Mayor (Crewmate)
- The Mayor has a configurable amount of extra votes
- Jester (Crewmate)
- The Jester wins alone by getting ejected, can win with Crewmates
- Speedrunner (Crewmate)
- The Crewmates win if the Speedrunner completes tasks and is alive
- Tasker (Crewmate)
- The Crewmates win if the Tasker completes tasks and is alive
- Workhorse (Crewmate)
- The Workhorse gains additional votes per completed task
- Tyrant (Impostor)
@@ -49,13 +49,11 @@
- To check ability descriptions, type /r {ability}
## <b>♠️ Client Side settings:</b>
- Game Master
- Unlock FPS
- Game Master (Spectator)
- Show FPS
- Dark Theme
- Toggle Lobby Music
- Show/Hide Info When Dead
- Customizable strings
## <b>⚙️ Technical settings:</b>
- Kick/Ban players under a certain level
- Kick/Ban invalid FriendCodes
@@ -71,24 +69,27 @@
- Automatically start game
- Automatically rejoin lobby
- Automatically send winner info
- Enable (configurable) Welcome Messages
- The Welcome Template is in Templates.txt
## <b>🔧 Gameplay Settings:</b>
- Dead impostors can sabotage
- Disable critical sabotages (invividual)
- Disable door sabotages
- Disable meeting calls first 30s
- Disable body reports
- Disable devices (per map, individual)
- Override decontamination time (per map)
- Disable spore triggers on The Fungle
- % Tasks completed for Crewmates to win
- Enable/Disable any task
- All players have same tasks
- Hide and Seek: Custom Impostor count
- Hide and Seek: Custom Seeker count
## <b>🏆 Custom Gamemodes:</b>
- 0 Kill Cooldown
- Shift and Seek
- Speedrun
## <b>❓ Other Improvements:</b>
- Preset system for mod settings
- Command Helper
- Creatable and customizable Templates
- Eht Dleks (Reverse Skeld) Map
- Ability to cancel starting countdown
@@ -96,8 +97,10 @@
- Faster startup time
- Custom anticheat system
- Zoom out in lobby or when dead
- See player kill/task count when dead
- See player kill/task count and Role when dead
- Higher and more accurate Option ranges
- Always visible lobby timer
- Access experimental animation test scene
- <b>🎉 And this all works in public lobbies!</b>
### Hotkeys
@@ -114,26 +117,30 @@
### Chat Commands
| Command | Function |
| ------------------------------------------- | ------------------------------------------------- |
| /h<br>/help | Show command help |
| /l<br>/win | Show winner |
| /r | Show current gamemode/roles description |
| /0kc<br>/sns</br>/sp | Show respective gamemode description |
| /ban <name> | Ban a player by name |
| /kick <name> | Kick a player by name |
| /cban <color> | Ban a player by color |
| /ckick <color> | Kick a player by color |
| /help | Show command help |
| /l<br>/lastgame | Send last game info |
| /r | Send current gamemode/roles description |
| /r {ability} | Send specific Ability info |
| /0kc<br>/sns</br>/sp | Send respective gamemode description |
| /ban {name} | Ban a player by name |
| /kick {name} | Kick a player by name |
| /cban {color} | Ban a player by color |
| /ckick {color} | Kick a player by color |
| /dump | Copy your LogOutput file |
| /endgame | Instantly end the game |
| /endmeeting | Instantly end an ongoing meeting |
| /aur | Sends AUR socials (GitHub, Discord) |
| /color | Sets color. Can be used to bypass color limit |
| /reload | Resets the *Language*.JSON file to default |
| /start | Starts game countdown |
| /eg<br>/endgame | Instantly end an ongoing game |
| /em<br>/endmeeting | Instantly end an ongoing meeting |
| /aur<br>/socials | Send AUR socials (GitHub, Discord) |
| /col<br>/color | Set color. Can be used to bypass color limit |
| /reload | Reset the *Language*.JSON file to default |
| /s<br>/start | Start game countdown |
| /vip<br>/moderator<br>/admin | Add a user to respective list by name |
| /t {template} | Send a Template from Templates.txt |
‎
**Credit to these mods and their developers for their code:**
### :star: [AUnlocker](https://github.com/astra1dev/AUnlocker)
> - Original NumberOptionsPatch
> - Always Show Lobby Timer
### :star: [EHR (Formerly TOHE+)](https://github.com/Gurge44/EndlessHostRoles)
> - Task Patching
### :star: [TOH](https://github.com/tukasa0001/TownOfHost) :
+61 -39
View File
@@ -2,26 +2,28 @@
"LanguageID": "0",
"gameMaster": "Game Master",
"unlockFPS": "Unlock FPS",
"showFPS": "Show FPS",
"autoStart": "Auto Start",
"enableDarkTheme": "Enable Dark Theme",
"enableLobbyMusic": "Lobby Music",
"disableInfoWhenDead": "Hide Info When Dead",
"disableCommandHelper": "Disable Command Helper",
"gameMasterWarning":"You will now spectate games until Game Master is turned off.",
"gameMasterWarning":"You will now spectate games until Game Master is turned off. WARNING: Ability messages will not be sent and role assigning might be inaccurate if this setting is enabled.",
"cancelStartCountdown": "Start countdown canceled",
"invalidFriendCodeKick": "{0} was kicked for having an invalid Friendcode",
"invalidFriendCodeBan": "{0} was banned for having an invalid Friendcode",
"language": "Language (Requires Restart)",
"gamemode": "Gamemode",
"tabGroupMain": "Moderation",
"kickLowLevelPlayer": "Kick Players Under Level",
"tempBanLowLevelPlayer": "Ban Instead Of Kick",
"kickInvalidFriendCodes": "Kick Invalid FriendCodes",
"dontKickLevelOnes": "Don't Kick Lv.1 Players For Glitched Lobbies",
"kickInvalidFriendCodes": "Kick Invalid (Empty) Friendcodes",
"tempBanInvalidFriendCodes": "Ban Instead Of Kick",
"applyBanList": "Apply BanList",
"applyDenyNameList": "Apply DenyName List",
"applyModeratorList": "Apply Moderator List",
"deniedWordsToKick": "Sent Denied Words To Kick Player",
"moderatorCanUseCommand": "Moderators can use commands",
"autoKickStart": "Kick Players Who Say Start",
"autoKickStartAsBan": "Ban Instead Of Kick",
@@ -33,6 +35,8 @@
"autoStartTimer": "Countdown For Auto Start",
"waitAutoStart": "Auto Start After",
"playerAutoStart": "Players Needed To Auto Start",
"enableJoinMessages": "Enable Welcome Messages",
"messagePerPlayerNum": "Message Per Amount Of Joins",
"tabGroupMisc": "Miscelleneous",
"startCountdown": "Default Starting Countdown",
"colorCommandLevel": "Who Can use Color Commands",
@@ -41,20 +45,18 @@
"tabGroupAccess": "Access Levels",
"slashColorCmd": "Who Can Use /color",
"slashRolesAndGamemodeCmd": "Who Can Use /r And Templates",
"slashLastGameCmd": "Who Can Use /l",
"slashHelpAndAurCmd": "Who Can Use /help And /aur",
"slashKickCmd": "Who Can Use /kick And /ckick",
"slashBanCmd": "Who Can Use /ban And /cban",
"slashRolesAndGamemodeCmd": "Who Can Use /r & Templates",
"slashLastGameCmd": "Who Can Use /l & /aur",
"slashKickCmd": "Who Can Use /kick & /ckick",
"slashBanCmd": "Who Can Use /ban & /cban",
"slashEndMeetingCmd": "Who Can Use /endmeeting",
"slashStartAndEndGameCmd": "Who Can Use /startgame And /endgame",
"slashStartAndEndGameCmd": "Who Can Use /startgame & /endgame",
"tabGroupCrewmate": "Crewmate Roles",
"tabGroupNeutral": "Neutral Roles",
"tabGroupImpostor": "Impostor Roles",
"tabGroupStandard": "Standard",
"chatBeforeFirstMeeting": "Force chat 1st round to see roles (experimental)",
"tabGroupHNS": "Hide and Seek",
"numSeekers": "# Seekers",
@@ -117,7 +119,6 @@
"disableAirshipCamera": "Disable Airship Camera",
"disableAirshipVital": "Disable Airship Vitals",
"disableFungleDevices": "Disable Fungle Devices",
"disableFungleCamera": "Disable Fungle Camera",
"disableFungleVital": "Disable Fungle Vitals",
"tabGroupTasks": "Tasks",
@@ -214,28 +215,9 @@
"disableSubmitScan": "Disable Submit Scan",
"disableUploadData": "Disable Upload Data",
"noKcdMode": "0 Kill Cooldown:\n\nImpostors have no kill cooldown, Crewmates have low tasks\nThink fast and pay attention!",
"SnSModeOne": "Shift and Seek:\n\nImpostors can only kill someone while shapeshifted as them\nEmergency Meetings = Off",
"SnSModeTwo": "Crew wins by tasks/surviving {0}s\nImp wins by killing\nOne wrong kill = Can't kill for {1}s\n{2} wrong kill(s) = suicide",
"speedrunMode": "Speedrun:\n\nEveryone is a crewmate. The 1st player to finish tasks wins the game. Game auto ends after {0}s",
"allCommandsFull": "Commands:\n/r - Current mode description\n/0kc, /sns, /sp - Specific mode description\n/l - Shows last winner info\n/kick, /ban - Bans or kicks a player by name\n/ckick, /cban - Bans or kicks a player by color",
"allCommandsOne": "Commands:\n/r - Current mode description\n/0kc, /sns, /sp - Specific mode description\n/l - Shows last winner info",
"allCommandsTwo": "/kick, /ban - Bans or kicks a player by name\n/ckick, /cban - Bans or kicks a player by color",
"socialsAll": "AUR socials:\n\ng i t h u b . c o m /\nApeMV/AmongUsRevamped\n\nd i s c o r d . g g /\n83Zhzhyhya",
"translationReloaded": "Your file has successfully been reset.\nTo apply the changes, restart your game.",
"allCommandsFull": "<b>ALL COMMANDS:</b>\n\n<b>/help</b>\nShow this message.\n<b>/aur, /socials</b>\nSend Among Us Revamped social links.\n\n<b>/r, /gm</b>\nSend current mode description or ability list.\n<b>/r {ability}</b>\nSend specific ability info.\n<b>/l, /lastgame</b>\nSend last winner info.\n\n<b>/0kc, /0killcooldown</b>\nSend 0 Kill Cooldown mode description.\n<b>/sns, /shiftandseek</b>\nSend Shift and Seek mode description.\n<b>/sp, /speedrun</b>\nSend Speedrun mode description.\n\n/<b>kick, /ban</b>\nKick or ban a player by name.\n<b>/ckick, /cban</b>\nKick or ban a player by color.\n\n<b>/vip /moderator /admin</b>\nAdd a player as VIP, Moderator, or Admin.\n<b>/removevip, /removemoderator, /removeadmin</b>\nRemove VIP, Moderator, or Admin from a player.\n\n<b>/eg, /endgame</b>\nEnd the current game.\n<b>/em, /endmeeting</b>\nEnd the current meeting.\n<b>/s, /start</b>\nBegin the game starting countdown.\n\n<b>/t {template}</b>\nSend a template from AUR-DATA/templates.txt.\n\n<b>/col, /color, /colour</b>\nSet your color, can be used to bypass limits.",
"mayorPublic": "Mayor:\n\nThe Mayor is a Crewmate with {0} additional vote(s). Use them wisely.",
"tyrantPublic": "Tyrant:\n\nThe Tyrant is an Impostor with {0} additional vote(s). Use them wisely.",
"juggernautPublic": "Juggernaut:\n\nThe Impostors instantly win if the Juggernaut gains {0} kills.",
"speedrunnerPublic": "Speedrunner:\n\nThe Crewmates win if the Speedrunner completes tasks and is alive. The Speedrunner has more tasks.",
"stealerPublic": "Stealer:\n\nThe Stealer gains {0} additional vote(s) per killed player. Votes are rounded down.",
"workhorsePublic": "Workhorse:\n\nThe Workhorse gains {0} additional vote(s) per completed task. Votes are rounded down.",
"jesterPublic": "Jester:\n\nThe Jester is a Crewmate who can also win alone by getting voted.",
"customRoleAnnouncement": "Custom Roles are enabled!\n\nIf you have a Custom Role, it will show in a message below this one.",
"translationReloaded": "Your file has successfully been reset.\nTo apply all changes, restart your game.",
"tabGroupCrewmateAbilities": "Crewmate Ability Settings",
"crewmateAbility": "Crewmate (Role) Ability",
@@ -247,8 +229,8 @@
"extraVotesCrewmate": "Extra Votes For Mayor",
"extraVotesPerTask": "Extra Votes Per Task For Workhorse",
"speedrunnerShortTasks": "Short Tasks For Speedrunner",
"speedrunnerLongTasks": "Long Tasks For Speedrunner",
"speedrunnerShortTasks": "Short Tasks For Tasker",
"speedrunnerLongTasks": "Long Tasks For Tasker",
"tabGroupImpostorAbilities": "Impostor Ability Settings",
"impostorAbility": "Impostor (Role) Ability",
@@ -262,7 +244,7 @@
"ability": "Ability",
"templateWelcome": "# In this file you can add Templates, which serve as easy copy-paste alternatives.\n# To create a template, write a new line with the same formatting as the test Template below.\n# Note that Templates can't be longer than 120 characters and can't contain special characters. Having so will kick you.\n\ntest: this is an example template. Type '/t test' to see it.",
"templateWelcome": "# In this file you can add Templates, which serve as easy copy-paste alternatives.\n# To create a template, write a new line with the same formatting as the test Template below.\n# Note that Templates can't be longer than 120 characters and can't contain special characters. Having so will kick you.\n\ntest: this is an example template. Type '/t test' to see it.\n\nwelcome: Welcome! This lobby uses Among Us Revamped {ModVersion} by MV. Enjoy!",
"moderatorWelcome": "# In this file you can add Moderators by Friendcode.\n# If you add someone, they will gain a purple name in-game.\n# Go to 'System Settings' in-game to customize Moderator permissions. Below is a Friendcode example.\n\nfriendcode#0000",
"vipWelcome": "# In this file you can add VIP's by Friendcode.\n# If you add someone, they will gain a yellow name in-game.\n# Go to 'System Settings' in-game to customize VIP permissions. Below is a Friendcode example.\n\nfriendcode#0000\n",
"adminWelcome": "# In this file you can add Admins by Friendcode.\n# If you add someone, they will gain a red name in-game.\n# Go to 'System Settings' in-game to customize Admin permissions. Below is a Friendcode example.\n\nfriendcode#0000\n",
@@ -270,5 +252,45 @@
"banwordWelcome": "# In this file you can set denied words, automatically kicking anyone in-game who sends words listed here.\n# Make sure to separate words by using new lines.",
"bannameWelcome": "# In this file you can set denied names, automatically kicking anyone in-game who uses names listed here.\n# Make sure to separate names by using new lines.",
"noGameEndWarning": "WARNING: No Game End is enabled"
"noGameEndWarning": "WARNING: No Game End is enabled",
"tooLongTemplate": "Your Template is longer than 120 characters and would kick you upon sending. Please reduce the length.",
"vipAdd": "Successfully added {0} as VIP.",
"moderatorAdd": "Successfully added {0} as Moderator.",
"adminAdd": "Successfully added {0} as Admin.",
"vipRemove": "Successfully removed VIP from {0}.",
"moderatorRemove": "Successfully removed Moderator from {0}.",
"adminRemove": "Successfully removed Admin from {0}.",
"permFail": "Could not find user '{0}'. Did you write it correctly?",
"helpDesc": "Show all commands and what they do.",
"snsDesc": "Send Shift and Seek gamemode Description.",
"0kcDesc": "Send 0 Kill Cooldown gamemode Description.",
"SrDesc": "Send Speedrun gamemode Description.",
"egDesc": "End the current game.",
"emDesc": "End the current meeting.",
"aurDesc": "Send Among Us Revamped social links.",
"sDesc": "Start the game countdown.",
"rDesc": "/r sends active abilities or current gamemode. /r {ability} sends specific ability info",
"rolesDesc": "Send all abilities/gamemode overview.",
"kickDesc": "Kick a player by name.",
"ckickDesc": "Kick a player by color.",
"banDesc": "Ban a player by name.",
"cbanDesc": "Ban a player by color.",
"dumpDesc": "Copy LogOutput into a seperate file.",
"colDesc": "Set your color.",
"reloadDesc": "Reload language file.",
"vipDesc": "Add user as VIP.",
"moderatorDesc": "Add user as Moderator.",
"adminDesc": "Add user as admin.",
"cremoveVipDesc": "Remove VIP from user.",
"removeModeratorDesc": "Remove Moderator from user.",
"removeAdminDesc": "Remove Admin from user.",
"lastgameDesc": "Send last game info.",
"templateDesc": "Send a specified template from AUR-DATA/templates.txt.",
"banWordKick": "{0} was kicked because they sent a banned word {1} time(s)",
"pluginWarning": "<color=red><size=5><b>WARNING:</color></b></size>\n<size=3><b>You have 2 or more detected Plugins.</size></b>\nAmong Us Revamped is not compatible with most mods.\nIf you find bugs, they are most likely due to incompatibility."
}