1
0
зеркало из https://github.com/mt-mods/pipeworks.git synced 2026-01-12 15:45:25 +01:00

1 Коммитов

Автор SHA1 Сообщение Дата
BuckarooBanzay
3a01f3f8ca fix chest duplication bug
closes #118
2024-03-17 20:06:35 +01:00

Просмотреть файл

@@ -111,6 +111,12 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end
minetest.after(0.2, function()
if minetest.get_modpath("default") then
local current_node = minetest.get_node(pos)
if current_node.name ~= "default:" .. swap .. "_open" then
-- the chest has already been replaced, don't try to replace what's there.
-- see: https://github.com/minetest/minetest_game/pull/3046
return
end
minetest.swap_node(pos, { name = "default:" .. swap, param2 = node.param2 })
end