mirror of
https://github.com/minetest-mods/digtron.git
synced 2024-07-04 14:55:15 +02:00
Crate marker entities will indicate when they're in a non-buildable node. Doesn't show protection though.
This commit is contained in:
parent
960d4e4155
commit
a3a1402e1b
@ -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()
|
||||
|
BIN
textures/digtron_no_entry.png
Normal file
BIN
textures/digtron_no_entry.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 556 B |
Loading…
Reference in New Issue
Block a user