This commit is contained in:
D1GQ committed 2024-12-08 19:07:00 -06:00
1 parent 105cfc1f0b
commit 7e89b5f518
3 files changed
+23 -11

No files matched your search

+2 -2
View File
@@ -267,7 +267,7 @@ public static class Utils
sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f), pixelsPerUnit);
sprite.hideFlags |= HideFlags.HideAndDontSave | HideFlags.DontSaveInEditor;
Logger.Log($"Successfully loaded sprite from {path}");
// Logger.Log($"Successfully loaded sprite from {path}");
return CachedSprites[path + pixelsPerUnit] = sprite;
}
catch (Exception ex)
@@ -293,7 +293,7 @@ public static class Utils
return null;
}
Logger.Log($"Successfully loaded texture from {path}");
// Logger.Log($"Successfully loaded texture from {path}");
return texture;
}
catch (Exception ex)
+9 -5
View File
@@ -27,7 +27,7 @@ class PlayerControlPatch
public static void SetPlayerHighlight(PlayerControl player)
{
string hashPuid = Utils.GetHashPuid(player);
string friendCode = ValidateFriendCode(player, out string _);
string friendCode = player.Data.FriendCode;
SetPlayerOutline(player, hashPuid, friendCode, new());
}
@@ -150,22 +150,26 @@ class PlayerControlPatch
private static void SetPlayerOutline(PlayerControl player, string hashPuid, string friendCode, StringBuilder sbTag)
{
if (BAUAntiCheat.SickoData.ContainsKey(hashPuid) || BAUAntiCheat.SickoData.ContainsValue(friendCode))
if (hashPuid != "" && BAUAntiCheat.SickoData.ContainsKey(hashPuid)
|| friendCode != "" && BAUAntiCheat.SickoData.ContainsValue(friendCode))
{
sbTag.Append($"<color=#00f583>{Translator.GetString("Player.SickoUser")}</color>+++");
player.SetOutlineByHex(true, "#00f583");
}
else if (BAUAntiCheat.AUMData.ContainsKey(hashPuid) || BAUAntiCheat.AUMData.ContainsValue(friendCode))
else if (hashPuid != "" && BAUAntiCheat.AUMData.ContainsKey(hashPuid)
|| friendCode != "" && BAUAntiCheat.AUMData.ContainsValue(friendCode))
{
sbTag.Append($"<color=#4f0000>{Translator.GetString("Player.AUMUser")}</color>+++");
player.SetOutlineByHex(true, "#4f0000");
}
else if (BAUAntiCheat.KNData.ContainsKey(hashPuid) || BAUAntiCheat.KNData.ContainsValue(friendCode))
else if (hashPuid != "" && BAUAntiCheat.KNData.ContainsKey(hashPuid)
|| friendCode != "" && BAUAntiCheat.KNData.ContainsValue(friendCode))
{
sbTag.Append($"<color=#8731e7>{Translator.GetString("Player.KNUser")}</color>+++");
player.SetOutlineByHex(true, "#8731e7");
}
else if (BAUAntiCheat.PlayerData.ContainsKey(hashPuid) || BAUAntiCheat.PlayerData.ContainsValue(friendCode))
else if (hashPuid != "" && BAUAntiCheat.PlayerData.ContainsKey(hashPuid)
|| friendCode != "" && BAUAntiCheat.PlayerData.ContainsValue(friendCode))
{
sbTag.Append($"<color=#fc0000>{Translator.GetString("Player.KnownCheater")}</color>+++");
player.SetOutlineByHex(true, "#fc0000");
+12 -4
View File
@@ -156,14 +156,22 @@ public class Main : BasePlugin
{
try
{
ConsoleManager.DetachConsole();
foreach (var listener in BepInEx.Logging.Logger.Listeners)
{
if (listener.GetType().Name.ToLower().Contains("Unity"))
{
BepInEx.Logging.Logger.Listeners.Remove(listener);
break;
}
}
ConsoleManager.CreateConsole();
ConsoleManager.ConfigConsoleEnabled.BoxedValue = false;
ConsoleManager.SetConsoleTitle("Among Us - BAU Console");
ConsoleManager.ConfigPreventClose.Value = true;
if (ConsoleManager.ConfigConsoleEnabled.Value) ConsoleManager.DetachConsole();
ConsoleManager.ConfigConsoleEnabled.Value = false;
ConsoleManager.SetConsoleTitle("Among Us - BAU Console");
Logger = BepInEx.Logging.Logger.CreateLogSource(PluginGuid);
var customLogListener = new CustomLogListener();
BepInEx.Logging.Logger.Listeners.Clear();
BepInEx.Logging.Logger.Listeners.Add(customLogListener);
ConsoleManager.SetConsoleColor(ConsoleColor.Green);
ConsoleManager.ConsoleStream.WriteLine($".--------------------------------------------------------------------------------.\r\n| ____ _ _ _ _ _ |\r\n| | __ ) ___| |_| |_ ___ _ __ / \\ _ __ ___ ___ _ __ __ _ | | | |___ |\r\n| | _ \\ / _ \\ __| __/ _ \\ '__| / _ \\ | '_ ` _ \\ / _ \\| '_ \\ / _` | | | | / __||\r\n| | |_) | __/ |_| || __/ | / ___ \\| | | | | | (_) | | | | (_| | | |_| \\__ \\|\r\n| |____/ \\___|\\__|\\__\\___|_| /_/ \\_\\_| |_| |_|\\___/|_| |_|\\__, | \\___/|___/|\r\n| |___/ |\r\n'--------------------------------------------------------------------------------'");