fix LBM not restoring sign text

This commit is contained in:
Vanessa Dannenberg 2018-09-30 16:37:43 -04:00
parent 7913e1b72c
commit ceb955f9eb
2 changed files with 13 additions and 13 deletions

13
api.lua
View File

@ -485,16 +485,3 @@ street_signs.after_place_node = function(pos, placer, itemstack, pointed_thing)
minetest.swap_node(pos, {name = itemstack:get_name().."_onpole", param2 = node.param2})
end
end
-- restore signs' text after /clearobjects and the like, the next time
-- a block is reloaded by the server.
minetest.register_lbm({
nodenames = street_signs.lbm_restore_nodes,
name = "street_signs:restore_sign_text",
label = "Restore sign text",
run_at_every_load = true,
action = function(pos, node)
street_signs.update_sign(pos)
end
})

View File

@ -2048,3 +2048,16 @@ for _, d in ipairs({"l", "c", "r"}) do
groups = {choppy=2, dig_immediate=2},
})
end
-- restore signs' text after /clearobjects and the like, the next time
-- a block is reloaded by the server.
minetest.register_lbm({
nodenames = street_signs.lbm_restore_nodes,
name = "street_signs:restore_sign_text",
label = "Restore sign text",
run_at_every_load = true,
action = function(pos, node)
street_signs.update_sign(pos)
end
})