add utility alias for level-0 leveled nodes.
leveled nodes now have an alias from level 0 to air, meaning that code that changes the level of a node doesn't have to differentiate between setting its level, and removing the node when the level is supposed to be 0.
This commit is contained in:
parent
4436b9068a
commit
2de047d37a
1 changed files with 1 additions and 0 deletions
|
@ -79,4 +79,5 @@ function blockgame.register_leveled_node (name, def)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_alias(fullname, fullname .. "_" .. def.level_max)
|
minetest.register_alias(fullname, fullname .. "_" .. def.level_max)
|
||||||
|
minetest.register_alias(fullname .. "_" .. 0, "air")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue