mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
Detected Level Above Setting
This commit is contained in:
1 parent
57be1ac849
commit
34b86454bf
5 files changed
+32
-13
No files matched your search
@@ -250,7 +250,7 @@ class AntiCheat
|
||||
if (reader.BytesRemaining > 0)
|
||||
{
|
||||
uint level = reader.ReadPackedUInt32();
|
||||
if (level >= 200)
|
||||
if (level >= BetterGameSettings.DetectedLevelAbove.GetInt())
|
||||
{
|
||||
BetterNotificationManager.NotifyCheat(player, $"Invalid Level: {level}");
|
||||
Logger.LogCheat($"{player.BetterData().RealName} {Enum.GetName((RpcCalls)callId)}: {level >= 200}");
|
||||
|
||||
@@ -88,18 +88,26 @@ public class BetterOptionFloatItem : BetterOptionItem
|
||||
|
||||
public void Increase()
|
||||
{
|
||||
if (CurrentValue + Increment <= floatRange.max)
|
||||
int times = 1;
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
times = 5;
|
||||
|
||||
if (CurrentValue + Increment * times <= floatRange.max)
|
||||
{
|
||||
CurrentValue += Increment;
|
||||
CurrentValue += Increment * times;
|
||||
AdjustButtonsActiveState();
|
||||
}
|
||||
}
|
||||
|
||||
public void Decrease()
|
||||
{
|
||||
if (CurrentValue - Increment >= floatRange.min)
|
||||
int times = 1;
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
times = 5;
|
||||
|
||||
if (CurrentValue - Increment * times >= floatRange.min)
|
||||
{
|
||||
CurrentValue -= Increment;
|
||||
CurrentValue -= Increment * times;
|
||||
AdjustButtonsActiveState();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,18 +88,26 @@ public class BetterOptionIntItem : BetterOptionItem
|
||||
|
||||
public void Increase()
|
||||
{
|
||||
if (CurrentValue + Increment <= intRange.max)
|
||||
int times = 1;
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
times = 5;
|
||||
|
||||
if (CurrentValue + Increment * times <= intRange.max)
|
||||
{
|
||||
CurrentValue += Increment;
|
||||
CurrentValue += Increment * times;
|
||||
AdjustButtonsActiveState();
|
||||
}
|
||||
}
|
||||
|
||||
public void Decrease()
|
||||
{
|
||||
if (CurrentValue - Increment >= intRange.min)
|
||||
int times = 1;
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
times = 5;
|
||||
|
||||
if (CurrentValue - Increment * times >= intRange.min)
|
||||
{
|
||||
CurrentValue -= Increment;
|
||||
CurrentValue -= Increment * times;
|
||||
AdjustButtonsActiveState();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using AmongUs.GameOptions;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
using static Logger;
|
||||
|
||||
namespace BetterAmongUs.Patches;
|
||||
|
||||
@@ -13,6 +14,7 @@ class BetterGameSettings
|
||||
public static BetterOptionItem? UseBanNameList;
|
||||
public static BetterOptionItem? UseBanWordList;
|
||||
public static BetterOptionItem? HideAndSeekImpNum;
|
||||
public static BetterOptionItem? DetectedLevelAbove;
|
||||
public static BetterOptionItem? DetectCheatClients;
|
||||
public static BetterOptionItem? DetectInvalidRPCs;
|
||||
}
|
||||
@@ -43,8 +45,9 @@ static class GameSettingMenuPatch
|
||||
}
|
||||
|
||||
new BetterOptionTitleItem().Create(BetterSettingsTab, $"<color=#4f92ff>Detections</color>");
|
||||
BetterGameSettings.DetectCheatClients = new BetterOptionCheckboxItem().Create(600, BetterSettingsTab, "Detect Cheat Clients", true);
|
||||
BetterGameSettings.DetectInvalidRPCs = new BetterOptionCheckboxItem().Create(700, BetterSettingsTab, "Detect Invalid RPCs", true);
|
||||
BetterGameSettings.DetectedLevelAbove = new BetterOptionIntItem().Create(600, BetterSettingsTab, "Detected player level # or >", [100, 1000, 5], 200, "");
|
||||
BetterGameSettings.DetectCheatClients = new BetterOptionCheckboxItem().Create(700, BetterSettingsTab, "Detect Cheat Clients", true);
|
||||
BetterGameSettings.DetectInvalidRPCs = new BetterOptionCheckboxItem().Create(800, BetterSettingsTab, "Detect Invalid RPCs", true);
|
||||
}
|
||||
|
||||
// Gameplay Settings
|
||||
|
||||
@@ -27,8 +27,8 @@ public class Main : BasePlugin
|
||||
public const string HotfixNum = "0";
|
||||
public const bool IsHotFix = false;
|
||||
public const string PluginGuid = "com.d1gq.betteramongus";
|
||||
public const string PluginVersion = "1.0.5";
|
||||
public const string ReleaseDate = "08.22.2024"; // mm/dd/yyyy
|
||||
public const string PluginVersion = "1.1.0";
|
||||
public const string ReleaseDate = "08.24.2024"; // mm/dd/yyyy
|
||||
public const string Github = "https://github.com/D1GQ/BetterAmongUs-Public";
|
||||
public const string Discord = "https://discord.gg/vjYrXpzNAn";
|
||||
|
||||
|
||||
Reference in new issue
Block a user