mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
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:
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
|
||||
|
||||
Reference in new issue
Block a user