Fix IDE0019
This commit is contained in:
committed by
Pavel Penev
parent
80bb828fe5
commit
6d7c73d498
@@ -34,12 +34,8 @@ namespace OpenRA.Mods.Common.Installer
|
||||
var prefixes = new[] { "HKEY_LOCAL_MACHINE\\Software\\", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\" };
|
||||
|
||||
foreach (var prefix in prefixes)
|
||||
{
|
||||
var installDir = Registry.GetValue($"{prefix}GOG.com\\Games\\{appId.Value}", "path", null) as string;
|
||||
|
||||
if (installDir != null)
|
||||
if (Registry.GetValue($"{prefix}GOG.com\\Games\\{appId.Value}", "path", null) is string installDir)
|
||||
return installDir;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -646,8 +646,7 @@ namespace OpenRA.Mods.Common.Pathfinder
|
||||
/// </summary>
|
||||
bool ActorIsBlocking(Actor actor)
|
||||
{
|
||||
var mobile = actor.OccupiesSpace as Mobile;
|
||||
var isMovable = mobile != null && !mobile.IsTraitDisabled && !mobile.IsTraitPaused && !mobile.IsImmovable;
|
||||
var isMovable = actor.OccupiesSpace is Mobile mobile && !mobile.IsTraitDisabled && !mobile.IsTraitPaused && !mobile.IsImmovable;
|
||||
if (isMovable)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user