mirror of
https://github.com/ApeMV/AmongUsRevamped.git
synced 2026-10-19 15:51:59 +00:00
Small adjustments
This commit is contained in:
1 parent
b422d65b47
commit
3ff2df26dc
2 files changed
+67
-18
No files matched your search
@@ -68,7 +68,7 @@ namespace AmongUsRevamped
|
||||
|
||||
Children = new();
|
||||
|
||||
AllConfigEntries = new ConfigEntry<int>[10];
|
||||
AllConfigEntries = new ConfigEntry<int>[5];
|
||||
if (Id == 0)
|
||||
{
|
||||
singleEntry = Main.Instance.Config.Bind("Current Preset", id.ToString(), DefaultValue);
|
||||
@@ -80,7 +80,7 @@ namespace AmongUsRevamped
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < 10; i++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
AllConfigEntries[i] = Main.Instance.Config.Bind($"Preset{i + 1}", id.ToString(), DefaultValue);
|
||||
}
|
||||
|
||||
+65
-16
@@ -67,22 +67,6 @@ namespace AmongUsRevamped
|
||||
{
|
||||
ErrorText.Instance.AddError(ErrorCode.Main_DictionaryError);
|
||||
}
|
||||
|
||||
GameObject t = GameObject.Find("Tint");
|
||||
if (t != null)
|
||||
{
|
||||
t.SetActive(false);
|
||||
}
|
||||
GameObject b = GameObject.Find("BackgroundTexture");
|
||||
if (b != null)
|
||||
{
|
||||
b.SetActive(false);
|
||||
}
|
||||
GameObject w = GameObject.Find("WindowShine");
|
||||
if (w != null)
|
||||
{
|
||||
w.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,4 +166,69 @@ namespace AmongUsRevamped
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/3X3CODE/MainMenuEnhanced/blob/main/MainMenuEnhanced/VisualPatch.cs
|
||||
[HarmonyPatch(typeof(MainMenuManager), nameof(MainMenuManager.Start))]
|
||||
public static class MainMenuManagerStartPatch
|
||||
{
|
||||
public static void Postfix(MainMenuManager __instance)
|
||||
{
|
||||
if (__instance == null) return;
|
||||
|
||||
var bg = GameObject.Find("BackgroundTexture");
|
||||
if (bg != null)
|
||||
{
|
||||
bg.SetActive(false);
|
||||
}
|
||||
|
||||
Transform tintTrans = __instance.transform.Find("MainUI/Tint");
|
||||
var tint = tintTrans.gameObject;
|
||||
if (tint != null)
|
||||
{
|
||||
tint.SetActive(false);
|
||||
}
|
||||
|
||||
DisableObject("WindowShine");
|
||||
DisableComponent("RightPanel");
|
||||
DisableComponent("MaskedBlackScreen");
|
||||
|
||||
Transform playTransform = __instance.transform.Find("MainUI/AspectScaler/LeftPanel/Main Buttons/PlayButton/FontPlacer/Text_TMP");
|
||||
if (playTransform != null)
|
||||
{
|
||||
var playbutton = playTransform.gameObject;
|
||||
if (playbutton != null)
|
||||
{
|
||||
if (playbutton.TryGetComponent<TextTranslatorTMP>(out var tmp))
|
||||
{
|
||||
tmp.enabled = false;
|
||||
}
|
||||
if (playbutton.TryGetComponent<TextMeshPro>(out var text))
|
||||
{
|
||||
text.text = "Start";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void DisableObject(string name)
|
||||
{
|
||||
var obj = GameObject.Find(name);
|
||||
if (obj != null)
|
||||
{
|
||||
obj.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
static void DisableComponent(string name)
|
||||
{
|
||||
var obj = GameObject.Find(name);
|
||||
if (obj != null)
|
||||
{
|
||||
if (obj.TryGetComponent<SpriteRenderer>(out var renderer))
|
||||
{
|
||||
renderer.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user