Bunch of fixes

This commit is contained in:
Jean-Patrick Guerrero 2020-12-31 01:34:08 +01:00
parent 14f58dfc9e
commit 3b1f71722f
2 changed files with 15 additions and 3 deletions

View File

@ -1819,15 +1819,26 @@ local trash = core.create_detached_inventory("i3_trash", {
trash:set_size("main", 1)
core.register_on_player_inventory_action(function(player)
after(0, function()
core.register_on_player_inventory_action(function(player, action, inventory, info)
if (info.from_list == "main" and info.to_list == "craft") or
(info.from_list == "craft" and info.to_list == "main") then
local name = player:get_player_name()
local data = pdata[name]
local fs = make_fs(player, data)
player:set_inventory_formspec(fs)
end
end)
if rawget(_G, "armor") then
armor:register_on_update(function(player)
local name = player:get_player_name()
local data = pdata[name]
local fs = make_fs(player, data)
player:set_inventory_formspec(fs)
end)
end)
end
i3.register_craft_type("digging", {
description = ES"Digging",

View File

@ -1,2 +1,3 @@
name = i3
description = Next-Gen inventory for Minetest
optional_depends = 3d_armor