floodfill,line: add proper comments

All @module declarations must go!
This commit is contained in:
Starbeamrainbowlabs 2023-07-07 00:42:57 +01:00
parent 2edc9f6f6c
commit 74cc6669c0
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
2 changed files with 11 additions and 6 deletions

View File

@ -3,9 +3,10 @@ local Vector3 = wea_c.Vector3
--- Flood-fill command for complex lakes etc.
-- @module worldeditadditions.floodfill
-- @param start_pos Vector3 The position to start floodfilling from.
-- @param radius number The maximum radius to limit the floodfill operation too.
-- @param replace_node string The (normalised) name of the node to replace with when floodfilling.
-- @returns number The number of nodes replaced.
function worldeditadditions.floodfill(start_pos, radius, replace_node)
start_pos = Vector3.clone(start_pos)

View File

@ -1,8 +1,6 @@
local wea_c = worldeditadditions_core
local Vector3 = wea_c.Vector3
--- Counts the nodes in a given area.
-- @module worldeditadditions.count
-- ██ ██ ███ ██ ███████
-- ██ ██ ████ ██ ██
@ -10,7 +8,13 @@ local Vector3 = wea_c.Vector3
-- ██ ██ ██ ██ ██ ██
-- ███████ ██ ██ ████ ███████
--- Counts the nodes in a given area.
-- @param pos1 Vector3 The position to start drawing the line from.
-- @param pos2 Vector3 The position to draw the line to.
-- @param thickness number The thickness of the line to draw.
-- @param node_name string The (normalised) name of the node to draw the line with.
-- @returns bool,{replaced=number} 1. A bool indicating whether the operation was successful or not.
-- 2. A table containing statistics. At present the only key in this table is `replaced`, which indicates the number of nodes replaced when drawing the line.
function worldeditadditions.line(pos1, pos2, thickness, node_name)
local pos1_sorted, pos2_sorted = Vector3.sort(pos1, pos2)
-- pos2 will always have the highest co-ordinates now