From c030a3beb8440efd0f3c4ca183da0cbedcb3f7b5 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Wed, 29 Sep 2021 20:19:28 +0200 Subject: [PATCH] aux1 key works now as well instead of only sneak key for storing a new pattern --- README.md | 2 +- init.lua | 3 +-- inspect.lua | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5f263f1..25905f8 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/init.lua b/init.lua index e1f41b9..315f56b 100644 --- a/init.lua +++ b/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({ } }) - diff --git a/inspect.lua b/inspect.lua index 6c038a3..d9ea96c 100644 --- a/inspect.lua +++ b/inspect.lua @@ -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