summaryrefslogtreecommitdiff
path: root/entities.lua
diff options
context:
space:
mode:
Diffstat (limited to 'entities.lua')
-rw-r--r--entities.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/entities.lua b/entities.lua
index fa109b7..5f265a9 100644
--- a/entities.lua
+++ b/entities.lua
@@ -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()