Fix error when clicking unknown item in the recipe (#255)

This commit is contained in:
whosit 2024-12-09 19:40:40 +03:00 committed by GitHub
parent e132a17523
commit 43cf0d8e7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -329,7 +329,7 @@ ui.register_page("craftguide", {
local giveme_form = local giveme_form =
"label[" .. (give_x + 0.1) .. "," .. (craftguidey + 2.7) .. ";" .. F(S("Give me:")) .. "]" .. "label[" .. (give_x + 0.1) .. "," .. (craftguidey + 2.7) .. ";" .. F(S("Give me:")) .. "]" ..
"button[" .. (give_x) .. "," .. (craftguidey + 2.9) .. ";0.75,0.5;craftguide_giveme_1;1]" "button[" .. (give_x) .. "," .. (craftguidey + 2.9) .. ";0.75,0.5;craftguide_giveme_1;1]"
if item_def.type ~= "tool" then if item_def and item_def.type ~= "tool" then
giveme_form = giveme_form .. giveme_form = giveme_form ..
"button[" .. (give_x + 0.8) .. "," .. (craftguidey + 2.9) .. ";0.75,0.5;craftguide_giveme_10;10]" .. "button[" .. (give_x + 0.8) .. "," .. (craftguidey + 2.9) .. ";0.75,0.5;craftguide_giveme_10;10]" ..
"button[" .. (give_x + 1.6) .. "," .. (craftguidey + 2.9) .. ";0.75,0.5;craftguide_giveme_99;99]" "button[" .. (give_x + 1.6) .. "," .. (craftguidey + 2.9) .. ";0.75,0.5;craftguide_giveme_99;99]"