aboutsummaryrefslogtreecommitdiff
path: root/src/nodedef.h
Commit message (Expand)AuthorAge
* Paramtype2: Add missing type CPT2_GLASSLIKE_LIQUID_LEVELparamat2017-03-30
* Content_mapblock.cpp: Refactornumber Zero2017-03-20
* Add hardware node coloring. Includes:Dániel Juhász2017-01-23
* Environment & IGameDef code refactoring (#4985)Ner'zhul2017-01-09
* Improve getPointedThing() (#4346)Dániel Juhász2017-01-04
* Move TileAnimation code to seperate filesfan52017-01-02
* Revert "Adding particle blend, glow and animation (#4705)"sfan52016-11-14
* Adding particle blend, glow and animation (#4705)Foghrye42016-11-15
* Add minetest.unregister_item and minetest.register_alias_forcepaly22016-09-08
* Make plantlike drawtype more funAuke Kok2016-08-26
* Move updateTextures and fillTileAttribs to ContentFeaturesEkdohibs2016-05-23
* Allow nodes to specify which sides to connect to.Auke Kok2016-03-12
* Nodebox: Allow nodeboxes to "connect"Auke Kok2016-03-12
* Add minetest.register_lbm() to run code on block load onlyest312016-03-07
* Fix backface culling when connecting to new servers.Auke Kok2016-02-10
* Backface culling: Ignore setting in tiledef from old servers.Auke Kok2016-01-23
* Liquids: Flow into and destroy 'floodable' nodesparamat2016-01-07
* Add new ContentParamType2 "CPT2_DEGROTATE"est312015-10-04
* Fix relief mapping issuesRealBadAngel2015-07-16
* Add minimap featureRealBadAngel2015-06-27
* Add texture overridingrubenwardy2015-05-19
* Fix compilation for non-client builds, and fix signed comparison warningkwolekr2015-05-08
* NodeResolver: Remove NodeResolveMethodkwolekr2015-05-07
* NodeDefManager: Improve const-correctness of interfaceskwolekr2015-05-05
* Schematics: Refactor NodeResolver and add NodeResolveMethodkwolekr2015-04-16
* Revert "Fix issue #2441: crash on respawn, since a conversion std::list to st...kwolekr2015-03-20
* Finer progress bar updates when initializing nodesest312015-03-15
* Fix issue #2441: crash on respawn, since a conversion std::list to std::vecto...Loic Blot2015-03-05
* Replace std::list to std::vector into tile.cpp (m_texture_trash) and move til...Loic Blot2015-03-05
* NodeResolver: Perform callback immediately if node registration phase finishedkwolekr2015-01-04
* Remove freezemelt (the remainder of proller nonsense)kwolekr2015-01-04
* Fix crash if NodeResolver destroyed before pending any node resolutionskwolekr2015-01-03
* Set fallback content if resolving content vector requires everythingkwolekr2014-12-27
* Redefine NodeResolver interface and replace with callback mechanismkwolekr2014-12-27
* NodeResolver: Fix some comments and use const references for paramskwolekr2014-12-12
* NodeResolver: Fix cancelNode and cancelNodeListkwolekr2014-12-11
* Refactor decoration-related codekwolekr2014-10-29
* Add NodeResolver documentationkwolekr2014-10-28
* Add NodeResolver and clean up node name -> content ID resolution systemkwolekr2014-10-26
* Custom collision boxes node property.RealBadAngel2014-10-19
* Add meshnode drawtype.RealBadAngel2014-10-18
* Add optional framed glasslike drawtypeBlockMen2014-10-02
* Add firelike drawtypeTriBlade92014-09-21
* Allow use all 6 faces for special tiles.RealBadAngel2014-08-25
* Unite nodes shaders.RealBadAngel2014-06-15
* Shaders rework.RealBadAngel2013-12-03
* Add support for different drowning damage and allow drowning in other nodetypesBlockMen2013-08-06
* Leveled nodebox backward compatibilityproller2013-08-02
* Weather supportproller2013-07-27
* Add liquid_range to nodedefPilzAdam2013-07-20
ss="hl opt">(L) == 8) // only spawn for a single player playername = luaL_checkstring(L, 8); } else if (lua_istable(L, 1)) { int table = lua_gettop(L); lua_pushnil(L); while (lua_next(L, table) != 0) { const char *key = lua_tostring(L, -2); if(strcmp(key,"pos")==0){ pos=check_v3f(L, -1); }else if(strcmp(key,"vel")==0){ vel=check_v3f(L, -1); }else if(strcmp(key,"acc")==0){ acc=check_v3f(L, -1); }else if(strcmp(key,"expirationtime")==0){ expirationtime=luaL_checknumber(L, -1); }else if(strcmp(key,"size")==0){ size=luaL_checknumber(L, -1); }else if(strcmp(key,"collisiondetection")==0){ collisiondetection=lua_toboolean(L, -1); }else if(strcmp(key,"vertical")==0){ vertical=lua_toboolean(L, -1); }else if(strcmp(key,"texture")==0){ texture=luaL_checkstring(L, -1); }else if(strcmp(key,"playername")==0){ playername=luaL_checkstring(L, -1); } lua_pop(L, 1); } } if (strcmp(playername, "")==0) // spawn for all players { getServer(L)->spawnParticleAll(pos, vel, acc, expirationtime, size, collisiondetection, vertical, texture); } else { getServer(L)->spawnParticle(playername, pos, vel, acc, expirationtime, size, collisiondetection, vertical, texture); } return 1; } // add_particlespawner({amount=, time=, // minpos=, maxpos=, // minvel=, maxvel=, // minacc=, maxacc=, // minexptime=, maxexptime=, // minsize=, maxsize=, // collisiondetection=, // vertical=, // texture=, // player=}) // minpos/maxpos/minvel/maxvel/minacc/maxacc = {x=num, y=num, z=num} // minexptime/maxexptime = num (seconds) // minsize/maxsize = num // collisiondetection = bool // vertical = bool // texture = e.g."default_wood.png" int ModApiParticles::l_add_particlespawner(lua_State *L) { // Get parameters u16 amount = 1; v3f minpos, maxpos, minvel, maxvel, minacc, maxacc; minpos= maxpos= minvel= maxvel= minacc= maxacc= v3f(0, 0, 0); float time, minexptime, maxexptime, minsize, maxsize; time= minexptime= maxexptime= minsize= maxsize= 1; bool collisiondetection, vertical; collisiondetection= vertical= false; std::string texture = ""; const char *playername = ""; if (lua_gettop(L) > 1) //deprecated { log_deprecated(L,"Deprecated add_particlespawner call with individual parameters instead of definition"); amount = luaL_checknumber(L, 1); time = luaL_checknumber(L, 2); minpos = check_v3f(L, 3); maxpos = check_v3f(L, 4); minvel = check_v3f(L, 5); maxvel = check_v3f(L, 6); minacc = check_v3f(L, 7); maxacc = check_v3f(L, 8); minexptime = luaL_checknumber(L, 9); maxexptime = luaL_checknumber(L, 10); minsize = luaL_checknumber(L, 11); maxsize = luaL_checknumber(L, 12); collisiondetection = lua_toboolean(L, 13); texture = luaL_checkstring(L, 14); if (lua_gettop(L) == 15) // only spawn for a single player playername = luaL_checkstring(L, 15); } else if (lua_istable(L, 1)) { int table = lua_gettop(L); lua_pushnil(L); while (lua_next(L, table) != 0) { const char *key = lua_tostring(L, -2); if(strcmp(key,"amount")==0){ amount=luaL_checknumber(L, -1); }else if(strcmp(key,"time")==0){ time=luaL_checknumber(L, -1); }else if(strcmp(key,"minpos")==0){ minpos=check_v3f(L, -1); }else if(strcmp(key,"maxpos")==0){ maxpos=check_v3f(L, -1); }else if(strcmp(key,"minvel")==0){ minvel=check_v3f(L, -1); }else if(strcmp(key,"maxvel")==0){ maxvel=check_v3f(L, -1); }else if(strcmp(key,"minacc")==0){ minacc=check_v3f(L, -1); }else if(strcmp(key,"maxacc")==0){ maxacc=check_v3f(L, -1); }else if(strcmp(key,"minexptime")==0){ minexptime=luaL_checknumber(L, -1); }else if(strcmp(key,"maxexptime")==0){ maxexptime=luaL_checknumber(L, -1); }else if(strcmp(key,"minsize")==0){ minsize=luaL_checknumber(L, -1); }else if(strcmp(key,"maxsize")==0){ maxsize=luaL_checknumber(L, -1); }else if(strcmp(key,"collisiondetection")==0){ collisiondetection=lua_toboolean(L, -1); }else if(strcmp(key,"vertical")==0){ vertical=lua_toboolean(L, -1); }else if(strcmp(key,"texture")==0){ texture=luaL_checkstring(L, -1); }else if(strcmp(key,"playername")==0){ playername=luaL_checkstring(L, -1); } lua_pop(L, 1); } } if (strcmp(playername, "")==0) //spawn for all players { u32 id = getServer(L)->addParticleSpawnerAll( amount, time, minpos, maxpos, minvel, maxvel, minacc, maxacc, minexptime, maxexptime, minsize, maxsize, collisiondetection, vertical, texture); lua_pushnumber(L, id); } else { u32 id = getServer(L)->addParticleSpawner(playername, amount, time, minpos, maxpos, minvel, maxvel, minacc, maxacc, minexptime, maxexptime, minsize, maxsize, collisiondetection, vertical, texture); lua_pushnumber(L, id); } return 1; } // delete_particlespawner(id, player) // player (string) is optional int ModApiParticles::l_delete_particlespawner(lua_State *L) { // Get parameters u32 id = luaL_checknumber(L, 1); if (lua_gettop(L) == 2) // only delete for one player { const char *playername = luaL_checkstring(L, 2); getServer(L)->deleteParticleSpawner(playername, id); } else // delete for all players { getServer(L)->deleteParticleSpawnerAll(id); } return 1; } void ModApiParticles::Initialize(lua_State *L, int top) { API_FCT(add_particle); API_FCT(add_particlespawner); API_FCT(delete_particlespawner); }