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:
DrSmugleaf
2020-11-26 14:33:31 +01:00
committed by GitHub
parent a16ce4b7a5
commit 06b1939a60
75 changed files with 147 additions and 113 deletions

View File

@@ -10,16 +10,19 @@ namespace Content.Client.GameObjects.Components.ActionBlocking
{
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
{
var cuffState = curState as HandcuffedComponentState;
if (curState is not HandcuffedComponentState state)
{
return;
}
if (cuffState == null || cuffState.IconState == string.Empty)
if (state.IconState == string.Empty)
{
return;
}
if (Owner.TryGetComponent<SpriteComponent>(out var sprite))
{
sprite.LayerSetState(0, new RSI.StateId(cuffState.IconState)); // TODO: safety check to see if RSI contains the state?
sprite.LayerSetState(0, new RSI.StateId(state.IconState)); // TODO: safety check to see if RSI contains the state?
}
}
}