Add GetWorldMarker, return position from WorldMarker, rename CanSetWorldMarker

- WorldMarker() now returns x,y,z,areaId on success (was just 1)
- New global GetWorldMarker(index) for querying marker positions
- Rename CanSetWorldMarkers → CanSetWorldMarker (singular)
- Addon uses WorldMarker return values directly instead of GetMarkerDef
This commit is contained in:
MarcelineVQ
2026-03-07 14:10:22 -08:00
parent 4f195c248f
commit 1e8091fcb5
3 changed files with 47 additions and 30 deletions
+2 -1
View File
@@ -100,7 +100,8 @@ fn registerLuaFunctions() void {
// User-facing functions stay global
registerFunction("WorldMarker", @intFromPtr(&markers.luaWorldMarker));
registerFunction("ClearWorldMarker", @intFromPtr(&markers.luaClearWorldMarker));
registerFunction("CanSetWorldMarkers", @intFromPtr(&markers.luaCanSetMarkers));
registerFunction("GetWorldMarker", @intFromPtr(&markers.luaGetWorldMarker));
registerFunction("CanSetWorldMarker", @intFromPtr(&markers.luaCanSetMarkers));
// Internal functions in WorldMarkers table (via luaL_openlib)
const lib = [_]lua.LuaReg{