Rename sync functions and drop redundant GetMarkerDef

Rename SetMarkerDef → SetMarkerSync, ClearMarkerDef → ClearMarkerSync
to clarify their purpose. Remove GetMarkerDef from the table since
GetWorldMarker is now a public global.
This commit is contained in:
MarcelineVQ
2026-03-07 14:13:41 -08:00
parent 1e8091fcb5
commit 9d51ff1c77
2 changed files with 8 additions and 9 deletions
+3 -4
View File
@@ -103,11 +103,10 @@ fn registerLuaFunctions() void {
registerFunction("GetWorldMarker", @intFromPtr(&markers.luaGetWorldMarker));
registerFunction("CanSetWorldMarker", @intFromPtr(&markers.luaCanSetMarkers));
// Internal functions in WorldMarkers table (via luaL_openlib)
// Sync functions in WorldMarkers table (used by addon message handler)
const lib = [_]lua.LuaReg{
.{ .name = "SetMarkerDef", .func = @intFromPtr(&markers.luaSetMarkerDef) },
.{ .name = "ClearMarkerDef", .func = @intFromPtr(&markers.luaClearMarkerDef) },
.{ .name = "GetMarkerDef", .func = @intFromPtr(&markers.luaGetMarkerDef) },
.{ .name = "SetMarkerSync", .func = @intFromPtr(&markers.luaSetMarkerDef) },
.{ .name = "ClearMarkerSync", .func = @intFromPtr(&markers.luaClearMarkerDef) },
.{ .name = null, .func = 0 }, // sentinel
};
lua.openlib(lua.getContext(), "WorldMarkers", &lib, 0);