Improvement of cyclomatic complexity by fewer nestings.
This commit is contained in:
committed by
Pavel Penev
parent
91802e6f10
commit
ee6f8ae45d
@@ -260,18 +260,18 @@ namespace OpenRA
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Any trait overrides that aren't explicitly whitelisted are flagged
|
// Any trait overrides that aren't explicitly whitelisted are flagged
|
||||||
if (mapRules != null)
|
if (mapRules == null)
|
||||||
{
|
return false;
|
||||||
if (AnyFlaggedTraits(modData, mapRules.Nodes))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (mapRules.Value != null)
|
if (AnyFlaggedTraits(modData, mapRules.Nodes))
|
||||||
{
|
return true;
|
||||||
var mapFiles = FieldLoader.GetValue<string[]>("value", mapRules.Value);
|
|
||||||
foreach (var f in mapFiles)
|
if (mapRules.Value != null)
|
||||||
if (AnyFlaggedTraits(modData, MiniYaml.FromStream(fileSystem.Open(f), f)))
|
{
|
||||||
return true;
|
var mapFiles = FieldLoader.GetValue<string[]>("value", mapRules.Value);
|
||||||
}
|
foreach (var f in mapFiles)
|
||||||
|
if (AnyFlaggedTraits(modData, MiniYaml.FromStream(fileSystem.Open(f), f)))
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user