diff --git a/callbacks.lua b/callbacks.lua index 1f43e39..317c3c8 100644 --- a/callbacks.lua +++ b/callbacks.lua @@ -24,8 +24,7 @@ minetest.register_on_joinplayer(function(player) unified_inventory.alternate[player_name] = 1 unified_inventory.current_item[player_name] = nil unified_inventory.current_craft_direction[player_name] = "recipe" - unified_inventory.set_inventory_formspec(player, - unified_inventory.default) + unified_inventory.set_inventory_formspec(player, unified_inventory.default) -- Refill slot local refill = minetest.create_detached_inventory(player_name.."refill", { diff --git a/internal.lua b/internal.lua index f83f96b..76a277d 100644 --- a/internal.lua +++ b/internal.lua @@ -375,6 +375,5 @@ function ui.apply_filter(player, filter, search_dir) ui.current_index[player_name] = 1 ui.activefilter[player_name] = filter ui.active_search_direction[player_name] = search_dir - ui.set_inventory_formspec(player, - ui.current_page[player_name]) + ui.set_inventory_formspec(player, ui.current_page[player_name]) end diff --git a/waypoints.lua b/waypoints.lua index 08fce38..1496cdd 100644 --- a/waypoints.lua +++ b/waypoints.lua @@ -330,8 +330,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end end) - -minetest.register_on_joinplayer(function(player) +-- waypoints_temp must be initialized before the general unified_inventory +-- joinplayer callback is run for updating the inventory +table.insert(minetest.registered_on_joinplayers, 1, function(player) local player_name = player:get_player_name() local waypoints = get_waypoint_data(player)