mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-22 10:53:43 +01:00
Fix bug
This commit is contained in:
parent
4b3ab0af5f
commit
671fae8926
10
init.lua
10
init.lua
@ -897,7 +897,7 @@ local function craft_stack(player, pname, data, craft_rcp)
|
||||
local output = craft_rcp and data.recipes[data.rnum].output or data.usages[data.unum].output
|
||||
output = ItemStack(output)
|
||||
local stackname, stackcount = output:get_name(), output:get_count()
|
||||
local scrbar_val = data[sprintf("scrbar_%s", craft_rcp and "rcp" or "usg")]
|
||||
local scrbar_val = data[sprintf("scrbar_%s", craft_rcp and "rcp" or "usg")] or 1
|
||||
|
||||
for name, count in pairs(data.export_counts[rcp_usg].rcp) do
|
||||
local items = {[name] = count}
|
||||
@ -1433,6 +1433,14 @@ local function get_rcp_extra(fs, data, panel, is_recipe, is_usage)
|
||||
max_stacks_usg = get_stack_max(data, is_recipe, panel.rcp[data.unum])
|
||||
end
|
||||
|
||||
if is_recipe and max_stacks_rcp == 0 then
|
||||
data.export_rcp = nil
|
||||
data.scrbar_rcp = 1
|
||||
elseif is_usage and max_stacks_usg == 0 then
|
||||
data.export_usg = nil
|
||||
data.scrbar_usg = 1
|
||||
end
|
||||
|
||||
if max_stacks_rcp > 0 or max_stacks_usg > 0 then
|
||||
get_export_fs(fs, data, panel, is_recipe, is_usage, max_stacks_rcp,
|
||||
max_stacks_usg)
|
||||
|
Loading…
Reference in New Issue
Block a user