Crate marker entities will indicate when they're in a non-buildable node. Doesn't show protection though.

This commit is contained in:
FaceDeer 2017-01-17 11:50:02 -07:00
parent 960d4e4155
commit a3a1402e1b
2 changed files with 9 additions and 0 deletions

@ -60,6 +60,15 @@ minetest.register_entity("digtron:marker_crate", {
},
on_activate = function(self, staticdata)
local pos = self.object:getpos()
local node = minetest.get_node(pos)
local node_def = minetest.registered_nodes[node.name]
if not node_def.buildable_to then
local props = self.object:get_properties()
props.textures = {"digtron_no_entry.png", "digtron_no_entry.png", "digtron_no_entry.png", "digtron_no_entry.png", "digtron_no_entry.png", "digtron_no_entry.png"}
self.object:set_properties(props)
end
minetest.after(5.0,
function(self)
self.object:remove()

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B