Minor chat improvement

This commit is contained in:
Jean-Patrick Guerrero 2020-12-10 19:05:23 +01:00
parent 227be72798
commit 37a01cc836
1 changed files with 8 additions and 1 deletions

View File

@ -927,7 +927,14 @@ local function craft_stack(player, pname, data, _f)
local count = stackcount * scrbar_val
local stack = ItemStack(sprintf("%s %s", stackname, count))
local message = clr("#ff0", sprintf("%s x %s", count, get_desc(stackname)))
local desc = get_desc(stackname)
local message
if count > 1 then
message = clr("#ff0", sprintf("%s x %s", count, desc))
else
message = clr("#ff0", sprintf("%s", desc))
end
if inv:room_for_item("main", stack) then
inv:add_item("main", stack)