mirror of
https://github.com/ApeMV/AmongUsRevamped.git
synced 2026-10-20 01:46:28 +00:00
Settings update and standard 0Kcd mode
This commit is contained in:
1 parent
75c003ca0c
commit
5eee7e98eb
3 files changed
+29
-11
No files matched your search
+8
-6
@@ -25,6 +25,7 @@ public partial class Main : BasePlugin
|
||||
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> NoKcdMode { get; private set; }
|
||||
|
||||
public static NormalGameOptionsV10 NormalOptions => GameOptionsManager.Instance != null ? GameOptionsManager.Instance.currentNormalGameOptions : null;
|
||||
public static bool HasArgumentException;
|
||||
@@ -60,13 +61,14 @@ public partial class Main : BasePlugin
|
||||
HNSRevamped.Logger.Enable();
|
||||
Instance = this;
|
||||
|
||||
AutoStart = Config.Bind("Client Options", "AutoStart", false);
|
||||
AutoStart = Config.Bind("Client Options", "Auto Start", false);
|
||||
GM = Config.Bind("Client Options", "GM", false);
|
||||
UnlockFps = Config.Bind("Client Options", "UnlockFPS", false);
|
||||
ShowFps = Config.Bind("Client Options", "ShowFPS", false);
|
||||
AutoStart = Config.Bind("Client Options", "AutoStart", false);
|
||||
DarkTheme = Config.Bind("Client Options", "DarkTheme", true);
|
||||
LobbyMusic = Config.Bind("Client Options", "LobbyMusic", 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", true);
|
||||
LobbyMusic = Config.Bind("Client Options", "Lobby Music", false);
|
||||
NoKcdMode = Config.Bind("Client Options", "0Kcd Mode", false);
|
||||
|
||||
BanManager.Init();
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace HNSRevamped
|
||||
private static ClientOptionItem AutoStart;
|
||||
private static ClientOptionItem DarkTheme;
|
||||
private static ClientOptionItem LobbyMusic;
|
||||
private static ClientOptionItem NoKcdMode;
|
||||
|
||||
public static void Postfix(OptionsMenuBehaviour __instance)
|
||||
{
|
||||
@@ -61,10 +62,13 @@ namespace HNSRevamped
|
||||
}
|
||||
|
||||
if (DarkTheme == null || DarkTheme.ToggleButton == null)
|
||||
DarkTheme = ClientOptionItem.Create("EnableDarkTheme", Main.DarkTheme, __instance);
|
||||
DarkTheme = ClientOptionItem.Create("Enable Dark Theme", Main.DarkTheme, __instance);
|
||||
|
||||
if (LobbyMusic == null || LobbyMusic.ToggleButton == null)
|
||||
LobbyMusic = ClientOptionItem.Create("LobbyMusic", Main.LobbyMusic, __instance);
|
||||
LobbyMusic = ClientOptionItem.Create("Lobby Music", Main.LobbyMusic, __instance);
|
||||
|
||||
if (NoKcdMode == null || NoKcdMode.ToggleButton == null)
|
||||
NoKcdMode = ClientOptionItem.Create("0Kcd Mode", Main.NoKcdMode, __instance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public static class NumberOption_Increase
|
||||
{
|
||||
public static bool Prefix(NumberOption __instance)
|
||||
{
|
||||
if (Utils.isHideNSeek)
|
||||
if (Utils.isHideNSeek || !Utils.isHideNSeek && __instance.TitleText.text != "# Impostors" && __instance.TitleText.text != "Player Speed")
|
||||
{
|
||||
__instance.Value += __instance.Increment;
|
||||
__instance.UpdateValue();
|
||||
@@ -26,7 +26,7 @@ public static class NumberOption_Decrease
|
||||
{
|
||||
public static bool Prefix(NumberOption __instance)
|
||||
{
|
||||
if (Utils.isHideNSeek)
|
||||
if (Utils.isHideNSeek || !Utils.isHideNSeek && __instance.TitleText.text != "# Impostors" && __instance.TitleText.text != "Player Speed")
|
||||
{
|
||||
__instance.Value -= __instance.Increment;
|
||||
__instance.UpdateValue();
|
||||
@@ -43,9 +43,21 @@ public static class NumberOption_Initialize
|
||||
{
|
||||
public static void Postfix(NumberOption __instance)
|
||||
{
|
||||
if (Utils.isHideNSeek)
|
||||
if (Utils.isHideNSeek || !Utils.isHideNSeek && __instance.TitleText.text != "# Impostors" && __instance.TitleText.text != "Player Speed")
|
||||
{
|
||||
__instance.ValidRange = new FloatRange(-999f, 999f);
|
||||
}
|
||||
|
||||
if (Main.NoKcdMode.Value && !Utils.isHideNSeek)
|
||||
{
|
||||
Main.NormalOptions.KillCooldown = 0f;
|
||||
|
||||
Main.NormalOptions.EmergencyCooldown = 0;
|
||||
Main.NormalOptions.DiscussionTime = 0;
|
||||
|
||||
Main.NormalOptions.NumCommonTasks = 0;
|
||||
Main.NormalOptions.NumShortTasks = 1;
|
||||
Main.NormalOptions.NumLongTasks = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user