From 241fe649f7357271d5c02c3d5f7a987ad7811d6d Mon Sep 17 00:00:00 2001 From: paramat Date: Wed, 11 Oct 2017 01:06:40 +0100 Subject: Biome API: Add decoration flags for underground decorations Add "all_floors" and "all_ceilings" flags for simple and schematic decorations. Decorations are placed on all floor and/or ceiling surfaces. Decorations are placed before dungeon generation so placement in dungeons is not possible. Add 'getSurfaces()' function to mapgen.cpp that returns 2 arrays of y coordinates for all floor and ceiling surfaces in a specified node column. Move 'getHeight()' checks into DecoSimple and DecoSchematic. Delete 'getHeight()' functions. --- src/mapgen.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mapgen.h') diff --git a/src/mapgen.h b/src/mapgen.h index 0a3f267f0..8994fdc00 100644 --- a/src/mapgen.h +++ b/src/mapgen.h @@ -193,6 +193,9 @@ public: s16 findGroundLevel(v2s16 p2d, s16 ymin, s16 ymax); s16 findLiquidSurface(v2s16 p2d, s16 ymin, s16 ymax); void updateHeightmap(v3s16 nmin, v3s16 nmax); + void getSurfaces(v2s16 p2d, s16 ymin, s16 ymax, + s16 *floors, s16 *ceilings, u16 *num_floors, u16 *num_ceilings); + void updateLiquid(UniqueQueue *trans_liquid, v3s16 nmin, v3s16 nmax); void setLighting(u8 light, v3s16 nmin, v3s16 nmax); -- cgit v1.2.3