You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--transposes a region defined by the positions `pos1` and `pos2` between the `axis1` and `axis2` axes, returning the number of nodes transposed, the new position 1, and the new position 2
225
+
--scales the region defined by positions `pos1` and `pos2` by an factor of positive integer `factor` with `pos1` as the origin, returning the number of nodes scaled, the new scaled position 1, and the new scaled position 2
226
+
worldedit.scale=function(pos1, pos2, factor, env)
227
+
localpos1, pos2=worldedit.sort_pos(pos1, pos2)
228
+
ifenv==nilthenenv=minetest.envend
229
+
230
+
localpos= {x=pos2.x, y=0, z=0}
231
+
localbigpos= {x=0, y=0, z=0}
232
+
size=factor-1
233
+
whilepos.x>=pos1.xdo
234
+
pos.y=pos2.y
235
+
whilepos.y>=pos1.ydo
236
+
pos.z=pos2.z
237
+
whilepos.z>=pos1.zdo
238
+
localnode=env:get_node(pos) --obtain current node
239
+
localmeta=env:get_meta(pos):to_table() --get meta of current node
--transposes a region defined by the positions `pos1` and `pos2` between the `axis1` and `axis2` axes, returning the number of nodes transposed, the new transposed position 1, and the new transposed position 2
0 commit comments