1
0
Fork 0

Fix crash when clicking craftbook icon in furnace

objects
Wuzzy 2019-03-13 11:32:26 +01:00
parent f7af5dfa07
commit fb389df3a0
2 changed files with 1 additions and 24 deletions

View File

@ -1131,25 +1131,6 @@ if progressive_mode then
end)
end
function mcl_craftguide.show_old(name, item, show_usages)
local func = "mcl_craftguide.show(): "
assert(name, func .. "player name missing")
local data = player_data[name]
local player = get_player_by_name(name)
local query_item = data.query_item
reset_data(data)
item = reg_items[item] and item or query_item
data.query_item = item
data.show_usages = show_usages
data.recipes = get_recipes(item, data, player)
show_fs(player, name)
end
function mcl_craftguide.show(name)
local player = minetest.get_player_by_name(name)
if next(recipe_filters) then

View File

@ -20,7 +20,6 @@ local function active_formspec(fuel_percent, item_percent)
(item_percent)..":gui_furnace_arrow_fg.png^[transformR270]"..
"image_button[8,0;1,1;craftguide_book.png;craftguide;]"..
"tooltip[craftguide;Recipe book]"..
"tooltip[doc;Help]"..
"listring[current_name;dst]"..
"listring[current_player;main]"..
"listring[current_name;src]"..
@ -41,7 +40,6 @@ local inactive_formspec = "size[9,8.75]"..
"image[4.1,1.5;1.5,1;gui_furnace_arrow_bg.png^[transformR270]"..
"image_button[8,0;1,1;craftguide_book.png;craftguide;]"..
"tooltip[craftguide;Recipe book]"..
"tooltip[doc;Help]"..
"listring[current_name;dst]"..
"listring[current_player;main]"..
"listring[current_name;src]"..
@ -51,9 +49,7 @@ local inactive_formspec = "size[9,8.75]"..
local receive_fields = function(pos, formname, fields, sender)
if fields.craftguide then
mcl_craftguide.show_craftguide(sender)
elseif fields.doc and minetest.get_modpath("doc") then
doc.show_entry(sender:get_player_name(), "nodes", "mcl_furnaces:furnace", true)
mcl_craftguide.show(sender:get_player_name())
end
end