//conv, //erode: treat liquids as air

This commit is contained in:
Starbeamrainbowlabs 2021-02-23 00:20:57 +00:00
parent aef4fe4380
commit 4ba59a6ec3
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 3 additions and 2 deletions

View file

@ -15,7 +15,8 @@ It's about time I started a changelog! This will serve from now on as the main c
- If you encounter any other issues with it over large areas (particularly 2000x150x2000 and larger), please let me know - If you encounter any other issues with it over large areas (particularly 2000x150x2000 and larger), please let me know
- Bugfix: Fix obscure crash in calls to `human_size` ("unknown" will now be returned if passed junk) - Bugfix: Fix obscure crash in calls to `human_size` ("unknown" will now be returned if passed junk)
- `//many` can now be used with commands with no arguments. - `//many` can now be used with commands with no arguments.
- `//fillcaves`: Treat liquids as air when filling caves in - `//conv`, `//erode`, `//fillcaves`: Treat liquids as air
## v1.10 (16th January 2021) ## v1.10 (16th January 2021)
- `//maze`: Fix some parts of generated mazes staying solid - `//maze`: Fix some parts of generated mazes staying solid

View file

@ -20,7 +20,7 @@ function worldeditadditions.make_heightmap(pos1, pos2, manip, area, data)
-- Scan each column top to bottom -- Scan each column top to bottom
for y = pos2.y+1, pos1.y, -1 do for y = pos2.y+1, pos1.y, -1 do
local i = area:index(x, y, z) local i = area:index(x, y, z)
if not worldeditadditions.is_airlike(data[i]) then if not (worldeditadditions.is_airlike(data[i]) or worldeditadditions.is_liquidlike(data[i])) then
-- It's the first non-airlike node in this column -- It's the first non-airlike node in this column
-- Start heightmap values from 1 (i.e. there's at least 1 node in the column) -- Start heightmap values from 1 (i.e. there's at least 1 node in the column)
heightmap[hi] = (y - pos1.y) + 1 heightmap[hi] = (y - pos1.y) + 1