mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
GenElementManager: Pass opaque handles to Lua and rename to ObjDefManager
Add core.clear_registered_schematics() and refactor schematics somewhat
This commit is contained in:
parent
6a48844eba
commit
ed10005d38
16 changed files with 363 additions and 203 deletions
12
src/mg_ore.h
12
src/mg_ore.h
|
@ -47,7 +47,7 @@ enum OreType {
|
|||
|
||||
extern FlagDesc flagdesc_ore[];
|
||||
|
||||
class Ore : public GenElement, public NodeResolver {
|
||||
class Ore : public ObjDef, public NodeResolver {
|
||||
public:
|
||||
static const bool NEEDS_NOISE = false;
|
||||
|
||||
|
@ -112,14 +112,16 @@ public:
|
|||
v3s16 nmin, v3s16 nmax);
|
||||
};
|
||||
|
||||
class OreManager : public GenElementManager {
|
||||
class OreManager : public ObjDefManager {
|
||||
public:
|
||||
static const char *ELEMENT_TITLE;
|
||||
static const size_t ELEMENT_LIMIT = 0x10000;
|
||||
|
||||
OreManager(IGameDef *gamedef);
|
||||
~OreManager() {}
|
||||
|
||||
const char *getObjectTitle() const
|
||||
{
|
||||
return "ore";
|
||||
}
|
||||
|
||||
Ore *create(int type)
|
||||
{
|
||||
switch (type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue