mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
Add BAUConfigEntry
This commit is contained in:
1 parent
44a93d5909
commit
dc0d0f5302
31 files changed
+205
-129
No files matched your search
+9
-1
@@ -3,6 +3,7 @@ using BepInEx.Logging;
|
||||
using BepInEx.Unity.IL2CPP;
|
||||
using BetterAmongUs.Attributes;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Data.Json;
|
||||
using BetterAmongUs.Enums;
|
||||
using BetterAmongUs.Helpers;
|
||||
@@ -54,6 +55,11 @@ internal class BAUPlugin : BasePlugin
|
||||
return text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the BAUPlugin instance.
|
||||
/// </summary>
|
||||
internal static BAUPlugin? Instance { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Harmony instance used for patching.
|
||||
/// </summary>
|
||||
@@ -106,6 +112,8 @@ internal class BAUPlugin : BasePlugin
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
Instance = this;
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var listener in BepInEx.Logging.Logger.Listeners)
|
||||
@@ -136,7 +144,7 @@ internal class BAUPlugin : BasePlugin
|
||||
|
||||
BAUModdedSupportFlags.Initialize();
|
||||
GithubAPI.Connect();
|
||||
BAUConfigs.LoadConfigs(this);
|
||||
BAUConfigs.LoadConfigs();
|
||||
BetterDataManager.Initialize();
|
||||
Translator.Initialize();
|
||||
Harmony.PatchAll();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using BetterAmongUs.Attributes;
|
||||
using BetterAmongUs.Commands.Arguments;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Modules.Support;
|
||||
|
||||
namespace BetterAmongUs.Commands;
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
using BepInEx.Configuration;
|
||||
using BetterAmongUs.Modules.Support;
|
||||
using BetterAmongUs.Patches.Client;
|
||||
|
||||
namespace BetterAmongUs.Data;
|
||||
|
||||
/// <summary>
|
||||
/// Manages configuration entries for the Better Among Us.
|
||||
/// </summary>
|
||||
internal static class BAUConfigs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for private only lobby setting.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<bool>? PrivateOnlyLobby { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for anti-cheat setting.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<bool>? AntiCheat { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for sending Better RPC setting.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<bool>? SendBetterRpc { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for better notifications setting.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<bool>? BetterNotifications { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for force own language setting.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<bool>? ForceOwnLanguage { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for chat dark mode setting.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<bool>? ChatDarkMode { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for chat in gameplay setting.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<bool>? ChatInGameplay { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for lobby player info setting.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<bool>? LobbyPlayerInfo { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for disable lobby theme setting.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<bool>? DisableLobbyTheme { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for unlock FPS setting.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<bool>? UnlockFPS { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for show FPS setting.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<bool>? ShowFPS { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for command prefix setting.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<string>? CommandPrefix { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for favorite color setting.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<int>? FavoriteColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration entry for the settings preset.
|
||||
/// </summary>
|
||||
internal static ConfigEntry<int>? SettingsPreset { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Loads configuration options from BepInEx config file.
|
||||
/// </summary>
|
||||
internal static void LoadConfigs(BAUPlugin plugin)
|
||||
{
|
||||
PrivateOnlyLobby = plugin.Config.Bind("Mod", "PrivateOnlyLobby", false);
|
||||
AntiCheat = plugin.Config.Bind("Better Options", "AntiCheat", true);
|
||||
SendBetterRpc = plugin.Config.Bind("Better Options", "SendBetterRpc", true);
|
||||
BetterNotifications = plugin.Config.Bind("Better Options", "BetterNotifications", true);
|
||||
ForceOwnLanguage = plugin.Config.Bind("Better Options", "ForceOwnLanguage", false);
|
||||
ChatDarkMode = plugin.Config.Bind("Better Options", "ChatDarkMode", true);
|
||||
ChatInGameplay = plugin.Config.Bind("Better Options", "ChatInGameplay", true);
|
||||
LobbyPlayerInfo = plugin.Config.Bind("Better Options", "LobbyPlayerInfo", true);
|
||||
DisableLobbyTheme = plugin.Config.Bind("Better Options", "DisableLobbyTheme", true);
|
||||
UnlockFPS = plugin.Config.Bind("Better Options", "UnlockFPS", false);
|
||||
ShowFPS = plugin.Config.Bind("Better Options", "ShowFPS", false);
|
||||
CommandPrefix = plugin.Config.Bind("Client Options", "CommandPrefix", "/");
|
||||
FavoriteColor = plugin.Config.Bind("Mod", "FavoriteColor", -1);
|
||||
SettingsPreset = plugin.Config.Bind("Mod", "SettingsPreset", 0);
|
||||
|
||||
BAUModdedSupportEvents.InvokeAll_OnBAUConfigEntriesLoaded([
|
||||
PrivateOnlyLobby, AntiCheat, SendBetterRpc,
|
||||
BetterNotifications, ForceOwnLanguage, ChatDarkMode,
|
||||
ChatInGameplay, LobbyPlayerInfo, DisableLobbyTheme,
|
||||
UnlockFPS, ShowFPS, CommandPrefix,
|
||||
FavoriteColor, SettingsPreset
|
||||
]);
|
||||
|
||||
OptionsMenuBehaviourPatch.UpdateFrameRate();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using BetterAmongUs.Data.Json;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Data.Json;
|
||||
using BetterAmongUs.Helpers;
|
||||
|
||||
namespace BetterAmongUs.Data;
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
using BepInEx.Configuration;
|
||||
|
||||
namespace BetterAmongUs.Data.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a configuration entry wrapper for Better Among Us.
|
||||
/// Provides type-safe access to BepInEx configuration entries with implicit conversion support.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the configuration value.</typeparam>
|
||||
internal sealed class BAUConfigEntry<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BAUConfigEntry{T}"/> class.
|
||||
/// </summary>
|
||||
/// <param name="category">The configuration category/section name.</param>
|
||||
/// <param name="name">The name of the configuration entry.</param>
|
||||
/// <param name="defaultValue">The default value for the configuration entry.</param>
|
||||
internal BAUConfigEntry(string category, string name, T defaultValue)
|
||||
{
|
||||
_config = BAUPlugin.Instance.Config.Bind(category, name, defaultValue);
|
||||
}
|
||||
|
||||
private readonly ConfigEntry<T> _config;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current value of the configuration entry.
|
||||
/// </summary>
|
||||
internal T Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return _config.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
_config.Value = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implicitly converts a <see cref="BAUConfigEntry{T}"/> to a <see cref="ConfigEntry{T}"/>.
|
||||
/// </summary>
|
||||
/// <param name="entry">The BAU configuration entry to convert.</param>
|
||||
/// <returns>The underlying BepInEx configuration entry.</returns>
|
||||
public static implicit operator ConfigEntry<T>(BAUConfigEntry<T> entry)
|
||||
{
|
||||
return entry._config;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implicitly converts a <see cref="BAUConfigEntry{T}"/> to a <see cref="ConfigEntryBase"/>.
|
||||
/// </summary>
|
||||
/// <param name="entry">The BAU configuration entry to convert.</param>
|
||||
/// <returns>The underlying BepInEx configuration entry as a base type.</returns>
|
||||
public static implicit operator ConfigEntryBase(BAUConfigEntry<T> entry)
|
||||
{
|
||||
return entry._config;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
using BetterAmongUs.Modules.Support;
|
||||
using BetterAmongUs.Patches.Client;
|
||||
|
||||
namespace BetterAmongUs.Data.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Manages configuration entries for the Better Among Us.
|
||||
/// </summary>
|
||||
internal static class BAUConfigs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for anti-cheat setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<bool>? AntiCheat { get; } = new("Better Options", "AntiCheat", true);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for sending Better RPC setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<bool>? SendBetterRpc { get; } = new("Better Options", "SendBetterRpc", true);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for better notifications setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<bool>? BetterNotifications { get; } = new("Better Options", "BetterNotifications", true);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for force own language setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<bool>? ForceOwnLanguage { get; } = new("Better Options", "ForceOwnLanguage", false);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for chat dark mode setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<bool>? ChatDarkMode { get; } = new("Better Options", "ChatDarkMode", true);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for chat in gameplay setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<bool>? ChatInGameplay { get; } = new("Better Options", "ChatInGameplay", true);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for lobby player info setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<bool>? LobbyPlayerInfo { get; } = new("Better Options", "LobbyPlayerInfo", true);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for disable lobby theme setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<bool>? DisableLobbyTheme { get; } = new("Better Options", "DisableLobbyTheme", true);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for unlock FPS setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<bool>? UnlockFPS { get; } = new("Better Options", "UnlockFPS", false);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for show FPS setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<bool>? ShowFPS { get; } = new("Better Options", "ShowFPS", false);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for minimap icons setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<bool>? MinimapIcons { get; } = new("Better Options", "MinimapIcons", true);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for vent color groups setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<bool>? VentColorGroups { get; } = new("Better Options", "VentColorGroups", false);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for command prefix setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<string>? CommandPrefix { get; } = new("Mod", "CommandPrefix", "/");
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for private only lobby setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<bool>? PrivateOnlyLobby { get; } = new("Mod", "PrivateOnlyLobby", false);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for favorite color setting.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<int>? FavoriteColor { get; } = new("Mod", "FavoriteColor", -1);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the configuration entry for the settings preset.
|
||||
/// </summary>
|
||||
internal static BAUConfigEntry<int>? SettingsPreset { get; } = new("Mod", "SettingsPreset", 0);
|
||||
|
||||
/// <summary>
|
||||
/// Loads configuration options from BepInEx config file.
|
||||
/// </summary>
|
||||
internal static void LoadConfigs()
|
||||
{
|
||||
BAUModdedSupportEvents.InvokeAll_OnBAUConfigEntriesLoaded([
|
||||
PrivateOnlyLobby, AntiCheat, SendBetterRpc,
|
||||
BetterNotifications, ForceOwnLanguage, ChatDarkMode,
|
||||
ChatInGameplay, LobbyPlayerInfo, DisableLobbyTheme,
|
||||
UnlockFPS, ShowFPS, MinimapIcons, VentColorGroups, CommandPrefix,
|
||||
FavoriteColor, SettingsPreset
|
||||
]);
|
||||
|
||||
OptionsMenuBehaviourPatch.UpdateFrameRate();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Modules;
|
||||
using BetterAmongUs.Mono;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BetterAmongUs.Attributes;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Enums;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Managers;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BetterAmongUs.Attributes;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Enums;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Managers;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BetterAmongUs.Attributes;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Enums;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Managers;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BetterAmongUs.Attributes;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Enums;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Managers;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BetterAmongUs.Attributes;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Enums;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Managers;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BetterAmongUs.Attributes;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Enums;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Managers;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using AmongUs.GameOptions;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
|
||||
namespace BetterAmongUs.Modules;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BepInEx.Unity.IL2CPP.Utils;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Enums;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Mono;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Patches.Gameplay.UI.Settings;
|
||||
|
||||
namespace BetterAmongUs.Modules.OptionItems;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using Il2CppInterop.Runtime.InteropTypes.Arrays;
|
||||
using System.Globalization;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Modules;
|
||||
using System.Text;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using AmongUs.Data;
|
||||
using AmongUs.GameOptions;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Modules;
|
||||
using BetterAmongUs.Patches.Gameplay.UI.Settings;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using BepInEx.Unity.IL2CPP.Utils;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Managers;
|
||||
using BetterAmongUs.Modules;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BepInEx;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Managers;
|
||||
using BetterAmongUs.Modules;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Modules;
|
||||
using BetterAmongUs.Modules.Support;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Managers;
|
||||
using BetterAmongUs.Modules;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Modules;
|
||||
using BetterAmongUs.Modules.OptionItems;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Managers;
|
||||
using BetterAmongUs.Modules;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using BepInEx.Unity.IL2CPP.Utils.Collections;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Modules;
|
||||
using BetterAmongUs.Modules.OptionItems;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Modules;
|
||||
using BetterAmongUs.Mono;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using BetterAmongUs.Commands;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Enums;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Modules;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using AmongUs.GameOptions;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Modules;
|
||||
using BetterAmongUs.Mono;
|
||||
@@ -74,7 +75,7 @@ internal static class ChatPatch
|
||||
private static void ChatController_Update_Prefix(ChatController __instance)
|
||||
{
|
||||
// Apply dark/light theme to chat input field
|
||||
if (BAUPlugin.ChatDarkMode.Value)
|
||||
if (BAUConfigs.ChatDarkMode.Value)
|
||||
{
|
||||
// Free chat color
|
||||
__instance.freeChatField.background.color = new Color32(40, 40, 40, byte.MaxValue);
|
||||
@@ -224,7 +225,7 @@ internal static class ChatPatch
|
||||
{
|
||||
var chat = HudManager.Instance.Chat;
|
||||
|
||||
if (BAUPlugin.ChatDarkMode.Value)
|
||||
if (BAUConfigs.ChatDarkMode.Value)
|
||||
{
|
||||
// Quick chat color
|
||||
chat.quickChatField.background.color = new Color32(40, 40, 40, byte.MaxValue);
|
||||
@@ -257,7 +258,7 @@ internal static class ChatPatch
|
||||
{
|
||||
ChatBubble chatBubble = asChatBubble;
|
||||
|
||||
if (BAUPlugin.ChatDarkMode.Value)
|
||||
if (BAUConfigs.ChatDarkMode.Value)
|
||||
{
|
||||
chatBubble.transform.Find("ChatText (TMP)").GetComponentInChildren<TextMeshPro>(true).color = new Color(1f, 1f, 1f, 1f);
|
||||
chatBubble.transform.Find("Background").GetComponentInChildren<SpriteRenderer>(true).color = new Color(0.15f, 0.15f, 0.15f, 1f);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Modules;
|
||||
using BetterAmongUs.Mono;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using AmongUs.Data;
|
||||
using BetterAmongUs.Data;
|
||||
using BetterAmongUs.Data.Config;
|
||||
using BetterAmongUs.Data.Json;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Patches.Client.Managers;
|
||||
|
||||
Reference in new issue
Block a user