diff options
author | Paramat <paramat@users.noreply.github.com> | 2017-09-03 21:32:21 +0100 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-09-03 22:32:21 +0200 |
commit | 9f6d90aa811dd8f523b137d602127d31307ea15c (patch) | |
tree | fa92018a3ddd212f30fbfe08804313218153d0b9 /src/mg_ore.h | |
parent | 5bef3393889e0a29155a7e777d19344eaaae96b7 (diff) | |
download | minetest-9f6d90aa811dd8f523b137d602127d31307ea15c.tar.gz minetest-9f6d90aa811dd8f523b137d602127d31307ea15c.tar.bz2 minetest-9f6d90aa811dd8f523b137d602127d31307ea15c.zip |
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.
Diffstat (limited to 'src/mg_ore.h')
-rw-r--r-- | src/mg_ore.h | 17 |
1 files changed, 17 insertions, 0 deletions
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; } |