mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
5 files changed
+62
-24
No files matched your search
+6
-11
@@ -1,17 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<OutputType>Library</OutputType>
|
||||
<langVersion>preview</langVersion>
|
||||
<langVersion>preview</langVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\.editorconfig" Link=".editorconfig" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2024.6.18" />
|
||||
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.0.1">
|
||||
@@ -21,13 +18,11 @@
|
||||
<PackageReference Include="GitInfo" Version="2.0.40">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.674" Private="false" ExcludeAssets="runtime;native" />
|
||||
</PackageReference>
|
||||
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.674" Private="false" ExcludeAssets="runtime;native" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Embed all files in the Resources folder -->
|
||||
<EmbeddedResource Include="Resources\**\*" />
|
||||
<!-- Embed all files in the Resources folder -->
|
||||
<EmbeddedResource Include="Resources\**\*" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
+45
-10
@@ -88,11 +88,18 @@ class FileChecker
|
||||
HasTrySpoofFriendCode = true;
|
||||
}
|
||||
|
||||
waitTime -= Time.deltaTime;
|
||||
if (GameStates.IsInGame && GameStates.IsLobby)
|
||||
{
|
||||
waitTime -= Time.deltaTime;
|
||||
|
||||
if (waitTime <= 0 && GameStates.IsInGame)
|
||||
if (waitTime <= 0)
|
||||
{
|
||||
CheckIfUnauthorizedFiles();
|
||||
waitTime = 5f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckIfUnauthorizedFiles();
|
||||
waitTime = 5f;
|
||||
}
|
||||
}
|
||||
@@ -109,9 +116,25 @@ class FileChecker
|
||||
if (Enabled == false) return false;
|
||||
|
||||
// Get user info for later use with API.
|
||||
string ClientUserName = GameObject.Find("AccountTab")?.GetComponent<AccountTab>()?.userName.text;
|
||||
string ClientFriendCode = EOSManager.Instance.friendCode;
|
||||
string ClientPUIDHash = Utils.GetHashPuid(EOSManager.Instance.ProductUserId);
|
||||
string ClientUserName = string.Empty;
|
||||
string ClientFriendCode = string.Empty;
|
||||
string ClientPUIDHash = string.Empty;
|
||||
|
||||
if (!GameStates.IsInGame)
|
||||
{
|
||||
ClientUserName = GameObject.Find("AccountTab")?.GetComponent<AccountTab>()?.userName.text;
|
||||
ClientFriendCode = EOSManager.Instance.friendCode;
|
||||
ClientPUIDHash = Utils.GetHashPuid(EOSManager.Instance.ProductUserId);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PlayerControl.LocalPlayer?.Data != null)
|
||||
{
|
||||
ClientUserName = PlayerControl.LocalPlayer.Data.PlayerName;
|
||||
ClientFriendCode = PlayerControl.LocalPlayer.Data.FriendCode;
|
||||
ClientPUIDHash = Utils.GetHashPuid(PlayerControl.LocalPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
if (GameStates.IsDev)
|
||||
{
|
||||
@@ -152,11 +175,23 @@ class FileChecker
|
||||
// Check for banned words in VersionInfo display. Aka check cheat developers ego
|
||||
foreach (var WordInVersionInfo in KeyWordsInVersionInfo)
|
||||
{
|
||||
if (UnityEngine.Object.FindFirstObjectByType<VersionShower>().text.text.ToLower().Contains(WordInVersionInfo.ToLower()))
|
||||
if (!GameStates.IsInGame)
|
||||
{
|
||||
if (!HasUnauthorizedFile) UnauthorizedReason = UnauthorizedFileMsg;
|
||||
if (!CheatTags.Contains($"{WordInVersionInfo}-VersionInfo")) CheatTags.Add($"{WordInVersionInfo}-VersionInfo");
|
||||
HasUnauthorizedFile = true;
|
||||
if (UnityEngine.Object.FindFirstObjectByType<VersionShower>().text.text.ToLower().Contains(WordInVersionInfo.ToLower()))
|
||||
{
|
||||
if (!HasUnauthorizedFile) UnauthorizedReason = UnauthorizedFileMsg;
|
||||
if (!CheatTags.Contains($"{WordInVersionInfo}-VersionInfo")) CheatTags.Add($"{WordInVersionInfo}-VersionInfo");
|
||||
HasUnauthorizedFile = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (UnityEngine.Object.FindFirstObjectByType<PingTracker>().text.text.ToLower().Contains(WordInVersionInfo.ToLower()))
|
||||
{
|
||||
if (!HasUnauthorizedFile) UnauthorizedReason = UnauthorizedFileMsg;
|
||||
if (!CheatTags.Contains($"{WordInVersionInfo}-VersionInfo")) CheatTags.Add($"{WordInVersionInfo}-VersionInfo");
|
||||
HasUnauthorizedFile = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,13 +61,21 @@ public class ClientPatch
|
||||
[HarmonyPostfix]
|
||||
public static void AdjustButtonPositions_Postfix(RegionMenu __instance)
|
||||
{
|
||||
const int buttonsPerColumn = 6;
|
||||
const int maxColumns = 4;
|
||||
int buttonsPerColumn = 6;
|
||||
float buttonSpacing = 0.6f;
|
||||
float buttonSpacingSide = 2.25f;
|
||||
|
||||
List<UiElement> buttons = __instance.controllerSelectable.ToArray().ToList();
|
||||
|
||||
int columnCount = (buttons.Count + buttonsPerColumn - 1) / buttonsPerColumn;
|
||||
|
||||
while (columnCount > maxColumns)
|
||||
{
|
||||
buttonsPerColumn++;
|
||||
columnCount = (buttons.Count + buttonsPerColumn - 1) / buttonsPerColumn;
|
||||
}
|
||||
|
||||
float totalWidth = (columnCount - 1) * buttonSpacingSide;
|
||||
float totalHeight = (buttonsPerColumn - 1) * buttonSpacing;
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ internal class MainMenuPatch
|
||||
// Set button position and scale
|
||||
float baseY = -2.7882f;
|
||||
float newY = baseY + (0.38f * (buttons.Count - 1));
|
||||
button.transform.localPosition = new Vector3(-0.8118f, newY, -5f);
|
||||
button.transform.localPosition = new Vector3(-0.6118f, newY, -5f);
|
||||
button.transform.localScale = new Vector3(0.78f, 0.78f, 0.78f);
|
||||
|
||||
// Set button action
|
||||
|
||||
@@ -22,7 +22,7 @@ public class Main : BasePlugin
|
||||
{
|
||||
public const ReleaseTypes ReleaseBuildType = ReleaseTypes.Release;
|
||||
public const string CanaryNum = "0";
|
||||
public const string HotfixNum = "2";
|
||||
public const string HotfixNum = "3";
|
||||
public const bool IsHotFix = true;
|
||||
public const string PluginGuid = "com.d1gq.betteramongus";
|
||||
public const string PluginVersion = "1.0.0";
|
||||
|
||||
Reference in new issue
Block a user