//sculpt: Fix undefined `default` brush

This commit is contained in:
Starbeamrainbowlabs 2022-06-11 18:53:54 +01:00
parent 77c634dd7d
commit 6e0779a4e5
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
2 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,7 @@ 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 `//metaball`, which renders 2 or more [metaballs](https://en.wikipedia.org/wiki/Metaballs) in Minetest
- Migrate from `depends.txt` to `mod.conf`
- `//sculpt`: Fix undefined `default` brush
## v1.13: The transformational update (2nd January 2022)

View File

@ -5,6 +5,7 @@ local wea = worldeditadditions
-- @param target_size Vector3 The target size of the brush to create.
-- @returns true,table,Vector3|false,string If the operation was successful, true followed by the brush in a 1D ZERO-indexed table followed by the actual size of the brush as a Vector3 (x & y components used only). If the operation was not successful, false and an error message string is returned instead.
local function make_brush(brush_name, target_size)
if brush_name == "default" then brush_name = "circle_soft1" end
if not wea.sculpt.brushes[brush_name] then return false, "Error: That brush does not exist. Try using //sculptbrushes to list all available sculpting brushes." end
local brush_def = wea.sculpt.brushes[brush_name]