mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
clean up
This commit is contained in:
1 parent
f5e5661d67
commit
8fa1e678d2
17 files changed
+22
-37
No files matched your search
@@ -3,7 +3,6 @@ using BetterAmongUs.Patches;
|
||||
using HarmonyLib;
|
||||
using Hazel;
|
||||
using InnerNet;
|
||||
using Sentry.Internal.Extensions;
|
||||
|
||||
namespace BetterAmongUs;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using BetterAmongUs.Patches;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace BetterAmongUs;
|
||||
|
||||
@@ -198,7 +197,7 @@ class BetterDataManager
|
||||
return bool.Parse(jsonData[id.ToString()]);
|
||||
}
|
||||
}
|
||||
catch
|
||||
catch
|
||||
{
|
||||
SaveSetting(id, Default.ToString());
|
||||
}
|
||||
@@ -219,7 +218,7 @@ class BetterDataManager
|
||||
return float.Parse(jsonData[id.ToString()]);
|
||||
}
|
||||
}
|
||||
catch
|
||||
catch
|
||||
{
|
||||
SaveSetting(id, Default.ToString());
|
||||
}
|
||||
@@ -240,7 +239,7 @@ class BetterDataManager
|
||||
return int.Parse(jsonData[id.ToString()]);
|
||||
}
|
||||
}
|
||||
catch
|
||||
catch
|
||||
{
|
||||
SaveSetting(id, Default.ToString());
|
||||
}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using AmongUs.Data;
|
||||
using IEnumerator = System.Collections.IEnumerator;
|
||||
using UnityEngine.Networking;
|
||||
using IEnumerator = System.Collections.IEnumerator;
|
||||
|
||||
namespace BetterAmongUs;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using UnityEngine;
|
||||
using static Il2CppSystem.Net.Http.Headers.Parser;
|
||||
|
||||
namespace BetterAmongUs;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Dynamic;
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BetterAmongUs;
|
||||
|
||||
@@ -92,7 +91,7 @@ public class BetterOptionPlayerItem : BetterOptionItem
|
||||
{
|
||||
ThisOption.ValueText.text = Utils.PlayerFromPlayerId(CurrentIndex).GetPlayerNameAndColor();
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
ThisOption.ValueText.text = "<color=#ababab>Random</color>";
|
||||
}
|
||||
|
||||
+2
-2
@@ -105,8 +105,8 @@ internal static class RPC
|
||||
messageWriter.WriteBytesAndSize(optionsByteArray);
|
||||
AmongUsClient.Instance.FinishRpcImmediately(messageWriter);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void SendBetterCheck()
|
||||
{
|
||||
var flag = GameStates.IsHost && Main.BetterHost.Value;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Il2CppInterop.Runtime.InteropTypes.Arrays;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
@@ -38,11 +37,11 @@ public static class Translator
|
||||
{
|
||||
// Read the JSON file content
|
||||
using Stream resourceStream = assembly.GetManifestResourceStream(jsonFileName);
|
||||
|
||||
|
||||
if (resourceStream != null)
|
||||
{
|
||||
using StreamReader reader = new(resourceStream);
|
||||
|
||||
|
||||
string jsonContent = reader.ReadToEnd();
|
||||
// Deserialize the JSON into a dictionary
|
||||
Dictionary<string, string> jsonDictionary = JsonSerializer.Deserialize<Dictionary<string, string>>(jsonContent);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using AmongUs.GameOptions;
|
||||
using BetterAmongUs.Patches;
|
||||
using InnerNet;
|
||||
using Sentry.Internal.Extensions;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using HarmonyLib;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BetterAmongUs.Patches;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using AmongUs.Data;
|
||||
using AmongUs.GameOptions;
|
||||
using AmongUs.GameOptions;
|
||||
using Assets.CoreScripts;
|
||||
using HarmonyLib;
|
||||
using Hazel;
|
||||
@@ -249,7 +248,7 @@ class ChatPatch
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
chatBubble.transform.Find("ChatText (TMP)").GetComponent<TextMeshPro>().color = new Color(0f, 0f, 0f, 1f);
|
||||
chatBubble.transform.Find("Background").GetComponent<SpriteRenderer>().color = new Color(1f, 1f, 1f, 1f);
|
||||
|
||||
@@ -85,7 +85,7 @@ public static class OptionsMenuBehaviourPatch
|
||||
string title = Translator.GetString("BetterOption.ForceOwnLanguage");
|
||||
ForceOwnLanguage = ClientOptionItem.Create(title, Main.ForceOwnLanguage, __instance);
|
||||
}
|
||||
|
||||
|
||||
if (ChatDarkMode == null || ChatDarkMode.ToggleButton == null)
|
||||
{
|
||||
string title = Translator.GetString("BetterOption.ChatDarkMode");
|
||||
@@ -96,7 +96,7 @@ public static class OptionsMenuBehaviourPatch
|
||||
ChatPatch.ChatControllerPatch.SetChatTheme();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ChatInGameplay == null || ChatInGameplay.ToggleButton == null)
|
||||
{
|
||||
string title = Translator.GetString("BetterOption.ChatInGame");
|
||||
@@ -155,7 +155,7 @@ public static class OptionsMenuBehaviourPatch
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (SwitchToVanilla == null || SwitchToVanilla.ToggleButton == null)
|
||||
{
|
||||
string title = Translator.GetString("BetterOption.ToVanilla");
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using BepInEx.Unity.IL2CPP.Utils;
|
||||
using HarmonyLib;
|
||||
using HarmonyLib;
|
||||
using InnerNet;
|
||||
using UnityEngine;
|
||||
using static UnityEngine.GraphicsBuffer;
|
||||
|
||||
namespace BetterAmongUs.Patches;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ using AmongUs.GameOptions;
|
||||
using HarmonyLib;
|
||||
using Hazel;
|
||||
using Il2CppSystem.Text;
|
||||
using Steamworks;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ class GamePlayManager
|
||||
__instance.StartButton.gameObject.SetActive(true);
|
||||
if (__instance.startState == GameStartManager.StartingStates.Countdown)
|
||||
{
|
||||
__instance.StartButton.buttonText.text = string.Format("{0}: {1}", Translator.GetString(StringNames.Cancel),(int)__instance.countDownTimer + 1);
|
||||
__instance.StartButton.buttonText.text = string.Format("{0}: {1}", Translator.GetString(StringNames.Cancel), (int)__instance.countDownTimer + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using InnerNet;
|
||||
using HarmonyLib;
|
||||
using HarmonyLib;
|
||||
using InnerNet;
|
||||
|
||||
namespace BetterAmongUs;
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public class PingTrackerPatch
|
||||
|
||||
return newPing;
|
||||
}
|
||||
|
||||
|
||||
private static string GetTimeColor(float time)
|
||||
{
|
||||
float minutes = (int)time / 60 + 1f;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using AmongUs.GameOptions;
|
||||
using HarmonyLib;
|
||||
using Hazel;
|
||||
using static Il2CppSystem.Globalization.CultureInfo;
|
||||
|
||||
namespace BetterAmongUs.Patches;
|
||||
|
||||
|
||||
Reference in new issue
Block a user