diff --git a/ProjectObsidian/ProtoFlux/Avatar/AvatarRootSlot.cs b/ProjectObsidian/ProtoFlux/Avatar/AvatarRootSlot.cs new file mode 100644 index 0000000..5877396 --- /dev/null +++ b/ProjectObsidian/ProtoFlux/Avatar/AvatarRootSlot.cs @@ -0,0 +1,28 @@ +using System.Collections.Generic; +using FrooxEngine; +using FrooxEngine.CommonAvatar; +using ProtoFlux.Core; +using ProtoFlux.Runtimes.Execution; + +namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Users.Avatar +{ + [ContinuouslyChanging] + [NodeCategory("Obsidian/Avatar")] + public class AvatarRootSlot : ObjectFunctionNode + { + public readonly ObjectInput User; + + protected override Slot Compute(ExecutionContext context) + { + User user = User.Evaluate(context); + if (user == null) return null; + + Slot slot = user.Root.Slot; + List list = new List(); + slot.GetFirstDirectComponentsInChildren(list); + if (list.Count == 0) return null; + + return list[0].Slot; + } + } +} \ No newline at end of file diff --git a/ProjectObsidian/ProtoFlux/Interaction/FindGrabbableFromSlot.cs b/ProjectObsidian/ProtoFlux/Interaction/FindGrabbableFromSlot.cs index ee40b6f..2396f0e 100644 --- a/ProjectObsidian/ProtoFlux/Interaction/FindGrabbableFromSlot.cs +++ b/ProjectObsidian/ProtoFlux/Interaction/FindGrabbableFromSlot.cs @@ -2,10 +2,10 @@ using ProtoFlux.Core; using ProtoFlux.Runtimes.Execution; -namespace ProtoFlux.Users.Avatar +namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Interaction { [ContinuouslyChanging] - [NodeCategory("ProtoFlux/Obsidian/Avatar")] + [NodeCategory("Obsidian/Interaction")] public class FindGrabbableFromSlot : ObjectFunctionNode { public readonly ObjectInput Slot; diff --git a/ProjectObsidian/ProtoFlux/Users/Status/IsUserInNoclipNode.cs b/ProjectObsidian/ProtoFlux/Users/Status/IsUserInNoclipNode.cs index dfefc82..1c1b1c7 100644 --- a/ProjectObsidian/ProtoFlux/Users/Status/IsUserInNoclipNode.cs +++ b/ProjectObsidian/ProtoFlux/Users/Status/IsUserInNoclipNode.cs @@ -6,7 +6,7 @@ namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Locomotion { [ContinuouslyChanging] - [NodeCategory("Obsidian/Locomotion")] + [NodeCategory("Obsidian/Users/Status")] public class IsUserInNoClipNode : ValueFunctionNode { public readonly ObjectInput User; diff --git a/ProjectObsidian/ProtoFlux/Users/Status/IsUserInSeatedMode.cs b/ProjectObsidian/ProtoFlux/Users/Status/IsUserInSeatedMode.cs index b5ee204..30c9c5a 100644 --- a/ProjectObsidian/ProtoFlux/Users/Status/IsUserInSeatedMode.cs +++ b/ProjectObsidian/ProtoFlux/Users/Status/IsUserInSeatedMode.cs @@ -1,11 +1,10 @@ using ProtoFlux.Core; using ProtoFlux.Runtimes.Execution; -namespace FrooxEngine.ProtoFlux.Status +namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Users.Status { - [ContinuouslyChanging] - [NodeCategory("ProtoFlux/Obsidian/Status")] - public class IsUserInSeatedModeNode : ValueFunctionNode + [NodeCategory("Obsidian/Users/Status")] + public class IsUserInSeatedModeNode : ValueFunctionNode { public readonly ObjectInput User; diff --git a/ProjectObsidian/ProtoFlux/Utility/WriteToLogNode.cs b/ProjectObsidian/ProtoFlux/Utility/WriteToLogNode.cs index 6d2b38f..e813158 100644 --- a/ProjectObsidian/ProtoFlux/Utility/WriteToLogNode.cs +++ b/ProjectObsidian/ProtoFlux/Utility/WriteToLogNode.cs @@ -1,9 +1,9 @@ using Elements.Core; using FrooxEngine; using ProtoFlux.Core; -using ProtoFlux.Runtimes.Execution; using System.Threading.Tasks; using FrooxEngine.ProtoFlux; +using ProtoFlux.Runtimes.Execution; namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Utility {