mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
Get Platform
This commit is contained in:
1 parent
27566e5d1a
commit
4cd1f794d0
2 files changed
+5
-3
No files matched your search
@@ -9,6 +9,6 @@ public class VersionShowerPatch
|
||||
[HarmonyPostfix]
|
||||
public static void Postfix(VersionShower __instance)
|
||||
{
|
||||
__instance.text.text = $"<color=#0dff00>♻BetterAmongUs♻ {Main.GetVersionText()}</color> - " + __instance.text.text;
|
||||
__instance.text.text = $"<color=#0dff00>♻BetterAmongUs♻ {Main.GetVersionText()}</color> <color=#ababab>~</color> {Utils.GetPlatformName(Main.PlatformData.Platform)} " + __instance.text.text;
|
||||
}
|
||||
}
|
||||
@@ -84,6 +84,8 @@ public class Main : BasePlugin
|
||||
public static string BetterAmongUsVersion => PluginVersion;
|
||||
public static string AmongUsVersion => Application.version;
|
||||
|
||||
public static PlatformSpecificData PlatformData => Constants.GetPlatformData();
|
||||
|
||||
public static List<string> SupportedAmongUsVersions =
|
||||
[
|
||||
"2024.8.13",
|
||||
@@ -143,7 +145,7 @@ public class Main : BasePlugin
|
||||
BetterDataManager.LoadData();
|
||||
LoadOptions();
|
||||
|
||||
if (File.Exists(Path.Combine($"{Environment.CurrentDirectory}/Among Us_Data/Plugins/x86", "steam_api.dll")))
|
||||
if (PlatformData.Platform == Platforms.StandaloneSteamPC)
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "steam_appid.txt"), "945360");
|
||||
|
||||
if (File.Exists(Path.Combine(BetterDataManager.filePathFolder, "better-log.txt")))
|
||||
@@ -164,7 +166,7 @@ public class Main : BasePlugin
|
||||
string SupportedVersions = string.Empty;
|
||||
foreach (string text in SupportedAmongUsVersions.ToArray())
|
||||
SupportedVersions += $"{text} ";
|
||||
BetterAmongUs.Logger.Log($"BetterAmongUs {BetterAmongUsVersion}-{ReleaseDate} - [{AmongUsVersion} --> {SupportedVersions.Substring(0, SupportedVersions.Length - 1)}]");
|
||||
BetterAmongUs.Logger.Log($"BetterAmongUs {BetterAmongUsVersion}-{ReleaseDate} - [{AmongUsVersion} --> {SupportedVersions.Substring(0, SupportedVersions.Length - 1)}] {Utils.GetPlatformName(PlatformData.Platform)}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user