add MinimapIcons and VentColorGroups client options

This commit is contained in:
D1GQ committed 2026-03-16 18:33:10 -05:00
1 parent dc0d0f5302
commit f02f5426b1
6 files changed
+36 -6

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@ internal static class BAUConfigs
/// <summary>
/// Gets the configuration entry for vent color groups setting.
/// </summary>
internal static BAUConfigEntry<bool>? VentColorGroups { get; } = new("Better Options", "VentColorGroups", false);
internal static BAUConfigEntry<bool>? VentColorGroups { get; } = new("Better Options", "VentColorGroups", true);
/// <summary>
/// Gets the configuration entry for command prefix setting.
+7 -1
View File
@@ -1,4 +1,5 @@
using UnityEngine;
using BetterAmongUs.Data.Config;
using UnityEngine;
namespace BetterAmongUs.Modules;
@@ -109,6 +110,11 @@ internal static class VentGroups
/// </returns>
internal static Color GetVentGroupColor(Vent vent)
{
if (!BAUConfigs.VentColorGroups.Value)
{
return Color.gray;
}
if (ventToLowestId.TryGetValue(vent.Id, out int lowestId))
{
return groupColors[lowestId];
@@ -51,6 +51,25 @@ internal static class OptionsMenuBehaviourPatch
ClientOptionItem.CreateToggle(Translator.GetString("BetterOption.UnlockFPS"), BAUConfigs.UnlockFPS, 1, __instance, UpdateFrameRate);
ClientOptionItem.CreateToggle(Translator.GetString("BetterOption.ShowFPS"), BAUConfigs.ShowFPS, 1, __instance);
ClientOptionItem.CreateToggle(Translator.GetString("BetterOption.VentColorGroups"), BAUConfigs.VentColorGroups, 2, __instance, toggleCheck: () =>
{
bool cannotToggle = GameState.IsInGame;
if (cannotToggle)
{
BetterNotificationManager.Notify($"Unable to toggle while in gameplay!", 2.5f);
}
return !cannotToggle;
});
ClientOptionItem.CreateToggle(Translator.GetString("BetterOption.MinimapIcons"), BAUConfigs.MinimapIcons, 2, __instance, toggleCheck: () =>
{
bool cannotToggle = GameState.IsInGame;
if (cannotToggle)
{
BetterNotificationManager.Notify($"Unable to toggle while in gameplay!", 2.5f);
}
return !cannotToggle;
});
// Button options (no toggle)
if (!ModInfo.Starlight)
{
+3 -2
View File
@@ -1,4 +1,5 @@
using BetterAmongUs.Modules;
using BetterAmongUs.Data.Config;
using BetterAmongUs.Modules;
using BetterAmongUs.Modules.Support;
using HarmonyLib;
using UnityEngine;
@@ -13,7 +14,7 @@ internal static class VentPatch
private static bool Vent_SetOutline_Prefix(Vent __instance, bool on, bool mainTarget)
{
// Skip if vent color groups are disabled - use vanilla behavior
if (BAUModdedSupportFlags.HasFlag(BAUModdedSupportFlags.Disable_VentColorGroups)) return true;
if (!BAUConfigs.VentColorGroups.Value || BAUModdedSupportFlags.HasFlag(BAUModdedSupportFlags.Disable_VentColorGroups)) return true;
// Get group color for this vent and apply outline
Color color = VentGroups.GetVentGroupColor(__instance);
@@ -1,4 +1,5 @@
using BetterAmongUs.Helpers;
using BetterAmongUs.Data.Config;
using BetterAmongUs.Helpers;
using BetterAmongUs.Modules;
using BetterAmongUs.Modules.Support;
using BetterAmongUs.Mono;
@@ -68,7 +69,7 @@ internal static class MiniMapBehaviourPatch
[HarmonyPostfix]
private static void MapBehaviour_Show_Postfix(MapBehaviour __instance)
{
if (BAUModdedSupportFlags.HasFlag(BAUModdedSupportFlags.Disable_MinimapIcons)) return;
if (!BAUConfigs.MinimapIcons.Value || BAUModdedSupportFlags.HasFlag(BAUModdedSupportFlags.Disable_MinimapIcons)) return;
// Make infected overlay buttons semi-transparent and smaller
foreach (var button in __instance.infectedOverlay.allButtons)
+3
View File
@@ -60,6 +60,9 @@
"BetterOption.LobbyTheme": "Disable Lobby Theme",
"BetterOption.UnlockFPS": "UnlockFPS",
"BetterOption.ShowFPS": "ShowFPS",
"BetterOption.VentColorGroups": "Vent Color Groups",
"BetterOption.MinimapIcons": "Minimap Icons",
"BetterOption.SaveData": "Open Save Data",
"BetterOption.ToVanilla": "Switch To Vanilla",