This commit is contained in:
Jean-Patrick Guerrero 2020-02-09 02:08:24 +01:00
parent aa61333ee3
commit 5fc7e7c087

@ -1016,7 +1016,7 @@ local function get_panels(data, fs)
end end
end end
local function make_formspec(data) local function make_fs(data)
local fs = {} local fs = {}
fs[#fs + 1] = fmt([[ fs[#fs + 1] = fmt([[
@ -1124,7 +1124,7 @@ local show_fs = function(player, name)
if sfinv_only then if sfinv_only then
sfinv.set_player_inventory_formspec(player) sfinv.set_player_inventory_formspec(player)
else else
show_formspec(name, "craftguide", make_formspec(data)) show_formspec(name, "craftguide", make_fs(data))
end end
end end
@ -1646,7 +1646,7 @@ if sfinv_only then
get = function(self, player, context) get = function(self, player, context)
local name = player:get_player_name() local name = player:get_player_name()
local data = pdata[name] local data = pdata[name]
local formspec = make_formspec(data) local formspec = make_fs(data)
return sfinv.make_formspec(player, context, formspec) return sfinv.make_formspec(player, context, formspec)
end, end,
@ -1686,7 +1686,7 @@ else
search(data) search(data)
end end
show_formspec(name, "craftguide", make_formspec(data)) show_formspec(name, "craftguide", make_fs(data))
end end
core.register_craftitem("craftguide:book", { core.register_craftitem("craftguide:book", {