1
0
mirror of https://github.com/HybridDog/connected_chests.git synced 2024-11-17 11:20:17 +01:00

Chest opening: Fix chest not closing itself

This commit is contained in:
Hybrid Dog 2018-02-26 15:47:15 +01:00
parent 476338593b
commit 631d4d83f8

View File

@ -516,10 +516,12 @@ connected_chests.register_chest("default:chest", {
minetest.after(0.2, minetest.show_formspec, pname,
"default:chest_connected", spec)
open_chests[vi] = open_chests[vi] or 0
open_chests[vi] = open_chests[vi]+1
if not accessed_chests[pname] then
open_chests[vi] = open_chests[vi] or 0
open_chests[vi] = open_chests[vi]+1
accessed_chests[pname] = vi
accessed_chests[pname] = vi
end
end
})
@ -562,10 +564,12 @@ connected_chests.register_chest("default:chest_locked", {
minetest.after(0.2, minetest.show_formspec, pname,
"default:chest_locked_connected", spec)
open_chests[vi] = open_chests[vi] or 0
open_chests[vi] = open_chests[vi]+1
if not accessed_chests[pname] then
open_chests[vi] = open_chests[vi] or 0
open_chests[vi] = open_chests[vi]+1
accessed_chests[pname] = vi
accessed_chests[pname] = vi
end
end
})