mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-23 03:13:44 +01:00
Minor chat improvement
This commit is contained in:
parent
227be72798
commit
37a01cc836
9
init.lua
9
init.lua
@ -927,7 +927,14 @@ local function craft_stack(player, pname, data, _f)
|
|||||||
|
|
||||||
local count = stackcount * scrbar_val
|
local count = stackcount * scrbar_val
|
||||||
local stack = ItemStack(sprintf("%s %s", stackname, count))
|
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
|
if inv:room_for_item("main", stack) then
|
||||||
inv:add_item("main", stack)
|
inv:add_item("main", stack)
|
||||||
|
Loading…
Reference in New Issue
Block a user