mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-09 19:45:21 +01:00
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.
This commit is contained in:
17
src/mg_ore.h
17
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user