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,39 @@
import { createNodeModule } from "../../nodeTypes.js";
/**
* Reads sprite flag data.
*/
export const fgetNode = createNodeModule(
{
id: "graphics_fget",
title: "Get Sprite Flag",
category: "Graphics",
description: "Retrieve the bitfield or specific flag value for a sprite.",
searchTags: ["fget", "flag", "sprite", "meta"],
inputs: [
{
id: "sprite",
name: "Sprite",
direction: "input",
kind: "number",
defaultValue: 0,
},
{ id: "flag", name: "Flag", direction: "input", kind: "number" },
],
outputs: [
{ id: "value", name: "Value", direction: "output", kind: "number" },
],
properties: [],
},
{
evaluateValue: ({ resolveValueInput }) => {
const OMIT = "__pg_omit__";
const sprite = resolveValueInput("sprite", "0");
const flag = resolveValueInput("flag", OMIT);
if (flag === OMIT) {
return `fget(${sprite})`;
}
return `fget(${sprite}, ${flag})`;
},
}
);