aboutsummaryrefslogtreecommitdiff
path: root/src/script/common
Commit message (Expand)AuthorAge
...
* Revert "Adding particle blend, glow and animation (#4705)"sfan52016-11-14
* Adding particle blend, glow and animation (#4705)Foghrye42016-11-15
* Adding LuaError on attempt to assign vectors with values out of rangeFoghrye42016-10-25
* Replace various std::map with UNORDERED_MAP + various cleanupsLoic Blot2016-10-05
* Make some maps unordered to improve performanceLoic Blot2016-10-05
* Make getStackMax return the correct maximal stack sizeSmallJoker2016-09-08
* Lua->C getintfield() use lua_tointeger (#4408)Tomas2016-08-10
* Fixes for compiling with a newer (system) jsoncpp (#4429)Rogier-52016-08-10
* Allow nodes to specify which sides to connect to.Auke Kok2016-03-12
* Nodebox: Allow nodeboxes to "connect"Auke Kok2016-03-12
* Add Lua interface to HTTPFetchRequestJeija2016-02-22
* Allow per-tiles culling.Auke Kok2016-01-20
* Show infotext with description for item entitiesRealBadAngel2016-01-18
* Liquids: Flow into and destroy 'floodable' nodesparamat2016-01-07
* Revert "Add support for using arbitrary meshes as items"Sapier2015-12-29
* Add support for using arbitrary meshes as itemsSapier2015-12-29
* Fix lua object:get_properties() being brokenSapier2015-12-21
* Fix missing popest312015-12-20
* Add support for limiting rotation of automatic face movement dir entitysSapier2015-12-19
* Add option to give every object a nametagBlockMen2015-12-15
* Add support for audio feedback if placing node failedBlockMen2015-11-07
* Fix server crashing on Lua errorsShadowNinja2015-10-31
* Add option to disable backface culling for modelsBlockMen2015-10-25
* Fix crash regression when invsize formspec gets usedest312015-10-17
* Use warningstream for deprecated field messages and refactor log_deprecatedShadowNinja2015-10-15
* Push error handler afresh each time lua_pcall is usedKahrl2015-08-27
* Use numeric indices and raw table access with LUA_REGISTRYINDEXKahrl2015-08-27
* SAPI: Track last executed mod and include in error messageskwolekr2015-08-12
* Display Lua memory usage at the time of Out-of-Memory errorkwolekr2015-08-10
* Improve Script CPP API diagnosticskwolekr2015-08-05
* Fix tiling issues for PLANTLIKE and FIRELIKE with FSAARealBadAngel2015-08-05
* Fix relief mapping issuesRealBadAngel2015-07-16
* Fix code style from recent commits and add misc. optimizationskwolekr2015-07-02
* Add some missing getter functions to the lua APITeTpaAka2015-05-28
* SAPI/Noise: Add PerlinNoiseMap:getMapSlice() functionkwolekr2015-05-17
* SAPI: Accept either ARGB8 table or ColorString to specify colorskwolekr2015-05-16
* Add mod securityShadowNinja2015-05-16
* Add push_ARGB8 to script/common/c_converterTeTpaAka2015-05-15
* Schematics: Add per-node force placement optionkwolekr2015-05-09
* Fix missing Y component assignment in check_v3fkwolekr2015-05-08
* Remove duplicate lua_getfield() in c_converter.cppKevin Ott2015-05-07
* Fix error messages for type-checking Lua reading functionsShadowNinja2015-05-06
* Add 'persistence' alias for Lua noiseparams and validate more vector parameterskwolekr2015-04-19
* Schematics: Refactor NodeResolver and add NodeResolveMethodkwolekr2015-04-16
* Move globals from main.cpp to more sane locationsCraig Robbins2015-04-01
* Clean up and tweak build systemShadowNinja2015-03-27
* Don't use luaL_checkstring to read node names, it's only for argumentsShadowNinja2015-03-07
* For usages of assert() that are meant to persist in Release builds (when NDEB...Craig Robbins2015-03-07
* Remove freezemelt (the remainder of proller nonsense)kwolekr2015-01-04
* Redefine NodeResolver interface and replace with callback mechanismkwolekr2014-12-27
n class="hl kwd">getMap().getNodeTimer(o->m_p); lua_pushboolean(L,(t.timeout != 0)); return 1; } int NodeTimerRef::l_get_timeout(lua_State *L) { MAP_LOCK_REQUIRED; NodeTimerRef *o = checkobject(L, 1); ServerEnvironment *env = o->m_env; if(env == NULL) return 0; NodeTimer t = env->getMap().getNodeTimer(o->m_p); lua_pushnumber(L,t.timeout); return 1; } int NodeTimerRef::l_get_elapsed(lua_State *L) { MAP_LOCK_REQUIRED; NodeTimerRef *o = checkobject(L, 1); ServerEnvironment *env = o->m_env; if(env == NULL) return 0; NodeTimer t = env->getMap().getNodeTimer(o->m_p); lua_pushnumber(L,t.elapsed); return 1; } NodeTimerRef::NodeTimerRef(v3s16 p, ServerEnvironment *env): m_p(p), m_env(env) { } NodeTimerRef::~NodeTimerRef() { } // Creates an NodeTimerRef and leaves it on top of stack // Not callable from Lua; all references are created on the C side. void NodeTimerRef::create(lua_State *L, v3s16 p, ServerEnvironment *env) { NodeTimerRef *o = new NodeTimerRef(p, env); *(void **)(lua_newuserdata(L, sizeof(void *))) = o; luaL_getmetatable(L, className); lua_setmetatable(L, -2); } void NodeTimerRef::set_null(lua_State *L) { NodeTimerRef *o = checkobject(L, -1); o->m_env = NULL; } void NodeTimerRef::Register(lua_State *L) { lua_newtable(L); int methodtable = lua_gettop(L); luaL_newmetatable(L, className); int metatable = lua_gettop(L); lua_pushliteral(L, "__metatable"); lua_pushvalue(L, methodtable); lua_settable(L, metatable); // hide metatable from Lua getmetatable() lua_pushliteral(L, "__index"); lua_pushvalue(L, methodtable); lua_settable(L, metatable); lua_pushliteral(L, "__gc"); lua_pushcfunction(L, gc_object); lua_settable(L, metatable); lua_pop(L, 1); // drop metatable luaL_openlib(L, 0, methods, 0); // fill methodtable lua_pop(L, 1); // drop methodtable // Cannot be created from Lua //lua_register(L, className, create_object); } const char NodeTimerRef::className[] = "NodeTimerRef"; const luaL_Reg NodeTimerRef::methods[] = { luamethod(NodeTimerRef, start), luamethod(NodeTimerRef, set), luamethod(NodeTimerRef, stop), luamethod(NodeTimerRef, is_started), luamethod(NodeTimerRef, get_timeout), luamethod(NodeTimerRef, get_elapsed), {0,0} };