allow modifier in lobby with error

This commit is contained in:
XtraCube committed 2025-02-26 15:38:25 -05:00
1 parent 0e2eeea069
commit 81834a7f1a
1 file changed
+2 -3
+2 -3
View File
@@ -366,10 +366,9 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
[HideFromIl2Cpp]
public BaseModifier? AddModifier(BaseModifier modifier)
{
if (!AmongUsClient.Instance.IsGameStarted)
if (LobbyBehaviour.Instance)
{
Logger<MiraApiPlugin>.Error("Cannot add modifier because the game has not started yet.");
return null;
Logger<MiraApiPlugin>.Warning($"Modifiers added in the lobby won't sync to new players!");
}
var id = modifier.TypeId;