From 87f502a2592bbd41e99df9009a966111156f0181 Mon Sep 17 00:00:00 2001 From: Zefram Date: Fri, 13 Jun 2014 15:04:20 +0100 Subject: Show item usages in craft guide When the craft guide is showing a craft, the output slot is now a button, which causes the craft guide to show ways in which that output can be used. This mirrors the way input slots are buttons that show recipes for the selected ingredient. Usages of an item can be iterated through in the same way as recipes for the item. This incidentally offers some ability to retrace one's steps through a crafting chain, without storing actual history. --- init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index f91e048..0542e36 100644 --- a/init.lua +++ b/init.lua @@ -6,14 +6,15 @@ local worldpath = minetest.get_worldpath() -- Data tables definitions unified_inventory = {} unified_inventory.activefilter = {} +unified_inventory.active_search_direction = {} unified_inventory.alternate = {} unified_inventory.current_page = {} unified_inventory.current_searchbox = {} unified_inventory.current_index = {} unified_inventory.current_item = {} +unified_inventory.current_craft_direction = {} unified_inventory.registered_craft_types = {} -unified_inventory.crafts_table = {} -unified_inventory.crafts_table_count = 0 +unified_inventory.crafts_for = { usage = {}, recipe = {} } unified_inventory.players = {} unified_inventory.items_list_size = 0 unified_inventory.items_list = {} -- cgit v1.2.3