mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Rework functionality of leveled nodes (#9852)
Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
This commit is contained in:
parent
7d3972a504
commit
c94d37827d
8 changed files with 79 additions and 34 deletions
|
@ -529,13 +529,13 @@ int ModApiEnvMod::l_set_node_level(lua_State *L)
|
|||
|
||||
// add_node_level(pos, level)
|
||||
// pos = {x=num, y=num, z=num}
|
||||
// level: 0..63
|
||||
// level: -127..127
|
||||
int ModApiEnvMod::l_add_node_level(lua_State *L)
|
||||
{
|
||||
GET_ENV_PTR;
|
||||
|
||||
v3s16 pos = read_v3s16(L, 1);
|
||||
u8 level = 1;
|
||||
s16 level = 1;
|
||||
if(lua_isnumber(L, 2))
|
||||
level = lua_tonumber(L, 2);
|
||||
MapNode n = env->getMap().getNode(pos);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue