mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-11-19 13:17:10 +00:00
fix issue with example mod
This commit is contained in:
1 parent
2f7b0692f3
commit
faed84d0f6
2 files changed
+4
-3
No files matched your search
@@ -21,7 +21,7 @@ public class MeetingButton : CustomActionButton
|
||||
|
||||
public override bool Enabled(RoleBehaviour? role)
|
||||
{
|
||||
return PlayerControl.LocalPlayer.HasModifier<CaptainModifier>();
|
||||
return PlayerControl.LocalPlayer != null && PlayerControl.LocalPlayer.HasModifier<CaptainModifier>();
|
||||
}
|
||||
|
||||
protected override void OnClick()
|
||||
|
||||
@@ -133,11 +133,12 @@ public static class Extensions
|
||||
}
|
||||
|
||||
component = player.GetComponent<ModifierComponent>();
|
||||
if (component)
|
||||
if (component == null)
|
||||
{
|
||||
ModifierComponents[player] = component;
|
||||
return null;
|
||||
}
|
||||
|
||||
ModifierComponents[player] = component;
|
||||
return component;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user