diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2015-06-28 03:47:03 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2015-06-28 04:15:55 -0400 |
commit | 0a70d8edefc23c2b692926982620ef8d827ab610 (patch) | |
tree | 38760a40b2f384774768cdf66fc514c0a3fb9375 /callbacks.lua | |
parent | 20eba2bf9bb152a6d18f5741cf6bac424856a5ef (diff) |
Add "lite" mode
Set unified_inventory_lite = true in minetest.conf to enable.
This mode reduces the feature-set of the mod as follows:
* no bags
* no waypoints,
* no home/go-home buttons,
* no set-day/-night buttons,
* smaller creative/craft guide inventory pages (4x6 instead of 8x10)
* fewer paging buttons
* smaller search field
* move "Result: foo" to below the crafting guide grid.
* Move main "tab" buttons to the right, below the search and paging buttons.
* Made "tab" buttons able to use to 2 rows if necessary (max 8 buttons)
Diffstat (limited to 'callbacks.lua')
-rw-r--r-- | callbacks.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/callbacks.lua b/callbacks.lua index 605d8e5..3a41c32 100644 --- a/callbacks.lua +++ b/callbacks.lua @@ -68,11 +68,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) -- Inventory page controls local start = math.floor( - unified_inventory.current_index[player_name] / 80 + 1) + unified_inventory.current_index[player_name] / unified_inventory.items_per_page + 1) local start_i = start local pagemax = math.floor( (#unified_inventory.filtered_items_list[player_name] - 1) - / (80) + 1) + / (unified_inventory.items_per_page) + 1) if fields.start_list then start_i = 1 @@ -101,7 +101,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) if not (start_i == start) then minetest.sound_play("paperflip1", {to_player=player_name, gain = 1.0}) - unified_inventory.current_index[player_name] = (start_i - 1) * 80 + 1 + unified_inventory.current_index[player_name] = (start_i - 1) * unified_inventory.items_per_page + 1 unified_inventory.set_inventory_formspec(player, unified_inventory.current_page[player_name]) end |