mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
allow modifier in lobby with error
This commit is contained in:
1 parent
0e2eeea069
commit
81834a7f1a
1 file changed
+2
-3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user