From 7063d682f9a49f0ab98fb1f6f75585d8672b3bad Mon Sep 17 00:00:00 2001 From: alyx Date: Mon, 31 Jul 2023 15:16:34 -0400 Subject: Load what was stuck on replit --- circuits.json | 2243 ++++++++++++++++++++++++++++++++++++------------- index.html | 12 + lib/chips2.js | 327 ++++++- pwathings/appver.json | 2 +- searcher/index.html | 2 +- types.html | 141 ++-- 6 files changed, 2024 insertions(+), 703 deletions(-) diff --git a/circuits.json b/circuits.json index 7c4e479..a7b4a5e 100644 --- a/circuits.json +++ b/circuits.json @@ -239,6 +239,114 @@ } ] }, + "953fb21b-c9f0-46fc-a0f1-ee1a937854f8": { + "ReadonlyPaletteName": "Add Tag", + "ReadonlyChipName": "Add Tag", + "Description": "Adds a tag to the input object or player.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Add Tag", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Target", + "ReadonlyType": "Taggable", + "Description": "" + }, + { + "Name": "Tag", + "ReadonlyType": "string", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Object", + "Rec Room Object", + "Tag" + ] + }, + { + "FilterPath": [ + "Player", + "Tag" + ] + } + ] + }, + "81939b0e-428f-481c-9fba-453b4c84f01e": { + "ReadonlyPaletteName": "Add Tags", + "ReadonlyChipName": "Add Tags", + "Description": "Adds tags to the input object or player.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Add Tags", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Target", + "ReadonlyType": "Taggable", + "Description": "" + }, + { + "Name": "Tags", + "ReadonlyType": "List", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Object", + "Rec Room Object", + "Tag" + ] + }, + { + "FilterPath": [ + "Player", + "Tag" + ] + } + ] + }, "3edc785f-46ef-4f30-b101-a07126d3a370": { "ReadonlyPaletteName": "AI Get Line of Sight Parameters", "ReadonlyChipName": "AI Get Line of Sight Parameters", @@ -1010,7 +1118,7 @@ "ReadonlyPaletteName": "Angular Velocity Add", "ReadonlyChipName": "Angular Velocity Add", "Description": "Add angular velocity to an object. The Angular Velocity vector should lie along the axis of the rotation being added, with a magnitude that (once multiplied by the speed multiplier) represents the clockwise rotation speed in deg/s. Once the new angular velocity has been computed, its speed will be capped by the Max Angular Speed.", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -1059,7 +1167,13 @@ ] } ], - "NodeFilters": [] + "NodeFilters": [ + { + "FilterPath": [ + "Physics" + ] + } + ] }, "98b24bc7-32d8-4386-9348-d44ad00d7702": { "ReadonlyPaletteName": "Angular Velocity Set (Deprecated)", @@ -1118,7 +1232,7 @@ "ReadonlyPaletteName": "Angular Velocity Set", "ReadonlyChipName": "Angular Velocity Set", "Description": "Sets the angular velocity of an object. The Angular Velocity vector should lie along the axis of rotation, with a magnitude that (once multiplied by the speed multiplier) represents the clockwise rotation speed in deg/s.", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -1162,7 +1276,13 @@ ] } ], - "NodeFilters": [] + "NodeFilters": [ + { + "FilterPath": [ + "Physics" + ] + } + ] }, "aaa4e58f-16df-426a-b7a7-a654eab97037": { "ReadonlyPaletteName": "Asin", @@ -1284,7 +1404,7 @@ "ReadonlyPaletteName": "Audio Player Pause", "ReadonlyChipName": "Audio Player Pause", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -1326,7 +1446,7 @@ "ReadonlyPaletteName": "Audio Player Play", "ReadonlyChipName": "Audio Player Play", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -1373,7 +1493,7 @@ "ReadonlyPaletteName": "Audio Player Set Speed", "ReadonlyChipName": "Audio Player Set Speed", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -1420,7 +1540,7 @@ "ReadonlyPaletteName": "Audio Player Set Volume", "ReadonlyChipName": "Audio Player Set Volume", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -1467,7 +1587,7 @@ "ReadonlyPaletteName": "Audio Player Stop", "ReadonlyChipName": "Audio Player Stop", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -1509,7 +1629,7 @@ "ReadonlyPaletteName": "Audio Player Time Stamp", "ReadonlyChipName": "Audio Player Time Stamp", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -2439,23 +2559,29 @@ } ] }, - "87a8e178-b15c-4c38-9da0-95ba74f9f4ec": { - "ReadonlyPaletteName": "Color Constant", - "ReadonlyChipName": "Color Constant", + "c3fc963c-6d73-4d88-9c9b-95e9faae219f": { + "ReadonlyPaletteName": "Collision Data Get Distance", + "ReadonlyChipName": "Collision Data Get Distance", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Color Constant", + "Name": "Collision Data Get Distance", "ReadonlyTypeParams": {}, - "Inputs": [], + "Inputs": [ + { + "Name": "Target", + "ReadonlyType": "Collision Data", + "Description": "" + } + ], "Outputs": [ { - "Name": "Color", - "ReadonlyType": "Color", + "Name": "Distance", + "ReadonlyType": "float", "Description": "" } ] @@ -2464,44 +2590,34 @@ "NodeFilters": [ { "FilterPath": [ - "Constant" + "Physics" ] } ] }, - "3d2fd0b5-eeac-45cc-a622-1701710f0792": { - "ReadonlyPaletteName": "Color Variable", - "ReadonlyChipName": "Color Variable", + "ced470f8-dd9d-4e67-a654-7c7e1a3e7819": { + "ReadonlyPaletteName": "Collision Data Get Normal", + "ReadonlyChipName": "Collision Data Get Normal", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", - "ChipNameSource": "Code", + "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Color Variable", + "Name": "Collision Data Get Normal", "ReadonlyTypeParams": {}, "Inputs": [ { - "Name": "", - "ReadonlyType": "exec", - "Description": "" - }, - { - "Name": "", - "ReadonlyType": "Color", + "Name": "Target", + "ReadonlyType": "Collision Data", "Description": "" } ], "Outputs": [ { - "Name": "", - "ReadonlyType": "exec", - "Description": "" - }, - { - "Name": "", - "ReadonlyType": "Color", + "Name": "Normal", + "ReadonlyType": "Vector3", "Description": "" } ] @@ -2510,35 +2626,34 @@ "NodeFilters": [ { "FilterPath": [ - "Variable", - "Primitive" + "Physics" ] } ] }, - "8e412141-635d-435c-a900-f40d8a261906": { - "ReadonlyPaletteName": "Color To Int", - "ReadonlyChipName": "Color To Int", + "8c8931da-1a8e-4164-a3a5-0f68db8cafb5": { + "ReadonlyPaletteName": "Collision Data Get Object", + "ReadonlyChipName": "Collision Data Get Object", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Color To Int", + "Name": "Collision Data Get Object", "ReadonlyTypeParams": {}, "Inputs": [ { - "Name": "Color", - "ReadonlyType": "Color", + "Name": "Target", + "ReadonlyType": "Collision Data", "Description": "" } ], "Outputs": [ { - "Name": "Int", - "ReadonlyType": "int", + "Name": "Object", + "ReadonlyType": "Rec Room Object", "Description": "" } ] @@ -2547,36 +2662,34 @@ "NodeFilters": [ { "FilterPath": [ - "Conversion" + "Physics" ] } ] }, - "c0ee02f4-bbab-40ea-88a0-7441d7e7094c": { - "ReadonlyPaletteName": "Combatant Get Ground Position", - "ReadonlyChipName": "Combatant Get Ground Position", - "Description": "Outputs the ground position of an input combatant.", - "IsBetaChip": true, + "2729e8db-62d1-4f9e-b076-74f27cd43332": { + "ReadonlyPaletteName": "Collision Data Get Player", + "ReadonlyChipName": "Collision Data Get Player", + "Description": "", + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Combatant Get Ground Position", - "ReadonlyTypeParams": { - "T": "(AI | Combatant | Player)" - }, + "Name": "Collision Data Get Player", + "ReadonlyTypeParams": {}, "Inputs": [ { - "Name": "Combatant", - "ReadonlyType": "T", + "Name": "Target", + "ReadonlyType": "Collision Data", "Description": "" } ], "Outputs": [ { - "Name": "Ground Position", - "ReadonlyType": "Vector3", + "Name": "Player", + "ReadonlyType": "Player", "Description": "" } ] @@ -2585,47 +2698,34 @@ "NodeFilters": [ { "FilterPath": [ - "Object", - "Combatant" + "Physics" ] } ] }, - "3967a8ad-4237-4ae7-8cbf-850d8e24fe30": { - "ReadonlyPaletteName": "Combatant Get Health", - "ReadonlyChipName": "Combatant Get Health", - "Description": "Outputs the Health property of the input combatant.", - "IsBetaChip": true, + "5910618b-f862-49ce-9779-46130e47f985": { + "ReadonlyPaletteName": "Collision Data Get Position", + "ReadonlyChipName": "Collision Data Get Position", + "Description": "", + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Combatant Get Health", - "ReadonlyTypeParams": { - "T": "(AI | Combatant | Player)" - }, + "Name": "Collision Data Get Position", + "ReadonlyTypeParams": {}, "Inputs": [ { - "Name": "Object", - "ReadonlyType": "T", + "Name": "Target", + "ReadonlyType": "Collision Data", "Description": "" } ], "Outputs": [ { - "Name": "Health", - "ReadonlyType": "int", - "Description": "" - }, - { - "Name": "Shield", - "ReadonlyType": "int", - "Description": "" - }, - { - "Name": "Max Health", - "ReadonlyType": "int", + "Name": "Position", + "ReadonlyType": "Vector3", "Description": "" } ] @@ -2634,29 +2734,229 @@ "NodeFilters": [ { "FilterPath": [ - "Object", - "Combatant" + "Physics" ] } ] }, - "2a12c389-c3c6-4484-8c63-21cdaf0fac6c": { - "ReadonlyPaletteName": "Combatant Get Is Alive", - "ReadonlyChipName": "Combatant Get Is Alive", - "Description": "Outputs True if the input combatant is alive.", - "IsBetaChip": true, + "87a8e178-b15c-4c38-9da0-95ba74f9f4ec": { + "ReadonlyPaletteName": "Color Constant", + "ReadonlyChipName": "Color Constant", + "Description": "", + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Combatant Get Is Alive", - "ReadonlyTypeParams": { - "T": "(AI | Combatant | Player)" - }, - "Inputs": [ - { - "Name": "Object", + "Name": "Color Constant", + "ReadonlyTypeParams": {}, + "Inputs": [], + "Outputs": [ + { + "Name": "Color", + "ReadonlyType": "Color", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Constant" + ] + } + ] + }, + "3d2fd0b5-eeac-45cc-a622-1701710f0792": { + "ReadonlyPaletteName": "Color Variable", + "ReadonlyChipName": "Color Variable", + "Description": "", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "Code", + "NodeDescs": [ + { + "Name": "Color Variable", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "", + "ReadonlyType": "Color", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "", + "ReadonlyType": "Color", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Variable", + "Primitive" + ] + } + ] + }, + "8e412141-635d-435c-a900-f40d8a261906": { + "ReadonlyPaletteName": "Color To Int", + "ReadonlyChipName": "Color To Int", + "Description": "", + "IsBetaChip": true, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Color To Int", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "Color", + "ReadonlyType": "Color", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "Int", + "ReadonlyType": "int", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Conversion" + ] + } + ] + }, + "c0ee02f4-bbab-40ea-88a0-7441d7e7094c": { + "ReadonlyPaletteName": "Combatant Get Ground Position", + "ReadonlyChipName": "Combatant Get Ground Position", + "Description": "Outputs the ground position of an input combatant.", + "IsBetaChip": true, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Combatant Get Ground Position", + "ReadonlyTypeParams": { + "T": "(AI | Combatant | Player)" + }, + "Inputs": [ + { + "Name": "Combatant", + "ReadonlyType": "T", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "Ground Position", + "ReadonlyType": "Vector3", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Object", + "Combatant" + ] + } + ] + }, + "3967a8ad-4237-4ae7-8cbf-850d8e24fe30": { + "ReadonlyPaletteName": "Combatant Get Health", + "ReadonlyChipName": "Combatant Get Health", + "Description": "Outputs the Health property of the input combatant.", + "IsBetaChip": true, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Combatant Get Health", + "ReadonlyTypeParams": { + "T": "(AI | Combatant | Player)" + }, + "Inputs": [ + { + "Name": "Object", + "ReadonlyType": "T", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "Health", + "ReadonlyType": "int", + "Description": "" + }, + { + "Name": "Shield", + "ReadonlyType": "int", + "Description": "" + }, + { + "Name": "Max Health", + "ReadonlyType": "int", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Object", + "Combatant" + ] + } + ] + }, + "2a12c389-c3c6-4484-8c63-21cdaf0fac6c": { + "ReadonlyPaletteName": "Combatant Get Is Alive", + "ReadonlyChipName": "Combatant Get Is Alive", + "Description": "Outputs True if the input combatant is alive.", + "IsBetaChip": true, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Combatant Get Is Alive", + "ReadonlyTypeParams": { + "T": "(AI | Combatant | Player)" + }, + "Inputs": [ + { + "Name": "Object", "ReadonlyType": "T", "Description": "" } @@ -2985,7 +3285,7 @@ "ReadonlyPaletteName": "Comment", "ReadonlyChipName": "i", "Description": "Put a comment next to your circuits to explain what they're doing.", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "Code", @@ -3221,29 +3521,19 @@ } ] }, - "953fb21b-c9f0-46fc-a0f1-ee1a937854f8": { - "ReadonlyPaletteName": "Rec Room Object Add Tag", - "ReadonlyChipName": "Rec Room Object Add Tag", - "Description": "Adds a tag to an object.", - "IsBetaChip": true, + "02d69553-ae96-4c2d-8477-59ada6a66783": { + "ReadonlyPaletteName": "Rec Room Object Get All with Tag", + "ReadonlyChipName": "Rec Room Object Get All with Tag", + "Description": "Searches the room for all objects with the input tag and outputs them as a list.", + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Rec Room Object Add Tag", + "Name": "Rec Room Object Get All with Tag", "ReadonlyTypeParams": {}, "Inputs": [ - { - "Name": "", - "ReadonlyType": "exec", - "Description": "" - }, - { - "Name": "Target", - "ReadonlyType": "Rec Room Object", - "Description": "" - }, { "Name": "Tag", "ReadonlyType": "string", @@ -3252,8 +3542,8 @@ ], "Outputs": [ { - "Name": "", - "ReadonlyType": "exec", + "Name": "Objects with Tag", + "ReadonlyType": "List", "Description": "" } ] @@ -3263,44 +3553,35 @@ { "FilterPath": [ "Object", - "Rec Room Object" + "Rec Room Object", + "Tag" ] } ] }, - "81939b0e-428f-481c-9fba-453b4c84f01e": { - "ReadonlyPaletteName": "Rec Room Object Add Tags", - "ReadonlyChipName": "Rec Room Object Add Tags", - "Description": "Adds tags to the input object.", + "9e51fcdc-87b4-4eee-a7b1-8d6f86a5fa6b": { + "ReadonlyPaletteName": "Rec Room Object Get Authority", + "ReadonlyChipName": "Rec Room Object Get Authority", + "Description": "Outputs the authority Player of the input object.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Rec Room Object Add Tags", + "Name": "Rec Room Object Get Authority", "ReadonlyTypeParams": {}, "Inputs": [ - { - "Name": "", - "ReadonlyType": "exec", - "Description": "" - }, { "Name": "Target", "ReadonlyType": "Rec Room Object", "Description": "" - }, - { - "Name": "Tags", - "ReadonlyType": "List", - "Description": "" } ], "Outputs": [ { - "Name": "", - "ReadonlyType": "exec", + "Name": "Result", + "ReadonlyType": "Player", "Description": "" } ] @@ -3312,20 +3593,25 @@ "Object", "Rec Room Object" ] - } - ] - }, - "02d69553-ae96-4c2d-8477-59ada6a66783": { - "ReadonlyPaletteName": "Rec Room Object Get All with Tag", - "ReadonlyChipName": "Rec Room Object Get All with Tag", - "Description": "Searches the room for all objects with a specified tag. Outputs all objects with the input tag as a list.", + }, + { + "FilterPath": [ + "Networking" + ] + } + ] + }, + "43ff2d3c-c3aa-45bc-a7b7-01587c8a61f6": { + "ReadonlyPaletteName": "Rec Room Object Get First with Tag", + "ReadonlyChipName": "Rec Room Object Get First with Tag", + "Description": "Gets the first object with the input tag.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Rec Room Object Get All with Tag", + "Name": "Rec Room Object Get First with Tag", "ReadonlyTypeParams": {}, "Inputs": [ { @@ -3336,8 +3622,8 @@ ], "Outputs": [ { - "Name": "Objects with Tag", - "ReadonlyType": "List", + "Name": "Object", + "ReadonlyType": "Rec Room Object", "Description": "" } ] @@ -3347,22 +3633,23 @@ { "FilterPath": [ "Object", - "Rec Room Object" + "Rec Room Object", + "Tag" ] } ] }, - "9e51fcdc-87b4-4eee-a7b1-8d6f86a5fa6b": { - "ReadonlyPaletteName": "Rec Room Object Get Authority", - "ReadonlyChipName": "Rec Room Object Get Authority", - "Description": "Outputs the authority Player of the input object.", + "b0497de0-3dd3-470d-a421-8f0d321bfc3e": { + "ReadonlyPaletteName": "Rec Room Object Get Is Local Player Authority", + "ReadonlyChipName": "Rec Room Object Get Is Local Player Authority", + "Description": "Outputs True on the player's machine who has authority of the input.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Rec Room Object Get Authority", + "Name": "Rec Room Object Get Is Local Player Authority", "ReadonlyTypeParams": {}, "Inputs": [ { @@ -3374,7 +3661,7 @@ "Outputs": [ { "Name": "Result", - "ReadonlyType": "Player", + "ReadonlyType": "bool", "Description": "" } ] @@ -3394,29 +3681,34 @@ } ] }, - "cb909206-8627-4c66-ac8d-47b1a046ef8b": { - "ReadonlyPaletteName": "Rec Room Object Get First Tag", - "ReadonlyChipName": "Rec Room Object Get First Tag", - "Description": "Gets the first tag of an object.", - "IsBetaChip": true, + "a76a9898-4add-4765-9f5b-f366b586e51c": { + "ReadonlyPaletteName": "Rec Room Object Get Last Equipping Player", + "ReadonlyChipName": "Rec Room Object Get Last Equipping Player", + "Description": "Returns the player who last held an object.", + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Rec Room Object Get First Tag", + "Name": "Rec Room Object Get Last Equipping Player", "ReadonlyTypeParams": {}, "Inputs": [ { - "Name": "Target", + "Name": "Object", "ReadonlyType": "Rec Room Object", "Description": "" } ], "Outputs": [ { - "Name": "Tag", - "ReadonlyType": "string", + "Name": "Player", + "ReadonlyType": "Player", + "Description": "" + }, + { + "Name": "Currently Equipped", + "ReadonlyType": "bool", "Description": "" } ] @@ -3428,31 +3720,47 @@ "Object", "Rec Room Object" ] + }, + { + "FilterPath": [ + "Player", + "Equipment" + ] } ] }, - "43ff2d3c-c3aa-45bc-a7b7-01587c8a61f6": { - "ReadonlyPaletteName": "Rec Room Object Get First with Tag", - "ReadonlyChipName": "Rec Room Object Get First with Tag", - "Description": "Gets the first object with a tag.", + "7077d139-9876-495e-9756-58150fef9f3b": { + "ReadonlyPaletteName": "Rec Room Object Variable", + "ReadonlyChipName": "Rec Room Object Variable", + "Description": "", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", - "ChipNameSource": "FirstNodeDesc", + "ChipNameSource": "Code", "NodeDescs": [ { - "Name": "Rec Room Object Get First with Tag", + "Name": "Rec Room Object Variable", "ReadonlyTypeParams": {}, "Inputs": [ { - "Name": "Tag", - "ReadonlyType": "string", + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "", + "ReadonlyType": "Rec Room Object", "Description": "" } ], "Outputs": [ { - "Name": "Object", + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "", "ReadonlyType": "Rec Room Object", "Description": "" } @@ -3460,6 +3768,12 @@ } ], "NodeFilters": [ + { + "FilterPath": [ + "Variable", + "Object" + ] + }, { "FilterPath": [ "Object", @@ -3468,29 +3782,34 @@ } ] }, - "b0497de0-3dd3-470d-a421-8f0d321bfc3e": { - "ReadonlyPaletteName": "Rec Room Object Get Is Local Player Authority", - "ReadonlyChipName": "Rec Room Object Get Is Local Player Authority", - "Description": "Outputs True on the player's machine who has authority of the input.", + "6809978a-e1fc-403a-a41a-d4e94f22281f": { + "ReadonlyPaletteName": "Consumable Deactivate", + "ReadonlyChipName": "Consumable Deactivate", + "Description": "Sets the input consumable to inactive. Displays the consumable as not active in the backback and allow using another one.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Rec Room Object Get Is Local Player Authority", + "Name": "Consumable Deactivate", "ReadonlyTypeParams": {}, "Inputs": [ { - "Name": "Target", - "ReadonlyType": "Rec Room Object", + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Consumable", + "ReadonlyType": "Consumable", "Description": "" } ], "Outputs": [ { - "Name": "Result", - "ReadonlyType": "bool", + "Name": "", + "ReadonlyType": "exec", "Description": "" } ] @@ -3499,45 +3818,62 @@ "NodeFilters": [ { "FilterPath": [ - "Object", - "Rec Room Object" + "Player", + "Economy", + "Consumable" ] }, { "FilterPath": [ - "Networking" + "Economy", + "Consumable" ] } ] }, - "a76a9898-4add-4765-9f5b-f366b586e51c": { - "ReadonlyPaletteName": "Rec Room Object Get Last Equipping Player", - "ReadonlyChipName": "Rec Room Object Get Last Equipping Player", - "Description": "Returns the player who last held an object.", + "cefee2a5-d4a8-4dff-8c4e-bad684ca8d34": { + "ReadonlyPaletteName": "Delay", + "ReadonlyChipName": "Delay", + "Description": "Fires outputs based on the inputted time to delay. The Run exec fires as soon as the node is executed. The After Delay exec fires once the input delay duration has completed. After Canceled fires after the delay node’s Cancel exec has been fired. Cancel cancels all current delays running from this node, except for delays scheduled for the next tick.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Rec Room Object Get Last Equipping Player", + "Name": "Delay", "ReadonlyTypeParams": {}, "Inputs": [ { - "Name": "Object", - "ReadonlyType": "Rec Room Object", + "Name": "Run", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Delay (s)", + "ReadonlyType": "float", + "Description": "" + }, + { + "Name": "Cancel", + "ReadonlyType": "exec", "Description": "" } ], "Outputs": [ { - "Name": "Player", - "ReadonlyType": "Player", + "Name": "Run", + "ReadonlyType": "exec", "Description": "" }, { - "Name": "Currently Equipped", - "ReadonlyType": "bool", + "Name": "After Delay", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Cancel", + "ReadonlyType": "exec", "Description": "" } ] @@ -3546,41 +3882,44 @@ "NodeFilters": [ { "FilterPath": [ - "Object", - "Rec Room Object" + "Control Flow" ] }, { "FilterPath": [ - "Player", - "Equipment" + "Time" + ] + }, + { + "FilterPath": [ + "Commonly Used" ] } ] }, - "e67cfcb7-03e8-4152-ba41-af8ca61d93fb": { - "ReadonlyPaletteName": "Rec Room Object Get Tags", - "ReadonlyChipName": "Rec Room Object Get Tags", - "Description": "Outputs list of tags the input object has.", + "c1fdc4fa-fcb4-4ea4-b505-7b1d15fb8117": { + "ReadonlyPaletteName": "Dice Get Player Rolled", + "ReadonlyChipName": "Dice Get Player Rolled", + "Description": "Returns the player who rolled the dice.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Rec Room Object Get Tags", + "Name": "Dice Get Player Rolled", "ReadonlyTypeParams": {}, "Inputs": [ { "Name": "Target", - "ReadonlyType": "Rec Room Object", + "ReadonlyType": "Die", "Description": "" } ], "Outputs": [ { - "Name": "Tags", - "ReadonlyType": "List", + "Name": "Player", + "ReadonlyType": "Player", "Description": "" } ] @@ -3590,38 +3929,70 @@ { "FilterPath": [ "Object", - "Rec Room Object" + "Dice" ] } ] }, - "bc3011d2-c085-490e-a450-195ff3a27009": { - "ReadonlyPaletteName": "Rec Room Object Has Tag", - "ReadonlyChipName": "Rec Room Object Has Tag", - "Description": "Outputs True if the input object has the input tag.", + "c80e2979-c672-4e7a-81fb-0ed1964e3ea6": { + "ReadonlyPaletteName": "Dice Get Result", + "ReadonlyChipName": "Dice Get Result", + "Description": "Returns the result of the dice.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Rec Room Object Has Tag", + "Name": "Dice Get Result", "ReadonlyTypeParams": {}, "Inputs": [ { - "Name": "Object", - "ReadonlyType": "Rec Room Object", + "Name": "Target", + "ReadonlyType": "Die", "Description": "" - }, + } + ], + "Outputs": [ { - "Name": "Tag", - "ReadonlyType": "string", + "Name": "Result", + "ReadonlyType": "int", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Object", + "Dice" + ] + } + ] + }, + "b8735ad9-cd89-4d81-ab9b-be3eb50e3b5a": { + "ReadonlyPaletteName": "Dice Get Roll finished", + "ReadonlyChipName": "Dice Get Roll finished", + "Description": "Outputs an exec when the dice finished rolling.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Dice Get Roll finished", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "Target", + "ReadonlyType": "Die", "Description": "" } ], "Outputs": [ { - "Name": "Has Tag", + "Name": "Roll Finished", "ReadonlyType": "bool", "Description": "" } @@ -3632,44 +4003,86 @@ { "FilterPath": [ "Object", - "Rec Room Object" + "Dice" ] } ] }, - "7077d139-9876-495e-9756-58150fef9f3b": { - "ReadonlyPaletteName": "Rec Room Object Variable", - "ReadonlyChipName": "Rec Room Object Variable", - "Description": "", + "182e1ae2-1183-4741-af6e-f307b788a857": { + "ReadonlyPaletteName": "Distance", + "ReadonlyChipName": "Distance", + "Description": "Outputs the distance between the input objects.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", - "ChipNameSource": "Code", + "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Rec Room Object Variable", - "ReadonlyTypeParams": {}, + "Name": "Distance", + "ReadonlyTypeParams": { + "T1": "(AI | Combatant | Rec Room Object | Patrol Point | Player | Vector3)", + "T2": "(AI | Combatant | Rec Room Object | Patrol Point | Player | Vector3)" + }, "Inputs": [ { - "Name": "", - "ReadonlyType": "exec", + "Name": "A", + "ReadonlyType": "T1", "Description": "" }, { - "Name": "", - "ReadonlyType": "Rec Room Object", + "Name": "B", + "ReadonlyType": "T2", "Description": "" } ], "Outputs": [ { - "Name": "", - "ReadonlyType": "exec", + "Name": "Distance", + "ReadonlyType": "float", "Description": "" - }, + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Math", + "Vector" + ] + }, + { + "FilterPath": [ + "Physics" + ] + } + ] + }, + "f2eafd78-5f23-44c9-a271-8ff2f0762e71": { + "ReadonlyPaletteName": "Divide", + "ReadonlyChipName": "Divide", + "Description": "Find how many times a value contains another.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Divide", + "ReadonlyTypeParams": { + "T": "(int | float | Vector3)" + }, + "Inputs": [ { - "Name": "", - "ReadonlyType": "Rec Room Object", + "Name": "Value", + "ReadonlyType": "T", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "Quotient", + "ReadonlyType": "T", "Description": "" } ] @@ -3678,29 +4091,29 @@ "NodeFilters": [ { "FilterPath": [ - "Variable", - "Object" + "Math", + "Scalar" ] }, { "FilterPath": [ - "Object", - "Rec Room Object" + "Math", + "Vector" ] } ] }, - "207c6721-b242-4dc2-857d-ebd1ff7c8624": { - "ReadonlyPaletteName": "Rec Room Object Remove Tag", - "ReadonlyChipName": "Rec Room Object Remove Tag", - "Description": "Removes a tag from the object.", - "IsBetaChip": true, + "15e42063-cbae-40f9-a9e4-8226e83217ec": { + "ReadonlyPaletteName": "Emitter Set Color Id", + "ReadonlyChipName": "Emitter Set Color Id", + "Description": "Sets the color for the particles emitted.", + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Rec Room Object Remove Tag", + "Name": "Emitter Set Color Id", "ReadonlyTypeParams": {}, "Inputs": [ { @@ -3710,12 +4123,12 @@ }, { "Name": "Target", - "ReadonlyType": "Rec Room Object", + "ReadonlyType": "Emitter", "Description": "" }, { - "Name": "Tag", - "ReadonlyType": "string", + "Name": "Value", + "ReadonlyType": "int", "Description": "" } ], @@ -3732,22 +4145,22 @@ { "FilterPath": [ "Object", - "Rec Room Object" + "Emitter" ] } ] }, - "fb368814-daaf-475f-ae08-1d01b9d63b8e": { - "ReadonlyPaletteName": "Rec Room Object Remove Tags", - "ReadonlyChipName": "Rec Room Object Remove Tags", - "Description": "Removes the input list of tags from the input object.", + "4263768a-035b-4d8b-b17c-1a7bb0b9b96d": { + "ReadonlyPaletteName": "Emitter Set Color", + "ReadonlyChipName": "Emitter Set Color", + "Description": "Sets the color for the particles emitted.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Rec Room Object Remove Tags", + "Name": "Emitter Set Color", "ReadonlyTypeParams": {}, "Inputs": [ { @@ -3757,12 +4170,12 @@ }, { "Name": "Target", - "ReadonlyType": "Rec Room Object", + "ReadonlyType": "Emitter", "Description": "" }, { - "Name": "Tags", - "ReadonlyType": "List", + "Name": "Color", + "ReadonlyType": "Color", "Description": "" } ], @@ -3779,22 +4192,22 @@ { "FilterPath": [ "Object", - "Rec Room Object" + "Emitter" ] } ] }, - "6809978a-e1fc-403a-a41a-d4e94f22281f": { - "ReadonlyPaletteName": "Consumable Deactivate", - "ReadonlyChipName": "Consumable Deactivate", - "Description": "Sets the input consumable to inactive. Displays the consumable as not active in the backback and allow using another one.", + "36881bd0-7da0-44a7-b6ef-8cd3770fed78": { + "ReadonlyPaletteName": "Emitter Set Looping", + "ReadonlyChipName": "Emitter Set Looping", + "Description": "Makes the emitter emit continuously or not.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Consumable Deactivate", + "Name": "Emitter Set Looping", "ReadonlyTypeParams": {}, "Inputs": [ { @@ -3803,8 +4216,13 @@ "Description": "" }, { - "Name": "Consumable", - "ReadonlyType": "Consumable", + "Name": "Target", + "ReadonlyType": "Emitter", + "Description": "" + }, + { + "Name": "Value", + "ReadonlyType": "bool", "Description": "" } ], @@ -3820,61 +4238,44 @@ "NodeFilters": [ { "FilterPath": [ - "Player", - "Economy", - "Consumable" - ] - }, - { - "FilterPath": [ - "Economy", - "Consumable" + "Object", + "Emitter" ] } ] }, - "cefee2a5-d4a8-4dff-8c4e-bad684ca8d34": { - "ReadonlyPaletteName": "Delay", - "ReadonlyChipName": "Delay", - "Description": "Fires outputs based on the inputted time to delay. The Run exec fires as soon as the node is executed. The After Delay exec fires once the input delay duration has completed. After Canceled fires after the delay node’s Cancel exec has been fired. Cancel cancels all current delays running from this node, except for delays scheduled for the next tick.", + "1fdf4bab-c868-4ffb-8bfc-b2e360450495": { + "ReadonlyPaletteName": "Emitter Set Size", + "ReadonlyChipName": "Emitter Set Size", + "Description": "Sets the size of the particles emitted.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Delay", + "Name": "Emitter Set Size", "ReadonlyTypeParams": {}, "Inputs": [ { - "Name": "Run", + "Name": "", "ReadonlyType": "exec", "Description": "" }, { - "Name": "Delay (s)", - "ReadonlyType": "float", + "Name": "Target", + "ReadonlyType": "Emitter", "Description": "" }, { - "Name": "Cancel", - "ReadonlyType": "exec", + "Name": "Value", + "ReadonlyType": "float", "Description": "" } ], "Outputs": [ { - "Name": "Run", - "ReadonlyType": "exec", - "Description": "" - }, - { - "Name": "After Delay", - "ReadonlyType": "exec", - "Description": "" - }, - { - "Name": "Cancel", + "Name": "", "ReadonlyType": "exec", "Description": "" } @@ -3884,44 +4285,45 @@ "NodeFilters": [ { "FilterPath": [ - "Control Flow" - ] - }, - { - "FilterPath": [ - "Time" - ] - }, - { - "FilterPath": [ - "Commonly Used" + "Object", + "Emitter" ] } ] }, - "c1fdc4fa-fcb4-4ea4-b505-7b1d15fb8117": { - "ReadonlyPaletteName": "Dice Get Player Rolled", - "ReadonlyChipName": "Dice Get Player Rolled", - "Description": "Returns the player who rolled the dice.", + "12446960-d971-475f-b64e-b5c7bb422eca": { + "ReadonlyPaletteName": "Emitter Set Speed", + "ReadonlyChipName": "Emitter Set Speed", + "Description": "Sets the speed particles are emitted.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Dice Get Player Rolled", + "Name": "Emitter Set Speed", "ReadonlyTypeParams": {}, "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, { "Name": "Target", - "ReadonlyType": "Die", + "ReadonlyType": "Emitter", + "Description": "" + }, + { + "Name": "Value", + "ReadonlyType": "float", "Description": "" } ], "Outputs": [ { - "Name": "Player", - "ReadonlyType": "Player", + "Name": "", + "ReadonlyType": "exec", "Description": "" } ] @@ -3931,34 +4333,39 @@ { "FilterPath": [ "Object", - "Dice" + "Emitter" ] } ] }, - "c80e2979-c672-4e7a-81fb-0ed1964e3ea6": { - "ReadonlyPaletteName": "Dice Get Result", - "ReadonlyChipName": "Dice Get Result", - "Description": "Returns the result of the dice.", + "56ebaa0b-256a-40ed-a066-f5663dfa2b59": { + "ReadonlyPaletteName": "Emitter Start", + "ReadonlyChipName": "Emitter Start", + "Description": "Starts emitting particles.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Dice Get Result", + "Name": "Emitter Start", "ReadonlyTypeParams": {}, "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, { "Name": "Target", - "ReadonlyType": "Die", + "ReadonlyType": "Emitter", "Description": "" } ], "Outputs": [ { - "Name": "Result", - "ReadonlyType": "int", + "Name": "", + "ReadonlyType": "exec", "Description": "" } ] @@ -3968,34 +4375,39 @@ { "FilterPath": [ "Object", - "Dice" + "Emitter" ] } ] }, - "b8735ad9-cd89-4d81-ab9b-be3eb50e3b5a": { - "ReadonlyPaletteName": "Dice Get Roll finished", - "ReadonlyChipName": "Dice Get Roll finished", - "Description": "Outputs an exec when the dice finished rolling.", + "23b278c4-5d3d-439d-afa3-ff30c949df97": { + "ReadonlyPaletteName": "Emitter Stop", + "ReadonlyChipName": "Emitter Stop", + "Description": "Stops emitting particles.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Dice Get Roll finished", + "Name": "Emitter Stop", "ReadonlyTypeParams": {}, "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, { "Name": "Target", - "ReadonlyType": "Die", + "ReadonlyType": "Emitter", "Description": "" } ], "Outputs": [ { - "Name": "Roll Finished", - "ReadonlyType": "bool", + "Name": "", + "ReadonlyType": "exec", "Description": "" } ] @@ -4005,42 +4417,41 @@ { "FilterPath": [ "Object", - "Dice" + "Emitter" ] } ] }, - "182e1ae2-1183-4741-af6e-f307b788a857": { - "ReadonlyPaletteName": "Distance", - "ReadonlyChipName": "Distance", - "Description": "Outputs the distance between the input objects.", + "3663225d-e18d-40e6-a234-ef10378528be": { + "ReadonlyPaletteName": "Equals", + "ReadonlyChipName": "Equals", + "Description": "Compares the two input values and outputs True if they are the same. False if they are different.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Distance", + "Name": "Equals", "ReadonlyTypeParams": { - "T1": "(AI | Combatant | Rec Room Object | Patrol Point | Player | Vector3)", - "T2": "(AI | Combatant | Rec Room Object | Patrol Point | Player | Vector3)" + "T": "any" }, "Inputs": [ { "Name": "A", - "ReadonlyType": "T1", + "ReadonlyType": "T", "Description": "" }, { "Name": "B", - "ReadonlyType": "T2", + "ReadonlyType": "T", "Description": "" } ], "Outputs": [ { - "Name": "Distance", - "ReadonlyType": "float", + "Name": "Equals", + "ReadonlyType": "bool", "Description": "" } ] @@ -4049,91 +4460,59 @@ "NodeFilters": [ { "FilterPath": [ - "Math", - "Vector" + "Logic", + "Comparison" ] }, { "FilterPath": [ - "Physics" + "Commonly Used" ] } ] }, - "f2eafd78-5f23-44c9-a271-8ff2f0762e71": { - "ReadonlyPaletteName": "Divide", - "ReadonlyChipName": "Divide", - "Description": "Find how many times a value contains another.", + "7d72a1fa-a434-4437-a73a-51f306a3f55f": { + "ReadonlyPaletteName": "Event Definition", + "ReadonlyChipName": "Event Definition", + "Description": "", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", - "ChipNameSource": "FirstNodeDesc", + "ChipNameSource": "Code", "NodeDescs": [ { - "Name": "Divide", - "ReadonlyTypeParams": { - "T": "(int | float | Vector3)" - }, - "Inputs": [ - { - "Name": "Value", - "ReadonlyType": "T", - "Description": "" - } - ], - "Outputs": [ - { - "Name": "Quotient", - "ReadonlyType": "T", - "Description": "" - } - ] + "Name": "Event Definition", + "ReadonlyTypeParams": {}, + "Inputs": [], + "Outputs": [] } ], "NodeFilters": [ { "FilterPath": [ - "Math", - "Scalar" + "Commonly Used" ] }, { "FilterPath": [ - "Math", - "Vector" + "Event" ] } ] }, - "15e42063-cbae-40f9-a9e4-8226e83217ec": { - "ReadonlyPaletteName": "Emitter Set Color", - "ReadonlyChipName": "Emitter Set Color", - "Description": "Sets the color for the particles emitted.", + "8b533ccb-643a-491d-982c-94417ce99954": { + "ReadonlyPaletteName": "Event Receiver", + "ReadonlyChipName": "Event Receiver", + "Description": "Events are the entry points for all circuit graphs. Events are execution hooks for things like a player loading into the room, or knowing when a Button is pressed. After creating this chip, make sure to use the configure tool to choose the event you want to listen for. You can use the Event Defintion chip to create your own events to add to this list and use with the Event Sender chip.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", - "ChipNameSource": "FirstNodeDesc", + "ChipNameSource": "Code", "NodeDescs": [ { - "Name": "Emitter Set Color", + "Name": "Event Receiver", "ReadonlyTypeParams": {}, - "Inputs": [ - { - "Name": "", - "ReadonlyType": "exec", - "Description": "" - }, - { - "Name": "Target", - "ReadonlyType": "Emitter", - "Description": "" - }, - { - "Name": "Value", - "ReadonlyType": "int", - "Description": "" - } - ], + "Inputs": [], "Outputs": [ { "Name": "", @@ -4146,39 +4525,33 @@ "NodeFilters": [ { "FilterPath": [ - "Object", - "Emitter" + "Event" + ] + }, + { + "FilterPath": [ + "Commonly Used" ] } ] }, - "4263768a-035b-4d8b-b17c-1a7bb0b9b96d": { - "ReadonlyPaletteName": "Emitter Set Color V2", - "ReadonlyChipName": "Emitter Set Color V2", - "Description": "Sets the color for the particles emitted.", - "IsBetaChip": true, + "96a8fe50-bc37-458b-bac9-582d45314779": { + "ReadonlyPaletteName": "Event Sender", + "ReadonlyChipName": "Event Sender", + "Description": "Use the Event Sender to fire your custom events defined in Event Defintions. After creating this chip, make sure to use the configure tool to change the event that you want to fire. You can also change who you want to send the event to from the config menu.", + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", - "ChipNameSource": "FirstNodeDesc", + "ChipNameSource": "Code", "NodeDescs": [ { - "Name": "Emitter Set Color V2", + "Name": "Event Sender", "ReadonlyTypeParams": {}, "Inputs": [ { "Name": "", "ReadonlyType": "exec", "Description": "" - }, - { - "Name": "Target", - "ReadonlyType": "Emitter", - "Description": "" - }, - { - "Name": "Color", - "ReadonlyType": "Color", - "Description": "" } ], "Outputs": [ @@ -4193,23 +4566,27 @@ "NodeFilters": [ { "FilterPath": [ - "Object", - "Emitter" + "Event" + ] + }, + { + "FilterPath": [ + "Commonly Used" ] } ] }, - "36881bd0-7da0-44a7-b6ef-8cd3770fed78": { - "ReadonlyPaletteName": "Emitter Set Looping", - "ReadonlyChipName": "Emitter Set Looping", - "Description": "Makes the emitter emit continuously or not.", + "0387e4c7-b917-4d19-937f-5da37b9f41cc": { + "ReadonlyPaletteName": "Execution Integer Switch", + "ReadonlyChipName": "Execution Integer Switch", + "Description": "Executes the associated output of the compare value that matches the 'match' input. Executes the default output if no match can be found.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Emitter Set Looping", + "Name": "Execution Integer Switch", "ReadonlyTypeParams": {}, "Inputs": [ { @@ -4218,19 +4595,14 @@ "Description": "" }, { - "Name": "Target", - "ReadonlyType": "Emitter", - "Description": "" - }, - { - "Name": "Value", - "ReadonlyType": "bool", + "Name": "Match", + "ReadonlyType": "int", "Description": "" } ], "Outputs": [ { - "Name": "", + "Name": "Failed", "ReadonlyType": "exec", "Description": "" } @@ -4240,23 +4612,28 @@ "NodeFilters": [ { "FilterPath": [ - "Object", - "Emitter" + "Logic", + "Control Flow" + ] + }, + { + "FilterPath": [ + "Control Flow" ] } ] }, - "1fdf4bab-c868-4ffb-8bfc-b2e360450495": { - "ReadonlyPaletteName": "Emitter Set Size", - "ReadonlyChipName": "Emitter Set Size", - "Description": "Sets the size of the particles emitted.", + "80c7d803-df40-45a5-ac7b-bfccb0b511c7": { + "ReadonlyPaletteName": "Execution String Switch", + "ReadonlyChipName": "Execution String Switch", + "Description": "Executes the associated output of the compare value that matches the 'match' input. Executes the default output if no match can be found.", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Emitter Set Size", + "Name": "Execution String Switch", "ReadonlyTypeParams": {}, "Inputs": [ { @@ -4265,19 +4642,14 @@ "Description": "" }, { - "Name": "Target", - "ReadonlyType": "Emitter", - "Description": "" - }, - { - "Name": "Value", - "ReadonlyType": "float", + "Name": "Match", + "ReadonlyType": "string", "Description": "" } ], "Outputs": [ { - "Name": "", + "Name": "Failed", "ReadonlyType": "exec", "Description": "" } @@ -4287,23 +4659,28 @@ "NodeFilters": [ { "FilterPath": [ - "Object", - "Emitter" + "Logic", + "Control Flow" + ] + }, + { + "FilterPath": [ + "Control Flow" ] } ] }, - "12446960-d971-475f-b64e-b5c7bb422eca": { - "ReadonlyPaletteName": "Emitter Set Speed", - "ReadonlyChipName": "Emitter Set Speed", - "Description": "Sets the speed particles are emitted.", + "49774675-e750-441f-9e92-8455232f1703": { + "ReadonlyPaletteName": "Explosion Emitter Explode", + "ReadonlyChipName": "Explosion Emitter Explode", + "Description": "", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Emitter Set Speed", + "Name": "Explosion Emitter Explode", "ReadonlyTypeParams": {}, "Inputs": [ { @@ -4313,12 +4690,7 @@ }, { "Name": "Target", - "ReadonlyType": "Emitter", - "Description": "" - }, - { - "Name": "Value", - "ReadonlyType": "float", + "ReadonlyType": "Explosion Emitter", "Description": "" } ], @@ -4335,39 +4707,34 @@ { "FilterPath": [ "Object", - "Emitter" + "Explosion Emitter" ] } ] }, - "56ebaa0b-256a-40ed-a066-f5663dfa2b59": { - "ReadonlyPaletteName": "Emitter Start", - "ReadonlyChipName": "Emitter Start", - "Description": "Starts emitting particles.", + "6039d63b-f484-4436-bb7c-ea58529ed4ec": { + "ReadonlyPaletteName": "Explosion Emitter Get Explosion Color", + "ReadonlyChipName": "Explosion Emitter Get Explosion Color", + "Description": "", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Emitter Start", + "Name": "Explosion Emitter Get Explosion Color", "ReadonlyTypeParams": {}, "Inputs": [ - { - "Name": "", - "ReadonlyType": "exec", - "Description": "" - }, { "Name": "Target", - "ReadonlyType": "Emitter", + "ReadonlyType": "Explosion Emitter", "Description": "" } ], "Outputs": [ { - "Name": "", - "ReadonlyType": "exec", + "Name": "Color", + "ReadonlyType": "Color", "Description": "" } ] @@ -4377,39 +4744,34 @@ { "FilterPath": [ "Object", - "Emitter" + "Explosion Emitter" ] } ] }, - "23b278c4-5d3d-439d-afa3-ff30c949df97": { - "ReadonlyPaletteName": "Emitter Stop", - "ReadonlyChipName": "Emitter Stop", - "Description": "Stops emitting particles.", + "87d94359-da69-49ed-8b61-fbf78d79fa48": { + "ReadonlyPaletteName": "Explosion Emitter Get Damage", + "ReadonlyChipName": "Explosion Emitter Get Damage", + "Description": "", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Emitter Stop", + "Name": "Explosion Emitter Get Damage", "ReadonlyTypeParams": {}, "Inputs": [ - { - "Name": "", - "ReadonlyType": "exec", - "Description": "" - }, { "Name": "Target", - "ReadonlyType": "Emitter", + "ReadonlyType": "Explosion Emitter", "Description": "" } ], "Outputs": [ { - "Name": "", - "ReadonlyType": "exec", + "Name": "Damage", + "ReadonlyType": "int", "Description": "" } ] @@ -4419,41 +4781,34 @@ { "FilterPath": [ "Object", - "Emitter" + "Explosion Emitter" ] } ] }, - "3663225d-e18d-40e6-a234-ef10378528be": { - "ReadonlyPaletteName": "Equals", - "ReadonlyChipName": "Equals", - "Description": "Compares the two input values and outputs True if they are the same. False if they are different.", + "eff7cfca-dcee-4ea1-887f-e4c60f3c8269": { + "ReadonlyPaletteName": "Explosion Emitter Get Explosion Radius", + "ReadonlyChipName": "Explosion Emitter Get Explosion Radius", + "Description": "", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Equals", - "ReadonlyTypeParams": { - "T": "any" - }, + "Name": "Explosion Emitter Get Explosion Radius", + "ReadonlyTypeParams": {}, "Inputs": [ { - "Name": "A", - "ReadonlyType": "T", - "Description": "" - }, - { - "Name": "B", - "ReadonlyType": "T", + "Name": "Target", + "ReadonlyType": "Explosion Emitter", "Description": "" } ], "Outputs": [ { - "Name": "Equals", - "ReadonlyType": "bool", + "Name": "Radius", + "ReadonlyType": "float", "Description": "" } ] @@ -4462,59 +4817,88 @@ "NodeFilters": [ { "FilterPath": [ - "Logic", - "Comparison" - ] - }, - { - "FilterPath": [ - "Commonly Used" + "Object", + "Explosion Emitter" ] } ] }, - "7d72a1fa-a434-4437-a73a-51f306a3f55f": { - "ReadonlyPaletteName": "Event Definition", - "ReadonlyChipName": "Event Definition", + "a3211c4f-9924-4a9a-afea-ab48f37bbc67": { + "ReadonlyPaletteName": "Explosion Emitter Set Explosion Color", + "ReadonlyChipName": "Explosion Emitter Set Explosion Color", "Description": "", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", - "ChipNameSource": "Code", + "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Event Definition", + "Name": "Explosion Emitter Set Explosion Color", "ReadonlyTypeParams": {}, - "Inputs": [], - "Outputs": [] + "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Target", + "ReadonlyType": "Explosion Emitter", + "Description": "" + }, + { + "Name": "Color", + "ReadonlyType": "Color", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + } + ] } ], "NodeFilters": [ { "FilterPath": [ - "Commonly Used" - ] - }, - { - "FilterPath": [ - "Event" + "Object", + "Explosion Emitter" ] } ] }, - "8b533ccb-643a-491d-982c-94417ce99954": { - "ReadonlyPaletteName": "Event Receiver", - "ReadonlyChipName": "Event Receiver", - "Description": "Events are the entry points for all circuit graphs. Events are execution hooks for things like a player loading into the room, or knowing when a Button is pressed. After creating this chip, make sure to use the configure tool to choose the event you want to listen for. You can use the Event Defintion chip to create your own events to add to this list and use with the Event Sender chip.", + "748f210d-f9e2-4dca-a29a-8eacf99daff7": { + "ReadonlyPaletteName": "Explosion Emitter Set Damage", + "ReadonlyChipName": "Explosion Emitter Set Damage", + "Description": "", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", - "ChipNameSource": "Code", + "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Event Receiver", + "Name": "Explosion Emitter Set Damage", "ReadonlyTypeParams": {}, - "Inputs": [], + "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Target", + "ReadonlyType": "Explosion Emitter", + "Description": "" + }, + { + "Name": "Damage", + "ReadonlyType": "int", + "Description": "" + } + ], "Outputs": [ { "Name": "", @@ -4527,33 +4911,39 @@ "NodeFilters": [ { "FilterPath": [ - "Event" - ] - }, - { - "FilterPath": [ - "Commonly Used" + "Object", + "Explosion Emitter" ] } ] }, - "96a8fe50-bc37-458b-bac9-582d45314779": { - "ReadonlyPaletteName": "Event Sender", - "ReadonlyChipName": "Event Sender", - "Description": "Use the Event Sender to fire your custom events defined in Event Defintions. After creating this chip, make sure to use the configure tool to change the event that you want to fire. You can also change who you want to send the event to from the config menu.", + "672e473f-7099-4f76-aead-8b3df7c2fcd2": { + "ReadonlyPaletteName": "Explosion Emitter Set Explosion Radius", + "ReadonlyChipName": "Explosion Emitter Set Explosion Radius", + "Description": "", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", - "ChipNameSource": "Code", + "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Event Sender", + "Name": "Explosion Emitter Set Explosion Radius", "ReadonlyTypeParams": {}, "Inputs": [ { "Name": "", "ReadonlyType": "exec", "Description": "" + }, + { + "Name": "Target", + "ReadonlyType": "Explosion Emitter", + "Description": "" + }, + { + "Name": "Radius", + "ReadonlyType": "float", + "Description": "" } ], "Outputs": [ @@ -4568,12 +4958,8 @@ "NodeFilters": [ { "FilterPath": [ - "Event" - ] - }, - { - "FilterPath": [ - "Commonly Used" + "Object", + "Explosion Emitter" ] } ] @@ -5100,7 +5486,7 @@ "ReadonlyPaletteName": "Get Any Player with Role", "ReadonlyChipName": "Get Any Player with Role", "Description": "Gets a player with the role. Returns invalid player if no player has the role.", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -5133,6 +5519,50 @@ } ] }, + "cb909206-8627-4c66-ac8d-47b1a046ef8b": { + "ReadonlyPaletteName": "Get First Tag", + "ReadonlyChipName": "Get First Tag", + "Description": "Gets the first tag of an object or player.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Get First Tag", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "Target", + "ReadonlyType": "Taggable", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "Tag", + "ReadonlyType": "string", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Object", + "Rec Room Object", + "Tag" + ] + }, + { + "FilterPath": [ + "Player", + "Tag" + ] + } + ] + }, "88f95338-d1a6-4fad-8424-d714d651f6ac": { "ReadonlyPaletteName": "Get Forward Vector", "ReadonlyChipName": "Get Forward Vector", @@ -5822,6 +6252,50 @@ } ] }, + "e67cfcb7-03e8-4152-ba41-af8ca61d93fb": { + "ReadonlyPaletteName": "Get Tags", + "ReadonlyChipName": "Get Tags", + "Description": "Outputs a list of tags the input object or player has.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Get Tags", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "Target", + "ReadonlyType": "Taggable", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "Tags", + "ReadonlyType": "List", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Object", + "Rec Room Object", + "Tag" + ] + }, + { + "FilterPath": [ + "Player", + "Tag" + ] + } + ] + }, "830f781d-2522-4ec0-9d6f-ecfc0bf695f6": { "ReadonlyPaletteName": "Get Up Vector", "ReadonlyChipName": "Get Up Vector", @@ -6630,13 +7104,55 @@ ], "Outputs": [ { - "Name": "Success", - "ReadonlyType": "exec", - "Description": "" - }, - { - "Name": "Failure", - "ReadonlyType": "exec", + "Name": "Success", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Failure", + "ReadonlyType": "exec", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Object", + "Vehicle" + ] + } + ] + }, + "bc3011d2-c085-490e-a450-195ff3a27009": { + "ReadonlyPaletteName": "Has Tag", + "ReadonlyChipName": "Has Tag", + "Description": "Outputs True if the input object or player has the input tag.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Has Tag", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "Target", + "ReadonlyType": "Taggable", + "Description": "" + }, + { + "Name": "Tag", + "ReadonlyType": "string", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "Has Tag", + "ReadonlyType": "bool", "Description": "" } ] @@ -6646,14 +7162,21 @@ { "FilterPath": [ "Object", - "Vehicle" + "Rec Room Object", + "Tag" + ] + }, + { + "FilterPath": [ + "Player", + "Tag" ] } ] }, "a4f8a9a1-fd7b-4702-8345-93ae4d57f333": { - "ReadonlyPaletteName": "If Expression", - "ReadonlyChipName": "If Expression", + "ReadonlyPaletteName": "If Value", + "ReadonlyChipName": "If Value", "Description": "Outputs one input value based on the input condition. Outputs the \"Then\" input if the input condition is True. Outputs the \"Else\" input if the input condition is False. Only reads one of the inputs, not both.", "IsBetaChip": false, "DeprecationStage": "Active", @@ -6661,7 +7184,7 @@ "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "If Expression", + "Name": "If Value", "ReadonlyTypeParams": { "T": "any" }, @@ -7352,6 +7875,120 @@ } ] }, + "de407f3c-2fb0-4c9a-9dc4-fb6d6709737e": { + "ReadonlyPaletteName": "Invisible Collision Get Enabled", + "ReadonlyChipName": "Invisible Collision Get Enabled", + "Description": "Outputs True if the target Invisible Collision object is enabled.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Invisible Collision Get Enabled", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "Target", + "ReadonlyType": "Invisible Collision", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "Enabled", + "ReadonlyType": "bool", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Object", + "Invisible Collision" + ] + } + ] + }, + "a5b78c7e-d718-44d4-91c4-7f795bf73814": { + "ReadonlyPaletteName": "Invisible Collision Set Enabled", + "ReadonlyChipName": "Invisible Collision Set Enabled", + "Description": "Sets the enabled state of a target Invisible Collision object.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Invisible Collision Set Enabled", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Target", + "ReadonlyType": "Invisible Collision", + "Description": "" + }, + { + "Name": "Enabled", + "ReadonlyType": "bool", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Object", + "Invisible Collision" + ] + } + ] + }, + "aa263220-c6aa-4789-b09c-c73d7fa144fd": { + "ReadonlyPaletteName": "Get Is Private Instance", + "ReadonlyChipName": "Get Is Private Instance", + "Description": "Returns True if the current room instance is private.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Get Is Private Instance", + "ReadonlyTypeParams": {}, + "Inputs": [], + "Outputs": [ + { + "Name": "Is Private Instance", + "ReadonlyType": "bool", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Utilities" + ] + } + ] + }, "24a1be50-ef1b-4e54-836b-4a2a95780b4e": { "ReadonlyPaletteName": "Is Valid", "ReadonlyChipName": "Is Valid", @@ -7634,8 +8271,8 @@ ] }, "2b6d9368-2ddc-41fb-ac14-b1a3561b19fc": { - "ReadonlyPaletteName": "Light Set Color", - "ReadonlyChipName": "Light Set Color", + "ReadonlyPaletteName": "Light Set Color Id", + "ReadonlyChipName": "Light Set Color Id", "Description": "Sets the color for a point light or a spotlight.", "IsBetaChip": false, "DeprecationStage": "Active", @@ -7643,7 +8280,7 @@ "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Light Set Color", + "Name": "Light Set Color Id", "ReadonlyTypeParams": {}, "Inputs": [ { @@ -7681,16 +8318,16 @@ ] }, "b2698906-68bd-4ea3-be98-35a23615b522": { - "ReadonlyPaletteName": "Light Set Color V2", - "ReadonlyChipName": "Light Set Color V2", + "ReadonlyPaletteName": "Light Set Color", + "ReadonlyChipName": "Light Set Color", "Description": "Sets the color for a point light or a spotlight.", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Light Set Color V2", + "Name": "Light Set Color", "ReadonlyTypeParams": {}, "Inputs": [ { @@ -7915,6 +8552,86 @@ } ] }, + "7876451d-982d-4880-b78b-b3d02389af2c": { + "ReadonlyPaletteName": "Light Set Softness", + "ReadonlyChipName": "Light Set Softness", + "Description": "", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Light Set Softness", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Target", + "ReadonlyType": "Light", + "Description": "" + }, + { + "Name": "Softness", + "ReadonlyType": "float", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + } + ] + } + ], + "NodeFilters": [] + }, + "723817f6-9562-4f36-b3cc-1c66da5ac3c6": { + "ReadonlyPaletteName": "Light Set Specular Contribution", + "ReadonlyChipName": "Light Set Specular Contribution", + "Description": "", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Light Set Specular Contribution", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Target", + "ReadonlyType": "Light", + "Description": "" + }, + { + "Name": "Specular Contribution", + "ReadonlyType": "float", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + } + ] + } + ], + "NodeFilters": [] + }, "0f96406e-af69-4f6c-a430-c6b004457ef4": { "ReadonlyPaletteName": "Light Turn Off", "ReadonlyChipName": "Light Turn Off", @@ -8211,7 +8928,7 @@ "ReadonlyPaletteName": "List Variable", "ReadonlyChipName": "List Variable", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "Code", @@ -9763,6 +10480,57 @@ } ] }, + "23ce1dae-7585-43af-92c1-9a72fa5d0101": { + "ReadonlyPaletteName": "Overlap Sphere", + "ReadonlyChipName": "Overlap Sphere", + "Description": "", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Overlap Sphere", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Origin", + "ReadonlyType": "Vector3", + "Description": "" + }, + { + "Name": "Radius", + "ReadonlyType": "float", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Collisions", + "ReadonlyType": "List", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Physics" + ] + } + ] + }, "92c05ebc-1967-49a4-94b5-2d01fe1e6b85": { "ReadonlyPaletteName": "Parse Bool", "ReadonlyChipName": "Parse Bool", @@ -10382,11 +11150,48 @@ "FilterPath": [ "Utilities" ] - }, + }, + { + "FilterPath": [ + "Player", + "Utilities" + ] + } + ] + }, + "8286a047-19a2-4ad0-bdec-833f35adf4f2": { + "ReadonlyPaletteName": "Player Get All with Tag", + "ReadonlyChipName": "Player Get All with Tag", + "Description": "Searches the room for all players with the input tag and outputs them as a list.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Player Get All with Tag", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "Tag", + "ReadonlyType": "string", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "Players with Tag", + "ReadonlyType": "List", + "Description": "" + } + ] + } + ], + "NodeFilters": [ { "FilterPath": [ "Player", - "Utilities" + "Tag" ] } ] @@ -10448,6 +11253,43 @@ } ] }, + "48364320-cb02-41d8-9d8f-50291131dad2": { + "ReadonlyPaletteName": "Player Get First with Tag", + "ReadonlyChipName": "Player Get First with Tag", + "Description": "Gets the first player with the input tag.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Player Get First with Tag", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "Tag", + "ReadonlyType": "string", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "Player", + "ReadonlyType": "Player", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Player", + "Tag" + ] + } + ] + }, "4646dbed-e616-470e-8e0c-eb446b91838b": { "ReadonlyPaletteName": "Player Get Is Local", "ReadonlyChipName": "Player Get Is Local", @@ -11171,7 +12013,7 @@ "ReadonlyPaletteName": "Projectile Launcher Fire Projectile", "ReadonlyChipName": "Projectile Launcher Fire Projectile", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -11218,7 +12060,7 @@ "ReadonlyPaletteName": "Projectile Launcher Get Projectile Color", "ReadonlyChipName": "Projectile Launcher Get Projectile Color", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -11255,7 +12097,7 @@ "ReadonlyPaletteName": "Projectile Launcher Get Hand Damage", "ReadonlyChipName": "Projectile Launcher Get Hand Damage", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -11292,7 +12134,7 @@ "ReadonlyPaletteName": "Projectile Launcher Get Head Damage", "ReadonlyChipName": "Projectile Launcher Get Head Damage", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -11329,7 +12171,7 @@ "ReadonlyPaletteName": "Projectile Launcher Get Projectile Speed", "ReadonlyChipName": "Projectile Launcher Get Projectile Speed", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -11366,7 +12208,7 @@ "ReadonlyPaletteName": "Projectile Launcher Get Torso Damage", "ReadonlyChipName": "Projectile Launcher Get Torso Damage", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -11403,7 +12245,7 @@ "ReadonlyPaletteName": "Projectile Launcher Set Projectile Color", "ReadonlyChipName": "Projectile Launcher Set Projectile Color", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -11450,7 +12292,7 @@ "ReadonlyPaletteName": "Projectile Launcher Set Hand Damage", "ReadonlyChipName": "Projectile Launcher Set Hand Damage", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -11497,7 +12339,7 @@ "ReadonlyPaletteName": "Projectile Launcher Set Head Damage", "ReadonlyChipName": "Projectile Launcher Set Head Damage", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -11544,7 +12386,7 @@ "ReadonlyPaletteName": "Projectile Launcher Set Projectile Speed", "ReadonlyChipName": "Projectile Launcher Set Projectile Speed", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -11591,7 +12433,7 @@ "ReadonlyPaletteName": "Projectile Launcher Set Torso Damage", "ReadonlyChipName": "Projectile Launcher Set Torso Damage", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -12451,7 +13293,7 @@ "d253cef6-dd99-4357-b98a-e09a0c23bad7": { "ReadonlyPaletteName": "Random From List", "ReadonlyChipName": "Random From List", - "Description": "Outputs a random value from a target list.", + "Description": "", "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", @@ -12488,14 +13330,7 @@ ] } ], - "NodeFilters": [ - { - "FilterPath": [ - "List", - "Utilities" - ] - } - ] + "NodeFilters": [] }, "fb2645f0-4042-4ef1-b988-af2f80e651ec": { "ReadonlyPaletteName": "Random Int", @@ -12620,6 +13455,114 @@ } ] }, + "207c6721-b242-4dc2-857d-ebd1ff7c8624": { + "ReadonlyPaletteName": "Remove Tag", + "ReadonlyChipName": "Remove Tag", + "Description": "Removes a tag from the input object or player.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Remove Tag", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Target", + "ReadonlyType": "Taggable", + "Description": "" + }, + { + "Name": "Tag", + "ReadonlyType": "string", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Object", + "Rec Room Object", + "Tag" + ] + }, + { + "FilterPath": [ + "Player", + "Tag" + ] + } + ] + }, + "fb368814-daaf-475f-ae08-1d01b9d63b8e": { + "ReadonlyPaletteName": "Remove Tags", + "ReadonlyChipName": "Remove Tags", + "Description": "Removes the input list of tags from the input object or player.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Remove Tags", + "ReadonlyTypeParams": {}, + "Inputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + }, + { + "Name": "Target", + "ReadonlyType": "Taggable", + "Description": "" + }, + { + "Name": "Tags", + "ReadonlyType": "List", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "", + "ReadonlyType": "exec", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Object", + "Rec Room Object", + "Tag" + ] + }, + { + "FilterPath": [ + "Player", + "Tag" + ] + } + ] + }, "f8db4ba2-7380-49a0-a0ba-bcdca11fec96": { "ReadonlyPaletteName": "Reroute", "ReadonlyChipName": "Reroute", @@ -13316,7 +14259,7 @@ "ReadonlyPaletteName": "Sample Audio", "ReadonlyChipName": "Sample Audio", "Description": "", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -13816,7 +14759,7 @@ "ReadonlyPaletteName": "Set Rotation", "ReadonlyChipName": "Set Rotation", "Description": "Sets the rotation of the target player or object. Players will rotate about the vertical axis only. Will fail in the following cases: If the target object is currently held, select/frozen by the maker pen, or is the child of a gizmo. Will also fail on players that are seated.", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -13877,7 +14820,7 @@ "ReadonlyPaletteName": "Set Transform", "ReadonlyChipName": "Set Transform", "Description": "Sets the transform (position and rotation) of the target player or object. Players will rotate about the vertical axis only. Will fail in the following cases: If the target object is currently held, select/frozen by the maker pen, or is the child of a gizmo. Will also fail on players that are seated.", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -14380,7 +15323,7 @@ "ReadonlyPaletteName": "Spherecast", "ReadonlyChipName": "Spherecast", "Description": "Fires an invisible sphere of the specified Radius from the Start Position, in the Direction specified. Returns true if any object or player is hit within the target Max Distance. Otherwise, returns false. You can configure the chip itself to ignore players or objects specifically.", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", @@ -14988,8 +15931,8 @@ ] }, "20b2528d-96a9-4be8-9782-aa75959f5232": { - "ReadonlyPaletteName": "Text Set Color", - "ReadonlyChipName": "Text Set Color", + "ReadonlyPaletteName": "Text Set Color Id", + "ReadonlyChipName": "Text Set Color Id", "Description": "Sets the color for a Text object.", "IsBetaChip": false, "DeprecationStage": "Active", @@ -14997,7 +15940,7 @@ "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Text Set Color", + "Name": "Text Set Color Id", "ReadonlyTypeParams": {}, "Inputs": [ { @@ -15035,16 +15978,16 @@ ] }, "0bfaa337-46a1-472f-beac-12faa21867d4": { - "ReadonlyPaletteName": "Text Set Color V2", - "ReadonlyChipName": "Text Set Color V2", + "ReadonlyPaletteName": "Text Set Color", + "ReadonlyChipName": "Text Set Color", "Description": "Sets the color for a Text object.", - "IsBetaChip": true, + "IsBetaChip": false, "DeprecationStage": "Active", "PaletteNameSource": "FirstNodeDesc", "ChipNameSource": "FirstNodeDesc", "NodeDescs": [ { - "Name": "Text Set Color V2", + "Name": "Text Set Color", "ReadonlyTypeParams": {}, "Inputs": [ { @@ -15759,6 +16702,92 @@ } ] }, + "be534038-473e-40ad-b4e2-abd38a76711b": { + "ReadonlyPaletteName": "Value Integer Switch", + "ReadonlyChipName": "Value Integer Switch", + "Description": "Returns the associated input of the compare value that matches the 'match' input. Returns the default value if no match can be found.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Value Integer Switch", + "ReadonlyTypeParams": { + "T": "any" + }, + "Inputs": [ + { + "Name": "Match", + "ReadonlyType": "int", + "Description": "" + }, + { + "Name": "Default", + "ReadonlyType": "T", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "Data", + "ReadonlyType": "T", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Logic" + ] + } + ] + }, + "2c9dcd54-dd65-498e-8a13-50c221448358": { + "ReadonlyPaletteName": "Value String Switch", + "ReadonlyChipName": "Value String Switch", + "Description": "Returns the associated input of the compare value that matches the 'match' input. Returns the default value if no match can be found.", + "IsBetaChip": false, + "DeprecationStage": "Active", + "PaletteNameSource": "FirstNodeDesc", + "ChipNameSource": "FirstNodeDesc", + "NodeDescs": [ + { + "Name": "Value String Switch", + "ReadonlyTypeParams": { + "T": "any" + }, + "Inputs": [ + { + "Name": "Match", + "ReadonlyType": "string", + "Description": "" + }, + { + "Name": "Default", + "ReadonlyType": "T", + "Description": "" + } + ], + "Outputs": [ + { + "Name": "Data", + "ReadonlyType": "T", + "Description": "" + } + ] + } + ], + "NodeFilters": [ + { + "FilterPath": [ + "Logic" + ] + } + ] + }, "6bd92538-6889-41f3-b819-9511e6f81944": { "ReadonlyPaletteName": "Vector3 Cross", "ReadonlyChipName": "Vector3 Cross", diff --git a/index.html b/index.html index a7d4cac..7b9e8a4 100644 --- a/index.html +++ b/index.html @@ -42,6 +42,18 @@
+
+

Aug 7, 2022 - Hiatuses and 'Hell yeah!'s

+
+
    +
  • Continued work on type intersection logic.
  • +
      +
    • By which I mean finished it!!!
    • +
    • Go to types.html and punch + regenTypes(nodefoo.ins[0]) into the devtools console to view it.
    • +
    +
+

June 8, 2022 - typedef diff --git a/lib/chips2.js b/lib/chips2.js index 2c4c786..dae4f53 100644 --- a/lib/chips2.js +++ b/lib/chips2.js @@ -1,5 +1,4 @@ //Gods-awful type-checking logic. - //TypeName: string, Params: Array function Type(TypeName,Params=[]) { if (!Type.all) Type.all = {}; @@ -177,6 +176,21 @@ Type.prototype.getClasses = function() { } return Array.from(ret); } +Type.prototype.getParams = function(set=new Set()) { + switch(this.mode) { + case 'param': + set.add(this.typename); + this.template.getParams(set); + break; + case 'templated': + case 'union': + case 'tuple': + this.template.map(t => t.getParams(set)); + break; + } + return set; +} + //just makes my life that much easier when writing code. Type.any is nicer than new Type('any') Type.typeDef = (function(typename, name, params=[]) { @@ -258,60 +272,286 @@ function intersect(type1, type2) { } return null; } -function intersectParams(type1, type2) { - const sect = intersect(type1, type2); - if (!(sect ?? false)) return null; - - function walkDown(t, tres) { - const ret = {}; - if (t.mode == "param") { - ret[t.typename] = tres; - } - else if ( - t.mode == tres.mode && - t.typename == tres.typename && - t.template?.length == tres.template?.length - ) { - for (const p in t.template) - ret = {...ret, ...walkDown(t.template[p], tres.template[p])}; +function walkDownParams(t, tres) { + let ret = {}; + if (t.mode == "param") { + ret = {[t.typename]: tres}; + } + else if ( + t.mode == tres.mode && + t.typename == tres.typename && + t.template?.length == tres.template?.length + ) { + for (const p in t.template) + ret = {...ret, ...walkDownParams(t.template[p], tres.template[p])}; + } + return ret; +} + +function Port(name, type, parent, input) { + //basics + this.parent = parent; + this.name = name; + //what have we here + this.base = (type == "exec") ? "exec" : parent.passed.reduce((t, k) => t.resolve(k, parent.params[k]), new Type(type, parent.passed)); + this.resolve() + //what does it do + this.conn = input ? null : new Set(); + this.side = input ? "in" : "out"; + //enter your mommy's SSN + this.id = crypto.randomUUID(); + Port.ports.set(this.id, this); + //on TV! + this._el = {}; + Object.defineProperty(this, 'el', {get: () => this._el, set: val => {this._el.id = ''; this._el = val; val.id = this.id}}) +} +Port.ports = new Map(); +Port.prototype.resolve = function () { + this.type = + (this.base == "exec") ? + "exec" : + this.parent.passed.reduce((t, k) => t.resolve(k, this.parent.params[k]), new Type(this.base, this.parent.passed)); +} +Port.prototype.getIDStr = function () { + return `${this.parent.id}/${this.side}/${this.id}`; +} +Port.getByID = function(str) { + const [id, side, id2] = str.split('/'); + if ( + id !== undefined && + side !== undefined && + id2 !== undefined + ) { + const side = Chip.chips.get(id)[side+'s']; + return side.filter(p => p.id == id2)[0]; + } +} +Port.prototype.remove = function(cb = false) { + if (this.side == "in") + unwireDataIn(this); + else + unwireDataOut(this); + + if (cb) this.parent[this.side + 's'] = this.parent[this.side + 's'].filter(p => p != this); + + Port.ports.delete(this.id); +} + + +function paramRecurse(ports, portCB, cancelCB=()=>false, seenchips=new Set()) { + for (const p of ports) { + if (cancelCB(p)) return; + const c = p.parent; + if (seenchips.has(c)) continue; + portCB(p); + seenchips.add(c); + const params = p.base.getParams(); + if (!params.size) continue; + paramRecurse([...c.ins, ...c.outs].filter(fp => { + for (const par of fp.base.getParams()) + if (params.has(par)) return true; + return false; + }).flatMap(p => (p.conn instanceof Set) ? [...p.conn] : p.conn).filter(p => p), portCB, cancelCB, seenchips); + } + return seenchips; +} + +//TODO: +//Please someone other than me go in and optimize this absolute shitshow. +//There are better ways than this to write code but I am too tired to write them. +//Of the things for future me, or some kind soul: +// refactor this to only do one pass of the graph. +// cache things like getParams() and toString() on first call. +// do something clever to progressively update the types for everything. maybe make related wires share a reference to an object and mutate that. +//Sorry in advance to all people on potato computers trying to run this slow piece of junk + +//future me here, tbh its not too bad and modern js zooms. my perf tests have put me at ease. +//it ciuld be faster, but it should be good for normal use +function regenTypes(ports, base=Type.any) { + if (ports instanceof Port) ports = [ports]; + for (const port of ports) + if (!(port instanceof Port)) throw new TypeError("Can only regen Ports!"); + + //step 1: recursively search for any issues with typing. + // 1A: get all connected chips - Done, see paramRecurse + // 1B: only get chips that share a chain of params. - Done, see paramRecurse + // 1C: aggregate types as you go on. - Done + // 1D: fail if null - Done + const basechips = [...ports]; + let finaltype = base; + const sc = paramRecurse( + basechips, + p => {finaltype = intersect(finaltype, p.base)}, + () => finaltype==null + ); + if (finaltype == null) return false; + + for (const chip of sc) + chip.root.append(`seen! ${finaltype}`); + + //step 2: recursively set all relevant type params, regen UI + paramRecurse(basechips, p => { + let type = finaltype.copy(); + let sect = walkDownParams(p.base, type); + console.log(sect); + p.parent.setParams(sect); + p.parent.regenChip(); + }); + + //step 3: cleanup, clear markers + + return finaltype; + +} +function wireData(port1, port2) { + //step 1: check things + // 1.0: both data? + if (!(port1.base instanceof Type && port2.base instanceof Type)) return false; + + // 1.1: same side? + if (port1.side == port2.side) return false; + + // 1.2: already connected? + const [input, output] = port1.side == "in" ? [port1, port2] : [port2, port1]; + if (output.conn.has(input)) return true; + + // 1.3: disconnect input + let oldconn; + if (input.conn != null) { + oldconn = input.conn; + input.conn = null; + oldconn.conn.delete(input) + } + + //step 2: do the actual stuff + // 2A: they're identical + if (input.type.toString() == output.type.toString()) { + // 2A.1: make the connections + output.conn.add(input); + input.conn = output; + Chip.regenconnections(); + return true; + } + + // 2B: they're different, one+ has params + if (output.base.getParams().size + input.base.getParams().size) { + // 2B.1: make the connections temporarily + output.conn.add(input); + input.conn = output; + // 2B.2: try recursing down them + const type = regenTypes(input); + // 2B.3: rollback if necessarry + if(!type) { + unwireDataIn(input); + if (oldconn) wireData(input, oldconn); } - return ret; + Chip.regenconnections(); + return true; } - const resolution1 = walkDown(type1, sect); - const resolution2 = walkDown(type2, sect); - return [resolution1, resolution2]; + + // 2C: they're different + // 2C.1: rollback everything + if (oldconn) wireData(input, oldconn); + return false; + + //step 3: final bits + // 2.1: regen connections + Chip.regenconnections(); } +function unwireDataIn(input, regen=true) { + const output = input.conn; + if (output == null) return null; + input.conn = null; + output.conn.delete(input); + if(regen) { + const regens = [input, output].filter(p => p.base.getParams().size); + regens.map(r => regenTypes(r)); + } + Chip.regenconnections(); +} +function unwireDataOut(output, regen=true) { + const inputs = [...output.conn]; + if (inputs.length == 0) return []; + output.conn.clear(); + for (const i of inputs) + i.conn = null; + if(regen) { + const regens = [...inputs, output].filter(p => p.base.getParams().size); + regens.map(r => regenTypes(r)); + } + Chip.regenconnections(); +} + +function Chip(Entry, NodeDesc, el) { + this.id = crypto.randomUUID(); -function Chip(Entry) { - this.types = []; - if (Entry.ChipNameSource != "FirstNodeDesc") throw new TypeError("Chip is not FirstNodeDesc mode!"); + this.root = el; - const cur = Entry.NodeDescs[0]; - const params = cur.ReadonlyTypeParams; + const cur = NodeDesc; + const params = Object.fromEntries(Object.entries(cur.ReadonlyTypeParams).map(([n,t]) => [n, new Type(t)])); const passed = Object.keys(params) - - this.root = newEl('div', 'chip'); + + this.chip = Entry; + this.nd = cur; + this.defparams = {...params}; + this.params = {...params}; + this.passed = Object.keys(params); + + const portToType = (input, idx) => ((port) => new Port(port.Name, port.ReadonlyType, this, input, idx)); + let i = 0; + this.ins = cur.Inputs.map(portToType(true, i++)); + i = 0; + this.outs = cur.Outputs.map(portToType(false, i++)); + + this.regenChip(); + //this.regenUI(); + Chip.chips.set(this.id, this); +} +Chip.chips = new Map(); // list that chips register themselves into when constructed. +Chip.connections = new Set(); +Chip.regenconnections = function() { + Chip.connections.clear(); + for (const chip of Chip.chips.values()) { + for (const input of chip.ins) + if (input.type != "exec" && input.conn) + Chip.connections.add(`${input.conn.id} => ${input.id}`); + for (const output of chip.outs) + if (output.type == "exec" && output.conn) + Chip.connections.add(`${output.id} => ${output.conn.id}`); + } +} + +Chip.prototype.setParams = function (params) { + for (const p of Object.keys(params).filter(p => this.passed.includes(p))) + this.params[p] = params[p]; + for (const port of [...this.ins, ...this.outs]) + port.resolve(); +} + +Chip.prototype.regenChip = function () { + this.root.querySelector(".chip")?.remove(); + const chip = newEl('div', 'chip'); + chip.id = this.id; const header = newEl('div', 'chipheader'); - header.innerText = cur.Name; + header.innerText = this.nd.Name; const input = newEl('div', 'input'); const output = newEl('div', 'output'); - this.root.append(header, input, output); + chip.append(header, input, output); const genPort = (port) => { let classes,name; - if (port.ReadonlyType != "exec") { - const type = Object.entries(params).reduce((t,[k,v])=>t.resolve(k,v),new Type(port.ReadonlyType, passed)); - Object.entries(params).forEach(t => type.resolve(t[0], t[1])); - classes = type.getClasses(); - name = type.toString(); - this.types.push(type); + if (port.type != "exec") { + classes = port.type.getClasses(); + name = port.type.toString(); } else { classes = ["exec"]; name = "exec"; } const ret = newEl('div', ''); - ret.innerHTML = port.Name + " "; + ret.id = port.id + ret.innerHTML = port.name + " "; classes.forEach(p => ret.classList.add(p)) + port.el = ret; const tooltip = newEl('div', 'type'); tooltip.innerText = name; @@ -319,11 +559,20 @@ function Chip(Entry) { return [ret, tooltip]; } - input.append(...cur.Inputs.map(genPort).flat()); - output.append(...cur.Outputs.map(genPort).flat()); + input.append(...this.ins.flatMap(genPort)); + output.append(...this.outs.flatMap(genPort)); + this.root.prepend(chip); +} +Chip.prototype.remove = function() { + for (const p of [...this.ins, ...this.outs]) + p.remove(); + Chip.chips.delete(this.id); + this.root.remove(); + //regenconnections } + //chips.js reimplemented with the above let root = document.documentElement; diff --git a/pwathings/appver.json b/pwathings/appver.json index 6923e35..59acae4 100644 --- a/pwathings/appver.json +++ b/pwathings/appver.json @@ -1,3 +1,3 @@ { - "ver": 9 + "ver": 10 } \ No newline at end of file diff --git a/searcher/index.html b/searcher/index.html index 83abf53..c221c8f 100644 --- a/searcher/index.html +++ b/searcher/index.html @@ -19,7 +19,7 @@ - + diff --git a/types.html b/types.html index 81da334..a4ca1be 100644 --- a/types.html +++ b/types.html @@ -27,67 +27,98 @@ -
\ No newline at end of file -- cgit v1.2.3-70-g09d2