@@ -21,7 +21,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "lua_api/l_internal.h"
|
||||
#include "cpp_api/s_base.h"
|
||||
#include "content/mods.h"
|
||||
#include <server.h>
|
||||
#include "server.h"
|
||||
#include <cmath>
|
||||
|
||||
ScriptApiBase *ModApiBase::getScriptApiBase(lua_State *L)
|
||||
{
|
||||
@@ -84,3 +85,8 @@ bool ModApiBase::registerFunction(lua_State *L, const char *name,
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ModApiBase::isNaN(lua_State *L, int idx)
|
||||
{
|
||||
return lua_type(L, idx) == LUA_TNUMBER && std::isnan(lua_tonumber(L, idx));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user