1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-12-24 02:15:30 +01:00

[moreblocks] Update

This commit is contained in:
LeMagnesium
2015-11-13 19:11:45 +01:00
parent 1a57595005
commit 90af647d5a
10 changed files with 74 additions and 55 deletions

View File

@@ -102,9 +102,11 @@ function circular_saw:get_output_inv(modname, material, amount, max)
local t = circular_saw.names[i]
local cost = circular_saw.cost_in_microblocks[i]
local balance = math.min(math.floor(amount/cost), max)
pos = pos + 1
list[pos] = modname .. ":" .. t[1] .. "_" .. material .. t[2]
.. " " .. balance
local nodename = modname .. ":" .. t[1] .. "_" .. material .. t[2]
if minetest.registered_nodes[nodename] then
pos = pos + 1
list[pos] = nodename .. " " .. balance
end
end
return list
end