mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 07:23:00 +00:00
//airapply: fix nodes_needed
This commit is contained in:
parent
b131970f16
commit
fcd4de3429
3 changed files with 10 additions and 7 deletions
|
@ -16,7 +16,7 @@ Note to self: See the bottom of this file for the release template text.
|
||||||
|
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
- `//airapply`: Improve error handling
|
- `//airapply`: Improve error handling, fix safe_region node counter
|
||||||
- `//floodfill`: Fix crash caused by internal refactoring of the `Queue` data structure
|
- `//floodfill`: Fix crash caused by internal refactoring of the `Queue` data structure
|
||||||
- `//spop`: Fix wording in displayed message
|
- `//spop`: Fix wording in displayed message
|
||||||
|
|
||||||
|
|
|
@ -71,10 +71,10 @@ The detailed explanations have moved! Check them out [here](https://github.com/s
|
||||||
- [`//spop`](https://worldeditadditions.mooncarrot.space/Reference/#spop)
|
- [`//spop`](https://worldeditadditions.mooncarrot.space/Reference/#spop)
|
||||||
|
|
||||||
### Measure
|
### Measure
|
||||||
- [`//mface`](https://worldeditadditions.mooncarrot.space/Reference/#mface)
|
- [`//mface`](https://worldeditadditions.mooncarrot.space/Reference/#mface) _(new in v1.13)_
|
||||||
- [`//midpos`](https://worldeditadditions.mooncarrot.space/Reference/#midpos)
|
- [`//midpos`](https://worldeditadditions.mooncarrot.space/Reference/#midpos) _(new in v1.13)_
|
||||||
- [`//msize`](https://worldeditadditions.mooncarrot.space/Reference/#msize)
|
- [`//msize`](https://worldeditadditions.mooncarrot.space/Reference/#msize) _(new in v1.13)_
|
||||||
- [`//mtrig`](https://worldeditadditions.mooncarrot.space/Reference/#mtrig)
|
- [`//mtrig`](https://worldeditadditions.mooncarrot.space/Reference/#mtrig) _(new in v1.13)_
|
||||||
|
|
||||||
### Meta
|
### Meta
|
||||||
- [`//multi <command_a> <command_b> ....`](https://worldeditadditions.mooncarrot.space/Reference/#multi)
|
- [`//multi <command_a> <command_b> ....`](https://worldeditadditions.mooncarrot.space/Reference/#multi)
|
||||||
|
@ -82,6 +82,7 @@ The detailed explanations have moved! Check them out [here](https://github.com/s
|
||||||
- [`//subdivide <size_x> <size_y> <size_z> <cmd_name> <args>`](https://worldeditadditions.mooncarrot.space/Reference/#subdivide)
|
- [`//subdivide <size_x> <size_y> <size_z> <cmd_name> <args>`](https://worldeditadditions.mooncarrot.space/Reference/#subdivide)
|
||||||
- [`//ellipsoidapply <command_name> <args>`](https://worldeditadditions.mooncarrot.space/Reference/#ellipsoidapply) _(new in v1.9)_
|
- [`//ellipsoidapply <command_name> <args>`](https://worldeditadditions.mooncarrot.space/Reference/#ellipsoidapply) _(new in v1.9)_
|
||||||
- [`//airapply <command_name> <args>`](https://worldeditadditions.mooncarrot.space/Reference/#airapply) _(new in v1.9)_
|
- [`//airapply <command_name> <args>`](https://worldeditadditions.mooncarrot.space/Reference/#airapply) _(new in v1.9)_
|
||||||
|
- [`//noiseapply2d <command_name> <args>`](https://worldeditadditions.mooncarrot.space/Reference/#noiseapply2d) _(new in v1.13)_
|
||||||
|
|
||||||
### Extras
|
### Extras
|
||||||
- [`//y`](https://github.com/sbrl/Minetest-WorldEditAdditions/blob/main/Chat-Command-Reference.md#y)
|
- [`//y`](https://github.com/sbrl/Minetest-WorldEditAdditions/blob/main/Chat-Command-Reference.md#y)
|
||||||
|
|
|
@ -38,8 +38,10 @@ worldedit.register_command("airapply", {
|
||||||
return true, cmd_we, args_parsed
|
return true, cmd_we, args_parsed
|
||||||
end,
|
end,
|
||||||
nodes_needed = function(name)
|
nodes_needed = function(name)
|
||||||
local pos1, pos2 = worldedit.sort_pos(worldedit.pos1[name], worldedit.pos2[name])
|
return worldedit.volume(
|
||||||
return math.ceil(4/3 * math.pi * (pos2.x - pos1.x)/2 * (pos2.y - pos1.y)/2 * (pos2.z - pos1.z)/2)
|
worldedit.pos1[name],
|
||||||
|
worldedit.pos2[name]
|
||||||
|
)
|
||||||
end,
|
end,
|
||||||
func = function(name, cmd, args_parsed)
|
func = function(name, cmd, args_parsed)
|
||||||
if not minetest.check_player_privs(name, cmd.privs) then
|
if not minetest.check_player_privs(name, cmd.privs) then
|
||||||
|
|
Loading…
Reference in a new issue