mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-06-30 23:20:44 +02:00
Code cleanup, new Stairs+ recipes.
This commit is contained in:
@ -5,7 +5,7 @@ circular_saw.known_stairs = setmetatable({}, {
|
||||
__newindex = function(k, v)
|
||||
local modname = minetest.get_current_modname()
|
||||
print(("WARNING: mod %s tried to add node %s to the circular saw"
|
||||
.." manually."):format(modname, v))
|
||||
.. " manually."):format(modname, v))
|
||||
end,
|
||||
})
|
||||
|
||||
@ -127,7 +127,7 @@ function circular_saw:update_inventory(pos, amount)
|
||||
local material = name_parts[2]
|
||||
|
||||
inv:set_list("input", { -- Display as many full blocks as possible:
|
||||
node_name.." ".. math.floor(amount / 8)
|
||||
node_name.. " " .. math.floor(amount / 8)
|
||||
})
|
||||
|
||||
-- The stairnodes made of default nodes use moreblocks namespace, other mods keep own:
|
||||
@ -269,16 +269,16 @@ gui_slots = "listcolors[#606060AA;#808080;#101010;#202020;#FFF]"
|
||||
|
||||
function circular_saw.on_construct(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", "size[11,9]"..gui_slots..
|
||||
"label[0,0;"..S("Input\nmaterial").."]"..
|
||||
"list[current_name;input;1.5,0;1,1;]"..
|
||||
"label[0,1;"..S("Left-over").."]"..
|
||||
"list[current_name;micro;1.5,1;1,1;]"..
|
||||
"label[0,2;"..S("Recycle\noutput").."]"..
|
||||
"list[current_name;recycle;1.5,2;1,1;]"..
|
||||
"field[0.3,3.5;1,1;max_offered;"..S("Max")..":;${max_offered}]"..
|
||||
"button[1,3.2;1,1;Set;"..S("Set").."]"..
|
||||
"list[current_name;output;2.8,0;8,4;]"..
|
||||
meta:set_string("formspec", "size[11,9]" ..gui_slots..
|
||||
"label[0,0;" ..S("Input\nmaterial").. "]" ..
|
||||
"list[current_name;input;1.5,0;1,1;]" ..
|
||||
"label[0,1;" ..S("Left-over").. "]" ..
|
||||
"list[current_name;micro;1.5,1;1,1;]" ..
|
||||
"label[0,2;" ..S("Recycle\noutput").. "]" ..
|
||||
"list[current_name;recycle;1.5,2;1,1;]" ..
|
||||
"field[0.3,3.5;1,1;max_offered;" ..S("Max").. ":;${max_offered}]" ..
|
||||
"button[1,3.2;1,1;Set;" ..S("Set").. "]" ..
|
||||
"list[current_name;output;2.8,0;8,4;]" ..
|
||||
"list[current_player;main;1.5,5;8,4;]")
|
||||
|
||||
meta:set_int("anz", 0) -- No microblocks inside yet.
|
||||
|
Reference in New Issue
Block a user