From c8a7f41331696fe26df79a02614d498dc0f4c2e5 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Fri, 4 Mar 2022 22:59:53 +0100 Subject: [PATCH] Rider reports these things as error for some reason so I'm just gonna uhhhh --- Content.Client/Storage/Visualizers/BagOpenCloseVisualizer.cs | 4 ++-- Content.Client/Weapons/Melee/MeleeWeaponSystem.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Client/Storage/Visualizers/BagOpenCloseVisualizer.cs b/Content.Client/Storage/Visualizers/BagOpenCloseVisualizer.cs index 71598fd4c2..528ab708a0 100644 --- a/Content.Client/Storage/Visualizers/BagOpenCloseVisualizer.cs +++ b/Content.Client/Storage/Visualizers/BagOpenCloseVisualizer.cs @@ -32,10 +32,10 @@ namespace Content.Client.Storage.Visualizers if (_openIcon != null && entities.TryGetComponent(entity, out var spriteComponent) && - spriteComponent.BaseRSI?.Path != null) + spriteComponent.BaseRSI?.Path is { } path) { spriteComponent.LayerMapReserveBlank(OpenIcon); - spriteComponent.LayerSetSprite(OpenIcon, new Rsi(spriteComponent.BaseRSI.Path, _openIcon)); + spriteComponent.LayerSetSprite(OpenIcon, new Rsi(path, _openIcon)); spriteComponent.LayerSetVisible(OpenIcon, false); } } diff --git a/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs b/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs index c697b87926..bb7c6e0b1f 100644 --- a/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs +++ b/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs @@ -67,12 +67,12 @@ namespace Content.Client.Weapons.Melee if (EntityManager.EntityExists(msg.Source) && msg.TextureEffect && EntityManager.TryGetComponent(msg.Source, out ISpriteComponent? sourceSprite) && - sourceSprite.BaseRSI?.Path != null) + sourceSprite.BaseRSI?.Path is { } path) { var curTime = _gameTiming.CurTime; var effect = new EffectSystemMessage { - EffectSprite = sourceSprite.BaseRSI.Path.ToString(), + EffectSprite = path.ToString(), RsiState = sourceSprite.LayerGetState(0).Name, Coordinates = EntityManager.GetComponent(attacker).Coordinates, Color = Vector4.Multiply(new Vector4(255, 255, 255, 125), 1.0f),