mirror of
https://github.com/ApeMV/AmongUsRevamped.git
synced 2026-10-21 21:43:36 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c380c1b51 | ||
|
|
71461583b3 | ||
|
|
81c20d4706 | ||
|
|
94c0049939 | ||
|
|
1c3224396c | ||
|
|
de4f057899 | ||
|
|
3e4d833b66 | ||
|
|
6a5fbe7300 | ||
|
|
fbf9b2b6eb |
No files matched your search
+5
-3
@@ -30,11 +30,11 @@ public partial class Main : BasePlugin
|
||||
public static ConfigEntry<string> Preset5 { get; private set; }
|
||||
|
||||
public static ConfigEntry<bool> GM { get; private set; }
|
||||
public static ConfigEntry<bool> UnlockFps { get; private set; }
|
||||
public static ConfigEntry<bool> ShowFps { get; private set; }
|
||||
public static ConfigEntry<bool> AutoStart { get; private set; }
|
||||
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 NormalGameOptionsV10 NormalOptions => GameOptionsManager.Instance != null ? GameOptionsManager.Instance.currentNormalGameOptions : null;
|
||||
public static HideNSeekGameOptionsV10 HideNSeekOptions => GameOptionsManager.Instance != null ? GameOptionsManager.Instance.currentHideNSeekGameOptions : null;
|
||||
@@ -42,7 +42,7 @@ public partial class Main : BasePlugin
|
||||
|
||||
public static bool HasArgumentException;
|
||||
public static string CredentialsText;
|
||||
public const string ModVersion = "v1.6.6";
|
||||
public const string ModVersion = "v1.7.4";
|
||||
|
||||
public static float GameTimer;
|
||||
|
||||
@@ -85,16 +85,18 @@ public partial class Main : BasePlugin
|
||||
|
||||
AutoStart = Config.Bind("Client Options", "Auto Start", false);
|
||||
GM = Config.Bind("Client Options", "Game Master", false);
|
||||
UnlockFps = Config.Bind("Client Options", "Unlock FPS", false);
|
||||
ShowFps = Config.Bind("Client Options", "Show FPS", false);
|
||||
AutoStart = Config.Bind("Client Options", "Auto Start", false);
|
||||
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);
|
||||
|
||||
Translator.Init();
|
||||
BanManager.Init();
|
||||
|
||||
Harmony.PatchAll();
|
||||
|
||||
ConsoleManager.DetachConsole();
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(ModManager), nameof(ModManager.LateUpdate))]
|
||||
|
||||
@@ -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="2025.11.18" PrivateAssets="all" Condition="'$(Configuration)' == 'Release'"/>
|
||||
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2026.3.31" 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" />
|
||||
|
||||
+54
-34
@@ -20,12 +20,14 @@ public static class BanManager
|
||||
#endif
|
||||
|
||||
public static string RemoveHtmlTags(this string str) => Regex.Replace(str, "<[^>]*?>", "");
|
||||
private static readonly string DenyNameListPath = $"{DataPath}/AUR-DATA/DenyNameList.txt";
|
||||
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/Bannedwords.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";
|
||||
private static string TemplatePath = $"{DataPath}/AUR-DATA/Templates.txt";
|
||||
public static Dictionary<string, string> Templates = new();
|
||||
public static List<string> TempBanWhiteList = [];
|
||||
public static void Init()
|
||||
{
|
||||
@@ -33,36 +35,15 @@ 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();
|
||||
}
|
||||
if (!File.Exists(BanListPath))
|
||||
{
|
||||
Logger.Warn("Creating a new Banlist.txt file", "BanManager");
|
||||
File.Create(BanListPath).Close();
|
||||
}
|
||||
if (!File.Exists(BanWordPath))
|
||||
{
|
||||
Logger.Warn("Creating a new Banlist.txt file", "BanManager");
|
||||
File.Create(BanWordPath).Close();
|
||||
}
|
||||
if (!File.Exists(VipListPath))
|
||||
{
|
||||
Logger.Warn("Creating a new VIP.txt file", "BanManager");
|
||||
File.Create(VipListPath).Close();
|
||||
}
|
||||
if (!File.Exists(ModeratorListPath))
|
||||
{
|
||||
Logger.Warn("Creating a new Moderator.txt file", "BanManager");
|
||||
File.Create(ModeratorListPath).Close();
|
||||
}
|
||||
if (!File.Exists(AdminListPath))
|
||||
{
|
||||
Logger.Warn("Creating a new Admin.txt file", "BanManager");
|
||||
File.Create(AdminListPath).Close();
|
||||
}
|
||||
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();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -153,6 +134,7 @@ public static class BanManager
|
||||
string line;
|
||||
while ((line = sr.ReadLine()) != null)
|
||||
{
|
||||
if (line.StartsWith("#")) continue;
|
||||
if (line == "") continue;
|
||||
if (!OnlyCheckPuid)
|
||||
{
|
||||
@@ -172,7 +154,7 @@ public static class BanManager
|
||||
{
|
||||
if (name == "" || !AmongUsClient.Instance.AmHost) return false;
|
||||
|
||||
var deniedNames = File.ReadAllLines(DenyNameListPath);
|
||||
var deniedNames = File.ReadAllLines(DenyNameListPath).Where(x => !x.StartsWith("#"));
|
||||
|
||||
if (deniedNames.Where(code => !string.IsNullOrWhiteSpace(code)).Any(code => name.Contains(code, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
@@ -188,7 +170,7 @@ public static class BanManager
|
||||
{
|
||||
if (input == "" || !AmongUsClient.Instance.AmHost || Utils.CheckAccessLevel(player.Data.FriendCode) > 0) return false;
|
||||
|
||||
var bannedWords = File.ReadAllLines(BanWordPath);
|
||||
var bannedWords = File.ReadAllLines(BanWordPath).Where(x => !x.StartsWith("#"));
|
||||
|
||||
if (bannedWords.Where(code => !string.IsNullOrWhiteSpace(code)).Any(code => input.Contains(code, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
@@ -213,4 +195,42 @@ public static class BanManager
|
||||
__instance.BanButton.GetComponent<ButtonRolloverHandler>().SetEnabledColors();
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadTemplates()
|
||||
{
|
||||
Templates.Clear();
|
||||
|
||||
if (!File.Exists(TemplatePath)) return;
|
||||
|
||||
foreach (var line in File.ReadAllLines(TemplatePath))
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(line)) continue;
|
||||
if (line.StartsWith("#")) continue;
|
||||
|
||||
int splitIndex = line.IndexOf(':');
|
||||
|
||||
if (splitIndex == -1) continue;
|
||||
|
||||
string key = line[..splitIndex].Trim().ToLower();
|
||||
string value = line[(splitIndex + 1)..].Trim();
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
+112
-38
@@ -38,12 +38,6 @@ namespace AmongUsRevamped
|
||||
taskOptionsLoad = Task.Run(Load);
|
||||
}
|
||||
|
||||
//[HarmonyPatch(typeof(MainMenuManager), nameof(MainMenuManager.Start)), HarmonyPostfix]
|
||||
//public static void WaitOptionsLoad()
|
||||
//{
|
||||
//taskOptionsLoad.Wait();
|
||||
//}
|
||||
|
||||
public const int PresetId = 0;
|
||||
|
||||
private static readonly string[] presets =
|
||||
@@ -62,12 +56,22 @@ namespace AmongUsRevamped
|
||||
"Everyone", "<color=yellow>VIP</color> And Above", "<color=purple>Moderator</color> And Above", "<color=red>Admin</color>", "Only You"
|
||||
};
|
||||
|
||||
public static readonly string[] crewmateAbilities =
|
||||
{
|
||||
"Mayor", "Workhorse", "Jester", "Speedrunner", "None"
|
||||
};
|
||||
public static readonly string[] impostorAbilities =
|
||||
{
|
||||
"Tyrant", "Stealer", "Juggernaut", "None"
|
||||
};
|
||||
|
||||
//System
|
||||
public static OptionItem Gamemode;
|
||||
|
||||
public static OptionItem TabGroupMain;
|
||||
|
||||
public static OptionItem KickLowLevelPlayer;
|
||||
public static OptionItem DontKickLevelOnes;
|
||||
public static OptionItem TempBanLowLevelPlayer;
|
||||
|
||||
public static OptionItem KickInvalidFriendCodes;
|
||||
@@ -256,9 +260,10 @@ namespace AmongUsRevamped
|
||||
public static OptionItem DisableUploadData;
|
||||
|
||||
// Gamemode
|
||||
/*
|
||||
public static OptionItem TabGroupStandard;
|
||||
public static OptionItem ChatBeforeFirstMeeting;
|
||||
|
||||
*/
|
||||
public static OptionItem TabGroupHNS;
|
||||
public static OptionItem NumSeekers;
|
||||
|
||||
@@ -283,18 +288,53 @@ namespace AmongUsRevamped
|
||||
public static OptionItem TabGroupSpeedrun;
|
||||
public static OptionItem SpeedrunSettingsOverride;
|
||||
public static OptionItem GameAutoEndsAfter;
|
||||
public static OptionItem EngineerMode;
|
||||
|
||||
// Roles
|
||||
// Abilities
|
||||
public static OptionItem TabGroupCrewmate;
|
||||
public static OptionItem MayorPerc;
|
||||
public static OptionItem MayorExtraVoteCount;
|
||||
public static OptionItem MayorVentToMeeting;
|
||||
|
||||
public static OptionItem TabGroupNeutral;
|
||||
public static OptionItem JesterPerc;
|
||||
public static OptionItem JesterCanVent;
|
||||
public static OptionItem OverrideCrewmate;
|
||||
public static OptionItem CrewmateAbility;
|
||||
|
||||
public static OptionItem OverrideScientist;
|
||||
public static OptionItem ScientistAbility;
|
||||
|
||||
public static OptionItem OverrideEngineer;
|
||||
public static OptionItem EngineerAbility;
|
||||
|
||||
public static OptionItem OverrideNoisemaker;
|
||||
public static OptionItem NoisemakerAbility;
|
||||
|
||||
public static OptionItem OverrideTracker;
|
||||
public static OptionItem TrackerAbility;
|
||||
|
||||
public static OptionItem OverrideDetective;
|
||||
public static OptionItem DetectiveAbility;
|
||||
|
||||
public static OptionItem TabGroupCrewmateAbilities;
|
||||
public static OptionItem ExtraVotesCrewmate;
|
||||
public static OptionItem ExtraVotesPerTask;
|
||||
public static OptionItem SpeedrunnerShortTasks;
|
||||
public static OptionItem SpeedrunnerLongTasks;
|
||||
|
||||
public static OptionItem TabGroupImpostor;
|
||||
|
||||
public static OptionItem OverrideImpostor;
|
||||
public static OptionItem ImpostorAbility;
|
||||
|
||||
public static OptionItem OverrideShapeshifter;
|
||||
public static OptionItem ShapeshifterAbility;
|
||||
|
||||
public static OptionItem OverridePhantom;
|
||||
public static OptionItem PhantomAbility;
|
||||
|
||||
public static OptionItem OverrideViper;
|
||||
public static OptionItem ViperAbility;
|
||||
|
||||
public static OptionItem TabGroupImpostorAbilities;
|
||||
public static OptionItem ExtraVotesImpostor;
|
||||
public static OptionItem ExtraVotesPerKill;
|
||||
public static OptionItem KillsNeededForJuggernaut;
|
||||
|
||||
public static bool IsLoaded = false;
|
||||
|
||||
@@ -317,6 +357,8 @@ namespace AmongUsRevamped
|
||||
.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)
|
||||
@@ -336,7 +378,7 @@ namespace AmongUsRevamped
|
||||
|
||||
AutoSendGameInfo = BooleanOptionItem.Create(60150, Translator.Get("autoSendGameInfo"), true, TabGroup.SystemSettings, false);
|
||||
AutoRejoinLobby = BooleanOptionItem.Create(60210, Translator.Get("autoRejoinLobby"), false, TabGroup.SystemSettings, false);
|
||||
AutoStartTimer = IntegerOptionItem.Create(64420, Translator.Get("autoStartTimer"), new(1, 600, 1), 5, TabGroup.SystemSettings, false)
|
||||
AutoStartTimer = IntegerOptionItem.Create(64420, Translator.Get("autoStartTimer"), new(1, 5, 1), 5, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
WaitAutoStart = IntegerOptionItem.Create(64421, Translator.Get("waitAutoStart"), new(10, 600, 10), 300, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
@@ -345,7 +387,7 @@ namespace AmongUsRevamped
|
||||
TabGroupMisc = TextOptionItem.Create(60379, Translator.Get("tabGroupMisc"), TabGroup.SystemSettings)
|
||||
.SetColor(Color.green);
|
||||
|
||||
StartCountdown = IntegerOptionItem.Create(60380, Translator.Get("startCountdown"), new(1, 600, 1), 5, TabGroup.SystemSettings, false)
|
||||
StartCountdown = IntegerOptionItem.Create(60380, Translator.Get("startCountdown"), new(1, 5, 1), 5, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
AllowFortegreen = BooleanOptionItem.Create(60382, Translator.Get("allowFortegreen"), false, TabGroup.SystemSettings, false);
|
||||
NoGameEnd = BooleanOptionItem.Create(60383, Translator.Get("noGameEnd"), false, TabGroup.SystemSettings, false)
|
||||
@@ -362,34 +404,65 @@ namespace AmongUsRevamped
|
||||
SlashEndMeetingCmd = StringOptionItem.Create(60407, Translator.Get("slashEndMeetingCmd"), accessLevels, 3, TabGroup.SystemSettings, false);
|
||||
SlashStartAndEndGameCmd = StringOptionItem.Create(60408, Translator.Get("slashStartAndEndGameCmd"), accessLevels, 3, TabGroup.SystemSettings, false);
|
||||
|
||||
|
||||
// Custom role settings
|
||||
TabGroupCrewmate = TextOptionItem.Create(100000, Translator.Get("tabGroupCrewmate"), TabGroup.CustomRoleSettings)
|
||||
// Ability settings
|
||||
TabGroupCrewmate = TextOptionItem.Create(100000, Translator.Get("tabGroupCrewmate"), TabGroup.AbilitySettings)
|
||||
.SetColor(CL.Hex("#8cffff"));
|
||||
MayorPerc = IntegerOptionItem.Create(100001, Translator.Get("Mayor"), new(0, 100, 5), 0, TabGroup.CustomRoleSettings, false)
|
||||
.SetValueFormat(OptionFormat.Percent)
|
||||
.SetColor(CL.Hex("#204d42"));
|
||||
MayorExtraVoteCount = IntegerOptionItem.Create(100002, Translator.Get("mayorExtraVoteCount"), new(1, 15, 1), 1, TabGroup.CustomRoleSettings, false)
|
||||
.SetValueFormat(OptionFormat.Level)
|
||||
.SetParent(MayorPerc);
|
||||
MayorVentToMeeting = BooleanOptionItem.Create(100003, Translator.Get("mayorVentToMeeting"), true, TabGroup.CustomRoleSettings, false)
|
||||
.SetParent(MayorPerc);
|
||||
|
||||
TabGroupNeutral = TextOptionItem.Create(101000, Translator.Get("tabGroupNeutral"), TabGroup.CustomRoleSettings)
|
||||
.SetColor(CL.Hex("#FFFF99"));
|
||||
JesterPerc = IntegerOptionItem.Create(101001, Translator.Get("Jester"), new(0, 100, 5), 0, TabGroup.CustomRoleSettings, false)
|
||||
.SetValueFormat(OptionFormat.Percent)
|
||||
.SetColor(CL.Hex("#ec62a5"));
|
||||
JesterCanVent = BooleanOptionItem.Create(101002, Translator.Get("jesterCanVent"), false, TabGroup.CustomRoleSettings, false)
|
||||
.SetParent(JesterPerc);
|
||||
CrewmateAbility = StringOptionItem.Create(100001, Translator.Get("crewmateAbility"), crewmateAbilities, 4, TabGroup.AbilitySettings, false)
|
||||
.SetColor(CL.Hex("#8cffff"));
|
||||
|
||||
TabGroupImpostor = TextOptionItem.Create(102000, Translator.Get("tabGroupImpostor"), TabGroup.CustomRoleSettings)
|
||||
ScientistAbility = StringOptionItem.Create(100101, Translator.Get("scientistAbility"), crewmateAbilities, 4, TabGroup.AbilitySettings, false)
|
||||
.SetColor(CL.Hex("#8cffff"));
|
||||
|
||||
EngineerAbility = StringOptionItem.Create(100201, Translator.Get("engineerAbility"), crewmateAbilities, 4, TabGroup.AbilitySettings, false)
|
||||
.SetColor(CL.Hex("#8cffff"));
|
||||
|
||||
NoisemakerAbility = StringOptionItem.Create(100301, Translator.Get("noisemakerAbility"), crewmateAbilities, 4, TabGroup.AbilitySettings, false)
|
||||
.SetColor(CL.Hex("#8cffff"));
|
||||
|
||||
TrackerAbility = StringOptionItem.Create(100401, Translator.Get("trackerAbility"), crewmateAbilities, 4, TabGroup.AbilitySettings, false)
|
||||
.SetColor(CL.Hex("#8cffff"));
|
||||
|
||||
DetectiveAbility = StringOptionItem.Create(100501, Translator.Get("detectiveAbility"), crewmateAbilities, 4, TabGroup.AbilitySettings, false)
|
||||
.SetColor(CL.Hex("#8cffff"));
|
||||
|
||||
TabGroupCrewmateAbilities = TextOptionItem.Create(101000, Translator.Get("tabGroupCrewmateAbilities"), TabGroup.AbilitySettings)
|
||||
.SetColor(CL.Hex("#8cffff"));
|
||||
ExtraVotesCrewmate = IntegerOptionItem.Create(101001, Translator.Get("extraVotesCrewmate"), new(1, 15, 1), 1, TabGroup.AbilitySettings, false)
|
||||
.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), 4, TabGroup.AbilitySettings, false)
|
||||
.SetValueFormat(OptionFormat.Level);
|
||||
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)
|
||||
.SetColor(CL.Hex("#ff1919"));
|
||||
|
||||
ImpostorAbility = StringOptionItem.Create(100002, Translator.Get("impostorAbility"), impostorAbilities, 3, TabGroup.AbilitySettings, false)
|
||||
.SetColor(CL.Hex("#ff1919"));
|
||||
|
||||
ShapeshifterAbility = StringOptionItem.Create(102101, Translator.Get("shapeshifterAbility"), impostorAbilities, 3, TabGroup.AbilitySettings, false)
|
||||
.SetColor(CL.Hex("#ff1919"));
|
||||
|
||||
PhantomAbility = StringOptionItem.Create(102201, Translator.Get("phantomAbility"), impostorAbilities, 3, TabGroup.AbilitySettings, false)
|
||||
.SetColor(CL.Hex("#ff1919"));
|
||||
|
||||
|
||||
ViperAbility = StringOptionItem.Create(102301, Translator.Get("viperAbility"), impostorAbilities, 3, TabGroup.AbilitySettings, false)
|
||||
.SetColor(CL.Hex("#ff1919"));
|
||||
|
||||
TabGroupImpostorAbilities = TextOptionItem.Create(103000, Translator.Get("tabGroupImpostorAbilities"), TabGroup.AbilitySettings)
|
||||
.SetColor(CL.Hex("#ff1919"));
|
||||
ExtraVotesImpostor = IntegerOptionItem.Create(103001, Translator.Get("extraVotesImpostor"), new(1, 15, 1), 1, TabGroup.AbilitySettings, false)
|
||||
.SetValueFormat(OptionFormat.Level);
|
||||
ExtraVotesPerKill = FloatOptionItem.Create(103002, Translator.Get("extraVotesPerKill"), new(0.25f, 3f, 0.25f), 0.5f, TabGroup.AbilitySettings, false)
|
||||
.SetValueFormat(OptionFormat.Level);
|
||||
KillsNeededForJuggernaut = IntegerOptionItem.Create(103003, Translator.Get("killsNeededForJuggernaut"), new(3, 15, 1), 7, TabGroup.AbilitySettings, false)
|
||||
.SetValueFormat(OptionFormat.Level);
|
||||
|
||||
// Gamemode Settings
|
||||
TabGroupStandard = TextOptionItem.Create(69998, Translator.Get("tabGroupStandard"), TabGroup.GamemodeSettings)
|
||||
.SetColor(Color.white);
|
||||
ChatBeforeFirstMeeting = BooleanOptionItem.Create(69999, Translator.Get("chatBeforeFirstMeeting"), false, TabGroup.GamemodeSettings, false);
|
||||
|
||||
TabGroupHNS = TextOptionItem.Create(70000, Translator.Get("tabGroupHNS"), TabGroup.GamemodeSettings)
|
||||
.SetColor(Color.green);
|
||||
@@ -437,6 +510,7 @@ namespace AmongUsRevamped
|
||||
SpeedrunSettingsOverride = BooleanOptionItem.Create(70076, Translator.Get("speedrunSettingsOverride"), true, TabGroup.GamemodeSettings, false);
|
||||
GameAutoEndsAfter = IntegerOptionItem.Create(70077, Translator.Get("gameAutoEndsAfter"), new(0, 600, 10), 300, TabGroup.GamemodeSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
EngineerMode = BooleanOptionItem.Create(70078, Translator.Get("engineerMode"), false, TabGroup.GamemodeSettings, false);
|
||||
|
||||
// Gameplay Settings
|
||||
TabGroupSabotages = TextOptionItem.Create(60450, Translator.Get("tabGroupSabotages"), TabGroup.ModSettings)
|
||||
|
||||
@@ -5,7 +5,150 @@ using InnerNet;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AmongUsRevamped;
|
||||
// It was a fun ride, but this won't last.
|
||||
// Edit: WE ARE SO BACK
|
||||
|
||||
public static class AbilityManagement
|
||||
{
|
||||
public static bool IsMayor(PlayerControl player)
|
||||
{
|
||||
if (player.Data.RoleType == RoleTypes.Crewmate && Options.CrewmateAbility.GetValue() == 0 ||
|
||||
player.Data.RoleType == RoleTypes.Scientist && Options.ScientistAbility.GetValue() == 0 ||
|
||||
player.Data.RoleType == RoleTypes.Engineer && Options.EngineerAbility.GetValue() == 0 ||
|
||||
player.Data.RoleType == RoleTypes.Noisemaker && Options.NoisemakerAbility.GetValue() == 0 ||
|
||||
player.Data.RoleType == RoleTypes.Tracker && Options.TrackerAbility.GetValue() == 0 ||
|
||||
player.Data.RoleType == RoleTypes.Detective && Options.DetectiveAbility.GetValue() == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
||||
public static bool IsWorkhorse(PlayerControl player)
|
||||
{
|
||||
if (player.Data.RoleType == RoleTypes.Crewmate && Options.CrewmateAbility.GetValue() == 1 ||
|
||||
player.Data.RoleType == RoleTypes.Scientist && Options.ScientistAbility.GetValue() == 1 ||
|
||||
player.Data.RoleType == RoleTypes.Engineer && Options.EngineerAbility.GetValue() == 1 ||
|
||||
player.Data.RoleType == RoleTypes.Noisemaker && Options.NoisemakerAbility.GetValue() == 1 ||
|
||||
player.Data.RoleType == RoleTypes.Tracker && Options.TrackerAbility.GetValue() == 1 ||
|
||||
player.Data.RoleType == RoleTypes.Detective && Options.DetectiveAbility.GetValue() == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
||||
public static bool IsJester(PlayerControl player)
|
||||
{
|
||||
if (player.Data.RoleType == RoleTypes.Crewmate && Options.CrewmateAbility.GetValue() == 2 ||
|
||||
player.Data.RoleType == RoleTypes.Scientist && Options.ScientistAbility.GetValue() == 2 ||
|
||||
player.Data.RoleType == RoleTypes.Engineer && Options.EngineerAbility.GetValue() == 2 ||
|
||||
player.Data.RoleType == RoleTypes.Noisemaker && Options.NoisemakerAbility.GetValue() == 2 ||
|
||||
player.Data.RoleType == RoleTypes.Tracker && Options.TrackerAbility.GetValue() == 2 ||
|
||||
player.Data.RoleType == RoleTypes.Detective && Options.DetectiveAbility.GetValue() == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
||||
public static bool IsSpeedrunner(PlayerControl player)
|
||||
{
|
||||
if (player.Data.RoleType == RoleTypes.Crewmate && Options.CrewmateAbility.GetValue() == 3 ||
|
||||
player.Data.RoleType == RoleTypes.Scientist && Options.ScientistAbility.GetValue() == 3 ||
|
||||
player.Data.RoleType == RoleTypes.Engineer && Options.EngineerAbility.GetValue() == 3 ||
|
||||
player.Data.RoleType == RoleTypes.Noisemaker && Options.NoisemakerAbility.GetValue() == 3 ||
|
||||
player.Data.RoleType == RoleTypes.Tracker && Options.TrackerAbility.GetValue() == 3 ||
|
||||
player.Data.RoleType == RoleTypes.Detective && Options.DetectiveAbility.GetValue() == 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
||||
public static bool IsTyrant(PlayerControl player)
|
||||
{
|
||||
if (player.Data.RoleType == RoleTypes.Impostor && Options.ImpostorAbility.GetValue() == 0 ||
|
||||
player.Data.RoleType == RoleTypes.Shapeshifter && Options.ShapeshifterAbility.GetValue() == 0 ||
|
||||
player.Data.RoleType == RoleTypes.Phantom && Options.PhantomAbility.GetValue() == 0 ||
|
||||
player.Data.RoleType == RoleTypes.Viper && Options.ViperAbility.GetValue() == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
||||
public static bool IsStealer(PlayerControl player)
|
||||
{
|
||||
if (player.Data.RoleType == RoleTypes.Impostor && Options.ImpostorAbility.GetValue() == 1 ||
|
||||
player.Data.RoleType == RoleTypes.Shapeshifter && Options.ShapeshifterAbility.GetValue() == 1 ||
|
||||
player.Data.RoleType == RoleTypes.Phantom && Options.PhantomAbility.GetValue() == 1 ||
|
||||
player.Data.RoleType == RoleTypes.Viper && Options.ViperAbility.GetValue() == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
||||
public static bool IsJuggernaut(PlayerControl player)
|
||||
{
|
||||
if (player.Data.RoleType == RoleTypes.Impostor && Options.ImpostorAbility.GetValue() == 2 ||
|
||||
player.Data.RoleType == RoleTypes.Shapeshifter && Options.ShapeshifterAbility.GetValue() == 2 ||
|
||||
player.Data.RoleType == RoleTypes.Phantom && Options.PhantomAbility.GetValue() == 2 ||
|
||||
player.Data.RoleType == RoleTypes.Viper && Options.ViperAbility.GetValue() == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
||||
public static string RoleList()
|
||||
{
|
||||
var firstLines = new List<string>();
|
||||
|
||||
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 secondLines = new List<string>();
|
||||
|
||||
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()}");
|
||||
|
||||
string firstText = firstLines.Count > 0 ? "ABILITIES:\n\n" + string.Join("\n", firstLines) : "";
|
||||
string secondText = secondLines.Count > 0 ? "\n" + string.Join("\n", secondLines) : "";
|
||||
|
||||
return firstText + secondText;
|
||||
}
|
||||
|
||||
public static void SendRoleList(ChatController c, string text, bool moderator)
|
||||
{
|
||||
if (string.IsNullOrEmpty(AbilityManagement.RoleList())) return;
|
||||
|
||||
if (text.Length <= 120)
|
||||
{
|
||||
if (moderator) Utils.ModeratorChatCommand(text, "", false);
|
||||
else Utils.ChatCommand(c, text, "", false);
|
||||
return;
|
||||
}
|
||||
|
||||
int splitIndex = text.LastIndexOf('\n', 120);
|
||||
|
||||
if (splitIndex <= 0) splitIndex = 120;
|
||||
|
||||
string first = text[..splitIndex];
|
||||
string second = text[(splitIndex + 1)..];
|
||||
|
||||
if (moderator) Utils.ModeratorChatCommand(first, second, true);
|
||||
else Utils.ChatCommand(c, first, second, true);
|
||||
}
|
||||
}
|
||||
/*
|
||||
public static class CustomRoleManagement
|
||||
{
|
||||
public static Dictionary<byte, string> PlayerRoles = new Dictionary<byte, string>();
|
||||
@@ -19,6 +162,8 @@ public static class CustomRoleManagement
|
||||
|
||||
public static void AssignRoles()
|
||||
{
|
||||
if (Options.Gamemode.GetValue() > 1) return;
|
||||
|
||||
// crewmateRoles = assigned with crewmate role base
|
||||
// impostorRoles = assigned with impostor role base
|
||||
List<(string roleName, int percentage)> crewmateRoles = new()
|
||||
@@ -114,7 +259,12 @@ public static class CustomRoleManagement
|
||||
private static int PendingRoleMessages = 0;
|
||||
public static void SendRoleMessages(Dictionary<string, string> roleMessages)
|
||||
{
|
||||
if (PlayerRoles.Count == 0 || PlayerControl.LocalPlayer.Data.IsDead) return;
|
||||
if (PlayerRoles.Count == 0 || PlayerControl.LocalPlayer.Data.IsDead)
|
||||
{
|
||||
HandlingRoleMessages = false;
|
||||
PendingRoleMessages = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
HashSet<string> sentRoles = new HashSet<string>();
|
||||
|
||||
@@ -199,4 +349,5 @@ public static class CustomRoleManagement
|
||||
}
|
||||
return string.Join("\n", lines);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -102,22 +102,6 @@ class FixedUpdateInGamePatch
|
||||
break;
|
||||
}
|
||||
|
||||
if (__instance.Data.PlayerLevel != 0 && __instance.Data.PlayerLevel < Options.KickLowLevelPlayer.GetInt() - 1 && __instance.Data.ClientId != AmongUsClient.Instance.HostId)
|
||||
{
|
||||
if (!Options.TempBanLowLevelPlayer.GetBool())
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(__instance.Data.ClientId, false);
|
||||
Logger.Info($" {__instance.Data.PlayerName} was kicked for being under level {Options.KickLowLevelPlayer.GetInt()}", "KickLowLevelPlayer");
|
||||
Logger.SendInGame($" {__instance.Data.PlayerName} was kicked for being under level {Options.KickLowLevelPlayer.GetInt()}");
|
||||
}
|
||||
else
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(__instance.Data.ClientId, true);
|
||||
Logger.Info($" {__instance.Data.PlayerName} was banned for being under level {Options.KickLowLevelPlayer.GetInt()} ", "BanLowLevelPlayer");
|
||||
Logger.SendInGame($" {__instance.Data.PlayerName} was banned for being under level {Options.KickLowLevelPlayer.GetInt()}");
|
||||
}
|
||||
}
|
||||
|
||||
if (Utils.InGame && !Utils.IsMeeting && !ExileController.Instance)
|
||||
{
|
||||
// 2 = Shift and Seek
|
||||
|
||||
@@ -214,7 +214,8 @@ namespace AmongUsRevamped
|
||||
public enum TabGroup
|
||||
{
|
||||
SystemSettings,
|
||||
CustomRoleSettings,
|
||||
//CustomRoleSettings,
|
||||
AbilitySettings,
|
||||
ModSettings,
|
||||
GamemodeSettings,
|
||||
|
||||
|
||||
+40
-1
@@ -73,8 +73,12 @@ public static class Utils
|
||||
{
|
||||
case TabGroup.SystemSettings:
|
||||
return "System Settings";
|
||||
/*
|
||||
case TabGroup.CustomRoleSettings:
|
||||
return "Custom Roles";
|
||||
*/
|
||||
case TabGroup.AbilitySettings:
|
||||
return "Ability Settings";
|
||||
case TabGroup.ModSettings:
|
||||
return "Gameplay Settings";
|
||||
case TabGroup.GamemodeSettings:
|
||||
@@ -212,14 +216,16 @@ public static class Utils
|
||||
NormalGameEndChecker.ImpCheckComplete = false;
|
||||
CreateOptionsPickerPatch.SetDleks2 = false;
|
||||
CanCallMeetings = true;
|
||||
CustomRoleManagement.HandlingRoleMessages = false;
|
||||
//CustomRoleManagement.HandlingRoleMessages = false;
|
||||
PlayerControlSetRolePatch.FirstAssign = true;
|
||||
PlayerControlSetRolePatch.Jesters.Clear();
|
||||
|
||||
PlayerControlCompleteTaskPatch.playerTasksCompleted.Clear();
|
||||
PlayerControlCompleteTaskPatch.tasksPerPlayer.Clear();
|
||||
PlayerControlCompleteTaskPatch.tasksInitiated = false;
|
||||
PlayerControlCompleteTaskPatch.ignoredCompletedTasks = 0;
|
||||
PlayerControlCompleteTaskPatch.ignoredTasks = 0;
|
||||
|
||||
}
|
||||
|
||||
public static PlayerControl[] AllAlivePlayerControls
|
||||
@@ -541,4 +547,37 @@ public static class Utils
|
||||
PlayerControl.LocalPlayer.CmdReportDeadBody(null);
|
||||
MeetingHud.Instance.RpcClose();
|
||||
}
|
||||
|
||||
public static MethodBase GetStateMachineMoveNext<T>(string methodName)
|
||||
{
|
||||
var typeName = typeof(T).FullName;
|
||||
var stateMachine = typeof(T).GetNestedTypes().FirstOrDefault(x => x.Name.Contains(methodName));
|
||||
|
||||
if (stateMachine == null)
|
||||
{
|
||||
Logger.Error($"Failed to find {methodName} state machine for {typeName}", "GetStateMachineMoveNext");
|
||||
return null;
|
||||
}
|
||||
|
||||
var moveNext = AccessTools.Method(stateMachine, "MoveNext");
|
||||
if (moveNext == null)
|
||||
{
|
||||
Logger.Error($"Failed to find MoveNext method for {typeName}.{methodName}", "GetStateMachineMoveNext");
|
||||
return null;
|
||||
}
|
||||
|
||||
Logger.Info($"Found {methodName}.MoveNext", "GetStateMachineMoveNext");
|
||||
return moveNext;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
return $"<color=#ff1919>{p.Data.RoleType}</color>";
|
||||
}
|
||||
else return $"<color=#8cffff>{p.Data.RoleType}</color>";
|
||||
}
|
||||
}
|
||||
+89
-11
@@ -143,21 +143,40 @@ internal static class SendChatPatch
|
||||
return false;
|
||||
}
|
||||
|
||||
if (__instance.timeSinceLastMessage < 3f || OnGameJoinedPatch.WaitingForChat || CustomRoleManagement.HandlingRoleMessages) return false;
|
||||
if (__instance.timeSinceLastMessage < 3f || OnGameJoinedPatch.WaitingForChat /*|| CustomRoleManagement.HandlingRoleMessages*/) return false;
|
||||
|
||||
if (text == "/l" || text == "/lastgame" || text == "/win" || text == "/winner")
|
||||
{
|
||||
if (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);
|
||||
return false;}
|
||||
|
||||
if (text == "/r mayor"){
|
||||
Utils.ChatCommand(__instance, Translator.Get("mayorPublic", Options.MayorExtraVoteCount.GetInt()), "", false);
|
||||
Utils.ChatCommand(__instance, Translator.Get("mayorPublic", Options.ExtraVotesCrewmate.GetInt()), "", false);
|
||||
return false;}
|
||||
|
||||
if (text == "/r tyrant"){
|
||||
Utils.ChatCommand(__instance, Translator.Get("tyrantPublic", Options.ExtraVotesImpostor.GetInt()), "", false);
|
||||
return false;}
|
||||
|
||||
if (text == "/r workhorse"){
|
||||
Utils.ChatCommand(__instance, Translator.Get("workhorsePublic", Options.ExtraVotesPerTask.GetFloat()), "", false);
|
||||
return false;}
|
||||
|
||||
if (text == "/r stealer"){
|
||||
Utils.ChatCommand(__instance, Translator.Get("stealerPublic", Options.ExtraVotesPerKill.GetFloat()), "", false);
|
||||
return false;}
|
||||
|
||||
if (text == "/r juggernaut"){
|
||||
Utils.ChatCommand(__instance, Translator.Get("juggernautPublic", Options.KillsNeededForJuggernaut.GetInt()), "", false);
|
||||
return false;}
|
||||
|
||||
if (text == "/r speedrunner"){
|
||||
Utils.ChatCommand(__instance, Translator.Get("speedrunnerPublic"), "", false);
|
||||
return false;}
|
||||
|
||||
if (text == "/aur" || text == "/amongusrevamped" || text == "/socials")
|
||||
@@ -189,7 +208,7 @@ internal static class SendChatPatch
|
||||
switch (Options.Gamemode.GetValue())
|
||||
{
|
||||
case 0:
|
||||
Utils.ChatCommand(__instance, $"Enabled Custom Roles:\n\n{CustomRoleManagement.GetActiveRoles()}", "", false);
|
||||
AbilityManagement.SendRoleList(__instance, AbilityManagement.RoleList(), false);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
@@ -210,6 +229,31 @@ internal static class SendChatPatch
|
||||
__instance.freeChatField.textArea.SetText(string.Empty);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (text.StartsWith("/t "))
|
||||
{
|
||||
string templateName = text[3..].Trim().ToLower();
|
||||
|
||||
if (BanManager.Templates.TryGetValue(templateName, out string templateMessage))
|
||||
{
|
||||
if (templateMessage.Length < 121)
|
||||
{
|
||||
Utils.ChatCommand(__instance, templateMessage, "", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("tooLongTemplate"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Info($"Could not find template '{templateName}'", "TemplateManager");
|
||||
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, $"Template '{templateName}' not found.");
|
||||
}
|
||||
__instance.freeChatField.textArea.Clear();
|
||||
__instance.freeChatField.textArea.SetText(string.Empty);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool col1 = text.StartsWith("/col ") || text.StartsWith("/cor ");
|
||||
bool col2 = text.StartsWith("/color ");
|
||||
@@ -243,10 +287,10 @@ internal static class SendChatPatch
|
||||
if (!isKick && !isBan && !isColorKick && !isColorBan)
|
||||
{
|
||||
|
||||
__instance.freeChatField.textArea.SetText(converted);
|
||||
Utils.ChatCommand(__instance, $"{converted}", "", false);
|
||||
//__instance.freeChatField.textArea.SetText(converted);
|
||||
//Utils.ChatCommand(__instance, $"{converted}", "", false);
|
||||
Logger.Info($" {PlayerControl.LocalPlayer.Data.PlayerName}: {msgtext}", "SendChat");
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
string arg = text.Substring(isKick ? 6 : isBan ? 5 : isColorKick ? 7 : isColorBan ? 6 : 0).Trim();
|
||||
@@ -400,7 +444,7 @@ public static class RPCHandlerPatch
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomRoleManagement.HandlingRoleMessages || OnGameJoinedPatch.WaitingForChat) return;
|
||||
if (/*CustomRoleManagement.HandlingRoleMessages || */OnGameJoinedPatch.WaitingForChat || GameStartManagerUpdatePatch.CountingDown) return;
|
||||
|
||||
if (text == "/h" || text == "/help")
|
||||
{
|
||||
@@ -476,7 +520,7 @@ public static class RPCHandlerPatch
|
||||
switch (Options.Gamemode.GetValue())
|
||||
{
|
||||
case 0:
|
||||
Utils.ModeratorChatCommand($"Enabled Custom Roles:\n\n{CustomRoleManagement.GetActiveRoles()}", "", false);
|
||||
AbilityManagement.SendRoleList(DestroyableSingleton<HudManager>.Instance.Chat, AbilityManagement.RoleList(), true);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
@@ -494,11 +538,45 @@ public static class RPCHandlerPatch
|
||||
}
|
||||
}
|
||||
|
||||
if (Utils.CheckAccessLevel(__instance.Data.FriendCode) < Options.SlashRolesAndGamemodeCmd.GetValue()) return;
|
||||
|
||||
if (text == "/r jester"){
|
||||
Utils.ModeratorChatCommand(Translator.Get("jesterPublic"), "", false);}
|
||||
|
||||
if (text == "/r mayor"){
|
||||
Utils.ModeratorChatCommand(Translator.Get("mayorPublic", Options.MayorExtraVoteCount.GetInt()), "", false);}
|
||||
Utils.ModeratorChatCommand(Translator.Get("mayorPublic", Options.ExtraVotesCrewmate.GetInt()), "", false);}
|
||||
|
||||
if (text == "/r tyrant"){
|
||||
Utils.ModeratorChatCommand(Translator.Get("tyrantPublic", Options.ExtraVotesImpostor.GetInt()), "", false);}
|
||||
|
||||
if (text == "/r workhorse"){
|
||||
Utils.ModeratorChatCommand(Translator.Get("workhorsePublic", Options.ExtraVotesPerTask.GetFloat()), "", false);}
|
||||
|
||||
if (text == "/r stealer"){
|
||||
Utils.ModeratorChatCommand(Translator.Get("stealerPublic", Options.ExtraVotesPerKill.GetFloat()), "", false);}
|
||||
|
||||
if (text == "/r juggernaut"){
|
||||
Utils.ModeratorChatCommand(Translator.Get("juggernautPublic", Options.KillsNeededForJuggernaut.GetInt()), "", false);}
|
||||
|
||||
if (text == "/r speedrunner"){
|
||||
Utils.ModeratorChatCommand(Translator.Get("speedrunnerPublic"), "", false);}
|
||||
|
||||
if (text.StartsWith("/t "))
|
||||
{
|
||||
string templateName = text[3..].Trim().ToLower();
|
||||
|
||||
if (BanManager.Templates.TryGetValue(templateName, out string templateMessage))
|
||||
{
|
||||
if (templateMessage.Length < 121)
|
||||
{
|
||||
Utils.ModeratorChatCommand(templateMessage, "", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
HudManager.Instance.Chat.AddChat(PlayerControl.LocalPlayer, Translator.Get("tooLongTemplate"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@ namespace AmongUsRevamped
|
||||
public static class OptionsMenuBehaviourStartPatch
|
||||
{
|
||||
private static ClientOptionItem GM;
|
||||
private static ClientOptionItem UnlockFPS;
|
||||
private static ClientOptionItem ShowFPS;
|
||||
private static ClientOptionItem AutoStart;
|
||||
private static ClientOptionItem DarkTheme;
|
||||
private static ClientOptionItem LobbyMusic;
|
||||
private static ClientOptionItem DisableInfoWhenDead;
|
||||
|
||||
public static void Postfix(OptionsMenuBehaviour __instance)
|
||||
{
|
||||
@@ -31,20 +31,12 @@ namespace AmongUsRevamped
|
||||
}
|
||||
}
|
||||
|
||||
if (UnlockFPS == null || UnlockFPS.ToggleButton == null)
|
||||
{
|
||||
UnlockFPS = ClientOptionItem.Create(Translator.Get("unlockFPS"), Main.UnlockFps, __instance, UnlockFPSButtonToggle);
|
||||
|
||||
static void UnlockFPSButtonToggle()
|
||||
{
|
||||
Application.targetFrameRate = Main.UnlockFps.Value ? 120 : 60;
|
||||
Logger.SendInGame($"FPS Set To {Application.targetFrameRate}");
|
||||
}
|
||||
}
|
||||
|
||||
if (ShowFPS == null || ShowFPS.ToggleButton == null)
|
||||
ShowFPS = ClientOptionItem.Create(Translator.Get("showFPS"), Main.ShowFps, __instance);
|
||||
|
||||
if (DisableInfoWhenDead == null || DisableInfoWhenDead.ToggleButton == null)
|
||||
DisableInfoWhenDead = ClientOptionItem.Create(Translator.Get("disableInfoWhenDead"), Main.DisableInfoWhenDead, __instance);
|
||||
|
||||
if (AutoStart == null || AutoStart.ToggleButton == null)
|
||||
{
|
||||
AutoStart = ClientOptionItem.Create(Translator.Get("autoStart"), Main.AutoStart, __instance, AutoStartButtonToggle);
|
||||
|
||||
@@ -148,7 +148,7 @@ public class RemoveDisableDevicesPatch
|
||||
{
|
||||
public static void Postfix()
|
||||
{
|
||||
if (!Options.DisableDevices.GetBool()) return;
|
||||
if (!Options.DisableDevices.GetBool() || !AmongUsClient.Instance.AmHost) return;
|
||||
|
||||
UpdateDisableDevices();
|
||||
}
|
||||
|
||||
+21
-14
@@ -1,28 +1,31 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace AmongUsRevamped;
|
||||
|
||||
[HarmonyPatch(typeof(AmongUsDateTime), nameof(AmongUsDateTime.UtcNow), MethodType.Getter)]
|
||||
public static class AmongUsDateTime_UtcNow
|
||||
{
|
||||
public static bool Prefix(ref Il2CppSystem.DateTime __result)
|
||||
{
|
||||
if (!CreateOptionsPickerPatch.SetDleks) return true;
|
||||
|
||||
var managedDate = new DateTime(DateTime.UtcNow.Year, 4, 2, 7, 1, 0, DateTimeKind.Utc);
|
||||
__result = new Il2CppSystem.DateTime(managedDate.Ticks);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class CreateOptionsPickerPatch
|
||||
{
|
||||
public static bool SetDleks = false;
|
||||
public static bool SetDleks2;
|
||||
private static bool InitiatedDleks;
|
||||
private static bool isSkeldFlipped = false;
|
||||
public static bool FlippedSkeld
|
||||
{
|
||||
get => isSkeldFlipped;
|
||||
set
|
||||
{
|
||||
if (AmongUsClient.Instance == null || isSkeldFlipped == value) return;
|
||||
|
||||
AssetReference temp = AmongUsClient.Instance.ShipPrefabs[3];
|
||||
AmongUsClient.Instance.ShipPrefabs[3] = AmongUsClient.Instance.ShipPrefabs[0];
|
||||
AmongUsClient.Instance.ShipPrefabs[0] = temp;
|
||||
|
||||
isSkeldFlipped = value;
|
||||
}
|
||||
}
|
||||
|
||||
private static MapSelectButton DleksButton;
|
||||
[HarmonyPatch]
|
||||
public static class GameOptionsMapPickerPatch
|
||||
@@ -80,6 +83,8 @@ class CreateOptionsPickerPatch
|
||||
dlekS_ehT_MapButton.Button.OnClick.RemoveAllListeners();
|
||||
dlekS_ehT_MapButton.Button.OnClick.AddListener((UnityEngine.Events.UnityAction)(() =>
|
||||
{
|
||||
FlippedSkeld = true;
|
||||
|
||||
__instance.SelectMap(__instance.AllMapIcons[0]);
|
||||
|
||||
if (__instance.selectedButton)
|
||||
@@ -136,6 +141,8 @@ class CreateOptionsPickerPatch
|
||||
|
||||
if (__instance.MapName == null) return false;
|
||||
|
||||
FlippedSkeld = (__instance.selectedMapId == 3);
|
||||
|
||||
if (DleksButton != null) SetDleks = __instance.selectedMapId == 3;
|
||||
|
||||
if (__instance.selectedMapId == 3)
|
||||
|
||||
@@ -53,24 +53,38 @@ class NormalGameEndChecker
|
||||
|
||||
if (Winner == "Jester")
|
||||
{
|
||||
LastWinReason = $"Jester wins! (Voted)\n\nImpostors: {impostorList}" + (string.IsNullOrEmpty(customRoles) ? "" : "\n\n" + customRoles);
|
||||
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}";
|
||||
canUpdateWinnerText = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Winner == "Speedrunner")
|
||||
{
|
||||
LastWinReason = $"Crewmates win! (Speedrunner finished tasks)\n\nImpostor: {impostorList}";
|
||||
canUpdateWinnerText = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Utils.AliveImpostors == 0 || Winner == "Crewmate")
|
||||
{
|
||||
LastWinReason = $"Crewmates win!\n\nImpostors: {impostorList}" + (string.IsNullOrEmpty(customRoles) ? "" : "\n\n" + customRoles);
|
||||
LastWinReason = $"Crewmates win!\n\nImpostors: {impostorList}";
|
||||
canUpdateWinnerText = false;
|
||||
}
|
||||
else if (Utils.AliveImpostors >= Utils.AliveCrewmates || Winner == "Impostor")
|
||||
{
|
||||
LastWinReason = $"Impostors win!\n\nImpostor: {impostorList}" + (string.IsNullOrEmpty(customRoles) ? "" : "\n\n" + customRoles);
|
||||
LastWinReason = $"Impostors win!\n\nImpostor: {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}" + (string.IsNullOrEmpty(customRoles) ? "" : "\n\n" + customRoles);
|
||||
LastWinReason = $"Crewmates win! ({Options.TaskPercentNeededToWin.GetInt()}% Tasks)\n\nImpostors: {impostorList}";
|
||||
canUpdateWinnerText = false;
|
||||
}
|
||||
else if (Options.Gamemode.GetValue() < 2 || Winner == "ImpostorSabotage")
|
||||
|
||||
+51
-65
@@ -1,88 +1,74 @@
|
||||
using System.Reflection;
|
||||
using Il2CppInterop.Runtime.InteropTypes;
|
||||
|
||||
namespace AmongUsRevamped;
|
||||
|
||||
[HarmonyPatch]
|
||||
class ExileControllerWrapUpPatch
|
||||
{
|
||||
[HarmonyPatch(typeof(ExileController), nameof(ExileController.WrapUp))]
|
||||
class ExileControllerPatch
|
||||
public static MethodBase TargetMethod()
|
||||
{
|
||||
public static void Postfix(ExileController __instance)
|
||||
return AccessTools.Method(typeof(ExileController), nameof(ExileController.WrapUp));
|
||||
}
|
||||
|
||||
public static void Postfix(ExileController __instance)
|
||||
{
|
||||
AfterExile(__instance.initData.networkedPlayer);
|
||||
}
|
||||
|
||||
public static void AfterExile(NetworkedPlayerInfo ejectedPlayer)
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
if (ejectedPlayer == null) return;
|
||||
|
||||
PlayerControl pc = null;
|
||||
PlayerControl exiledPlayer = ejectedPlayer.Object;
|
||||
foreach (var p in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
AfterExile(__instance.initData.networkedPlayer);
|
||||
}
|
||||
|
||||
public static void AfterExile(NetworkedPlayerInfo ejectedPlayer)
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
|
||||
if (ejectedPlayer == null) return;
|
||||
|
||||
PlayerControl pc = null;
|
||||
foreach (var p in PlayerControl.AllPlayerControls)
|
||||
if (p.PlayerId == ejectedPlayer.PlayerId)
|
||||
{
|
||||
if (p.PlayerId == ejectedPlayer.PlayerId)
|
||||
{
|
||||
pc = p;
|
||||
}
|
||||
pc = p;
|
||||
}
|
||||
|
||||
if (ejectedPlayer == PlayerControl.LocalPlayer.Data)
|
||||
if (ejectedPlayer == PlayerControl.LocalPlayer.Data && !Main.DisableInfoWhenDead.Value)
|
||||
{
|
||||
if (p.Data.Role.IsImpostor)
|
||||
{
|
||||
if (p.Data.Role.IsImpostor)
|
||||
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=red><size=90%>({MurderPlayerPatch.killCount[p.Data.PlayerId]}†)";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!PlayerControlCompleteTaskPatch.playerTasksCompleted.ContainsKey(p))
|
||||
{
|
||||
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=red><size=90%>({MurderPlayerPatch.killCount[p.Data.PlayerId]}†)";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!PlayerControlCompleteTaskPatch.playerTasksCompleted.ContainsKey(p))
|
||||
{
|
||||
PlayerControlCompleteTaskPatch.playerTasksCompleted[p] = 0;
|
||||
}
|
||||
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=green><size=90%>({PlayerControlCompleteTaskPatch.playerTasksCompleted[p]}/{PlayerControlCompleteTaskPatch.tasksPerPlayer[p]})";
|
||||
PlayerControlCompleteTaskPatch.playerTasksCompleted[p] = 0;
|
||||
}
|
||||
p.cosmetics.nameText.text = $"{p.Data.PlayerName}<color=green><size=90%>({PlayerControlCompleteTaskPatch.playerTasksCompleted[p]}/{PlayerControlCompleteTaskPatch.tasksPerPlayer[p]})";
|
||||
}
|
||||
}
|
||||
|
||||
Logger.Info($" {ejectedPlayer.PlayerName} was ejected", "ExileController");
|
||||
|
||||
if (CustomRoleManagement.PlayerRoles.TryGetValue(ejectedPlayer.PlayerId, out var role) && role == "Jester")
|
||||
{
|
||||
Utils.CustomWinnerEndGame(pc, 1);
|
||||
NormalGameEndChecker.CheckWinnerText("Jester");
|
||||
return;
|
||||
}
|
||||
|
||||
if (CustomRoleManagement.HandlingRoleMessages)
|
||||
{
|
||||
Logger.Info(" SRM2 is called before SRM1 finished. This should not happen.", "ExileController");
|
||||
}
|
||||
else
|
||||
{
|
||||
CustomRoleManagement.SendRoleMessages(new Dictionary<string, string>
|
||||
{
|
||||
{ "Jester", Translator.Get("jesterPriv")},
|
||||
{ "Mayor", Translator.Get("mayorPriv", Options.MayorExtraVoteCount.GetInt())},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if ANDROID
|
||||
[HarmonyPatch(typeof(AirshipExileController), nameof(AirshipExileController.WrapUpAndSpawn))]
|
||||
class AirshipExileControllerPatchAndroid
|
||||
{
|
||||
public static void Postfix(AirshipExileController __instance)
|
||||
Logger.Info($" {ejectedPlayer.PlayerName} was ejected", "ExileController");
|
||||
|
||||
if (PlayerControlSetRolePatch.Jesters.Contains(exiledPlayer))
|
||||
{
|
||||
ExileControllerPatch.AfterExile(__instance.initData.networkedPlayer);
|
||||
Logger.Info($"Jester {ejectedPlayer.PlayerName} wins", "ExilePatch");
|
||||
Utils.CustomWinnerEndGame(exiledPlayer, 1);
|
||||
NormalGameEndChecker.CheckWinnerText("Jester");
|
||||
return;
|
||||
}
|
||||
}
|
||||
#else
|
||||
[HarmonyPatch(typeof(AirshipExileController._WrapUpAndSpawn_d__11), nameof(AirshipExileController._WrapUpAndSpawn_d__11.MoveNext))]
|
||||
class AirshipExileControllerPatchPC
|
||||
|
||||
[HarmonyPatch]
|
||||
class AirshipExileControllerPatch
|
||||
{
|
||||
public static void Postfix(AirshipExileController._WrapUpAndSpawn_d__11 __instance, ref bool __result)
|
||||
public static MethodBase TargetMethod()
|
||||
{
|
||||
var instance = __instance.__4__this;
|
||||
ExileControllerPatch.AfterExile(instance.initData.networkedPlayer);
|
||||
return Utils.GetStateMachineMoveNext<AirshipExileController>(nameof(AirshipExileController.WrapUpAndSpawn));
|
||||
}
|
||||
|
||||
public static void Postfix(AirshipExileController._WrapUpAndSpawn_d__11 __instance)
|
||||
{
|
||||
ExileControllerWrapUpPatch.AfterExile(__instance.__4__this.initData.networkedPlayer);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -115,11 +115,16 @@ namespace AmongUsRevamped
|
||||
case TabGroup.SystemSettings:
|
||||
__instance.MenuDescriptionText.text = "Quality settings to improve comfort and testing.";
|
||||
break;
|
||||
/*
|
||||
case TabGroup.CustomRoleSettings:
|
||||
__instance.MenuDescriptionText.text = "Custom Role enabling and settings.";
|
||||
break;
|
||||
*/
|
||||
case TabGroup.AbilitySettings:
|
||||
__instance.MenuDescriptionText.text = "Ability settings to enhance vanilla roles.";
|
||||
break;
|
||||
case TabGroup.ModSettings:
|
||||
__instance.MenuDescriptionText.text = "Gameplay Settings to improve the in-game experience.";
|
||||
__instance.MenuDescriptionText.text = "Gameplay settings to improve the in-game experience.";
|
||||
break;
|
||||
case TabGroup.GamemodeSettings:
|
||||
__instance.MenuDescriptionText.text = "Situational settings to apply for specific gamemodes.";
|
||||
|
||||
@@ -9,6 +9,7 @@ public static class GameStartManagerUpdatePatch
|
||||
{
|
||||
public static bool CustomTimerApplied;
|
||||
public static bool Autostarting;
|
||||
public static bool CountingDown;
|
||||
|
||||
public static void Prefix(GameStartManager __instance)
|
||||
{
|
||||
@@ -27,11 +28,16 @@ public static class GameStartManagerUpdatePatch
|
||||
Autostarting = true;
|
||||
}
|
||||
|
||||
if (__instance.startState == GameStartManager.StartingStates.Countdown && !CustomTimerApplied && !Autostarting)
|
||||
if (__instance.startState == GameStartManager.StartingStates.Countdown)
|
||||
{
|
||||
__instance.countDownTimer = Options.StartCountdown.GetInt();
|
||||
CustomTimerApplied = true;
|
||||
CountingDown = true;
|
||||
if (!CustomTimerApplied && !Autostarting)
|
||||
{
|
||||
__instance.countDownTimer = Options.StartCountdown.GetInt();
|
||||
CustomTimerApplied = true;
|
||||
}
|
||||
}
|
||||
else CountingDown = false;
|
||||
|
||||
if (__instance.startState != GameStartManager.StartingStates.Countdown)
|
||||
{
|
||||
@@ -106,4 +112,13 @@ public class GameStartManagerStartPatch
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(GameStartManager), nameof(GameStartManager.BeginGame))]
|
||||
public class GameStartManagerBeginGamePatch
|
||||
{
|
||||
public static void Prefix(GameStartManager __instance)
|
||||
{
|
||||
if (Options.NoGameEnd.GetBool()) Logger.SendInGame(Translator.Get("noGameEndWarning"));
|
||||
}
|
||||
}
|
||||
|
||||
+7
-15
@@ -15,19 +15,7 @@ internal static class CoShowIntroPatch
|
||||
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
|
||||
NormalGameEndChecker.customRoles = CustomRoleManagement.PlayerToCustomRole();
|
||||
|
||||
if (CustomRoleManagement.PlayerRoles.Count != 0 && !Utils.isHideNSeek)
|
||||
{
|
||||
_ = new LateTask(() =>
|
||||
{
|
||||
CustomRoleManagement.SendRoleMessages(new Dictionary<string, string>
|
||||
{
|
||||
{ "Jester", Translator.Get("jesterPriv")},
|
||||
{ "Mayor", Translator.Get("mayorPriv", Options.MayorExtraVoteCount.GetInt())},
|
||||
});
|
||||
}, 1f, "BlockACKick");
|
||||
}
|
||||
AbilityManagement.SendRoleList(DestroyableSingleton<HudManager>.Instance.Chat, AbilityManagement.RoleList(), true);
|
||||
|
||||
foreach (var p in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
@@ -37,18 +25,22 @@ internal static class CoShowIntroPatch
|
||||
MurderPlayerPatch.misfireCount[p.Data.PlayerId] = 0;
|
||||
PlayerControlCompleteTaskPatch.playerTasksCompleted[p] = 0;
|
||||
PlayerControlCompleteTaskPatch.tasksPerPlayer[p] = 0;
|
||||
|
||||
Logger.Info($" {p.Data.PlayerName} -> {p.Data.RoleType}", "RoleInfo");
|
||||
}
|
||||
|
||||
Logger.Info($" {AbilityManagement.RoleList()}", "AbilityInfo");
|
||||
|
||||
if (Options.DisableAnnoyingMeetingCalls.GetBool() && !Utils.isHideNSeek)
|
||||
{
|
||||
Utils.CanCallMeetings = false;
|
||||
_ = new LateTask(() =>
|
||||
{
|
||||
Utils.CanCallMeetings = true;
|
||||
}, Options.ChatBeforeFirstMeeting.GetBool() ? 39.5f : 33f, "MeetingEnabled");
|
||||
}, 33f, "MeetingEnabled");
|
||||
}
|
||||
|
||||
if (Options.Gamemode.GetValue() == 2 && Options.SNSChatInGame.GetBool() || Options.Gamemode.GetValue() == 0 && Options.ChatBeforeFirstMeeting.GetBool())
|
||||
if (Options.Gamemode.GetValue() == 2 && Options.SNSChatInGame.GetBool() /*|| Options.Gamemode.GetValue() == 0 && Options.ChatBeforeFirstMeeting.GetBool()*/)
|
||||
{
|
||||
_ = new LateTask(() =>
|
||||
{
|
||||
|
||||
@@ -111,4 +111,32 @@ class OnPlayerLeftPatch
|
||||
PlayerControlCompleteTaskPatch.CalculateTaskWin();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.SetLevel))]
|
||||
public static class SetLevelPatch
|
||||
{
|
||||
public static List<PlayerControl> HandledLevelKicks = [];
|
||||
public static void Prefix(PlayerControl __instance, uint level)
|
||||
{
|
||||
if (AmongUsClient.Instance.AmHost && level < Options.KickLowLevelPlayer.GetInt() - 1 && __instance.Data.ClientId != AmongUsClient.Instance.HostId)
|
||||
{
|
||||
if (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()}");
|
||||
}
|
||||
else
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(__instance.Data.ClientId, true);
|
||||
Logger.Info($" {__instance.Data.PlayerName} was banned for being under level {Options.KickLowLevelPlayer.GetInt()} ", "BanLowLevelPlayer");
|
||||
Logger.SendInGame($" {__instance.Data.PlayerName} was banned for being under level {Options.KickLowLevelPlayer.GetInt()}");
|
||||
}
|
||||
HandledLevelKicks.Add(__instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
+25
-11
@@ -20,18 +20,33 @@ public static class CheckForEndVotingPatch
|
||||
|
||||
byte voterId = ps.TargetPlayerId;
|
||||
byte votedFor = ps.VotedFor;
|
||||
PlayerControl pc = GameData.Instance.GetPlayerById(voterId)?.Object;
|
||||
if (pc == null) continue;
|
||||
if (votedFor == byte.MaxValue) continue;
|
||||
if (!votes.ContainsKey(votedFor)) votes[votedFor] = 0;
|
||||
|
||||
visualVotes.Add(new MeetingHud.VoterState { VoterId = voterId, VotedForId = votedFor });
|
||||
|
||||
if (CustomRoleManagement.PlayerRoles.TryGetValue(voterId, out string role) && role == "Mayor")
|
||||
{
|
||||
int extraVotes = Options.MayorExtraVoteCount.GetInt();
|
||||
if (!votes.TryGetValue(votedFor, out int currentVotes)) currentVotes = 0;
|
||||
votes[votedFor] = currentVotes + extraVotes;
|
||||
if (!PlayerControlCompleteTaskPatch.playerTasksCompleted.ContainsKey(pc)) PlayerControlCompleteTaskPatch.playerTasksCompleted[pc] = 0;
|
||||
if (!MurderPlayerPatch.killCount.ContainsKey(voterId)) MurderPlayerPatch.killCount[voterId] = 0;
|
||||
|
||||
for (int i = 0; i < extraVotes; i++)
|
||||
visualVotes.Add(new MeetingHud.VoterState { VoterId = voterId, VotedForId = votedFor });
|
||||
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 extraVotesPerKill = (int)(Options.ExtraVotesPerKill.GetFloat()*MurderPlayerPatch.killCount[voterId]+0.1f);
|
||||
|
||||
if (!votes.TryGetValue(votedFor, out int currentVotes)) currentVotes = 0;
|
||||
|
||||
if (AbilityManagement.IsMayor(pc)) extraVotes += extraVotesCrewmate;
|
||||
if (AbilityManagement.IsTyrant(pc)) extraVotes += extraVotesImpostor;
|
||||
if (AbilityManagement.IsWorkhorse(pc)) extraVotes += extraVotesPerTask;
|
||||
if (AbilityManagement.IsStealer(pc)) extraVotes += extraVotesPerKill;
|
||||
|
||||
for (int i = 0; i < extraVotes; i++)
|
||||
{
|
||||
visualVotes.Add(new MeetingHud.VoterState { VoterId = voterId, VotedForId = votedFor });
|
||||
votes[votedFor]++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +60,6 @@ public static class CheckForEndVotingPatch
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HarmonyPatch(typeof(MeetingHud), nameof(MeetingHud.Start))]
|
||||
class MeetingHudStartPatch
|
||||
{
|
||||
@@ -65,7 +79,7 @@ class MeetingHudStartPatch
|
||||
}
|
||||
}
|
||||
|
||||
if (player == null || !PlayerControl.LocalPlayer.Data.IsDead) continue;
|
||||
if (player == null || !PlayerControl.LocalPlayer.Data.IsDead || Main.DisableInfoWhenDead.Value) continue;
|
||||
|
||||
var textTemplate = playerState.NameText;
|
||||
var taskText = GetProgressText(player);
|
||||
@@ -93,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)}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,10 +16,6 @@ internal class CoStartGamePatch
|
||||
Logger.Info($" Gamemode: {Options.Gamemode.GetValue()}", "StartGame");
|
||||
Logger.Info($" Players: {PlayerControl.AllPlayerControls.Count}", "StartGame");
|
||||
|
||||
if ((Options.Gamemode.GetValue() == 0 || Options.Gamemode.GetValue() == 1) && !Utils.isHideNSeek)
|
||||
{
|
||||
CustomRoleManagement.AssignRoles();
|
||||
}
|
||||
NormalGameEndChecker.imps.Clear();
|
||||
NormalGameEndChecker.LastWinReason = "";
|
||||
|
||||
@@ -32,42 +28,21 @@ class PlayerControlSetRolePatch
|
||||
private static int i;
|
||||
public static bool FirstAssign;
|
||||
private static HashSet<byte> Seekers = new();
|
||||
public static HashSet<PlayerControl> Jesters = new();
|
||||
private static readonly System.Random rand = new System.Random();
|
||||
|
||||
public static bool Prefix(PlayerControl __instance, ref RoleTypes roleType, ref bool canOverrideRole)
|
||||
{
|
||||
if (!FirstAssign || !AmongUsClient.Instance.AmHost) return true;
|
||||
|
||||
var oldRole = roleType;
|
||||
|
||||
canOverrideRole = false;
|
||||
|
||||
if (Main.GM.Value && __instance == PlayerControl.LocalPlayer)
|
||||
{
|
||||
roleType = RoleTypes.CrewmateGhost;
|
||||
}
|
||||
|
||||
if (CustomRoleManagement.PlayerRoles.TryGetValue(__instance.PlayerId, out var role) && role == "Mayor")
|
||||
{
|
||||
if (Options.MayorVentToMeeting.GetBool())
|
||||
{
|
||||
roleType = RoleTypes.Engineer;
|
||||
Logger.Info($"{__instance.Data.PlayerName} is Engineer due to being Mayor", "SetRolePatch");
|
||||
}
|
||||
else
|
||||
{
|
||||
roleType = RoleTypes.Crewmate;
|
||||
}
|
||||
}
|
||||
if (CustomRoleManagement.PlayerRoles.TryGetValue(__instance.PlayerId, out var r) && r == "Jester")
|
||||
{
|
||||
if (Options.JesterCanVent.GetBool())
|
||||
{
|
||||
roleType = RoleTypes.Engineer;
|
||||
Logger.Info($"{__instance.Data.PlayerName} is Engineer due to being Jester", "SetRolePatch");
|
||||
}
|
||||
else
|
||||
{
|
||||
roleType = RoleTypes.Crewmate;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Utils.isHideNSeek && i == 0)
|
||||
@@ -107,7 +82,9 @@ class PlayerControlSetRolePatch
|
||||
PlayerControl.LocalPlayer.myTasks.Clear();
|
||||
return true;
|
||||
}
|
||||
roleType = RoleTypes.Crewmate;
|
||||
|
||||
if (Options.EngineerMode.GetBool()) roleType = RoleTypes.Engineer;
|
||||
else roleType = RoleTypes.Crewmate;
|
||||
}
|
||||
|
||||
i++;
|
||||
@@ -118,6 +95,16 @@ class PlayerControlSetRolePatch
|
||||
i = 0;
|
||||
Logger.Info("PCSRP successful", "RoleManaging");
|
||||
}
|
||||
|
||||
if (roleType == RoleTypes.Crewmate && Options.CrewmateAbility.GetValue() == 2 ||
|
||||
roleType == RoleTypes.Scientist && Options.ScientistAbility.GetValue() == 2 ||
|
||||
roleType == RoleTypes.Engineer && Options.EngineerAbility.GetValue() == 2 ||
|
||||
roleType == RoleTypes.Noisemaker && Options.NoisemakerAbility.GetValue() == 2 ||
|
||||
roleType == RoleTypes.Tracker && Options.TrackerAbility.GetValue() == 2 ||
|
||||
roleType == RoleTypes.Detective && Options.DetectiveAbility.GetValue() == 2)
|
||||
{
|
||||
Jesters.Add(__instance);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -16,18 +16,19 @@ class ReportDeadBodyPatch
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost || __instance == null) return true;
|
||||
|
||||
if (Options.DisableAnnoyingMeetingCalls.GetBool() && !Utils.CanCallMeetings && !Options.ChatBeforeFirstMeeting.GetBool() && target == null)
|
||||
if (Options.DisableAnnoyingMeetingCalls.GetBool() && !Utils.CanCallMeetings /*&& !Options.ChatBeforeFirstMeeting.GetBool()*/ && target == null)
|
||||
{
|
||||
Logger.Info($" {__instance.Data.PlayerName} is calling a meeting too fast, attempt blocked", "ReportDeadBodyPatch");
|
||||
return false;
|
||||
}
|
||||
|
||||
// target == null means meeting
|
||||
if (target == null) return true;
|
||||
|
||||
if (Options.Gamemode.GetValue() == 2 || Options.Gamemode.GetValue() == 3)
|
||||
{
|
||||
Logger.Info($" Stopped {__instance.Data.PlayerName} reporting the body of {target.PlayerName}", "ReportDeadBodyPatch");
|
||||
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;
|
||||
}
|
||||
else return true;
|
||||
@@ -56,22 +57,29 @@ internal static class MurderPlayerPatch
|
||||
killCount[playerId]++;
|
||||
Logger.Info($" {__instance.Data.PlayerName} killed {target.Data.PlayerName}", "MurderPlayer");
|
||||
|
||||
if (target == PlayerControl.LocalPlayer || PlayerControl.LocalPlayer.Data.IsDead)
|
||||
if ((target == PlayerControl.LocalPlayer || PlayerControl.LocalPlayer.Data.IsDead) && !Main.DisableInfoWhenDead.Value)
|
||||
{
|
||||
foreach (var p in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
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.GetRoleText(p)}";
|
||||
}
|
||||
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]}/{PlayerControlCompleteTaskPatch.tasksPerPlayer[p]})</color> - {Utils.GetRoleText(p)}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Options.Gamemode.GetValue() < 2 && AbilityManagement.IsJuggernaut(__instance) && killCount[__instance.PlayerId] >= Options.KillsNeededForJuggernaut.GetInt())
|
||||
{
|
||||
Logger.Info("Juggernaut win", "MurderPlayer");
|
||||
Utils.ContinueEndGame((byte)GameOverReason.ImpostorsByVote);
|
||||
NormalGameEndChecker.CheckWinnerText("Juggernaut");
|
||||
}
|
||||
|
||||
//2 = Shift and Seek
|
||||
if (Options.Gamemode.GetValue() == 2 && !Utils.isHideNSeek)
|
||||
{
|
||||
@@ -150,12 +158,13 @@ class PlayerControlCompleteTaskPatch
|
||||
|
||||
foreach (var p in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
/*
|
||||
if (ignoredRoles.Contains(CustomRoleManagement.GetRole(p.PlayerId)) && !tasksInitiated)
|
||||
{
|
||||
ignoredTasks += p.Data.Tasks.Count;
|
||||
tasksInitiated = true;
|
||||
}
|
||||
|
||||
*/
|
||||
if (!playerTasksCompleted.ContainsKey(p))
|
||||
{
|
||||
playerTasksCompleted[p] = 0;
|
||||
@@ -164,20 +173,40 @@ class PlayerControlCompleteTaskPatch
|
||||
}
|
||||
|
||||
playerTasksCompleted[__instance]++;
|
||||
|
||||
/*
|
||||
if (ignoredRoles.Contains(CustomRoleManagement.GetRole(__instance.PlayerId)))
|
||||
{
|
||||
ignoredCompletedTasks = playerTasksCompleted[__instance];
|
||||
}
|
||||
|
||||
*/
|
||||
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)
|
||||
{
|
||||
Logger.Info($"Speedrunner {__instance.Data.PlayerName} won", "TaskPatch");
|
||||
Utils.ContinueEndGame((byte)GameOverReason.CrewmatesByVote);
|
||||
NormalGameEndChecker.CheckWinnerText("Speedrunner");
|
||||
}
|
||||
}
|
||||
|
||||
if (Options.Gamemode.GetValue() != 3) CalculateTaskWin();
|
||||
|
||||
if (PlayerControl.LocalPlayer.Data.IsDead)
|
||||
if (Options.Gamemode.GetValue() == 3)
|
||||
{
|
||||
if (!__instance.Data.IsDead && playerTasksCompleted[__instance] >= __instance.Data.Tasks.Count)
|
||||
{
|
||||
Utils.CustomWinnerEndGame(__instance, 1);
|
||||
NormalGameEndChecker.LastWinReason = $"{__instance.Data.PlayerName} wins! (Completed tasks)";
|
||||
NormalGameEndChecker.canUpdateWinnerText = false;
|
||||
}
|
||||
}
|
||||
|
||||
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]}/{tasksPerPlayer[__instance]})</color> - {Utils.GetRoleText(__instance)}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+19
-11
@@ -136,7 +136,7 @@ internal static class RpcSetTasksPatch
|
||||
|
||||
if (!Options.AllPlayersSameTasks.GetBool())
|
||||
{
|
||||
RerollTasks(ref taskTypeIds);
|
||||
RerollTasks(pc, ref taskTypeIds);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -155,23 +155,26 @@ internal static class RpcSetTasksPatch
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static void RerollTasks(ref Il2CppStructArray<byte> taskTypeIds)
|
||||
private static void RerollTasks(PlayerControl pc, ref Il2CppStructArray<byte> taskTypeIds)
|
||||
{
|
||||
// Default number of tasks
|
||||
bool hasCommonTasks = true;
|
||||
int numCommonTasks = Main.NormalOptions.NumCommonTasks;
|
||||
int numLongTasks = Main.NormalOptions.NumLongTasks;
|
||||
int numShortTasks = Main.NormalOptions.NumShortTasks;
|
||||
|
||||
if (AbilityManagement.IsSpeedrunner(pc))
|
||||
{
|
||||
numLongTasks = Options.SpeedrunnerLongTasks.GetInt();
|
||||
numShortTasks = Options.SpeedrunnerShortTasks.GetInt();
|
||||
}
|
||||
|
||||
if (taskTypeIds.Length == 0) hasCommonTasks = false;
|
||||
|
||||
switch (hasCommonTasks)
|
||||
{
|
||||
case false when numLongTasks == 0 && numShortTasks == 0:
|
||||
numShortTasks = 1;
|
||||
break;
|
||||
case true when numLongTasks == Main.NormalOptions.NumLongTasks && numShortTasks == Main.NormalOptions.NumShortTasks:
|
||||
return;
|
||||
case false when numLongTasks == 0 && numShortTasks == 0: numShortTasks = 1; break;
|
||||
case true when numLongTasks == Main.NormalOptions.NumLongTasks && numShortTasks == Main.NormalOptions.NumShortTasks: return;
|
||||
}
|
||||
|
||||
Il2CppSystem.Collections.Generic.List<byte> TasksList = new();
|
||||
@@ -180,24 +183,28 @@ internal static class RpcSetTasksPatch
|
||||
|
||||
Il2CppSystem.Collections.Generic.HashSet<TaskTypes> UsedTaskTypes = new();
|
||||
|
||||
var start0 = 0;
|
||||
var start1 = 0;
|
||||
var start2 = 0;
|
||||
|
||||
// Long tasks
|
||||
Il2CppSystem.Collections.Generic.List<NormalPlayerTask> CommonTasks = new();
|
||||
foreach (var task in ShipStatus.Instance.CommonTasks) CommonTasks.Add(task);
|
||||
Shuffle(CommonTasks);
|
||||
|
||||
ShipStatus.Instance.AddTasksFromList(ref start0, numCommonTasks, TasksList, UsedTaskTypes, CommonTasks);
|
||||
|
||||
Il2CppSystem.Collections.Generic.List<NormalPlayerTask> LongTasks = new();
|
||||
foreach (var task in ShipStatus.Instance.LongTasks) LongTasks.Add(task);
|
||||
Shuffle(LongTasks);
|
||||
|
||||
ShipStatus.Instance.AddTasksFromList(ref start1, numLongTasks, TasksList, UsedTaskTypes, LongTasks);
|
||||
|
||||
// Short tasks
|
||||
Il2CppSystem.Collections.Generic.List<NormalPlayerTask> ShortTasks = new();
|
||||
foreach (var task in ShipStatus.Instance.ShortTasks) ShortTasks.Add(task);
|
||||
Shuffle(ShortTasks);
|
||||
|
||||
ShipStatus.Instance.AddTasksFromList(ref start2, numShortTasks, TasksList, UsedTaskTypes, ShortTasks);
|
||||
|
||||
// Apply result
|
||||
taskTypeIds = new Il2CppStructArray<byte>(TasksList.Count);
|
||||
for (int i = 0; i < TasksList.Count; i++) taskTypeIds[i] = TasksList[i];
|
||||
}
|
||||
@@ -212,4 +219,5 @@ internal static class RpcSetTasksPatch
|
||||
list[r] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace AmongUsRevamped;
|
||||
|
||||
//Old Patch for Mayor
|
||||
|
||||
/*
|
||||
[HarmonyPatch(typeof(Vent), nameof(Vent.EnterVent))]
|
||||
class EnterVentPatch
|
||||
{
|
||||
@@ -13,4 +16,5 @@ class EnterVentPatch
|
||||
Logger.Info($" The Mayor, {pc.Data.PlayerName}, called a meeting by venting", "EnterVent");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -29,26 +29,40 @@
|
||||
<img src="https://github.com/astra1dev/AUnlocker/assets/90265231/14226f03-a003-4efc-b27b-6df53fb394d6" width=410 height=240>****
|
||||
|
||||
|
||||
# 🎮 Features (v1.6.6):
|
||||
## <b> 🌟 Custom Roles:</b>
|
||||
# 🎮 Features (v1.7.4):
|
||||
## <b> 🌟 Custom Abilities:</b>
|
||||
- Mayor (Crewmate)
|
||||
- The mayor has extra votes and can call meetings by venting, depending on settings.
|
||||
- Jester (Neutral)
|
||||
- The jester has to get voted to win alone and does not win with any other team.
|
||||
- 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
|
||||
- Workhorse (Crewmate)
|
||||
- The Workhorse gains additional votes per completed task
|
||||
- Tyrant (Impostor)
|
||||
- The Tyrant has a configurable amount of extra votes
|
||||
- Stealer (Impostor)
|
||||
- The Stealer gains additional votes per kill
|
||||
- Juggernaut (Impostor)
|
||||
- The Impostors win if the Juggernaut gains a set amount of kills
|
||||
- For the enabled ability list, type /r
|
||||
- To check ability descriptions, type /r {ability}
|
||||
|
||||
## <b>♠️ Client Side settings:</b>
|
||||
- Game Master
|
||||
- Unlock FPS
|
||||
- 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
|
||||
- Kick/Ban players who say "start"
|
||||
- Banword system
|
||||
- Denyword system
|
||||
- Banlist system
|
||||
- DenyName system
|
||||
- Denyname system
|
||||
- Multi layer moderator system
|
||||
- To add Admins, Moderators and VIP's, type the user's Friendcode in the designated files located in AUR-DATA
|
||||
- Enable No Game End
|
||||
@@ -75,7 +89,8 @@
|
||||
- Shift and Seek
|
||||
- Speedrun
|
||||
## <b>❓ Other Improvements:</b>
|
||||
- ehT dlekS map (reverse Skeld)
|
||||
- Creatable and customizable Templates
|
||||
- Eht Dleks (Reverse Skeld) Map
|
||||
- Ability to cancel starting countdown
|
||||
- Improved main menu
|
||||
- Faster startup time
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
"autoStart": "Auto Start",
|
||||
"enableDarkTheme": "Enable Dark Theme",
|
||||
"enableLobbyMusic": "Lobby Music",
|
||||
"disableInfoWhenDead": "Hide Info When Dead",
|
||||
|
||||
"gameMasterWarning":"You will now spectate games until GM is turned off. WARNING: Custom role notifications will not work with this setting on!",
|
||||
"gameMasterWarning":"You will now spectate games until Game Master is turned off.",
|
||||
|
||||
"cancelStartCountdown": "Start countdown canceled",
|
||||
|
||||
@@ -16,6 +17,7 @@
|
||||
"tabGroupMain": "Moderation",
|
||||
"kickLowLevelPlayer": "Kick Players Under Level",
|
||||
"tempBanLowLevelPlayer": "Ban Instead Of Kick",
|
||||
"dontKickLevelOnes": "Don't Kick Lv.1 Players For Glitched Lobbies",
|
||||
"kickInvalidFriendCodes": "Kick Invalid FriendCodes",
|
||||
"tempBanInvalidFriendCodes": "Ban Instead Of Kick",
|
||||
"applyBanList": "Apply BanList",
|
||||
@@ -40,7 +42,7 @@
|
||||
|
||||
"tabGroupAccess": "Access Levels",
|
||||
"slashColorCmd": "Who Can Use /color",
|
||||
"slashRolesAndGamemodeCmd": "Who Can Use /r",
|
||||
"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",
|
||||
@@ -76,6 +78,7 @@
|
||||
"tabGroupSpeedrun": "Speedrun",
|
||||
"speedrunSettingsOverride": "Auto Update Settings",
|
||||
"gameAutoEndsAfter": "Game automatically ends after",
|
||||
"engineerMode": "Everyone Is Engineer",
|
||||
|
||||
"tabGroupSabotages": "Sabotages",
|
||||
"deadImpostorsCanSabotage": "Dead Impostors Can Sabotage",
|
||||
@@ -222,17 +225,53 @@
|
||||
"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.",
|
||||
|
||||
"Mayor": "Mayor",
|
||||
"mayorPublic": "Mayor:\n\nThe Mayor is a crewmate with {0} extra vote(s). Depending on settings, they can vent to call a meeting.",
|
||||
"mayorPriv": "Your role is Mayor!\n\nYou are a crewmate with {0} extra vote(s). If you are an Engineer, vent to call a meeting.",
|
||||
"mayorExtraVoteCount": "Extra Votes",
|
||||
"mayorVentToMeeting": "Can Vent To Call Meetings",
|
||||
"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.",
|
||||
|
||||
"Jester": "Jester",
|
||||
"jesterPublic": "Jester:\n\nThe Jester wins alone by getting voted. They must act as suspicious as possible.",
|
||||
"jesterPriv": "Your role is Jester!\nYou are NOT a crewmate!\n\nYou win by getting voted. Act as suspicious as possible.",
|
||||
"jesterCanVent": "Can Vent",
|
||||
"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.",
|
||||
"roleDescriptionHelp": "Your Custom Role can be seen at the start of meetings. It is shown by an obvious private text"
|
||||
|
||||
"tabGroupCrewmateAbilities": "Crewmate Ability Settings",
|
||||
"crewmateAbility": "Crewmate (Role) Ability",
|
||||
"scientistAbility": "Scientist Ability",
|
||||
"engineerAbility": "Engineer Ability",
|
||||
"noisemakerAbility": "Noisemaker Ability",
|
||||
"trackerAbility": "Tracker Ability",
|
||||
"detectiveAbility": "Detective Ability",
|
||||
|
||||
"extraVotesCrewmate": "Extra Votes For Mayor",
|
||||
"extraVotesPerTask": "Extra Votes Per Task For Workhorse",
|
||||
"speedrunnerShortTasks": "Short Tasks For Speedrunner",
|
||||
"speedrunnerLongTasks": "Long Tasks For Speedrunner",
|
||||
|
||||
"tabGroupImpostorAbilities": "Impostor Ability Settings",
|
||||
"impostorAbility": "Impostor (Role) Ability",
|
||||
"shapeshifterAbility": "Shapeshifter Ability",
|
||||
"phantomAbility": "Phantom Ability",
|
||||
"viperAbility": "Viper Ability",
|
||||
|
||||
"extraVotesImpostor": "Extra Votes For Tyrant",
|
||||
"extraVotesPerKill": "Extra Votes Per Kill For Stealer",
|
||||
"killsNeededForJuggernaut": "Kills Needed For Juggernaut",
|
||||
|
||||
"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.",
|
||||
"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",
|
||||
"banlistWelcome": "# In this file you can ban players from your lobby by Friendcode.\n# Banning someone in-game will automatically add them here as well. Below is a Friendcode example.\n\nfriendcode#0000\n",
|
||||
"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",
|
||||
|
||||
"tooLongTemplate": "Your Template is longer than 120 characters and would kick you upon sending. Please reduce the length."
|
||||
}
|
||||
Reference in new issue
Block a user