mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-27 09:33:52 +01:00
//airapply: fix nodes_needed
This commit is contained in:
parent
b131970f16
commit
fcd4de3429
@ -16,7 +16,7 @@ Note to self: See the bottom of this file for the release template text.
|
||||
|
||||
|
||||
### 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
|
||||
- `//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)
|
||||
|
||||
### Measure
|
||||
- [`//mface`](https://worldeditadditions.mooncarrot.space/Reference/#mface)
|
||||
- [`//midpos`](https://worldeditadditions.mooncarrot.space/Reference/#midpos)
|
||||
- [`//msize`](https://worldeditadditions.mooncarrot.space/Reference/#msize)
|
||||
- [`//mtrig`](https://worldeditadditions.mooncarrot.space/Reference/#mtrig)
|
||||
- [`//mface`](https://worldeditadditions.mooncarrot.space/Reference/#mface) _(new in v1.13)_
|
||||
- [`//midpos`](https://worldeditadditions.mooncarrot.space/Reference/#midpos) _(new in v1.13)_
|
||||
- [`//msize`](https://worldeditadditions.mooncarrot.space/Reference/#msize) _(new in v1.13)_
|
||||
- [`//mtrig`](https://worldeditadditions.mooncarrot.space/Reference/#mtrig) _(new in v1.13)_
|
||||
|
||||
### Meta
|
||||
- [`//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)
|
||||
- [`//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)_
|
||||
- [`//noiseapply2d <command_name> <args>`](https://worldeditadditions.mooncarrot.space/Reference/#noiseapply2d) _(new in v1.13)_
|
||||
|
||||
### Extras
|
||||
- [`//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
|
||||
end,
|
||||
nodes_needed = function(name)
|
||||
local pos1, pos2 = worldedit.sort_pos(worldedit.pos1[name], worldedit.pos2[name])
|
||||
return math.ceil(4/3 * math.pi * (pos2.x - pos1.x)/2 * (pos2.y - pos1.y)/2 * (pos2.z - pos1.z)/2)
|
||||
return worldedit.volume(
|
||||
worldedit.pos1[name],
|
||||
worldedit.pos2[name]
|
||||
)
|
||||
end,
|
||||
func = function(name, cmd, args_parsed)
|
||||
if not minetest.check_player_privs(name, cmd.privs) then
|
||||
|
Loading…
Reference in New Issue
Block a user