mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
update to v16.0.2 and fix Lobby info not updating on streamer mode change
This commit is contained in:
1 parent
8f6f71fe2a
commit
a35b0e9a5e
4 files changed
+57
-36
No files matched your search
@@ -29,4 +29,8 @@
|
||||
<EmbeddedResource Include="Resources\**\*" />
|
||||
<EmbeddedResource Include="token.env" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="copy "$(TargetDir)BetterAmongUs.dll" "C:\Program Files (x86)\Steam\steamapps\common\Among Us\Among Us - Mods\Among Us - BetterAmongUs\BepInEx\plugins"" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -239,6 +239,7 @@ internal static class Utils
|
||||
}
|
||||
}, 0.2f, "DisconnectSelf 1");
|
||||
}
|
||||
|
||||
// Show dc pop up with text
|
||||
internal static void ShowPopUp(string text, bool enableWordWrapping = false)
|
||||
{
|
||||
|
||||
+32
-30
@@ -24,36 +24,6 @@ internal class ClientPatch
|
||||
internal static void EndFinalPartsOfLoginFlow_Postfix()
|
||||
{
|
||||
UserData.TrySetLocalData();
|
||||
|
||||
var varSupportedVersions = Main.SupportedAmongUsVersions;
|
||||
Version currentVersion = new Version(Main.AppVersion);
|
||||
Version firstSupportedVersion = new Version(varSupportedVersions.First());
|
||||
Version lastSupportedVersion = new Version(varSupportedVersions.Last());
|
||||
|
||||
if (currentVersion > firstSupportedVersion)
|
||||
{
|
||||
var verText = $"<b>{varSupportedVersions.First()}</b>";
|
||||
if (firstSupportedVersion != lastSupportedVersion)
|
||||
{
|
||||
verText = $"<b>{varSupportedVersions.Last()}</b> - <b>{varSupportedVersions.First()}</b>";
|
||||
}
|
||||
Utils.ShowPopUp($"<size=200%>-= <color=#ff2200><b>Warning</b></color> =-</size>\n\n" +
|
||||
$"<size=125%><color=#0dff00>Better Among Us {Main.GetVersionText()}</color>\nsupports <color=#4f92ff>Among Us {verText}</color>,\n" +
|
||||
$"<color=#4f92ff>Among Us <b>{Main.AppVersion}</b></color> is above the supported versions!\n" +
|
||||
$"<color=#ae1700>You may encounter minor to game breaking bugs.</color></size>");
|
||||
}
|
||||
else if (currentVersion < lastSupportedVersion)
|
||||
{
|
||||
var verText = $"<b>{varSupportedVersions.First()}</b>";
|
||||
if (firstSupportedVersion != lastSupportedVersion)
|
||||
{
|
||||
verText = $"<b>{varSupportedVersions.Last()}</b> - <b>{varSupportedVersions.First()}</b>";
|
||||
}
|
||||
Utils.ShowPopUp($"<size=200%>-= <color=#ff2200><b>Warning</b></color> =-</size>\n\n" +
|
||||
$"<size=125%><color=#0dff00>Better Among Us {Main.GetVersionText()}</color>\nsupports <color=#4f92ff>Among Us {verText}</color>,\n" +
|
||||
$"<color=#4f92ff>Among Us <b>{Main.AppVersion}</b></color> is below the supported versions!\n" +
|
||||
$"<color=#ae1700>You may encounter minor to game breaking bugs.</color></size>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,6 +67,38 @@ internal class ClientPatch
|
||||
return false;
|
||||
}
|
||||
|
||||
var varSupportedVersions = Main.SupportedAmongUsVersions;
|
||||
Version currentVersion = new(Main.AppVersion);
|
||||
Version firstSupportedVersion = new(varSupportedVersions.First());
|
||||
Version lastSupportedVersion = new(varSupportedVersions.Last());
|
||||
|
||||
if (currentVersion > firstSupportedVersion)
|
||||
{
|
||||
var verText = $"<b>{varSupportedVersions.First()}</b>";
|
||||
if (firstSupportedVersion != lastSupportedVersion)
|
||||
{
|
||||
verText = $"<b>{varSupportedVersions.Last()}</b> - <b>{varSupportedVersions.First()}</b>";
|
||||
}
|
||||
|
||||
Utils.ShowPopUp($"<size=200%>-= <color=#ff2200><b>Warning</b></color> =-</size>\n\n" +
|
||||
$"<size=125%><color=#0dff00>Better Among Us {Main.GetVersionText()}</color>\nsupports <color=#4f92ff>Among Us {verText}</color>,\n" +
|
||||
$"<color=#4f92ff>Among Us <b>{Main.AppVersion}</b></color> is above the supported versions!\n" +
|
||||
$"<color=#ae1700>You may encounter minor to game breaking bugs.</color></size>");
|
||||
}
|
||||
else if (currentVersion < lastSupportedVersion)
|
||||
{
|
||||
var verText = $"<b>{varSupportedVersions.First()}</b>";
|
||||
if (firstSupportedVersion != lastSupportedVersion)
|
||||
{
|
||||
verText = $"<b>{varSupportedVersions.Last()}</b> - <b>{varSupportedVersions.First()}</b>";
|
||||
}
|
||||
|
||||
Utils.ShowPopUp($"<size=200%>-= <color=#ff2200><b>Warning</b></color> =-</size>\n\n" +
|
||||
$"<size=125%><color=#0dff00>Better Among Us {Main.GetVersionText()}</color>\nsupports <color=#4f92ff>Among Us {verText}</color>,\n" +
|
||||
$"<color=#4f92ff>Among Us <b>{Main.AppVersion}</b></color> is below the supported versions!\n" +
|
||||
$"<color=#ae1700>You may encounter minor to game breaking bugs.</color></size>");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BepInEx;
|
||||
using AmongUs.Data;
|
||||
using BepInEx;
|
||||
using BepInEx.Configuration;
|
||||
using BepInEx.Logging;
|
||||
using BepInEx.Unity.IL2CPP;
|
||||
@@ -27,13 +28,13 @@ internal enum ReleaseTypes : int
|
||||
[BepInProcess("Among Us.exe")]
|
||||
internal class Main : BasePlugin
|
||||
{
|
||||
internal static readonly ReleaseTypes ReleaseBuildType = ReleaseTypes.Beta;
|
||||
internal const string BetaNum = "2";
|
||||
internal static readonly ReleaseTypes ReleaseBuildType = ReleaseTypes.Release;
|
||||
internal const string BetaNum = "0";
|
||||
internal const string HotfixNum = "0";
|
||||
internal const bool IsHotFix = false;
|
||||
internal const string PluginGuid = "com.ten.betteramongus";
|
||||
internal const string PluginVersion = "1.1.6";
|
||||
internal const string ReleaseDate = "3.29.2025"; // mm/dd/yyyy
|
||||
internal const string ReleaseDate = "4.4.2025"; // mm/dd/yyyy
|
||||
internal const string Github = "https://github.com/EnhancedNetwork/BetterAmongUs-Public";
|
||||
internal const string Discord = "https://discord.gg/ten";
|
||||
internal static UserData MyData = UserData.AllUsers.First();
|
||||
@@ -89,7 +90,8 @@ internal class Main : BasePlugin
|
||||
|
||||
internal static List<string> SupportedAmongUsVersions =
|
||||
[
|
||||
"2025.3.25",
|
||||
"2025.3.31",
|
||||
"2025.3.25"
|
||||
];
|
||||
|
||||
internal static List<PlayerControl> AllPlayerControls = [];
|
||||
@@ -169,6 +171,7 @@ internal class Main : BasePlugin
|
||||
GameSettingMenuPatch.SetupSettings(true);
|
||||
FileChecker.Initialize();
|
||||
InstanceAttribute.RegisterAll();
|
||||
AddActions();
|
||||
|
||||
if (PlatformData.Platform == Platforms.StandaloneSteamPC)
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "steam_appid.txt"), "945360");
|
||||
@@ -190,7 +193,18 @@ internal class Main : BasePlugin
|
||||
}
|
||||
}
|
||||
|
||||
internal static void RegisterAllMonoBehavioursInAssembly()
|
||||
private static void AddActions()
|
||||
{
|
||||
DataManager.Settings.Gameplay.OnStreamerModeChanged += (Action)(() =>
|
||||
{
|
||||
if (GameState.IsInGame)
|
||||
{
|
||||
Utils.DirtyAllNames();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void RegisterAllMonoBehavioursInAssembly()
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
|
||||
|
||||
Reference in new issue
Block a user