Update usages of ! is with is not (#2584)
* Update usages of ! is with is not * Content.IntegrationTests commit * Content.Server commit * Content.Shared commit Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -30,7 +30,9 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged.Barrels
|
||||
|
||||
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
||||
{
|
||||
if (!(curState is BatteryBarrelComponentState cast))
|
||||
base.HandleComponentState(curState, nextState);
|
||||
|
||||
if (curState is not BatteryBarrelComponentState cast)
|
||||
return;
|
||||
|
||||
MagazineCount = cast.Magazine;
|
||||
|
||||
@@ -38,7 +38,9 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged.Barrels
|
||||
|
||||
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
||||
{
|
||||
if (!(curState is BoltActionBarrelComponentState cast))
|
||||
base.HandleComponentState(curState, nextState);
|
||||
|
||||
if (curState is not BoltActionBarrelComponentState cast)
|
||||
return;
|
||||
|
||||
Chamber = cast.Chamber;
|
||||
|
||||
@@ -99,7 +99,9 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged.Barrels
|
||||
|
||||
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
||||
{
|
||||
if (!(curState is MagazineBarrelComponentState cast))
|
||||
base.HandleComponentState(curState, nextState);
|
||||
|
||||
if (curState is not MagazineBarrelComponentState cast)
|
||||
return;
|
||||
|
||||
Chambered = cast.Chambered;
|
||||
@@ -113,7 +115,7 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged.Barrels
|
||||
|
||||
switch (message)
|
||||
{
|
||||
|
||||
|
||||
case MagazineAutoEjectMessage _:
|
||||
_statusControl?.PlayAlarmAnimation();
|
||||
return;
|
||||
|
||||
@@ -38,7 +38,9 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged.Barrels
|
||||
|
||||
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
||||
{
|
||||
if (!(curState is PumpBarrelComponentState cast))
|
||||
base.HandleComponentState(curState, nextState);
|
||||
|
||||
if (curState is not PumpBarrelComponentState cast)
|
||||
return;
|
||||
|
||||
Chamber = cast.Chamber;
|
||||
|
||||
@@ -32,7 +32,9 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged.Barrels
|
||||
|
||||
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
||||
{
|
||||
if (!(curState is RevolverBarrelComponentState cast))
|
||||
base.HandleComponentState(curState, nextState);
|
||||
|
||||
if (curState is not RevolverBarrelComponentState cast)
|
||||
return;
|
||||
|
||||
CurrentSlot = cast.CurrentSlot;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged
|
||||
Mag,
|
||||
MagUnshaded,
|
||||
}
|
||||
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class ClientRangedWeaponComponent : SharedRangedWeaponComponent
|
||||
{
|
||||
@@ -23,7 +23,7 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged
|
||||
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
||||
{
|
||||
base.HandleComponentState(curState, nextState);
|
||||
if (!(curState is RangedWeaponComponentState rangedState))
|
||||
if (curState is not RangedWeaponComponentState rangedState)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user