Clarify the documentation regarding the the positioning of WorldEdit primitives relative to position 1.

This commit is contained in:
Anthony Zhang 2013-06-22 23:05:34 -04:00
parent 7070f81c59
commit 58970e7fab
4 changed files with 24 additions and 24 deletions

View File

@ -75,7 +75,7 @@ Replace all nodes other than <search node> with <replace node> in the current Wo
### //hollowsphere <radius> <node> ### //hollowsphere <radius> <node>
Add hollow sphere at WorldEdit position 1 with radius <radius>, composed of <node>. Add hollow sphere centered at WorldEdit position 1 with radius <radius>, composed of <node>.
//hollowsphere 5 Diamond Block //hollowsphere 5 Diamond Block
//hollowsphere 12 glass //hollowsphere 12 glass
@ -83,7 +83,7 @@ Add hollow sphere at WorldEdit position 1 with radius <radius>, composed of <nod
### //sphere <radius> <node> ### //sphere <radius> <node>
Add sphere at WorldEdit position 1 with radius <radius>, composed of <node>. Add sphere centered at WorldEdit position 1 with radius <radius>, composed of <node>.
//sphere 5 Diamond Block //sphere 5 Diamond Block
//sphere 12 glass //sphere 12 glass
@ -91,7 +91,7 @@ Add sphere at WorldEdit position 1 with radius <radius>, composed of <node>.
### //hollowdome <radius> <node> ### //hollowdome <radius> <node>
Add hollow dome at WorldEdit position 1 with radius <radius>, composed of <node>. Add hollow dome centered at WorldEdit position 1 with radius <radius>, composed of <node>.
//hollowdome 5 Diamond Block //hollowdome 5 Diamond Block
//hollowdome 12 glass //hollowdome 12 glass
@ -99,7 +99,7 @@ Add hollow dome at WorldEdit position 1 with radius <radius>, composed of <node>
### //dome <radius> <node> ### //dome <radius> <node>
Add dome at WorldEdit position 1 with radius <radius>, composed of <node>. Add dome centered at WorldEdit position 1 with radius <radius>, composed of <node>.
//dome 5 Diamond Block //dome 5 Diamond Block
//dome 12 glass //dome 12 glass
@ -125,7 +125,7 @@ Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length <length>
### //pyramid <height> <node> ### //pyramid <height> <node>
Add pyramid at WorldEdit position 1 with height <height>, composed of <node>. Add pyramid centered at WorldEdit position 1 with height <height>, composed of <node>.
//pyramid 8 Diamond Block //pyramid 8 Diamond Block
//pyramid 5 glass //pyramid 5 glass
@ -133,7 +133,7 @@ Add pyramid at WorldEdit position 1 with height <height>, composed of <node>.
### //spiral <width> <height> <spacer> <node> ### //spiral <width> <height> <spacer> <node>
Add spiral at WorldEdit position 1 with width <width>, height <height>, space between walls <spacer>, composed of <node>. Add spiral centered at WorldEdit position 1 with width <width>, height <height>, space between walls <spacer>, composed of <node>.
//spiral 20 5 3 Diamond Block //spiral 20 5 3 Diamond Block
//spiral 5 2 1 glass //spiral 5 2 1 glass

View File

@ -88,25 +88,25 @@ Contained in primitives.lua, this module allows the creation of several geometri
### count = worldedit.hollow_sphere(pos, radius, nodename) ### count = worldedit.hollow_sphere(pos, radius, nodename)
Adds a hollow sphere at `pos` with radius `radius`, composed of `nodename`. Adds a hollow sphere centered at `pos` with radius `radius`, composed of `nodename`.
Returns the number of nodes added. Returns the number of nodes added.
### count = worldedit.sphere(pos, radius, nodename) ### count = worldedit.sphere(pos, radius, nodename)
Adds a sphere at `pos` with radius `radius`, composed of `nodename`. Adds a sphere centered at `pos` with radius `radius`, composed of `nodename`.
Returns the number of nodes added. Returns the number of nodes added.
### count = worldedit.hollow_dome(pos, radius, nodename) ### count = worldedit.hollow_dome(pos, radius, nodename)
Adds a hollow dome at `pos` with radius `radius`, composed of `nodename`. Adds a hollow dome centered at `pos` with radius `radius`, composed of `nodename`.
Returns the number of nodes added. Returns the number of nodes added.
### count = worldedit.dome(pos, radius, nodename) ### count = worldedit.dome(pos, radius, nodename)
Adds a dome at `pos` with radius `radius`, composed of `nodename`. Adds a dome centered at `pos` with radius `radius`, composed of `nodename`.
Returns the number of nodes added. Returns the number of nodes added.
@ -124,13 +124,13 @@ Returns the number of nodes added.
### count = worldedit.pyramid(pos, height, nodename) ### count = worldedit.pyramid(pos, height, nodename)
Adds a pyramid at `pos` with height `height`. Adds a pyramid centered at `pos` with height `height`.
Returns the number of nodes added. Returns the number of nodes added.
### count = worldedit.spiral(pos, width, height, spacer, nodename) ### count = worldedit.spiral(pos, width, height, spacer, nodename)
Adds a spiral at `pos` with width `width`, height `height`, space between walls `spacer`, composed of `nodename`. Adds a spiral centered at `pos` with width `width`, height `height`, space between walls `spacer`, composed of `nodename`.
Returns the number of nodes added. Returns the number of nodes added.

View File

@ -1,6 +1,6 @@
worldedit = worldedit or {} worldedit = worldedit or {}
--adds a hollow sphere at `pos` with radius `radius`, composed of `nodename`, returning the number of nodes added --adds a hollow sphere centered at `pos` with radius `radius`, composed of `nodename`, returning the number of nodes added
worldedit.hollow_sphere = function(pos, radius, nodename, env) worldedit.hollow_sphere = function(pos, radius, nodename, env)
local node = {name=nodename} local node = {name=nodename}
local pos1 = {x=0, y=0, z=0} local pos1 = {x=0, y=0, z=0}
@ -24,7 +24,7 @@ worldedit.hollow_sphere = function(pos, radius, nodename, env)
return count return count
end end
--adds a sphere at `pos` with radius `radius`, composed of `nodename`, returning the number of nodes added --adds a sphere centered at `pos` with radius `radius`, composed of `nodename`, returning the number of nodes added
worldedit.sphere = function(pos, radius, nodename, env) worldedit.sphere = function(pos, radius, nodename, env)
local node = {name=nodename} local node = {name=nodename}
local pos1 = {x=0, y=0, z=0} local pos1 = {x=0, y=0, z=0}
@ -47,7 +47,7 @@ worldedit.sphere = function(pos, radius, nodename, env)
return count return count
end end
--adds a hollow dome at `pos` with radius `radius`, composed of `nodename`, returning the number of nodes added --adds a hollow dome centered at `pos` with radius `radius`, composed of `nodename`, returning the number of nodes added
worldedit.hollow_dome = function(pos, radius, nodename, env) --wip: use bresenham sphere for maximum speed worldedit.hollow_dome = function(pos, radius, nodename, env) --wip: use bresenham sphere for maximum speed
local node = {name=nodename} local node = {name=nodename}
local pos1 = {x=0, y=0, z=0} local pos1 = {x=0, y=0, z=0}
@ -71,7 +71,7 @@ worldedit.hollow_dome = function(pos, radius, nodename, env) --wip: use bresenha
return count return count
end end
--adds a dome at `pos` with radius `radius`, composed of `nodename`, returning the number of nodes added --adds a dome centered at `pos` with radius `radius`, composed of `nodename`, returning the number of nodes added
worldedit.dome = function(pos, radius, nodename, env) --wip: use bresenham sphere for maximum speed worldedit.dome = function(pos, radius, nodename, env) --wip: use bresenham sphere for maximum speed
local node = {name=nodename} local node = {name=nodename}
local pos1 = {x=0, y=0, z=0} local pos1 = {x=0, y=0, z=0}
@ -214,7 +214,7 @@ worldedit.cylinder = function(pos, axis, length, radius, nodename, env)
return count return count
end end
--adds a pyramid at `pos` with height `height`, composed of `nodename`, returning the number of nodes added --adds a pyramid centered at `pos` with height `height`, composed of `nodename`, returning the number of nodes added
worldedit.pyramid = function(pos, height, nodename, env) worldedit.pyramid = function(pos, height, nodename, env)
local pos1x, pos1y, pos1z = pos.x - height, pos.y, pos.z - height local pos1x, pos1y, pos1z = pos.x - height, pos.y, pos.z - height
local pos2x, pos2y, pos2z = pos.x + height, pos.y + height, pos.z + height local pos2x, pos2y, pos2z = pos.x + height, pos.y + height, pos.z + height
@ -243,7 +243,7 @@ worldedit.pyramid = function(pos, height, nodename, env)
return count return count
end end
--adds a spiral at `pos` with width `width`, height `height`, space between walls `spacer`, composed of `nodename`, returning the number of nodes added --adds a spiral centered at `pos` with width `width`, height `height`, space between walls `spacer`, composed of `nodename`, returning the number of nodes added
worldedit.spiral = function(pos, width, height, spacer, nodename, env) --wip: clean this up worldedit.spiral = function(pos, width, height, spacer, nodename, env) --wip: clean this up
-- spiral matrix - http://rosettacode.org/wiki/Spiral_matrix#Lua -- spiral matrix - http://rosettacode.org/wiki/Spiral_matrix#Lua
av, sn = math.abs, function(s) return s~=0 and s/av(s) or 0 end av, sn = math.abs, function(s) return s~=0 and s/av(s) or 0 end

View File

@ -289,7 +289,7 @@ minetest.register_chatcommand("/replaceinverse", {
minetest.register_chatcommand("/hollowsphere", { minetest.register_chatcommand("/hollowsphere", {
params = "<radius> <node>", params = "<radius> <node>",
description = "Add hollow sphere at WorldEdit position 1 with radius <radius>, composed of <node>", description = "Add hollow sphere centered at WorldEdit position 1 with radius <radius>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
func = function(name, param) func = function(name, param)
local pos = worldedit.pos1[name] local pos = worldedit.pos1[name]
@ -320,7 +320,7 @@ minetest.register_chatcommand("/hollowsphere", {
minetest.register_chatcommand("/sphere", { minetest.register_chatcommand("/sphere", {
params = "<radius> <node>", params = "<radius> <node>",
description = "Add sphere at WorldEdit position 1 with radius <radius>, composed of <node>", description = "Add sphere centered at WorldEdit position 1 with radius <radius>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
func = function(name, param) func = function(name, param)
local pos = worldedit.pos1[name] local pos = worldedit.pos1[name]
@ -351,7 +351,7 @@ minetest.register_chatcommand("/sphere", {
minetest.register_chatcommand("/hollowdome", { minetest.register_chatcommand("/hollowdome", {
params = "<radius> <node>", params = "<radius> <node>",
description = "Add hollow dome at WorldEdit position 1 with radius <radius>, composed of <node>", description = "Add hollow dome centered at WorldEdit position 1 with radius <radius>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
func = function(name, param) func = function(name, param)
local pos = worldedit.pos1[name] local pos = worldedit.pos1[name]
@ -382,7 +382,7 @@ minetest.register_chatcommand("/hollowdome", {
minetest.register_chatcommand("/dome", { minetest.register_chatcommand("/dome", {
params = "<radius> <node>", params = "<radius> <node>",
description = "Add dome at WorldEdit position 1 with radius <radius>, composed of <node>", description = "Add dome centered at WorldEdit position 1 with radius <radius>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
func = function(name, param) func = function(name, param)
local pos = worldedit.pos1[name] local pos = worldedit.pos1[name]
@ -483,7 +483,7 @@ minetest.register_chatcommand("/cylinder", {
minetest.register_chatcommand("/pyramid", { minetest.register_chatcommand("/pyramid", {
params = "<height> <node>", params = "<height> <node>",
description = "Add pyramid at WorldEdit position 1 with height <height>, composed of <node>", description = "Add pyramid centered at WorldEdit position 1 with height <height>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
func = function(name, param) func = function(name, param)
local pos = worldedit.pos1[name] local pos = worldedit.pos1[name]
@ -514,7 +514,7 @@ minetest.register_chatcommand("/pyramid", {
minetest.register_chatcommand("/spiral", { minetest.register_chatcommand("/spiral", {
params = "<width> <height> <space> <node>", params = "<width> <height> <space> <node>",
description = "Add spiral at WorldEdit position 1 with width <width>, height <height>, space between walls <space>, composed of <node>", description = "Add spiral centered at WorldEdit position 1 with width <width>, height <height>, space between walls <space>, composed of <node>",
privs = {worldedit=true}, privs = {worldedit=true},
func = function(name, param) func = function(name, param)
local pos = worldedit.pos1[name] local pos = worldedit.pos1[name]