Initial commit

moved from private version control
This commit is contained in:
2025-10-19 21:12:41 +11:00
parent 5e84773bbe
commit e64f3e881e
187 changed files with 25372 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
import { createNodeModule } from "../../nodeTypes.js";
/**
* Creates a coroutine from a function using coroutine.create().
*/
export const luaCoroutineCreateNode = createNodeModule(
{
id: "lua_coroutine_create",
title: "Coroutine Create",
category: "Lua",
description: "Wrap a function in a coroutine via coroutine.create().",
searchTags: ["coroutine", "create", "lua"],
inputs: [
{
id: "fn",
name: "Function",
direction: "input",
kind: "any",
description: "Function to run inside the coroutine",
},
],
outputs: [
{
id: "coroutine",
name: "Coroutine",
direction: "output",
kind: "any",
},
],
properties: [],
},
{
evaluateValue: ({ resolveValueInput }) => {
const fn = resolveValueInput("fn", "function() end");
return `coroutine.create(${fn})`;
},
}
);