forked from mtcontrib/replacer
aux1 key works now as well instead of only sneak key for storing a new pattern
This commit is contained in:
parent
7bfcb73607
commit
c030a3beb8
|
@ -11,7 +11,7 @@ Or just use /giveme replacer:replacer
|
|||
|
||||
Usage: Right-click on a node of that type you want to replace other nodes with.
|
||||
Left-click (normal usage) on any nodes you want to replace with the type you previously right-clicked on.
|
||||
SHIFT-Right-click in order to store a new pattern.
|
||||
Sneak-Right-click (alternatively: aux1-Right-click) in order to store a new pattern.
|
||||
|
||||
When in creative mode, the node will just be replaced. Your inventory will not be changed.
|
||||
|
||||
|
|
3
init.lua
3
init.lua
|
@ -94,7 +94,7 @@ minetest.register_tool( "replacer:replacer",
|
|||
local keys=placer:get_player_control();
|
||||
|
||||
-- just place the stored node if now new one is to be selected
|
||||
if( not( keys["sneak"] )) then
|
||||
if( not( keys["sneak"] ) and not( keys["aux1"])) then
|
||||
|
||||
return replacer.replace( itemstack, placer, pointed_thing, 0 ); end
|
||||
|
||||
|
@ -265,4 +265,3 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ replacer.inspect = function( itemstack, user, pointed_thing, mode, show_receipe
|
|||
end
|
||||
local name = user:get_player_name();
|
||||
local keys = user:get_player_control();
|
||||
if( keys["sneak"] ) then
|
||||
if( keys["sneak"] or keys["aux1"]) then
|
||||
show_receipe = true;
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user