Display conditions - Fixed event argument conditions

Display conditions - Fixed event inner-condition selection
This commit is contained in:
SpoinkyNL committed 2020-10-30 16:45:02 +01:00
1 parent f179980ac4
commit 13df88ca40
5 files changed
+30 -10

No files matched your search

@@ -62,7 +62,8 @@ namespace Artemis.Core
// If there is a child (root group), it must evaluate to true whenever the event triggered
if (Children.Any())
return Children[0].Evaluate();
return Children[0].EvaluateObject(_event.LastEventArgumentsUntyped);
// If there are no children, we always evaluate to true whenever the event triggered
return true;
}
@@ -44,6 +44,10 @@ namespace Artemis.Core
[DataModelIgnore]
public Type ArgumentsType => typeof(T);
/// <inheritdoc />
[DataModelIgnore]
public DataModelEventArgs? LastEventArgumentsUntyped => LastEventArguments;
/// <inheritdoc />
public event EventHandler? EventTriggered;
}
@@ -87,6 +91,10 @@ namespace Artemis.Core
[DataModelIgnore]
public Type ArgumentsType => typeof(DataModelEventArgs);
/// <inheritdoc />
[DataModelIgnore]
public DataModelEventArgs? LastEventArgumentsUntyped => LastEventArguments;
/// <inheritdoc />
public event EventHandler? EventTriggered;
}
@@ -19,6 +19,11 @@ namespace Artemis.Core
/// </summary>
Type ArgumentsType { get; }
/// <summary>
/// Gets the event arguments of the last time the event was triggered by its base type
/// </summary>
public DataModelEventArgs? LastEventArgumentsUntyped { get; }
/// <summary>
/// Fires when the event is triggered
/// </summary>