Change name of custom crack nodedef field to

Previous: crack
New: x_tsm_pyramids_crack
This commit is contained in:
Wuzzy 2016-11-10 16:29:19 +01:00
parent 82e6e5bdd0
commit 281eae639e

View File

@ -25,7 +25,7 @@ local trap_on_timer = function (pos, elapsed)
if obj:is_player() then if obj:is_player() then
local n = minetest.get_node(pos) local n = minetest.get_node(pos)
if n and n.name then if n and n.name then
if minetest.registered_nodes[n.name].crack and minetest.registered_nodes[n.name].crack < 2 then if minetest.registered_nodes[n.name].x_tsm_pyramids_crack and minetest.registered_nodes[n.name].x_tsm_pyramids_crack < 2 then
minetest.set_node(pos, {name="tsm_pyramids:trap_2"}) minetest.set_node(pos, {name="tsm_pyramids:trap_2"})
nodeupdate(pos) nodeupdate(pos)
end end
@ -44,7 +44,7 @@ minetest.register_node("tsm_pyramids:trap", {
on_construct = function(pos) on_construct = function(pos)
minetest.env:get_node_timer(pos):start(0.1) minetest.env:get_node_timer(pos):start(0.1)
end, end,
crack = 1, x_tsm_pyramids_crack = 1,
on_timer = trap_on_timer, on_timer = trap_on_timer,
drop = "", drop = "",
}) })