make Player not nullable in basemodifier (because it shouldnt ever be)

This commit is contained in:
XtraCube committed 2025-03-12 16:02:15 -04:00
1 parent 886ef0e31f
commit 08d8a48701
2 files changed
+5 -5

No files matched your search

@@ -15,7 +15,7 @@ public class FreezeModifier : TimedModifier
public override void OnActivate()
{
if (Player?.AmOwner == true)
if (Player.AmOwner)
{
Player.moveable = false;
}
@@ -25,15 +25,15 @@ public class FreezeModifier : TimedModifier
{
base.FixedUpdate();
if (Player?.AmOwner == true || PlayerControl.LocalPlayer.Data.Role is FreezerRole)
if (Player.AmOwner || PlayerControl.LocalPlayer.Data.Role is FreezerRole)
{
Player?.cosmetics.SetOutline(true, new Nullable<Color>(Palette.LightBlue));
Player.cosmetics.SetOutline(true, new Nullable<Color>(Palette.LightBlue));
}
}
public override void OnTimerComplete()
{
if (Player?.AmOwner == true)
if (Player.AmOwner)
{
Player.moveable = true;
}
+1 -1
View File
@@ -12,7 +12,7 @@ public abstract class BaseModifier : IOptionable
/// <summary>
/// Gets the player that the modifier is attached to.
/// </summary>
public PlayerControl? Player { get; internal set; }
public PlayerControl Player { get; internal set; } = null!;
/// <summary>
/// Gets the modifier component that the modifier is attached to.