From 9f6d90aa811dd8f523b137d602127d31307ea15c Mon Sep 17 00:00:00 2001 From: Paramat Date: Sun, 3 Sep 2017 21:32:21 +0100 Subject: Ores: Add stratum ore (#6352) Creates a single undulating ore stratum that is continuous across mapchunk borders and horizontally spans the world. Due to being continuous is ideal for creating bands of alternative stone type running through cliffs and mountains, or underground layers. Add missing documentation of 'ore_param2' parameter. --- src/mg_ore.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/mg_ore.h') diff --git a/src/mg_ore.h b/src/mg_ore.h index 253b115a2..b4309f2f9 100644 --- a/src/mg_ore.h +++ b/src/mg_ore.h @@ -42,6 +42,7 @@ enum OreType { ORE_PUFF, ORE_BLOB, ORE_VEIN, + ORE_STRATUM, }; extern FlagDesc flagdesc_ore[]; @@ -133,6 +134,20 @@ public: v3s16 nmin, v3s16 nmax, u8 *biomemap); }; +class OreStratum : public Ore { +public: + static const bool NEEDS_NOISE = true; + + NoiseParams np_stratum_thickness; + Noise *noise_stratum_thickness = nullptr; + + OreStratum() = default; + virtual ~OreStratum(); + + virtual void generate(MMVManip *vm, int mapseed, u32 blockseed, + v3s16 nmin, v3s16 nmax, u8 *biomemap); +}; + class OreManager : public ObjDefManager { public: OreManager(IGameDef *gamedef); @@ -156,6 +171,8 @@ public: return new OreBlob; case ORE_VEIN: return new OreVein; + case ORE_STRATUM: + return new OreStratum; default: return nullptr; } -- cgit v1.2.3