Minor style cleaning
This commit is contained in:
parent
b194e5f7a7
commit
8c59b1bf17
@ -191,7 +191,7 @@ for enchant in tooldef[3]:gmatch("[%w_]+") do
|
|||||||
description = "Enchanted "..cap(material).." "..cap(tool).." ("..cap(enchant)..")",
|
description = "Enchanted "..cap(material).." "..cap(tool).." ("..cap(enchant)..")",
|
||||||
inventory_image = original_tool.inventory_image.."^[colorize:violet:50",
|
inventory_image = original_tool.inventory_image.."^[colorize:violet:50",
|
||||||
wield_image = original_tool.wield_image,
|
wield_image = original_tool.wield_image,
|
||||||
groups = {not_in_creative_inventory=0},
|
groups = {not_in_creative_inventory=1},
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
groupcaps = groupcaps, damage_groups = {fleshy = fleshy},
|
groupcaps = groupcaps, damage_groups = {fleshy = fleshy},
|
||||||
full_punch_interval = full_punch_interval, max_drop_level = max_drop_level
|
full_punch_interval = full_punch_interval, max_drop_level = max_drop_level
|
||||||
|
@ -26,7 +26,7 @@ local nodes = { -- Nodes allowed to be cut. Registration format: [mod name] = [[
|
|||||||
]],
|
]],
|
||||||
}
|
}
|
||||||
|
|
||||||
local def = { -- Nodebox name, yield, definition.
|
local defs = { -- Nodebox name, yield, definition.
|
||||||
{"nanoslab", 16, {-.5,-.5,-.5,0,-.4375,0}},
|
{"nanoslab", 16, {-.5,-.5,-.5,0,-.4375,0}},
|
||||||
{"micropanel", 16, {-.5,-.5,-.5,.5,-.4375,0}},
|
{"micropanel", 16, {-.5,-.5,-.5,.5,-.4375,0}},
|
||||||
{"microslab", 8, {-.5,-.5,-.5,.5,-.4375,.5}},
|
{"microslab", 8, {-.5,-.5,-.5,.5,-.4375,.5}},
|
||||||
@ -330,7 +330,7 @@ function worktable.get_output(inv, stack)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local input, output = inv:get_stack("input", 1), {}
|
local input, output = inv:get_stack("input", 1), {}
|
||||||
for _, n in pairs(def) do
|
for _, n in pairs(defs) do
|
||||||
local count = math.min(n[2] * input:get_count(), input:get_stack_max())
|
local count = math.min(n[2] * input:get_count(), input:get_stack_max())
|
||||||
output[#output+1] = stack:get_name().."_"..n[1].." "..count
|
output[#output+1] = stack:get_name().."_"..n[1].." "..count
|
||||||
end
|
end
|
||||||
@ -356,7 +356,7 @@ function worktable.on_take(pos, listname, index, stack)
|
|||||||
inv:set_list("forms", {})
|
inv:set_list("forms", {})
|
||||||
end
|
end
|
||||||
elseif listname == "forms" then
|
elseif listname == "forms" then
|
||||||
inputstack:take_item(math.ceil(stack:get_count() / def[index][2]))
|
inputstack:take_item(math.ceil(stack:get_count() / defs[index][2]))
|
||||||
inv:set_stack("input", 1, inputstack)
|
inv:set_stack("input", 1, inputstack)
|
||||||
worktable.get_output(inv, inputstack)
|
worktable.get_output(inv, inputstack)
|
||||||
end
|
end
|
||||||
@ -382,7 +382,7 @@ xdecor.register("worktable", {
|
|||||||
allow_metadata_inventory_move = worktable.move
|
allow_metadata_inventory_move = worktable.move
|
||||||
})
|
})
|
||||||
|
|
||||||
for _, d in pairs(def) do
|
for _, d in pairs(defs) do
|
||||||
for mod, n in pairs(nodes) do
|
for mod, n in pairs(nodes) do
|
||||||
for name in n:gmatch("[%w_]+") do
|
for name in n:gmatch("[%w_]+") do
|
||||||
local ndef = minetest.registered_nodes[mod..":"..name]
|
local ndef = minetest.registered_nodes[mod..":"..name]
|
||||||
|
Loading…
Reference in New Issue
Block a user