diff --git a/README.txt b/README.txt index 047d8e2..f868835 100644 --- a/README.txt +++ b/README.txt @@ -1,10 +1,10 @@ Minetest mod "Pyramids" ======================= -version: 0.4 Beta +version: 0.4.1 Beta License of source code and textures: WTFPL ------------------------------------------ -(c) Copyright BlockMen (2013) +(c) Copyright BlockMen (2013 - 2015) License of mesh model: WTFPL @@ -40,4 +40,4 @@ Using the mod: -------------- This mod adds randomly spawned pyramids in deserts. The pyramids are very rare and contain a chest with stuff. -Also there are mummys inside, which attack the player if found in their radius. \ No newline at end of file +Also there are mummys inside, which attack the player if found in their radius. diff --git a/nodes.lua b/nodes.lua index fd663ce..9afba6b 100644 --- a/nodes.lua +++ b/nodes.lua @@ -15,9 +15,11 @@ trap_on_timer = function (pos, elapsed) for i, obj in pairs(objs) do if obj:is_player() then local n = minetest.get_node(pos) - if n and n.name and minetest.registered_nodes[n.name].crack < 2 then - minetest.set_node(pos, {name="pyramids:trap_2"}) - nodeupdate(pos) + if n and n.name then + if minetest.registered_nodes[n.name].crack and minetest.registered_nodes[n.name].crack < 2 then + minetest.set_node(pos, {name="pyramids:trap_2"}) + nodeupdate(pos) + end end end end