@@ -203,7 +203,7 @@ minetest.register_on_punchnode(function(pos, node, puncher)
203
203
local name = puncher :get_player_name ()
204
204
if worldedit .inspect [name ] then
205
205
local axis , sign = worldedit .player_axis (name )
206
- message = string.format (" inspector: %s at %s (param1=%d, param2=%d, received light=%d) punched facing the %s axis" ,
206
+ local message = string.format (" inspector: %s at %s (param1=%d, param2=%d, received light=%d) punched facing the %s axis" ,
207
207
node .name , minetest .pos_to_string (pos ), node .param1 , node .param2 , get_node_rlight (pos ), axis .. (sign > 0 and " +" or " -" ))
208
208
worldedit .player_notify (name , message )
209
209
end
@@ -642,6 +642,7 @@ minetest.register_chatcommand("/hollowcylinder", {
642
642
end
643
643
length = tonumber (length )
644
644
if axis == " ?" then
645
+ local sign
645
646
axis , sign = worldedit .player_axis (name )
646
647
length = length * sign
647
648
end
@@ -665,6 +666,7 @@ minetest.register_chatcommand("/cylinder", {
665
666
end
666
667
length = tonumber (length )
667
668
if axis == " ?" then
669
+ local sign
668
670
axis , sign = worldedit .player_axis (name )
669
671
length = length * sign
670
672
end
@@ -698,6 +700,7 @@ minetest.register_chatcommand("/hollowpyramid", {
698
700
local found , _ , axis , height , nodename = param :find (" ^([xyz%?])%s+([+-]?%d+)%s+(.+)$" )
699
701
height = tonumber (height )
700
702
if axis == " ?" then
703
+ local sign
701
704
axis , sign = worldedit .player_axis (name )
702
705
height = height * sign
703
706
end
@@ -715,6 +718,7 @@ minetest.register_chatcommand("/pyramid", {
715
718
local found , _ , axis , height , nodename = param :find (" ^([xyz%?])%s+([+-]?%d+)%s+(.+)$" )
716
719
height = tonumber (height )
717
720
if axis == " ?" then
721
+ local sign
718
722
axis , sign = worldedit .player_axis (name )
719
723
height = height * sign
720
724
end
@@ -762,6 +766,7 @@ minetest.register_chatcommand("/copy", {
762
766
end
763
767
amount = tonumber (amount )
764
768
if axis == " ?" then
769
+ local sign
765
770
axis , sign = worldedit .player_axis (name )
766
771
amount = amount * sign
767
772
end
@@ -811,6 +816,7 @@ minetest.register_chatcommand("/stack", {
811
816
local found , _ , axis , repetitions = param :find (" ^([xyz%?])%s+([+-]?%d+)$" )
812
817
repetitions = tonumber (repetitions )
813
818
if axis == " ?" then
819
+ local sign
814
820
axis , sign = worldedit .player_axis (name )
815
821
repetitions = repetitions * sign
816
822
end
0 commit comments