forked from mtcontrib/pipeworks
Set the owner for locked chests on placing
This commit is contained in:
parent
9af43b9f6f
commit
c505088fbb
|
@ -133,7 +133,13 @@ minetest.override_item("default:chest_locked", {
|
||||||
end,
|
end,
|
||||||
connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
|
connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
|
||||||
},
|
},
|
||||||
after_place_node = pipeworks.after_place,
|
after_place_node = function (pos, placer)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
meta:set_string("owner", placer:get_player_name() or "")
|
||||||
|
meta:set_string("infotext", "Locked Chest (owned by "..
|
||||||
|
meta:get_string("owner")..")")
|
||||||
|
pipeworks.after_place(pos)
|
||||||
|
end,
|
||||||
after_dig_node = pipeworks.after_dig
|
after_dig_node = pipeworks.after_dig
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user