From 482027d09b24d11b51b806f077c28d894e2caf7b Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Wed, 1 Feb 2023 15:06:36 +0100 Subject: [PATCH] Small cleanup --- init.lua | 1 + src/api.lua | 1 - src/fields.lua | 4 +--- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 704c984..7ab11bb 100644 --- a/init.lua +++ b/init.lua @@ -113,6 +113,7 @@ i3.files.common() i3.files.api(http) i3.files.compress() i3.files.detached() +i3.files.fields() i3.files.groups() i3.files.callbacks(http, storage) diff --git a/src/api.lua b/src/api.lua index bb03b26..be5ce59 100644 --- a/src/api.lua +++ b/src/api.lua @@ -196,7 +196,6 @@ end i3.new_tab("inventory", { description = S"Inventory", formspec = get_inventory_fs, - fields = i3.files.fields(), slots = true, }) diff --git a/src/fields.lua b/src/fields.lua index 77ddf37..ccbc0b3 100644 --- a/src/fields.lua +++ b/src/fields.lua @@ -464,7 +464,7 @@ core.register_on_player_receive_fields(function(player, formname, fields) local tab = i3.tabs[data.tab] if tab then - if tab.slots and data.tab > 1 then + if tab.slots then inv_fields(player, data, fields) end @@ -475,5 +475,3 @@ core.register_on_player_receive_fields(function(player, formname, fields) return true, set_fs(player) end) - -return inv_fields