From 4e2ade1bd76537c808789157f20f8c01654234c3 Mon Sep 17 00:00:00 2001 From: MysterD Date: Mon, 15 May 2023 01:19:10 -0700 Subject: [PATCH] Make GraphNode flags mutable from lua again --- autogen/convert_structs.py | 2 +- docs/lua/structs.md | 4 ++-- src/pc/lua/smlua_cobject_autogen.c | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/autogen/convert_structs.py b/autogen/convert_structs.py index 6532e7e1..b5ba9af5 100644 --- a/autogen/convert_structs.py +++ b/autogen/convert_structs.py @@ -100,7 +100,7 @@ override_field_immutable = { "Painting": [ "id", "imageCount", "textureType", "textureWidth", "textureHeight" ], "SpawnInfo": [ "syncID", "next", "unk18" ], "CustomLevelInfo": [ "next" ], - "GraphNode": [ "*" ], + "GraphNode": [ "children", "next", "parent", "prev", "type" ], "GraphNodeObject": [ "*" ], "ObjectWarpNode": [ "next "], "Animation": [ "length" ], diff --git a/docs/lua/structs.md b/docs/lua/structs.md index db833cf2..7c285c27 100644 --- a/docs/lua/structs.md +++ b/docs/lua/structs.md @@ -811,8 +811,8 @@ | Field | Type | Access | | ----- | ---- | ------ | | children | [GraphNode](structs.md#GraphNode) | read-only | -| extraFlags | `integer` | read-only | -| flags | `integer` | read-only | +| extraFlags | `integer` | | +| flags | `integer` | | | next | [GraphNode](structs.md#GraphNode) | read-only | | parent | [GraphNode](structs.md#GraphNode) | read-only | | prev | [GraphNode](structs.md#GraphNode) | read-only | diff --git a/src/pc/lua/smlua_cobject_autogen.c b/src/pc/lua/smlua_cobject_autogen.c index 188817ac..a0df0c44 100644 --- a/src/pc/lua/smlua_cobject_autogen.c +++ b/src/pc/lua/smlua_cobject_autogen.c @@ -632,14 +632,14 @@ static struct LuaObjectField sGlobalTexturesFields[LUA_GLOBAL_TEXTURES_FIELD_COU #define LUA_GRAPH_NODE_FIELD_COUNT 7 static struct LuaObjectField sGraphNodeFields[LUA_GRAPH_NODE_FIELD_COUNT] = { - { "children", LVT_COBJECT_P, offsetof(struct GraphNode, children), true, LOT_GRAPHNODE }, - { "extraFlags", LVT_U8, offsetof(struct GraphNode, extraFlags), true, LOT_NONE }, - { "flags", LVT_S16, offsetof(struct GraphNode, flags), true, LOT_NONE }, -// { "georef", LVT_???, offsetof(struct GraphNode, georef), true, LOT_??? }, <--- UNIMPLEMENTED - { "next", LVT_COBJECT_P, offsetof(struct GraphNode, next), true, LOT_GRAPHNODE }, - { "parent", LVT_COBJECT_P, offsetof(struct GraphNode, parent), true, LOT_GRAPHNODE }, - { "prev", LVT_COBJECT_P, offsetof(struct GraphNode, prev), true, LOT_GRAPHNODE }, - { "type", LVT_S16, offsetof(struct GraphNode, type), true, LOT_NONE }, + { "children", LVT_COBJECT_P, offsetof(struct GraphNode, children), true, LOT_GRAPHNODE }, + { "extraFlags", LVT_U8, offsetof(struct GraphNode, extraFlags), false, LOT_NONE }, + { "flags", LVT_S16, offsetof(struct GraphNode, flags), false, LOT_NONE }, +// { "georef", LVT_???, offsetof(struct GraphNode, georef), true, LOT_??? }, <--- UNIMPLEMENTED + { "next", LVT_COBJECT_P, offsetof(struct GraphNode, next), true, LOT_GRAPHNODE }, + { "parent", LVT_COBJECT_P, offsetof(struct GraphNode, parent), true, LOT_GRAPHNODE }, + { "prev", LVT_COBJECT_P, offsetof(struct GraphNode, prev), true, LOT_GRAPHNODE }, + { "type", LVT_S16, offsetof(struct GraphNode, type), true, LOT_NONE }, }; #define LUA_GRAPH_NODE_OBJECT_FIELD_COUNT 26