Nodes - Fixed string format node not outputting numerics

Data model event node - Renamed to Data Model-Event Value Cycle
Data model event node - Added new data model event node that outputs the latest event data
Event conditions - Performance improvements
This commit is contained in:
Robert committed 2022-08-23 20:35:25 +02:00
1 parent 3efb97eedd
commit d2e0607622
15 files changed
+488 -160

No files matched your search

@@ -21,7 +21,9 @@ public class StringFormatNode : Node
public override void Evaluate()
{
Output.Value = string.Format(Format.Value ?? string.Empty, Values.Values.ToArray());
// Convert numerics to floats beforehand to allow string.Format to format them
object[] values = Values.Values.Select(v => v is Numeric n ? (float) n : v).ToArray();
Output.Value = string.Format(Format.Value ?? string.Empty, values);
}
#endregion