Nodes - Added categories

Nodes - Added quick node creation
Nodes - Added input and output types to NodeAttribute
This commit is contained in:
Robert committed 2021-08-26 22:09:04 +02:00
1 parent 73794591bc
commit c4340c3c97
29 files changed
+389 -82

No files matched your search

+2 -2
View File
@@ -53,8 +53,8 @@ namespace Artemis.Core.Services
string name = nodeAttribute?.Name ?? nodeType.Name;
string description = nodeAttribute?.Description ?? string.Empty;
string category = nodeAttribute?.Category ?? string.Empty;
NodeData nodeData = new(plugin, nodeType, name, description, category, (s, e) => CreateNode(s, e, nodeType));
NodeData nodeData = new(plugin, nodeType, name, description, category, nodeAttribute?.InputType, nodeAttribute?.OutputType, (s, e) => CreateNode(s, e, nodeType));
return NodeTypeStore.Add(nodeData);
}
@@ -9,6 +9,8 @@ namespace Artemis.Core
public string Name { get; }
public string Description { get; set; }
public string Category { get; set; }
public Type InputType { get; set; }
public Type OutputType { get; set; }
#endregion
+6 -2
View File
@@ -13,20 +13,24 @@ namespace Artemis.Core
public string Name { get; }
public string Description { get; }
public string Category { get; }
public Type? InputType { get; }
public Type? OutputType { get; }
private Func<INodeScript, NodeEntity?, INode> _create;
#endregion
#region Constructors
internal NodeData(Plugin plugin, Type type, string name, string description, string category, Func<INodeScript, NodeEntity?, INode>? create)
internal NodeData(Plugin plugin, Type type, string name, string description, string category, Type? inputType, Type? outputType, Func<INodeScript, NodeEntity?, INode>? create)
{
this.Plugin = plugin;
this.Type = type;
this.Name = name;
this.Description = description;
this.Category = category;
this.InputType = inputType;
this.OutputType = outputType;
this._create = create;
}