Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
OreManager Class Reference

#include <mg_ore.h>

+ Inheritance diagram for OreManager:
+ Collaboration diagram for OreManager:

Public Member Functions

 OreManager (IGameDef *gamedef)
 
virtual ~OreManager ()=default
 
OreManagerclone () const
 
const char * getObjectTitle () const
 
void clear ()
 
size_t placeAllOres (Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax)
 
- Public Member Functions inherited from ObjDefManager
 ObjDefManager (IGameDef *gamedef, ObjDefType type)
 
virtual ~ObjDefManager ()
 
 DISABLE_CLASS_COPY (ObjDefManager)
 
virtual ObjDefgetByName (const std::string &name) const
 
virtual ObjDefHandle add (ObjDef *obj)
 
virtual ObjDefget (ObjDefHandle handle) const
 
virtual ObjDefset (ObjDefHandle handle, ObjDef *obj)
 
virtual u32 addRaw (ObjDef *obj)
 
virtual ObjDefgetRaw (u32 index) const
 
virtual ObjDefsetRaw (u32 index, ObjDef *obj)
 
size_t getNumObjects () const
 
ObjDefType getType () const
 
const NodeDefManagergetNodeDef () const
 
u32 validateHandle (ObjDefHandle handle) const
 

Static Public Member Functions

static Orecreate (OreType type)
 
- Static Public Member Functions inherited from ObjDefManager
static ObjDefHandle createHandle (u32 index, ObjDefType type, u32 uid)
 
static bool decodeHandle (ObjDefHandle handle, u32 *index, ObjDefType *type, u32 *uid)
 

Private Member Functions

 OreManager ()
 

Additional Inherited Members

- Protected Member Functions inherited from ObjDefManager
 ObjDefManager ()
 
void cloneTo (ObjDefManager *mgr) const
 
- Protected Attributes inherited from ObjDefManager
const NodeDefManagerm_ndef
 
std::vector< ObjDef * > m_objects
 
ObjDefType m_objtype
 

Constructor & Destructor Documentation

◆ OreManager() [1/2]

OreManager::OreManager ( IGameDef * gamedef)

◆ ~OreManager()

virtual OreManager::~OreManager ( )
virtualdefault

◆ OreManager() [2/2]

OreManager::OreManager ( )
inlineprivate

Referenced by clone().

+ Here is the caller graph for this function:

Member Function Documentation

◆ clear()

void OreManager::clear ( )
virtual

Reimplemented from ObjDefManager.

References ObjDefManager::m_objects.

Referenced by ModApiMapgen::l_clear_registered_ores().

+ Here is the caller graph for this function:

◆ clone()

OreManager * OreManager::clone ( ) const

References OreManager(), and ObjDefManager::cloneTo().

+ Here is the call graph for this function:

◆ create()

static Ore * OreManager::create ( OreType type)
inlinestatic

References ORE_BLOB, ORE_PUFF, ORE_SCATTER, ORE_SHEET, ORE_STRATUM, and ORE_VEIN.

Referenced by ModApiMapgen::l_register_ore().

+ Here is the caller graph for this function:

◆ getObjectTitle()

const char * OreManager::getObjectTitle ( ) const
inlinevirtual

Reimplemented from ObjDefManager.

◆ placeAllOres()

size_t OreManager::placeAllOres ( Mapgen * mg,
u32 blockseed,
v3s16 nmin,
v3s16 nmax )

References ObjDefManager::m_objects, and Ore::placeOre().

Referenced by ModApiMapgen::l_generate_ores(), MapgenCarpathian::makeChunk(), MapgenFlat::makeChunk(), MapgenFractal::makeChunk(), MapgenV5::makeChunk(), MapgenV6::makeChunk(), MapgenV7::makeChunk(), and MapgenValleys::makeChunk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: