Allow omit of explicit true in complex criteria (#101)
This commit is contained in:
parent
229e76b87d
commit
f9341c8cd3
2 changed files with 6 additions and 2 deletions
|
|
@ -315,10 +315,14 @@ namespace Observatory.Explorer
|
|||
try
|
||||
{
|
||||
var result = criteriaFunction.Value.Call(scan, parents, scanList, bioSignals, geoSignals);
|
||||
if (result.Length > 0 && ((bool?)result[0]).GetValueOrDefault(false))
|
||||
if (result.Length == 3 && ((bool?)result[0]).GetValueOrDefault(false))
|
||||
{
|
||||
results.Add((result[1].ToString(), result[2].ToString(), false));
|
||||
}
|
||||
else if (result.Length == 2)
|
||||
{
|
||||
results.Add((result[0].ToString(), result[1].ToString(), false));
|
||||
}
|
||||
}
|
||||
catch (NLua.Exceptions.LuaScriptException e)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue