Make sure to erase signs, if creator removes them.
This works without needing to depend on `signs` here since we call the embedded on_destruct. We leave other on_destruct calls alone for now since we may want to retain the current behavior where no triggers happen if you use this method of replacing nodes in a puzzle, which is needed for several puzzles I've made so far.
This commit is contained in:
parent
a62dded02d
commit
bcbfe20bc2
@ -1053,6 +1053,12 @@ minetest.register_node("mech:node_creator", {
|
||||
return
|
||||
end
|
||||
|
||||
-- if erasing signs, we have to remove entities
|
||||
local d2 = minetest.registered_nodes[minetest.get_node(p2).name]
|
||||
if d2.groups and d2.groups.sign then
|
||||
d2.on_destruct(p2)
|
||||
end
|
||||
|
||||
local n2 = minetest.deserialize(meta:get_string("node"))
|
||||
minetest.swap_node(p2, n2)
|
||||
|
||||
|
@ -122,7 +122,7 @@ minetest.register_node("signs:sign", {
|
||||
inventory_image = "sign.png",
|
||||
walkable = false,
|
||||
tiles = {"itb_blank.png"},
|
||||
groups = { node = 1 },
|
||||
groups = { node = 1, sign = 1 },
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -211,7 +211,7 @@ minetest.register_node("signs:sign_wall", {
|
||||
inventory_image = "sign.png",
|
||||
walkable = false,
|
||||
tiles = {"sign.png"},
|
||||
groups = { node = 1 },
|
||||
groups = { node = 1, sign = 1 },
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user