mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
refactor access and management methods for modifiers
This commit is contained in:
1 parent
5f1996b457
commit
dd8d3df2b0
6 files changed
+139
-61
No files matched your search
@@ -18,7 +18,7 @@ public class FreezeButton : CustomActionButton<PlayerControl>
|
||||
|
||||
protected override void OnClick()
|
||||
{
|
||||
Target.AddModifier<FreezeModifier>();
|
||||
Target?.RpcAddModifier<FreezeModifier>();
|
||||
}
|
||||
|
||||
public override PlayerControl GetTarget()
|
||||
|
||||
@@ -41,7 +41,7 @@ public class MeetingButton : CustomActionButton
|
||||
|
||||
if (UsesLeft == 0 && PlayerControl.LocalPlayer.HasModifier<CaptainModifier>())
|
||||
{
|
||||
PlayerControl.LocalPlayer.RemoveModifier<CaptainModifier>();
|
||||
PlayerControl.LocalPlayer.RpcRemoveModifier<CaptainModifier>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user