Make tangible.find use center={x,y,z} instead of centerx= etc

This commit is contained in:
2024-03-13 15:39:09 -04:00
parent 357e3766fb
commit fd8166f09c
7 changed files with 81 additions and 115 deletions

View File

@@ -143,6 +143,7 @@
#ifndef LUASTACK_HPP
#define LUASTACK_HPP
#include "util.hpp"
#include "wrap-string.hpp"
#include "wrap-set.hpp"
#include <cstring>
@@ -379,6 +380,7 @@ public:
bool isboolean(LuaSlot s) const { return lua_type(L_, s) == LUA_TBOOLEAN; }
bool isnil(LuaSlot s) const { return lua_type(L_, s) == LUA_TNIL; }
bool istoken(LuaSlot s) const { return lua_islightuserdata(L_, s) != 0; }
bool isxyz(LuaSlot s) const;
void checktable(LuaSlot s, const char *n) const { if (!istable(s)) argerr(n, "table"); }
void checkstring(LuaSlot s, const char *n) const { if (!isstring(s)) argerr(n, "string"); }
@@ -391,6 +393,7 @@ public:
void checkboolean(LuaSlot s, const char *n) const { if (!isboolean(s)) argerr(n, "boolean"); }
void checknil(LuaSlot s, const char *n) const { if (!isnil(s)) argerr(n, "nil"); }
void checktoken(LuaSlot s, const char *n) const { if (!istoken(s)) argerr(n, "token"); }
void checkxyz(LuaSlot s, const char *n) const { if (!isxyz(s)) argerr(n, "xyz"); }
bool ckboolean(LuaSlot s) const;
lua_Integer ckinteger(LuaSlot s) const;
@@ -400,6 +403,7 @@ public:
std::string_view ckstringview(LuaSlot s) const;
lua_State *ckthread(LuaSlot s) const;
LuaToken cktoken(LuaSlot s) const;
util::DXYZ ckxyz(LuaSlot s) const;
void clearmetatable(LuaSlot tab) const;
void setmetatable(LuaSlot tab, LuaSlot mt) const;