diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2018-06-30 17:11:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-30 17:11:38 +0200 |
commit | eef62c82a2e58700fc1216b0b8c03e421bc77995 (patch) | |
tree | 4c49e659069036cb53d69535dc33d33f29d963f4 /src/script/lua_api/l_particles.cpp | |
parent | 227c71eb76e019873b30e2d3893b68307d51d58f (diff) | |
download | minetest-eef62c82a2e58700fc1216b0b8c03e421bc77995.tar.gz minetest-eef62c82a2e58700fc1216b0b8c03e421bc77995.tar.bz2 minetest-eef62c82a2e58700fc1216b0b8c03e421bc77995.zip |
Modernize lua read (part 2 & 3): C++ templating assurance (#7410)
* Modernize lua read (part 2 & 3): C++ templating assurance
Implement the boolean reader
Implement the string reader
Also remove unused & unimplemented script_error_handler
Add a reader with default value
Diffstat (limited to 'src/script/lua_api/l_particles.cpp')
-rw-r--r-- | src/script/lua_api/l_particles.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/lua_api/l_particles.cpp b/src/script/lua_api/l_particles.cpp index 8a7de8b4f..15bcbf3b5 100644 --- a/src/script/lua_api/l_particles.cpp +++ b/src/script/lua_api/l_particles.cpp @@ -66,7 +66,7 @@ int ModApiParticles::l_add_particle(lua_State *L) acc = check_v3f(L, 3); expirationtime = luaL_checknumber(L, 4); size = luaL_checknumber(L, 5); - collisiondetection = lua_toboolean(L, 6); + collisiondetection = readParam<bool>(L, 6); texture = luaL_checkstring(L, 7); if (lua_gettop(L) == 8) // only spawn for a single player playername = luaL_checkstring(L, 8); @@ -177,7 +177,7 @@ int ModApiParticles::l_add_particlespawner(lua_State *L) maxexptime = luaL_checknumber(L, 10); minsize = luaL_checknumber(L, 11); maxsize = luaL_checknumber(L, 12); - collisiondetection = lua_toboolean(L, 13); + collisiondetection = readParam<bool>(L, 13); texture = luaL_checkstring(L, 14); if (lua_gettop(L) == 15) // only spawn for a single player playername = luaL_checkstring(L, 15); |