Abort when trying to set a not registered node (#7011)
authorHybridDog <ovvv@web.de>
Thu, 7 Mar 2019 07:31:25 +0000 (08:31 +0100)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Thu, 7 Mar 2019 07:31:25 +0000 (08:31 +0100)
commit431d8a9b83be858193328fe59e75026fa023393f
treeb5773cb8dd581f4e65ff4977e148483b23ad4d0b
parent3066d76e33070f0ec598b522b519fd6c1ddaf10e
Abort when trying to set a not registered node (#7011)

I removed the MapNode constructor which takes a nodename and gives the node's id or CONTENT_IGNORE
The code which used this constructor (two places) now handles the situation of not registered nodes correctly:
* minetest.set_node and similar functions make minetest crash when a not registered node is passed
* reverting a node with rollback aborts if the node is not registered
src/mapnode.cpp
src/mapnode.h
src/rollback_interface.cpp
src/script/common/c_content.cpp