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
|
@ -59,7 +59,7 @@ struct CutoffData {
|
|||
};
|
||||
#endif
|
||||
|
||||
class Decoration : public GenElement, public NodeResolver {
|
||||
class Decoration : public ObjDef, public NodeResolver {
|
||||
public:
|
||||
INodeDefManager *ndef;
|
||||
|
||||
|
@ -121,14 +121,16 @@ public:
|
|||
};
|
||||
*/
|
||||
|
||||
class DecorationManager : public GenElementManager {
|
||||
class DecorationManager : public ObjDefManager {
|
||||
public:
|
||||
static const char *ELEMENT_TITLE;
|
||||
static const size_t ELEMENT_LIMIT = 0x10000;
|
||||
|
||||
DecorationManager(IGameDef *gamedef);
|
||||
~DecorationManager() {}
|
||||
|
||||
const char *getObjectTitle() const
|
||||
{
|
||||
return "decoration";
|
||||
}
|
||||
|
||||
Decoration *create(int type)
|
||||
{
|
||||
switch (type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue