diff --git a/mods/CORE/Player/src/Player/inventory.lua b/mods/CORE/Player/src/Player/inventory.lua index d5d1560..a7c8dc1 100644 --- a/mods/CORE/Player/src/Player/inventory.lua +++ b/mods/CORE/Player/src/Player/inventory.lua @@ -10,7 +10,7 @@ PlayerInventoryUI:registerOnFormFieldActionMatch('%S+::%S+::item_button',functio local playerName = player:get_player_name() PlayerInventoryUI:setContex(playerName, paneType..'_pane_craft_selected_craft', craftName) - + player:set_inventory_formspec(PlayerInventoryUI:getFormSpecString(playerName)) PlayerInventoryUI:showForm(playerName) end) diff --git a/mods/UI/PlayerInventoryUI/src/PlayerInventoryUI.lua b/mods/UI/PlayerInventoryUI/src/PlayerInventoryUI.lua index 5db7b16..7eb5564 100644 --- a/mods/UI/PlayerInventoryUI/src/PlayerInventoryUI.lua +++ b/mods/UI/PlayerInventoryUI/src/PlayerInventoryUI.lua @@ -99,6 +99,7 @@ PlayerInventoryUI:registerOnFormFieldAction('close_left_pane', function(player, local playerName = player:get_player_name() PlayerInventoryUI:setContex(playerName, 'left_pane_name', 'select_pane_menu') + player:set_inventory_formspec(PlayerInventoryUI:getFormSpecString(playerName)) PlayerInventoryUI:showForm(playerName) end) @@ -109,16 +110,16 @@ PlayerInventoryUI:registerOnFormFieldActionMatch('select_left_%S+', function(pla local playerName = player:get_player_name() PlayerInventoryUI:setContex(playerName, 'left_pane_name', paneName) - PlayerInventoryUI:showForm(playerName) player:set_inventory_formspec(PlayerInventoryUI:getFormSpecString(playerName)) + PlayerInventoryUI:showForm(playerName) end) PlayerInventoryUI:registerOnFormFieldAction('close_right_pane', function(player, fieldName, fieldValue) local playerName = player:get_player_name() PlayerInventoryUI:setContex(playerName, 'right_pane_name', 'select_pane_menu') - PlayerInventoryUI:showForm(playerName) player:set_inventory_formspec(PlayerInventoryUI:getFormSpecString(playerName)) + PlayerInventoryUI:showForm(playerName) end) PlayerInventoryUI:registerOnFormFieldActionMatch('select_right_%S+', function(player, fieldName, fieldValue) @@ -128,8 +129,8 @@ PlayerInventoryUI:registerOnFormFieldActionMatch('select_right_%S+', function(pl local playerName = player:get_player_name() PlayerInventoryUI:setContex(playerName, 'right_pane_name', paneName) - PlayerInventoryUI:showForm(playerName) player:set_inventory_formspec(PlayerInventoryUI:getFormSpecString(playerName)) + PlayerInventoryUI:showForm(playerName) end) PlayerInventoryUI:registerOnFormFieldActionMatch('%S+::page_back', function(player, fieldName, fieldValue) @@ -145,8 +146,8 @@ PlayerInventoryUI:registerOnFormFieldActionMatch('%S+::page_back', function(play end PlayerInventoryUI:setContex(playerName, paneType..'_pane_craft_page_number', pageNumber) - PlayerInventoryUI:showForm(playerName) player:set_inventory_formspec(PlayerInventoryUI:getFormSpecString(playerName)) + PlayerInventoryUI:showForm(playerName) end) PlayerInventoryUI:registerOnFormFieldActionMatch('%S+::page_forward', function(player, fieldName, fieldValue) @@ -162,8 +163,8 @@ PlayerInventoryUI:registerOnFormFieldActionMatch('%S+::page_forward', function(p end PlayerInventoryUI:setContex(playerName, paneType..'_pane_craft_page_number', pageNumber) - PlayerInventoryUI:showForm(playerName) player:set_inventory_formspec(PlayerInventoryUI:getFormSpecString(playerName)) + PlayerInventoryUI:showForm(playerName) end) return PlayerInventoryUI