mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 07:23:00 +00:00
//sculpt: tweak the default settings
I got the idea from an MC video about voxelsniper. Surprisingly it works rather well :P
This commit is contained in:
parent
e3dac29a80
commit
46587164bd
3 changed files with 10 additions and 7 deletions
|
@ -8,7 +8,10 @@ Note to self: See the bottom of this file for the release template text.
|
||||||
- Add `//dome+`, which allows you to change the direction the dome is pointing in, and also create multiple domes at once
|
- Add `//dome+`, which allows you to change the direction the dome is pointing in, and also create multiple domes at once
|
||||||
- Add `//metaball`, which renders 2 or more [metaballs](https://en.wikipedia.org/wiki/Metaballs) in Minetest
|
- Add `//metaball`, which renders 2 or more [metaballs](https://en.wikipedia.org/wiki/Metaballs) in Minetest
|
||||||
- Migrate from `depends.txt` to `mod.conf`
|
- Migrate from `depends.txt` to `mod.conf`
|
||||||
- `//sculpt`: Fix undefined `default` brush
|
- `//sculpt`:
|
||||||
|
- Fix undefined `default` brush
|
||||||
|
- Change defaults to `circle`, `height=1`, and `brushsize=8`.
|
||||||
|
- **TODO:** change ordering to put `height` after `brushsize` instead of the other way around
|
||||||
- Commands that modify the terrain now ignore liquids
|
- Commands that modify the terrain now ignore liquids
|
||||||
- `//hollow`: Fix safe region bug
|
- `//hollow`: Fix safe region bug
|
||||||
- Significant backend refactoring to tidy things up
|
- Significant backend refactoring to tidy things up
|
||||||
|
|
|
@ -670,7 +670,7 @@ Lists all the available sculpting brushes for use with `//sculpt`. If the `previ
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### `//sculpt [<brush_name=default> [<height=5> [<brush_size=10>]]]`
|
### `//sculpt [<brush_name=default> [<height=1> [<brush_size=8>]]]`
|
||||||
Applies a specified brush to the terrain at position 1 with a given height and a given size. Multiple brushes exist (see [`//sculptlist`](#sculptlist)) - and are represented as a 2D grid of values between 0 and 1, which are then scaled to the specified height. The terrain around position 1 is first converted to a 2D heightmap (as in [`//convolve`](#convolve) before the brush "heightmap" is applied to it.
|
Applies a specified brush to the terrain at position 1 with a given height and a given size. Multiple brushes exist (see [`//sculptlist`](#sculptlist)) - and are represented as a 2D grid of values between 0 and 1, which are then scaled to the specified height. The terrain around position 1 is first converted to a 2D heightmap (as in [`//convolve`](#convolve) before the brush "heightmap" is applied to it.
|
||||||
|
|
||||||
Similar to [`//sphere`](https://github.com/Uberi/Minetest-WorldEdit/blob/master/ChatCommands.md#sphere-radius-node), [`//cubeapply 10 set`](https://github.com/Uberi/Minetest-WorldEdit/blob/master/ChatCommands.md#cubeapply-sizesizex-sizey-sizez-command-parameters), or [`//cylinder y 5 10 10 dirt`](https://github.com/Uberi/Minetest-WorldEdit/blob/master/ChatCommands.md#cylinder-xyz-length-radius1-radius2-node) (all from [WorldEdit](https://content.minetest.net/packages/sfan5/worldedit/)), but has a number of added advantages:
|
Similar to [`//sphere`](https://github.com/Uberi/Minetest-WorldEdit/blob/master/ChatCommands.md#sphere-radius-node), [`//cubeapply 10 set`](https://github.com/Uberi/Minetest-WorldEdit/blob/master/ChatCommands.md#cubeapply-sizesizex-sizey-sizez-command-parameters), or [`//cylinder y 5 10 10 dirt`](https://github.com/Uberi/Minetest-WorldEdit/blob/master/ChatCommands.md#cylinder-xyz-length-radius1-radius2-node) (all from [WorldEdit](https://content.minetest.net/packages/sfan5/worldedit/)), but has a number of added advantages:
|
||||||
|
|
|
@ -9,20 +9,20 @@ local Vector3 = wea_c.Vector3
|
||||||
-- ██ ██ ██ ██ ██ ██ ██
|
-- ██ ██ ██ ██ ██ ██ ██
|
||||||
-- ███████ ██████ ██████ ███████ ██ ██
|
-- ███████ ██████ ██████ ███████ ██ ██
|
||||||
worldeditadditions_core.register_command("sculpt", {
|
worldeditadditions_core.register_command("sculpt", {
|
||||||
params = "[<brush_name=default> [<height=5> [<brush_size=10>]]]",
|
params = "[<brush_name=default> [<height=1> [<brush_size=8>]]]",
|
||||||
description = "Applies a sculpting brush to the terrain with a given height. See //sculptlist to list all available brushes. Note that while the brush size is configurable, the actual brush size you end up with may be slightly different to that which you request due to brush size restrictions.",
|
description = "Applies a sculpting brush to the terrain with a given height. See //sculptlist to list all available brushes. Note that while the brush size is configurable, the actual brush size you end up with may be slightly different to that which you request due to brush size restrictions.",
|
||||||
privs = { worldedit = true },
|
privs = { worldedit = true },
|
||||||
require_pos = 1,
|
require_pos = 1,
|
||||||
parse = function(params_text)
|
parse = function(params_text)
|
||||||
if not params_text or params_text == "" then
|
if not params_text or params_text == "" then
|
||||||
params_text = "circle_soft1"
|
params_text = "circle"
|
||||||
end
|
end
|
||||||
|
|
||||||
local parts = wea_c.split_shell(params_text)
|
local parts = wea_c.split_shell(params_text)
|
||||||
|
|
||||||
local brush_name = "circle_soft1"
|
local brush_name = "circle"
|
||||||
local height = 5
|
local height = 1
|
||||||
local brush_size = 10
|
local brush_size = 8
|
||||||
|
|
||||||
if #parts >= 1 then
|
if #parts >= 1 then
|
||||||
brush_name = table.remove(parts, 1)
|
brush_name = table.remove(parts, 1)
|
||||||
|
|
Loading…
Reference in a new issue