From 70992daa0bed8b2d0d7cb149498dc28c1045e2a9 Mon Sep 17 00:00:00 2001 From: paradoxical-autumn <110392755+paradoxical-autumn@users.noreply.github.com> Date: Thu, 27 Jun 2024 15:41:22 +0100 Subject: [PATCH 1/6] code uploads but for some reason theyre not uploading --- .../ProtoFlux/Math/Constants/NotGenerated.cs | 14 +++++++++++++ .../ProtoFlux/Users/UserFromUserRef.cs | 20 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 ProjectObsidian/ProtoFlux/Math/Constants/NotGenerated.cs create mode 100644 ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs diff --git a/ProjectObsidian/ProtoFlux/Math/Constants/NotGenerated.cs b/ProjectObsidian/ProtoFlux/Math/Constants/NotGenerated.cs new file mode 100644 index 0000000..4008309 --- /dev/null +++ b/ProjectObsidian/ProtoFlux/Math/Constants/NotGenerated.cs @@ -0,0 +1,14 @@ +using FrooxEngine.ProtoFlux; +using ProtoFlux.Core; + +namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Math.Constants; + +[NodeCategory("Obsidian/Math/Constants")] +[NodeName("Not Generated")] +public class NotGenerated : ValueFunctionNode +{ + protected override int Compute(FrooxEngineContext context) + { + return 7; + } +} \ No newline at end of file diff --git a/ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs b/ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs new file mode 100644 index 0000000..2c34783 --- /dev/null +++ b/ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs @@ -0,0 +1,20 @@ +using FrooxEngine.ProtoFlux; +using ProtoFlux.Core; +using FrooxEngine; + +namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Users +{ + [ContinuouslyChanging] + [NodeCategory("Obsidian/Users")] + [NodeName("UserFromUserRef")] + public class UserFromUserRef : ObjectFunctionNode + { + public readonly ObjectInput UserRef; + + protected override User Compute(FrooxEngineContext context) + { + UserRef userRef = UserRef.Evaluate(context); + return userRef.Target; + } + } +} \ No newline at end of file From f747cf80a9c7f9f0834e2ecbd207bc8d232b563d Mon Sep 17 00:00:00 2001 From: paradoxical-autumn <110392755+paradoxical-autumn@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:21:02 +0100 Subject: [PATCH 2/6] my silly stuff works now :D --- .../ProtoFlux/Math/Constants/NotGenerated.cs | 14 -------------- ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs | 1 + 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 ProjectObsidian/ProtoFlux/Math/Constants/NotGenerated.cs diff --git a/ProjectObsidian/ProtoFlux/Math/Constants/NotGenerated.cs b/ProjectObsidian/ProtoFlux/Math/Constants/NotGenerated.cs deleted file mode 100644 index 4008309..0000000 --- a/ProjectObsidian/ProtoFlux/Math/Constants/NotGenerated.cs +++ /dev/null @@ -1,14 +0,0 @@ -using FrooxEngine.ProtoFlux; -using ProtoFlux.Core; - -namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Math.Constants; - -[NodeCategory("Obsidian/Math/Constants")] -[NodeName("Not Generated")] -public class NotGenerated : ValueFunctionNode -{ - protected override int Compute(FrooxEngineContext context) - { - return 7; - } -} \ No newline at end of file diff --git a/ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs b/ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs index 2c34783..6d4a533 100644 --- a/ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs +++ b/ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs @@ -1,6 +1,7 @@ using FrooxEngine.ProtoFlux; using ProtoFlux.Core; using FrooxEngine; +using ProtoFlux.Runtimes.Execution; namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Users { From 8cad7c5b199333dc73d5b8274134f172cf589ffe Mon Sep 17 00:00:00 2001 From: paradoxical-autumn <110392755+paradoxical-autumn@users.noreply.github.com> Date: Thu, 27 Jun 2024 17:19:50 +0100 Subject: [PATCH 3/6] Update ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs --- ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs b/ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs index 6d4a533..616b4f8 100644 --- a/ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs +++ b/ProjectObsidian/ProtoFlux/Users/UserFromUserRef.cs @@ -7,7 +7,7 @@ namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Users { [ContinuouslyChanging] [NodeCategory("Obsidian/Users")] - [NodeName("UserFromUserRef")] + [NodeName("User From UserRef")] public class UserFromUserRef : ObjectFunctionNode { public readonly ObjectInput UserRef; From 75cf56c6b5dfa1fdf0d161b8afbfcb70a1b2e8f8 Mon Sep 17 00:00:00 2001 From: paradoxical-autumn <110392755+paradoxical-autumn@users.noreply.github.com> Date: Thu, 27 Jun 2024 20:25:52 +0100 Subject: [PATCH 4/6] mvp --- .../ProtoFlux/Flow/AsyncWhileWithIteration.cs | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 ProjectObsidian/ProtoFlux/Flow/AsyncWhileWithIteration.cs diff --git a/ProjectObsidian/ProtoFlux/Flow/AsyncWhileWithIteration.cs b/ProjectObsidian/ProtoFlux/Flow/AsyncWhileWithIteration.cs new file mode 100644 index 0000000..1bad5c0 --- /dev/null +++ b/ProjectObsidian/ProtoFlux/Flow/AsyncWhileWithIteration.cs @@ -0,0 +1,40 @@ +using ProtoFlux.Core; +using System.Threading.Tasks; +using ProtoFlux.Runtimes.Execution; + +namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Flow +{ + [NodeCategory("Obsidian/Flow")] + [NodeName("AsyncWhileWithI", false)] + public class AsyncWhileWithIteration : AsyncActionNode + { + public ValueInput Condition; + public AsyncCall LoopStart; + public AsyncCall LoopIteration; + public Continuation LoopEnd; + public readonly ValueOutput i; + private int iter; + + protected override async Task RunAsync(ExecutionContext context) + { + iter = 0; + await LoopStart.ExecuteAsync(context); + while (Condition.Evaluate(context, defaultValue: false)) + { + iter++; + i.Write(iter, context); + if (context.AbortExecution) + { + throw new ExecutionAbortedException(base.Runtime as IExecutionRuntime, this, LoopIteration.Target, isAsync: true); + } + await LoopIteration.ExecuteAsync(context); + } + return LoopEnd.Target; + } + + public AsyncWhileWithIteration() + { + i = new ValueOutput(this); + } + } +} \ No newline at end of file From ff19e617d2b77fd097750b95ca3ee80aca8457ba Mon Sep 17 00:00:00 2001 From: paradoxical-autumn <110392755+paradoxical-autumn@users.noreply.github.com> Date: Thu, 27 Jun 2024 20:34:29 +0100 Subject: [PATCH 5/6] While nodes with iteration --- .../ProtoFlux/Flow/WhileWithIteration.cs | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ProjectObsidian/ProtoFlux/Flow/WhileWithIteration.cs diff --git a/ProjectObsidian/ProtoFlux/Flow/WhileWithIteration.cs b/ProjectObsidian/ProtoFlux/Flow/WhileWithIteration.cs new file mode 100644 index 0000000..14fb1af --- /dev/null +++ b/ProjectObsidian/ProtoFlux/Flow/WhileWithIteration.cs @@ -0,0 +1,39 @@ +using ProtoFlux.Core; +using ProtoFlux.Runtimes.Execution; + +namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Flow +{ + [NodeCategory("Obsidian/Flow")] + [NodeName("While With I", false)] + public class WhileWithIteration : ActionNode + { + public ValueInput Condition; + public Call LoopStart; + public Call LoopIteration; + public Call LoopEnd; + public readonly ValueOutput i; + private int iter; + + protected override IOperation Run(ExecutionContext context) + { + iter = 0; + LoopStart.Execute(context); + while (Condition.Evaluate(context, defaultValue: false)) + { + iter++; + i.Write(iter, context); + if (context.AbortExecution) + { + throw new ExecutionAbortedException(base.Runtime as IExecutionRuntime, this, LoopIteration.Target, isAsync: false); + } + LoopIteration.Execute(context); + } + return LoopEnd.Target; + } + + public WhileWithIteration() + { + i = new ValueOutput(this); + } + } +} \ No newline at end of file From f583ecca32cc3923da5f31d88eeb4c88a8d51e87 Mon Sep 17 00:00:00 2001 From: paradoxical-autumn <110392755+paradoxical-autumn@users.noreply.github.com> Date: Thu, 27 Jun 2024 20:53:18 +0100 Subject: [PATCH 6/6] oops i started indexing at 1 LMAO --- ProjectObsidian/ProtoFlux/Flow/AsyncWhileWithIteration.cs | 4 ++-- ProjectObsidian/ProtoFlux/Flow/WhileWithIteration.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ProjectObsidian/ProtoFlux/Flow/AsyncWhileWithIteration.cs b/ProjectObsidian/ProtoFlux/Flow/AsyncWhileWithIteration.cs index 1bad5c0..135699f 100644 --- a/ProjectObsidian/ProtoFlux/Flow/AsyncWhileWithIteration.cs +++ b/ProjectObsidian/ProtoFlux/Flow/AsyncWhileWithIteration.cs @@ -5,7 +5,7 @@ namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Flow { [NodeCategory("Obsidian/Flow")] - [NodeName("AsyncWhileWithI", false)] + [NodeName("AsyncWhile With I", false)] public class AsyncWhileWithIteration : AsyncActionNode { public ValueInput Condition; @@ -21,13 +21,13 @@ protected override async Task RunAsync(ExecutionContext context) await LoopStart.ExecuteAsync(context); while (Condition.Evaluate(context, defaultValue: false)) { - iter++; i.Write(iter, context); if (context.AbortExecution) { throw new ExecutionAbortedException(base.Runtime as IExecutionRuntime, this, LoopIteration.Target, isAsync: true); } await LoopIteration.ExecuteAsync(context); + iter++; } return LoopEnd.Target; } diff --git a/ProjectObsidian/ProtoFlux/Flow/WhileWithIteration.cs b/ProjectObsidian/ProtoFlux/Flow/WhileWithIteration.cs index 14fb1af..e86a3ff 100644 --- a/ProjectObsidian/ProtoFlux/Flow/WhileWithIteration.cs +++ b/ProjectObsidian/ProtoFlux/Flow/WhileWithIteration.cs @@ -20,13 +20,13 @@ protected override IOperation Run(ExecutionContext context) LoopStart.Execute(context); while (Condition.Evaluate(context, defaultValue: false)) { - iter++; i.Write(iter, context); if (context.AbortExecution) { throw new ExecutionAbortedException(base.Runtime as IExecutionRuntime, this, LoopIteration.Target, isAsync: false); } LoopIteration.Execute(context); + iter++; } return LoopEnd.Target; }