Skip to content

Commit c97db07

Browse files
authored
Display item description when missing item (#103)
1 parent 64416fd commit c97db07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

util_execute_cycle.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,9 @@ digtron.execute_dig_cycle = function(pos, clicker)
289289
return_string = S("Digtron connected to at least one builder with no output material assigned.") .. "\n"
290290
return_code = 6
291291
elseif test_build_return_code == 2 then
292+
local item_display_name = failed_to_find:get_short_description() .. " (" .. failed_to_find:get_name() .. ")"
292293
minetest.sound_play("dingding", {gain=1.0, pos=pos}) -- Insufficient inventory
293-
return_string = S("Digtron has insufficient building materials. Needed: @1", failed_to_find:get_name()) .. "\n"
294+
return_string = S("Digtron has insufficient building materials. Needed: @1", item_display_name) .. "\n"
294295
return_code = 7
295296
end
296297
return pos, return_string .. status_text, return_code --Abort, don't dig and don't build.

0 commit comments

Comments
 (0)