Skip to content

Commit

Permalink
Fix invalid instances of ObjectInput in Json nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Frozenreflex committed Jul 14, 2024
1 parent f2febf4 commit c3d7cc3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Json;
public class JsonGetObjectFromArrayNode<T> : ObjectFunctionNode<FrooxEngineContext, T> where T : class
{
public readonly ObjectInput<JsonArray> Input;
public readonly ObjectInput<int> Index;
public readonly ValueInput<int> Index;
public static bool IsValidGenericType => JsonTypeHelper.ValidObjectGetTypes.Contains(typeof(T));
protected override T Compute(FrooxEngineContext context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Json;
public class JsonGetValueFromArrayNode<T> : ValueFunctionNode<FrooxEngineContext, T> where T : unmanaged
{
public readonly ObjectInput<JsonArray> Input;
public readonly ObjectInput<int> Index;
public readonly ValueInput<int> Index;
public static bool IsValidGenericType => JsonTypeHelper.ValidValueTypes.Contains(typeof(T));
protected override T Compute(FrooxEngineContext context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Json;
[NodeName("Insert To Array")]
[NodeCategory("Obsidian/Json")]
[GenericTypes(typeof(string), typeof(Uri), typeof(IJsonToken), typeof(JsonObject), typeof(JsonArray))]
public class JsonInsertObjectToArrayNode<T> : ObjectFunctionNode<FrooxEngineContext, JsonArray>
public class JsonInsertObjectToArrayNode<T> : ObjectFunctionNode<FrooxEngineContext, JsonArray> where T : class
{
public readonly ObjectInput<JsonArray> Array;
public readonly ObjectInput<T> Object;
Expand Down
4 changes: 2 additions & 2 deletions ProjectObsidian/ProtoFlux/JSON/JsonInsertValueToArrayNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Json;
[NodeCategory("Obsidian/Json")]
[GenericTypes(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint),
typeof(long), typeof(ulong), typeof(float), typeof(double))]
public class JsonInsertValueToArrayNode<T> : ObjectFunctionNode<FrooxEngineContext, JsonArray>
public class JsonInsertValueToArrayNode<T> : ObjectFunctionNode<FrooxEngineContext, JsonArray> where T : unmanaged
{
public readonly ObjectInput<JsonArray> Array;
public readonly ObjectInput<T> Object;
public readonly ValueInput<T> Object;
public readonly ValueInput<int> Index;
public static bool IsValidGenericType => JsonTypeHelper.ValidValueTypes.Contains(typeof(T));
protected override JsonArray Compute(FrooxEngineContext context)
Expand Down

0 comments on commit c3d7cc3

Please sign in to comment.