update more comments

This commit is contained in:
Starbeamrainbowlabs 2023-07-02 20:05:46 +01:00
parent 047033a6ef
commit c988daeda6
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
6 changed files with 12 additions and 0 deletions

View File

@ -3,6 +3,8 @@ local wea_c = worldeditadditions_core
local Vector3 = wea_c.Vector3
--- Returns a smooth gaussian brush.
-- @name make_gaussian
-- @internal
-- @param size Vector3 The target size of the brush. Note that the actual size of the brush will be different, as the gaussian function has some limitations.
-- @param sigma=2 number The 'smoothness' of the brush. Higher values are more smooth.
return function(size, sigma)

View File

@ -2,6 +2,7 @@ local wea_c = worldeditadditions_core
local Vector3 = wea_c.Vector3
--- Makes a circle brush of a given size.
-- @name circle
-- @param size Vector3 The desired sizez of the brush (only X and Y are considered; Z is ignored).
-- @returns bool,brush,Vector3 Success bool, then the brush, then finally the actual size of the brush generated.
return function(size)

View File

@ -1,5 +1,8 @@
--- Returns a simple square brush with 100% weight for every pixel.
-- @name square
-- @param size Vector3 The desired size of the brush. Only the x and y components are used; the z component is ignored.
-- @returns bool,number[],Vector3 1: true, as this function always succeeds. 2: A simple square brush as a zero-indexed flat array. 3: The size of the resulting brush as a Vector3, using the x and y components.
return function(size)
local result = {}
for y=0, size.y do

View File

@ -3,6 +3,8 @@ local wea = worldeditadditions
local parse_static = dofile(wea.modpath.."/lib/sculpt/parse_static.lua")
--- Reads and parses the brush stored in the specified file.
-- @name import_static
-- @internal
-- @param filepath string The path to file that contains the static brush to read in.
-- @returns true,table,Vector3|false,string A success boolean, followed either by an error message as a string or the brush (as a table) and it's size (as an X/Y Vector3)
return function(filepath)

View File

@ -3,6 +3,8 @@ local wea_c = worldeditadditions_core
local Vector3 = wea_c.Vector3
--- Parses a static brush definition.
-- @name parse_static
-- @internal
-- @param source string The source string that contains the static brush, formatted as TSV.
-- @returns true,table,Vector3|false,string A success boolean, followed either by an error message as a string or the brush (as a table) and it's size (as an X/Y Vector3)
return function(source)

View File

@ -22,6 +22,8 @@ end
--- Scans the given directory and imports all static brushes found.
-- Static brushes have the file extension ".brush.tsv" (without quotes).
-- @name scan_static
-- @internal
-- @param dirpath string The path to directory that contains the static brushs to import.
-- @returns bool,loaded,errors A success boolean, followed by the number of brushes loaded, followed by the number of errors encountered while loading brushes (errors are logged as warnings with Minetest)
return function(dirpath, overwrite_existing)