1
0
mirror of https://github.com/Sokomine/replacer.git synced 2025-06-29 06:31:19 +02:00

Compare commits

4 Commits

2 changed files with 5 additions and 3 deletions

View File

@ -110,7 +110,7 @@ minetest.register_tool( "replacer:replacer",
-- just place the stored node if no new one is to be selected
if( not( keys["sneak"] ) and not( keys["aux1"])) then
return replacer.replace( itemstack, placer, pointed_thing, 0 ); end
return replacer.replace( itemstack, placer, pointed_thing, true ); end
if( pointed_thing.type ~= "node" ) then
@ -287,3 +287,5 @@ elseif(minetest.registered_nodes["default:chest"]) then
}
})
end
minetest.log("action", "[replacer] loaded.")

View File

@ -222,7 +222,7 @@ replacer.add_circular_saw_receipe = function( node_name, receipes )
if( not( help ) or #help ~= 2 or help[1]=='stairs') then
return;
end
help2 = help[2]:split('_');
local help2 = help[2]:split('_');
if( not( help2 ) or #help2 < 2 or (help2[1]~='micro' and help2[1]~='panel' and help2[1]~='stair' and help2[1]~='slab')) then
return;
end
@ -231,7 +231,7 @@ replacer.add_circular_saw_receipe = function( node_name, receipes )
-- TODO: write better and more correct method of getting the names of the materials
-- TODO: make sure only nodes produced by the saw are listed here
help[1]='default';
help[1]='default';
local basic_node_name = help[1]..':'..help2[2];
-- node found that fits into the saw
receipes[ #receipes+1 ] = { method = 'saw', type = 'saw', items = { basic_node_name }, output = node_name};