mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
Fix errors in PrivateLobbyPatch and ChatCommandsPatch
This commit is contained in:
1 parent
ae8d53372d
commit
caa1caa646
2 files changed
+10
-5
No files matched your search
@@ -126,9 +126,11 @@ internal static class PrivateLobbyPatch
|
||||
button.enabled = false;
|
||||
|
||||
// Change inactive sprite to cyan color to indicate locked state
|
||||
var sprite = __instance.HostPrivateButton.transform.Find("Inactive").GetComponent<SpriteRenderer>();
|
||||
sprite?.color = new(0.35f, 1, 1, 1);
|
||||
var sprite = __instance.HostPrivateButton.transform.Find("Inactive")?.GetComponent<SpriteRenderer>();
|
||||
if (sprite != null)
|
||||
{
|
||||
sprite.color = new Color(0.35f, 1f, 1f, 1f); // Corrected color assignment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -225,7 +225,10 @@ internal static class ChatCommandsPatch
|
||||
{
|
||||
for (int i = 1; i < typedParts.Length && i <= closestCommand.Arguments.Length; i++)
|
||||
{
|
||||
closestCommand.Arguments[i - 1]?.Arg = typedParts[i];
|
||||
if (closestCommand.Arguments[i - 1] != null)
|
||||
{
|
||||
closestCommand.Arguments[i - 1].Arg = typedParts[i]; // Safe assignment
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user