mirror of
https://github.com/ApeMV/AmongUsRevamped.git
synced 2026-10-22 07:36:05 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42889b5613 | ||
|
|
2e337ce6b8 | ||
|
|
59384ec415 | ||
|
|
43c3826aeb | ||
|
|
6869dc80b4 | ||
|
|
016ad4ba06 | ||
|
|
0ee0937254 | ||
|
|
4c5d53bc01 | ||
|
|
19ed93e308 | ||
|
|
ef8febf979 | ||
|
|
1e18868bf5 | ||
|
|
7944956053 |
No files matched your search
+22
-1
@@ -29,7 +29,7 @@ public partial class Main : BasePlugin
|
||||
public static NormalGameOptionsV10 NormalOptions => GameOptionsManager.Instance != null ? GameOptionsManager.Instance.currentNormalGameOptions : null;
|
||||
public static bool HasArgumentException;
|
||||
public static string CredentialsText;
|
||||
public const string ModVersion = "v1.0.0";
|
||||
public const string ModVersion = "v1.2.0";
|
||||
|
||||
public static float GameTimer;
|
||||
|
||||
@@ -84,4 +84,25 @@ public partial class Main : BasePlugin
|
||||
LateTask.Update(Time.deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
public enum ColorToString
|
||||
{
|
||||
Red = 0,
|
||||
Blue = 1,
|
||||
Green = 2,
|
||||
Pink = 3,
|
||||
Orange = 4,
|
||||
Yellow = 5,
|
||||
Black = 6,
|
||||
White = 7,
|
||||
Purple = 8,
|
||||
Brown = 9,
|
||||
Cyan = 10,
|
||||
Lime = 11,
|
||||
Maroon = 12,
|
||||
Rose = 13,
|
||||
Banana = 14,
|
||||
Gray = 15,
|
||||
Tan = 16
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ namespace AmongUsRevamped;
|
||||
public static class BanManager
|
||||
{
|
||||
public static string RemoveHtmlTags(this string str) => Regex.Replace(str, "<[^>]*?>", "");
|
||||
private static readonly string DenyNameListPath = "./AUR-DATA/DenyNameList.txt";
|
||||
private static string BanListPath = "./AUR-DATA/BanList.txt";
|
||||
private static string ModeratorListPath = "./AUR-DATA/ModeratorList.txt";
|
||||
public static List<string> TempBanWhiteList = [];
|
||||
@@ -21,6 +22,11 @@ public static class BanManager
|
||||
{
|
||||
Directory.CreateDirectory("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");
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace AmongUsRevamped
|
||||
|
||||
public static readonly string[] gameModes =
|
||||
{
|
||||
"None", "0 Kill Cooldown", "Shift And Seek"
|
||||
"None", "0 Kill Cooldown", "Shift And Seek", "Speedrun"
|
||||
};
|
||||
|
||||
//System
|
||||
@@ -38,8 +38,12 @@ namespace AmongUsRevamped
|
||||
public static OptionItem TempBanInvalidFriendCodes;
|
||||
|
||||
public static OptionItem ApplyBanList;
|
||||
public static OptionItem ApplyDenyNameList;
|
||||
public static OptionItem ApplyModeratorList;
|
||||
|
||||
public static OptionItem TabGroupAutomation;
|
||||
|
||||
public static OptionItem AutoSendGameInfo;
|
||||
public static OptionItem AutoRejoinLobby;
|
||||
public static OptionItem AutoStartTimer;
|
||||
public static OptionItem WaitAutoStart;
|
||||
@@ -174,6 +178,10 @@ namespace AmongUsRevamped
|
||||
public static OptionItem CantKillTime;
|
||||
public static OptionItem MisfiresToSuicide;
|
||||
|
||||
public static OptionItem TabGroupSpeedrun;
|
||||
public static OptionItem SpeedrunSettingsOverride;
|
||||
public static OptionItem GameAutoEndsAfter;
|
||||
|
||||
|
||||
public static bool IsLoaded = false;
|
||||
|
||||
@@ -185,8 +193,8 @@ namespace AmongUsRevamped
|
||||
.SetColor(Color.green)
|
||||
.SetHeader(true);
|
||||
|
||||
TabGroupMain = TextOptionItem.Create(60000, "Main", TabGroup.SystemSettings)
|
||||
.SetColor(Color.yellow);
|
||||
TabGroupMain = TextOptionItem.Create(60000, "Moderation", TabGroup.SystemSettings)
|
||||
.SetColor(Color.blue);
|
||||
|
||||
KickLowLevelPlayer = IntegerOptionItem.Create(60050, "Kick Players Under Level", new(0, 100, 1), 0, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Level);
|
||||
@@ -198,20 +206,24 @@ namespace AmongUsRevamped
|
||||
.SetParent(KickInvalidFriendCodes);
|
||||
|
||||
ApplyBanList = BooleanOptionItem.Create(60110, "Apply BanList", true, TabGroup.SystemSettings, true);
|
||||
ApplyModeratorList = BooleanOptionItem.Create(60120, "Apply ModeratorList", true, TabGroup.SystemSettings, false);
|
||||
ApplyDenyNameList = BooleanOptionItem.Create(60120, "Apply DenyName List", true, TabGroup.SystemSettings, false);
|
||||
ApplyModeratorList = BooleanOptionItem.Create(60121, "Apply Moderator List", true, TabGroup.SystemSettings, false);
|
||||
|
||||
TabGroupAutomation = TextOptionItem.Create(60149, "Automation", TabGroup.SystemSettings)
|
||||
.SetColor(Color.yellow);
|
||||
|
||||
AutoSendGameInfo = BooleanOptionItem.Create(60150, "Automatically send winner info", true, TabGroup.SystemSettings, false);
|
||||
AutoRejoinLobby = BooleanOptionItem.Create(60210, "Auto Rejoin Lobby", false, TabGroup.SystemSettings, false);
|
||||
AutoStartTimer = IntegerOptionItem.Create(44420, "Countdown For Auto Start", new(1, 600, 1), 5, TabGroup.SystemSettings, false)
|
||||
AutoStartTimer = IntegerOptionItem.Create(64420, "Countdown For Auto Start", new(1, 600, 1), 5, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
WaitAutoStart = IntegerOptionItem.Create(44421, "Auto Start After", new(10, 600, 10), 300, TabGroup.SystemSettings, false)
|
||||
WaitAutoStart = IntegerOptionItem.Create(64421, "Auto Start After", new(10, 600, 10), 300, TabGroup.SystemSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
PlayerAutoStart = IntegerOptionItem.Create(44422, "Players Needed To Auto Start", new(1, 15, 1), 1, TabGroup.SystemSettings, false);
|
||||
PlayerAutoStart = IntegerOptionItem.Create(64422, "Players Needed To Auto Start", new(1, 15, 1), 1, TabGroup.SystemSettings, false);
|
||||
|
||||
NoGameEnd = BooleanOptionItem.Create(60380, "No Game End", false, TabGroup.SystemSettings, false)
|
||||
.SetColor(Color.red)
|
||||
.SetHeader(true);
|
||||
|
||||
|
||||
// Gamemode Settings
|
||||
TabGroupHNS = TextOptionItem.Create(70000, "Hide and Seek", TabGroup.GamemodeSettings)
|
||||
.SetColor(Color.green);
|
||||
@@ -232,6 +244,12 @@ namespace AmongUsRevamped
|
||||
CrewAutoWinsGameAfter = IntegerOptionItem.Create(70054, "Crewmates Automatically Win After", new(0, 600, 10), 300, TabGroup.GamemodeSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
|
||||
TabGroupSpeedrun = TextOptionItem.Create(70075, "Speedrun", TabGroup.GamemodeSettings)
|
||||
.SetColor(Color.blue);
|
||||
SpeedrunSettingsOverride = BooleanOptionItem.Create(70076, "Auto Update Settings", true, TabGroup.GamemodeSettings, false);
|
||||
GameAutoEndsAfter = IntegerOptionItem.Create(70077, "Game automatically ends after", new(0, 600, 10), 300, TabGroup.GamemodeSettings, false)
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
|
||||
|
||||
// Gameplay Settings
|
||||
DisableSabotage = BooleanOptionItem.Create(60565, "Disable Critical Sabotages", false, TabGroup.ModSettings, false)
|
||||
@@ -252,7 +270,7 @@ namespace AmongUsRevamped
|
||||
.SetColor(new Color32(255, 255, 153, byte.MaxValue))
|
||||
.SetParent(OverrideTaskSettings);
|
||||
|
||||
DisableMiraTasks = BooleanOptionItem.Create(23000, "Disable Mira Tasks", false, TabGroup.ModSettings, false)
|
||||
DisableMiraTasks = BooleanOptionItem.Create(23000, "Disable Mira HQ Tasks", false, TabGroup.ModSettings, false)
|
||||
.SetColor(new Color32(173, 216, 230, byte.MaxValue))
|
||||
.SetParent(OverrideTaskSettings);
|
||||
|
||||
|
||||
+18
-1
@@ -36,10 +36,27 @@ public static class FixedUpdate
|
||||
{
|
||||
Main.GameTimer = 0f;
|
||||
|
||||
MessageWriter writer = AmongUsClient.Instance.StartEndGame();
|
||||
writer.Write((byte)GameOverReason.ImpostorDisconnect);
|
||||
AmongUsClient.Instance.FinishEndGame(writer);
|
||||
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));
|
||||
}
|
||||
}
|
||||
// 3 = Speedrun
|
||||
if (Options.Gamemode.GetValue() == 3 && !Utils.isHideNSeek && Options.GameAutoEndsAfter.GetInt() != 0 && !Options.NoGameEnd.GetBool())
|
||||
{
|
||||
Main.GameTimer += Time.fixedDeltaTime;
|
||||
|
||||
if (Main.GameTimer > Options.GameAutoEndsAfter.GetInt())
|
||||
{
|
||||
Main.GameTimer = 0f;
|
||||
|
||||
MessageWriter writer = AmongUsClient.Instance.StartEndGame();
|
||||
writer.Write((byte)GameOverReason.CrewmatesByVote);
|
||||
AmongUsClient.Instance.FinishEndGame(writer);
|
||||
Logger.Info($" Crewmates win because the game took longer than {Options.CrewAutoWinsGameAfter.GetInt()}s", "SNSManager");
|
||||
Logger.Info($" No one won because the game took longer than {Options.GameAutoEndsAfter.GetInt()}s", "SpeedrunManager");
|
||||
NormalGameEndChecker.LastWinReason = $"★ No one wins! (Timer)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+94
-2
@@ -25,6 +25,10 @@ public static class Utils
|
||||
|
||||
public static long TimeStamp => EpochStartSeconds + (long)Stopwatch.Elapsed.TotalSeconds;
|
||||
|
||||
public static int allAlivePlayersCount => AllAlivePlayerControls.Count();
|
||||
public static int AliveCrewmates => AllAlivePlayerControls.Count(pc => !pc.Data.Role.IsImpostor);
|
||||
public static int AliveImpostors => AllAlivePlayerControls.Count(pc => pc.Data.Role.IsImpostor);
|
||||
|
||||
public static bool IsLobby => AmongUsClient.Instance.GameState == InnerNetClient.GameStates.Joined;
|
||||
public static bool InGame => AmongUsClient.Instance && AmongUsClient.Instance.GameState == InnerNetClient.GameStates.Started;
|
||||
public static bool isHideNSeek => GameOptionsManager.Instance.CurrentGameOptions.GameMode == GameModes.HideNSeek;
|
||||
@@ -35,6 +39,8 @@ public static class Utils
|
||||
|
||||
public static bool IsFreePlay => AmongUsClient.Instance.NetworkMode == NetworkModes.FreePlay;
|
||||
public static bool IsMeeting => InGame && (MeetingHud.Instance);
|
||||
public static bool GamePastRoleSelection => Main.GameTimer > 10f;
|
||||
public static bool HandlingGameEnd;
|
||||
|
||||
public static string ColorString(Color32 color, string str) => $"<#{color.r:x2}{color.g:x2}{color.b:x2}{color.a:x2}>{str}</color>";
|
||||
public static string ColorToHex(Color32 color) => $"#{color.r:x2}{color.g:x2}{color.b:x2}{color.a:x2}";
|
||||
@@ -43,11 +49,28 @@ public static class Utils
|
||||
{
|
||||
if (friendCode == "") return false;
|
||||
|
||||
var friendCodesFilePath = @"./AUR-DATA/Moderators.txt";
|
||||
var friendCodesFilePath = @"./AUR-DATA/ModeratorList.txt";
|
||||
var friendCodes = File.ReadAllLines(friendCodesFilePath);
|
||||
return friendCodes.Any(code => code.Contains(friendCode));
|
||||
}
|
||||
|
||||
public static bool IsPlayerInDenyName(ClientData client, string name)
|
||||
{
|
||||
if (name == "" || !AmongUsClient.Instance.AmHost || !Options.ApplyDenyNameList.GetBool()) return false;
|
||||
|
||||
var denyNameFilePath = @"./AUR-DATA/DenyNameList.txt";
|
||||
var deniedNames = File.ReadAllLines(denyNameFilePath);
|
||||
|
||||
if (deniedNames.Where(code => !string.IsNullOrWhiteSpace(code)).Any(code => name.Contains(code, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(client.Id, false);
|
||||
Logger.Info($" {name} was kicked because their name was in DenyNameList.txt", "Kick");
|
||||
Logger.SendInGame($" {name} was kicked because their name was in DenyNameList.txt");
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
||||
public static string GetTabName(TabGroup tab)
|
||||
{
|
||||
switch (tab)
|
||||
@@ -63,6 +86,11 @@ public static class Utils
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsCustomOption(NumberOption option)
|
||||
{
|
||||
return option.GetComponent<OptionItem>() != null;
|
||||
}
|
||||
|
||||
public static void DestroyTranslator(this GameObject obj)
|
||||
{
|
||||
var translator = obj.GetComponent<TextTranslatorTMP>();
|
||||
@@ -164,4 +192,68 @@ public static class Utils
|
||||
try { return AmongUsClient.Instance.allClients.ToArray().FirstOrDefault(cd => cd.Id == id); }
|
||||
catch { return null; }
|
||||
}
|
||||
}
|
||||
|
||||
public static void ClearLeftoverData()
|
||||
{
|
||||
RpcSetTasksPatch.GlobalTaskIds = null;
|
||||
HandlingGameEnd = false;
|
||||
OnGameJoinedPatch.AutoStartCheck = false;
|
||||
Main.GameTimer = 0f;
|
||||
MurderPlayerPatch.misfireCount.Clear();
|
||||
LateTask.Tasks.Clear();
|
||||
FixedUpdateInGamePatch.ProcessedModerators.Clear();
|
||||
NormalGameEndChecker.ImpCheckComplete = false;
|
||||
}
|
||||
|
||||
public static PlayerControl[] AllAlivePlayerControls
|
||||
{
|
||||
get
|
||||
{
|
||||
int count = PlayerControl.AllPlayerControls.Count;
|
||||
var result = new PlayerControl[count];
|
||||
var i = 0;
|
||||
|
||||
foreach (PlayerControl pc in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
if (pc == null || pc.Data == null || pc.PlayerId >= 254 || pc.Data.IsDead || (pc.Data.Disconnected)) continue;
|
||||
|
||||
result[i++] = pc;
|
||||
}
|
||||
|
||||
if (i == 0) return [];
|
||||
|
||||
Array.Resize(ref result, i);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ShowLastResult(byte playerId = byte.MaxValue)
|
||||
{
|
||||
if (InGame)
|
||||
{
|
||||
Logger.SendInGame($"Hi, you're currently in-game. Let's use this command afterwards");
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(NormalGameEndChecker.LastWinReason))
|
||||
{
|
||||
Logger.SendInGame($"Your command was canceled due to not having the required info");
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerControl.LocalPlayer.RpcSendChat($"{NormalGameEndChecker.LastWinReason}");
|
||||
}
|
||||
|
||||
public static bool TryGetColorId(string input, out byte colorId)
|
||||
{
|
||||
colorId = 0;
|
||||
|
||||
if (Enum.TryParse<Main.ColorToString>(input, true, out var color))
|
||||
{
|
||||
colorId = (byte)color;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,246 @@
|
||||
using Hazel;
|
||||
using InnerNet;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
// https://github.com/SuperNewRoles/SuperNewRoles/blob/master/SuperNewRoles/Patches/LobbyBehaviourPatch.cs
|
||||
namespace AmongUsRevamped;
|
||||
|
||||
[HarmonyPatch(typeof(ChatController), nameof(ChatController.Update))]
|
||||
internal static class ChatControllerUpdatePatch
|
||||
{
|
||||
|
||||
public static void Postfix(ChatController __instance)
|
||||
{
|
||||
if (Main.DarkTheme.Value)
|
||||
{
|
||||
__instance.freeChatField.background.color = new Color32(40, 40, 40, byte.MaxValue);
|
||||
|
||||
__instance.quickChatField.background.color = new Color32(40, 40, 40, byte.MaxValue);
|
||||
__instance.quickChatField.text.color = Color.white;
|
||||
}
|
||||
else __instance.freeChatField.textArea.outputText.color = Color.black;
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(ChatController), nameof(ChatController.SendChat))]
|
||||
internal static class SendChatPatch
|
||||
{
|
||||
public static bool Prefix(ChatController __instance)
|
||||
{
|
||||
string text = __instance.freeChatField.textArea.text.Trim();
|
||||
string noKcdMode = "0 Kill Cooldown Mode:\n\nImpostors have no kill cooldown, Crewmates have low tasks.\nThink fast and pay attention.";
|
||||
string SnSModeOne = "Shift and Seek Mode:\n\nImps can only kill someone while shapeshifted as them.\nSabotages & Meetings = Off.";
|
||||
string SnSModeTwo = $"Crew wins by tasks/surviving {Options.CrewAutoWinsGameAfter.GetInt()}s.\nImp wins by killing Crew.\n1 Wrong kill = Can't kill for {Options.CantKillTime.GetInt()}s.\n{Options.MisfiresToSuicide.GetInt()} Wrong kills = suicide.";
|
||||
string speedrunMode = $"Speedrun Mode:\n\nEveryone is a crewmate. The 1st player to finish tasks wins the game. Game auto ends after {Options.GameAutoEndsAfter.GetInt()}s";
|
||||
|
||||
if (text == "/h" || text == "/help")
|
||||
{
|
||||
// PlayerControl.LocalPlayer.SendChat("All AUR commands:\n/0kc - Sends the 0 Kill Cooldown gamemode description to everyone");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (__instance.timeSinceLastMessage < 3f || OnGameJoinedPatch.WaitingForChat) return false;
|
||||
|
||||
if (text == "/l" || text == "/lastgame" || text == "/win" || text == "/winner")
|
||||
{
|
||||
Utils.ShowLastResult();
|
||||
__instance.timeSinceLastMessage = 0.8f;
|
||||
__instance.freeChatField.textArea.Clear();
|
||||
__instance.freeChatField.textArea.SetText(string.Empty);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (text == "/0kc" || text == "/0kcd" || text == "/0killcooldown")
|
||||
{
|
||||
PlayerControl.LocalPlayer.RpcSendChat($"{noKcdMode}");
|
||||
__instance.timeSinceLastMessage = 0.8f;
|
||||
__instance.freeChatField.textArea.Clear();
|
||||
__instance.freeChatField.textArea.SetText(string.Empty);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (text == "/sns" || text == "/shiftandseek" || text == "/shift&seek")
|
||||
{
|
||||
PlayerControl.LocalPlayer.RpcSendChat($"{SnSModeOne}");
|
||||
__instance.timeSinceLastMessage = 0.8f;
|
||||
__instance.freeChatField.textArea.Clear();
|
||||
__instance.freeChatField.textArea.SetText(string.Empty);
|
||||
|
||||
new LateTask(() =>
|
||||
{
|
||||
if (!Utils.IsLobby) return;
|
||||
PlayerControl.LocalPlayer.RpcSendChat($"{SnSModeTwo}");
|
||||
__instance.timeSinceLastMessage = 0.8f;
|
||||
}, 2.2f, "SNSTutorial2");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (text == "/sp" || text == "/sr" || text == "/speedrun")
|
||||
{
|
||||
PlayerControl.LocalPlayer.RpcSendChat($"{speedrunMode}");
|
||||
__instance.timeSinceLastMessage = 0.8f;
|
||||
__instance.freeChatField.textArea.Clear();
|
||||
__instance.freeChatField.textArea.SetText(string.Empty);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (text == "/r" || text == "/roles" || text == "/gamemode" || text == "/gm")
|
||||
{
|
||||
switch (Options.Gamemode.GetValue())
|
||||
{
|
||||
case 0:
|
||||
PlayerControl.LocalPlayer.RpcSendChat($"Custom roles:\nThere are no custom roles.");
|
||||
__instance.timeSinceLastMessage = 0.8f;
|
||||
__instance.freeChatField.textArea.Clear();
|
||||
__instance.freeChatField.textArea.SetText(string.Empty);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
PlayerControl.LocalPlayer.RpcSendChat($"{noKcdMode}");
|
||||
__instance.timeSinceLastMessage = 0.8f;
|
||||
__instance.freeChatField.textArea.Clear();
|
||||
__instance.freeChatField.textArea.SetText(string.Empty);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
PlayerControl.LocalPlayer.RpcSendChat($"{SnSModeOne}");
|
||||
__instance.timeSinceLastMessage = 0.8f;
|
||||
__instance.freeChatField.textArea.Clear();
|
||||
__instance.freeChatField.textArea.SetText(string.Empty);
|
||||
|
||||
new LateTask(() =>
|
||||
{
|
||||
PlayerControl.LocalPlayer.RpcSendChat($"{SnSModeTwo}");
|
||||
__instance.timeSinceLastMessage = 0.8f;
|
||||
}, 2.2f, "SNSTutorial2");
|
||||
break;
|
||||
|
||||
case 3:
|
||||
PlayerControl.LocalPlayer.RpcSendChat($"{speedrunMode}");
|
||||
__instance.timeSinceLastMessage = 0.8f;
|
||||
__instance.freeChatField.textArea.Clear();
|
||||
__instance.freeChatField.textArea.SetText(string.Empty);
|
||||
break;
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
bool isKick = text.StartsWith("/kick ");
|
||||
bool isBan = text.StartsWith("/ban ");
|
||||
|
||||
bool isColorKick = text.StartsWith("/ckick ");
|
||||
bool isColorBan = text.StartsWith("/cban ");
|
||||
|
||||
bool banLog = isBan || isColorBan;
|
||||
|
||||
if (!isKick && !isBan && !isColorKick && !isColorBan)
|
||||
{
|
||||
Logger.Info($" {PlayerControl.LocalPlayer.Data.PlayerName}: {text}", "SendChat");
|
||||
return true;
|
||||
}
|
||||
|
||||
string arg = text.Substring(isKick ? 6 : isBan ? 5 : isColorKick ? 7 : isColorBan ? 6 : 0).Trim();
|
||||
|
||||
PlayerControl target = null;
|
||||
|
||||
foreach (PlayerControl p in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
if (p.Data == null || p == PlayerControl.LocalPlayer) continue;
|
||||
|
||||
if ((isKick || isBan) && p.Data.PlayerName.Equals(arg, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
target = p;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((isColorKick || isColorBan) && Utils.TryGetColorId(arg, out byte colorId))
|
||||
{
|
||||
if (p.Data.DefaultOutfit.ColorId == colorId)
|
||||
{
|
||||
target = p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (target != null)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(target.Data.ClientId, isBan || isColorBan);
|
||||
Logger.Info($" {(banLog ? "banned" : "kicked")} {target.Data.PlayerName}", "Kick&BanCommand");
|
||||
__instance.freeChatField.textArea.Clear();
|
||||
__instance.freeChatField.textArea.SetText(string.Empty);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.HandleRpc))]
|
||||
public static class RPCHandlerPatch
|
||||
{
|
||||
public static void Prefix(PlayerControl __instance, byte callId, MessageReader reader)
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
|
||||
var rpcType = (RpcCalls)callId;
|
||||
MessageReader subReader = MessageReader.Get(reader);
|
||||
|
||||
switch (rpcType)
|
||||
{
|
||||
case RpcCalls.SendChat:
|
||||
{
|
||||
string chatText = subReader.ReadString();
|
||||
Logger.Info($" {__instance.Data.PlayerName}: {chatText}", "SendChat");
|
||||
|
||||
// Banning works by name and color. Commands are seperated incase someone has a color as their name
|
||||
bool isKick = chatText.StartsWith("/kick ");
|
||||
bool isBan = chatText.StartsWith("/ban ");
|
||||
|
||||
bool isColorKick = chatText.StartsWith("/ckick ");
|
||||
bool isColorBan = chatText.StartsWith("/cban ");
|
||||
|
||||
bool banLog = isBan || isColorBan;
|
||||
|
||||
if (!isKick && !isBan && !isColorKick && !isColorBan) return;
|
||||
|
||||
if (Utils.IsPlayerModerator(__instance.Data.FriendCode))
|
||||
{
|
||||
string arg = chatText.Substring(isKick ? 6 : isBan ? 5 : isColorKick ? 7 : isColorBan ? 6 : 0).Trim();
|
||||
|
||||
PlayerControl target = null;
|
||||
|
||||
foreach (PlayerControl p in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
if (p.Data == null || p == PlayerControl.LocalPlayer || Utils.IsPlayerModerator(p.Data.FriendCode)) continue;
|
||||
|
||||
if ((isKick || isBan) && p.Data.PlayerName.Equals(arg, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
target = p;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((isColorKick || isColorBan) && Utils.TryGetColorId(arg, out byte colorId))
|
||||
{
|
||||
if (p.Data.DefaultOutfit.ColorId == colorId)
|
||||
{
|
||||
target = p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (target != null)
|
||||
{
|
||||
AmongUsClient.Instance.KickPlayer(target.Data.ClientId, isBan || isColorBan);
|
||||
Logger.Info($" {__instance.Data.PlayerName} {(banLog ? "banned" : "kicked")} {target.Data.PlayerName}", "Kick&BanCommand");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,11 +51,8 @@ namespace AmongUsRevamped
|
||||
{
|
||||
private static void Postfix(VersionShower __instance)
|
||||
{
|
||||
RpcSetTasksPatch.GlobalTaskIds = null;
|
||||
OnGameJoinedPatch.AutoStartCheck = false;
|
||||
Main.GameTimer = 0f;
|
||||
MurderPlayerPatch.misfireCount.Clear();
|
||||
LateTask.Tasks.Clear();
|
||||
Utils.ClearLeftoverData();
|
||||
NormalGameEndChecker.LastWinReason = "";
|
||||
|
||||
Main.CredentialsText = $"<color=#FFD700>Among Us Revamped</color><color=#ffffff> {Main.ModVersion}</color>";
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using AmongUs.Data;
|
||||
using Discord;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace AmongUsRevamped;
|
||||
|
||||
// Originally from "Town of Us Rewritten", by Det
|
||||
[HarmonyPatch(typeof(ActivityManager), nameof(ActivityManager.UpdateActivity))]
|
||||
public class DiscordRPC
|
||||
{
|
||||
private static string Lobbycode = "";
|
||||
private static string Region = "";
|
||||
|
||||
public static void Prefix([HarmonyArgument(0)] Activity activity)
|
||||
{
|
||||
if (activity == null) return;
|
||||
|
||||
var details = $"AmongUsRevamped {Main.ModVersion}";
|
||||
activity.Details = details;
|
||||
|
||||
try
|
||||
{
|
||||
if (activity.State != "In Menus")
|
||||
{
|
||||
if (!DataManager.Settings.Gameplay.StreamerMode)
|
||||
{
|
||||
if (Utils.IsLobby)
|
||||
{
|
||||
Lobbycode = GameStartManager.Instance.GameRoomNameCode.text;
|
||||
Region = Utils.GetRegionName();
|
||||
}
|
||||
|
||||
if (Lobbycode != "" && Region != "") details = $"AmongUsRevamped - {Lobbycode} ({Region})";
|
||||
}
|
||||
else
|
||||
details = $"AmongUsRevamped {Main.ModVersion}";
|
||||
|
||||
activity.Details = details;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error("Error in updating discord rpc", "DiscordPatch");
|
||||
Logger.Exception(ex, "DiscordPatch");
|
||||
details = $"AmongUsRevamped v{Main.ModVersion}";
|
||||
activity.Details = details;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,11 +10,7 @@ public static class EndGameManagerPatch
|
||||
{
|
||||
public static void Postfix(EndGameManager __instance)
|
||||
{
|
||||
RpcSetTasksPatch.GlobalTaskIds = null;
|
||||
OnGameJoinedPatch.AutoStartCheck = false;
|
||||
Main.GameTimer = 0f;
|
||||
MurderPlayerPatch.misfireCount.Clear();
|
||||
LateTask.Tasks.Clear();
|
||||
Utils.ClearLeftoverData();
|
||||
|
||||
EndGameNavigation navigation = __instance.Navigation;
|
||||
if (!AmongUsClient.Instance.AmHost || __instance == null || navigation == null || !Options.AutoRejoinLobby.GetBool()) return;
|
||||
@@ -25,12 +21,44 @@ public static class EndGameManagerPatch
|
||||
[HarmonyPatch(typeof(LogicGameFlowNormal), nameof(LogicGameFlowNormal.CheckEndCriteria))]
|
||||
class NormalGameEndChecker
|
||||
{
|
||||
public static bool ImpCheckComplete;
|
||||
public static string LastWinReason = "";
|
||||
public static List<PlayerControl> imps = new List<PlayerControl>();
|
||||
|
||||
public static bool Prefix()
|
||||
{
|
||||
if (Options.NoGameEnd.GetBool()) return false;
|
||||
else return true;
|
||||
|
||||
if (Options.NoGameEnd.GetBool() || Options.Gamemode.GetValue() == 3 || Options.Gamemode.GetValue() == 2 && Main.NormalOptions.NumImpostors*2 < Utils.allAlivePlayersCount) return false;
|
||||
|
||||
var allPlayers = PlayerControl.AllPlayerControls.ToArray();
|
||||
|
||||
if (!ImpCheckComplete)
|
||||
{
|
||||
imps.AddRange(allPlayers.Where(pc => pc.Data.Role.IsImpostor));
|
||||
ImpCheckComplete = true;
|
||||
}
|
||||
|
||||
if (Utils.AliveImpostors == 0)
|
||||
{
|
||||
LastWinReason = $"★ Crewmates win!\n\nImpostors:\n" + string.Join("\n", imps.Select(p => p.Data.PlayerName));
|
||||
}
|
||||
else if (Utils.AliveImpostors >= Utils.AliveCrewmates)
|
||||
{
|
||||
LastWinReason = $"★ Impostors win!\n\nImpostors:\n★" + string.Join("\n★", imps.Select(p => p.Data.PlayerName));
|
||||
}
|
||||
else if (GameData.Instance != null && GameData.Instance.TotalTasks > 0 && GameData.Instance.CompletedTasks >= GameData.Instance.TotalTasks)
|
||||
{
|
||||
LastWinReason = $"★ Crewmates win! (Tasks)\n\nImpostors:\n" + string.Join("\n", imps.Select(p => p.Data.PlayerName));
|
||||
}
|
||||
else
|
||||
{
|
||||
LastWinReason = $"★ Impostors win! (Sabotage)\n\nImpostors:\n★" + string.Join("\n★", imps.Select(p => p.Data.PlayerName));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(LogicGameFlowHnS), nameof(LogicGameFlowHnS.CheckEndCriteria))]
|
||||
class HNSGameEndChecker
|
||||
{
|
||||
@@ -40,6 +68,7 @@ class HNSGameEndChecker
|
||||
else return true;
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(ControllerManager), nameof(ControllerManager.Update))]
|
||||
internal class ControllerManagerUpdatePatch
|
||||
{
|
||||
@@ -60,6 +89,6 @@ internal class ControllerManagerUpdatePatch
|
||||
}
|
||||
else
|
||||
PlayerControl.LocalPlayer.ReportDeadBody(PlayerControl.LocalPlayer.Data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,17 +10,39 @@ namespace AmongUsRevamped;
|
||||
[HarmonyPatch(typeof(AmongUsClient), nameof(AmongUsClient.OnGameJoined))]
|
||||
internal static class OnGameJoinedPatch
|
||||
{
|
||||
public static bool WaitingForChat;
|
||||
public static bool AutoStartCheck;
|
||||
public static void Postfix(AmongUsClient __instance)
|
||||
public static void Postfix()
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost || !Main.AutoStart.Value) return;
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
|
||||
LateTask.Tasks.Clear();
|
||||
WaitingForChat = false;
|
||||
AutoStartCheck = false;
|
||||
|
||||
new LateTask(() =>
|
||||
if (Main.AutoStart.Value)
|
||||
{
|
||||
AutoStartCheck = true;
|
||||
}, Options.WaitAutoStart.GetFloat(), "AutoStartTimer");
|
||||
LateTask.Tasks.Clear();
|
||||
|
||||
new LateTask(() =>
|
||||
{
|
||||
AutoStartCheck = true;
|
||||
}, Options.WaitAutoStart.GetFloat(), "AutoStartTimer");
|
||||
}
|
||||
|
||||
if (Options.AutoSendGameInfo.GetBool() && !string.IsNullOrEmpty(NormalGameEndChecker.LastWinReason))
|
||||
{
|
||||
WaitingForChat = true;
|
||||
|
||||
new LateTask(() =>
|
||||
{
|
||||
Utils.ShowLastResult();
|
||||
}, 3f, "AutoSendGameInfo");
|
||||
|
||||
new LateTask(() =>
|
||||
{
|
||||
WaitingForChat = false;
|
||||
}, 5.2f, "AutoSendGameInfo2");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +78,12 @@ class OnPlayerJoinedPatch
|
||||
{
|
||||
BanManager.CheckBanPlayer(Client);
|
||||
|
||||
Utils.IsPlayerInDenyName(Client, Client.PlayerName);
|
||||
|
||||
if (Utils.IsPlayerModerator(Client.FriendCode) && Options.ApplyModeratorList.GetBool())
|
||||
{
|
||||
Logger.Info($" {Client.PlayerName} is moderator", "ModeratorCheck");
|
||||
}
|
||||
|
||||
if (HasInvalidFriendCode(Client.FriendCode) && Options.KickInvalidFriendCodes.GetBool())
|
||||
{
|
||||
@@ -74,4 +102,14 @@ class OnPlayerJoinedPatch
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(AmongUsClient), nameof(AmongUsClient.OnPlayerLeft))]
|
||||
class OnPlayerLeftPatch
|
||||
{
|
||||
static void Prefix([HarmonyArgument(0)] ClientData client)
|
||||
{
|
||||
if (client?.Character == null) return;
|
||||
FixedUpdateInGamePatch.ProcessedModerators.Remove(client.Character.PlayerId);
|
||||
}
|
||||
}
|
||||
@@ -47,6 +47,8 @@ public static class NumberOption_Initialize
|
||||
{
|
||||
public static void Postfix(NumberOption __instance)
|
||||
{
|
||||
if (ModGameOptionsMenu.TabIndex >= 3) return;
|
||||
|
||||
if (Utils.isHideNSeek || !Utils.isHideNSeek && __instance.Title != StringNames.GameNumImpostors && __instance.Title != StringNames.GamePlayerSpeed)
|
||||
{
|
||||
__instance.ValidRange = new FloatRange(-900f, 900f);
|
||||
|
||||
@@ -11,6 +11,9 @@ internal class ApplyCustomImpostorCount
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
|
||||
NormalGameEndChecker.imps.Clear();
|
||||
NormalGameEndChecker.LastWinReason = "";
|
||||
|
||||
// Normal game = Impostor to prevent blocking task win. HNS = Crewmate to prevent Seeker detection range bugging.
|
||||
if (Main.GM.Value)
|
||||
{
|
||||
@@ -24,6 +27,23 @@ internal class ApplyCustomImpostorCount
|
||||
}
|
||||
}
|
||||
|
||||
if (Options.Gamemode.GetValue() == 3 && !Utils.isHideNSeek)
|
||||
{
|
||||
foreach (var p in PlayerControl.AllPlayerControls)
|
||||
{
|
||||
p.RpcSetRole(AmongUs.GameOptions.RoleTypes.Crewmate, false);
|
||||
|
||||
new LateTask(() =>
|
||||
{
|
||||
p.RpcSetRole(AmongUs.GameOptions.RoleTypes.Crewmate, false);
|
||||
}, 5f, "Speedrun Secondary RPCSetRole");
|
||||
|
||||
new LateTask(() =>
|
||||
{
|
||||
p.RpcSetRole(AmongUs.GameOptions.RoleTypes.Crewmate, false);
|
||||
}, 9f, "Speedrun Tertiary RPCSetRole");
|
||||
}
|
||||
}
|
||||
|
||||
if (Utils.isHideNSeek)
|
||||
{
|
||||
@@ -61,7 +81,12 @@ internal class ApplyCustomImpostorCount
|
||||
new LateTask(() =>
|
||||
{
|
||||
p.RpcSetRole(AmongUs.GameOptions.RoleTypes.Impostor, false);
|
||||
}, 9f, "Secondary RPCSetRole");
|
||||
}, 5f, "HNS Secondary RPCSetRole");
|
||||
|
||||
new LateTask(() =>
|
||||
{
|
||||
p.RpcSetRole(AmongUs.GameOptions.RoleTypes.Impostor, false);
|
||||
}, 9f, "HNS Tertiary RPCSetRole");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,30 +3,36 @@ using AmongUs.GameOptions;
|
||||
using Hazel;
|
||||
using InnerNet;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AmongUsRevamped;
|
||||
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.FixedUpdate))]
|
||||
class FixedUpdateInGamePatch
|
||||
{
|
||||
public static readonly HashSet<byte> ProcessedModerators = new HashSet<byte>();
|
||||
|
||||
public static void Postfix(PlayerControl __instance)
|
||||
{
|
||||
if (__instance == null || __instance.PlayerId == 255) return;
|
||||
|
||||
if (Utils.IsPlayerModerator(__instance.Data.FriendCode) && !ProcessedModerators.Contains(__instance.PlayerId))
|
||||
{
|
||||
__instance.SetName($"★{__instance.Data.PlayerName}★");
|
||||
ProcessedModerators.Add(__instance.PlayerId);
|
||||
}
|
||||
|
||||
GameObject g = GameObject.Find("GameSettingsLabel");
|
||||
|
||||
// 0Kc
|
||||
if (Options.Gamemode.GetValue() == 1 && !Utils.isHideNSeek && Main.NormalOptions.KillCooldown != 0.01f)
|
||||
{
|
||||
Main.NormalOptions.KillCooldown = 0.01f;
|
||||
|
||||
if (Options.NoKcdSettingsOverride.GetBool())
|
||||
if (Options.NoKcdSettingsOverride.GetBool() && g == null)
|
||||
{
|
||||
Main.NormalOptions.EmergencyCooldown = 0;
|
||||
Main.NormalOptions.DiscussionTime = 0;
|
||||
Main.NormalOptions.VotingTime = 30;
|
||||
|
||||
Main.NormalOptions.TaskBarMode = 0;
|
||||
Main.NormalOptions.NumCommonTasks = 0;
|
||||
Main.NormalOptions.NumShortTasks = 1;
|
||||
Main.NormalOptions.NumLongTasks = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,15 +41,33 @@ class FixedUpdateInGamePatch
|
||||
{
|
||||
Main.NormalOptions.KillCooldown = 2.5f;
|
||||
|
||||
if (Options.SNSSettingsOverride.GetBool())
|
||||
if (Options.SNSSettingsOverride.GetBool() && g == null)
|
||||
{
|
||||
Main.NormalOptions.NumEmergencyMeetings = 0;
|
||||
|
||||
Main.NormalOptions.TaskBarMode = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Options.DisableSabotage.SetValue(1);
|
||||
Options.DisableCloseDoor.SetValue(1);
|
||||
Options.DisableReport.SetValue(1);
|
||||
// Speedrun
|
||||
if (Options.Gamemode.GetValue() == 3 && !Utils.isHideNSeek && g == null)
|
||||
{
|
||||
Main.NormalOptions.NumEmergencyMeetings = 0;
|
||||
|
||||
Main.NormalOptions.TaskBarMode = 0;
|
||||
|
||||
if (__instance.AllTasksCompleted() && Utils.InGame && Utils.GamePastRoleSelection && !Utils.HandlingGameEnd)
|
||||
{
|
||||
Utils.HandlingGameEnd = true;
|
||||
__instance.RpcSetRole(AmongUs.GameOptions.RoleTypes.ImpostorGhost, false);
|
||||
|
||||
new LateTask(() =>
|
||||
{
|
||||
NormalGameEndChecker.LastWinReason = $"★ {__instance.Data.PlayerName} Wins! (Completed tasks first)";
|
||||
MessageWriter writer = AmongUsClient.Instance.StartEndGame();
|
||||
writer.Write((byte)GameOverReason.ImpostorsByVote);
|
||||
AmongUsClient.Instance.FinishEndGame(writer);
|
||||
}, 1f, "SpeedrunSetWinner");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +104,7 @@ class ReportDeadBodyPatch
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return true;
|
||||
|
||||
if (Options.DisableReport.GetBool() && target != null)
|
||||
if (Options.DisableReport.GetBool() && target != null || Options.Gamemode.GetValue() == 2)
|
||||
{
|
||||
Logger.Info($" Stopped {__instance.Data.PlayerName} reporting the body of {target.PlayerName}", "ReportDeadBodyPatch");
|
||||
return false;
|
||||
@@ -128,7 +152,7 @@ internal static class MurderPlayerPatch
|
||||
if (!__instance.Data.IsDead) {__instance.RpcSetRole(RoleTypes.Shapeshifter, false);}
|
||||
}, Options.CantKillTime.GetInt(), "SNSResetRole");
|
||||
|
||||
if (misfireCount[__instance.Data.PlayerId] >= Options.MisfiresToSuicide.GetValue())
|
||||
if (misfireCount[__instance.Data.PlayerId] >= Options.MisfiresToSuicide.GetFloat())
|
||||
{
|
||||
__instance.RpcSetRole(RoleTypes.ImpostorGhost);
|
||||
Logger.Info($" {__instance.Data.PlayerName} misfired {misfireCount[playerId]} times and suicided", "SNSKillManager");
|
||||
|
||||
@@ -20,7 +20,7 @@ public static class SabotageSystemTypeRepairDamagePatch
|
||||
var Sabo = (SystemTypes)amount;
|
||||
|
||||
Logger.Info($" {player.Data.PlayerName} is trying to sabotage: {Sabo}", "SabotageCheck");
|
||||
if (Options.DisableSabotage.GetBool())
|
||||
if (Options.DisableSabotage.GetBool() || Options.Gamemode.GetValue() == 2)
|
||||
{
|
||||
Logger.Info($" Sabotage {Sabo} by: {player.Data.PlayerName} was blocked", "SabotageCheck");
|
||||
return false;
|
||||
@@ -38,7 +38,7 @@ class ShipStatusCloseDoorsPatch
|
||||
|
||||
Logger.Info($" Trying to close the door in: {room}", "DoorCheck");
|
||||
|
||||
if (Options.DisableCloseDoor.GetBool())
|
||||
if (Options.DisableCloseDoor.GetBool() || Options.Gamemode.GetValue() == 2)
|
||||
{
|
||||
Logger.Info($" Door sabotage in: {room} was blocked", "DoorCheck");
|
||||
return false;
|
||||
|
||||
@@ -3,26 +3,8 @@ using InnerNet;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
// https://github.com/SuperNewRoles/SuperNewRoles/blob/master/SuperNewRoles/Patches/LobbyBehaviourPatch.cs
|
||||
namespace AmongUsRevamped;
|
||||
|
||||
[HarmonyPatch(typeof(ChatController), nameof(ChatController.Update))]
|
||||
internal static class ChatControllerUpdatePatch
|
||||
{
|
||||
|
||||
public static void Postfix(ChatController __instance)
|
||||
{
|
||||
if (Main.DarkTheme.Value)
|
||||
{
|
||||
__instance.freeChatField.background.color = new Color32(40, 40, 40, byte.MaxValue);
|
||||
|
||||
__instance.quickChatField.background.color = new Color32(40, 40, 40, byte.MaxValue);
|
||||
__instance.quickChatField.text.color = Color.white;
|
||||
}
|
||||
else __instance.freeChatField.textArea.outputText.color = Color.black;
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(VoteBanSystem), nameof(VoteBanSystem.AddVote))]
|
||||
internal static class AddVotePatch
|
||||
{
|
||||
@@ -1,6 +1,17 @@
|
||||
# 📎 AmongUsRevamped
|
||||
- AmongUsRevamped is a Host-Only mod with one goal: Creating the best Among Us experience possible without Modded Protocol. This includes new settings, utilities and even custom Gamemodes! Enjoy the countless features and feel free to contact me for anything regarding this mod. Happy gaming!
|
||||
|
||||
# Welcome to AmongUsRevamped!
|
||||
<br>
|
||||
|
||||
</p>
|
||||
<p align="center">
|
||||
|
||||
<center>
|
||||
<a href="https://discord.gg/83Zhzhyhya" target="_blank"><img src="https://img.shields.io/badge/Discord%20-%231DA1F2.svg?&style=for-the-badge&logo=discord&logoColor=white&color=5662f6"/></a>
|
||||
<a href="https://github.com/apemv/AmongUsRevamped/releases/latest" target="_blank"><img src="https://img.shields.io/badge/Latest Version%20-%231DA1F2.svg?&style=for-the-badge&logo=github&logoColor=white&color=181717"/></a>
|
||||
</center>
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
# 💡 How To Install:
|
||||
- <b>If you have BepInEx, download AmongUsRevamped.dll in releases and move it into Among Us → BepinEx → Plugins</b>
|
||||
@@ -18,7 +29,7 @@
|
||||
<img src="https://github.com/astra1dev/AUnlocker/assets/90265231/14226f03-a003-4efc-b27b-6df53fb394d6" width=410 height=240>****
|
||||
|
||||
|
||||
# 🎮 Features (v1.0.1):
|
||||
# 🎮 Features (v1.1.1):
|
||||
- <b>🔶 Client Side settings:</b>
|
||||
- Game Master
|
||||
- Unlock FPS
|
||||
@@ -28,6 +39,9 @@
|
||||
- <b>🔷 Technical settings:</b>
|
||||
- Kick/Ban players under a certain level
|
||||
- Kick/Ban invalid FriendCodes
|
||||
- Kick/Ban command using names instead of ID's
|
||||
- DenyName system
|
||||
- Moderator system
|
||||
- Enable No Game End
|
||||
- Banlist
|
||||
- <b>🔶 Automatic settings:</b>
|
||||
@@ -43,9 +57,11 @@
|
||||
- <b>🔶 Custom Gamemodes:</b>
|
||||
- 0 Kill Cooldown
|
||||
- Shift and Seek
|
||||
- Speedrun
|
||||
- <b>🔷 Extra features:</b>
|
||||
- Shift + L + Enter - Force End Game
|
||||
- Shift + M + Enter - Force Call/Close Meeting
|
||||
- Gamemode info commands -> /0kc /0killcooldown | /sns /shiftandseek |/sp /speedrun
|
||||
- Zoom out in lobby or when dead
|
||||
- Kick players while in game
|
||||
- Unlimited Option ranges
|
||||
|
||||
Reference in new issue
Block a user