mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Add core.get_mapgen_names() to Main Menu API (and use it)
Also rewrite mapgen registration for static initialization
This commit is contained in:
parent
5e2753c712
commit
ca89e63b27
6 changed files with 60 additions and 36 deletions
|
@ -70,8 +70,6 @@ class EmergeManager {
|
|||
public:
|
||||
INodeDefManager *ndef;
|
||||
|
||||
std::map<std::string, MapgenFactory *> mglist;
|
||||
|
||||
std::vector<Mapgen *> mapgen;
|
||||
std::vector<EmergeThread *> emergethread;
|
||||
|
||||
|
@ -105,14 +103,14 @@ public:
|
|||
void loadMapgenParams();
|
||||
void initMapgens();
|
||||
Mapgen *getCurrentMapgen();
|
||||
Mapgen *createMapgen(std::string mgname, int mgid,
|
||||
Mapgen *createMapgen(const std::string &mgname, int mgid,
|
||||
MapgenParams *mgparams);
|
||||
MapgenSpecificParams *createMapgenParams(std::string mgname);
|
||||
MapgenSpecificParams *createMapgenParams(const std::string &mgname);
|
||||
static void getMapgenNames(std::list<const char *> &mgnames);
|
||||
void startThreads();
|
||||
void stopThreads();
|
||||
bool enqueueBlockEmerge(u16 peer_id, v3s16 p, bool allow_generate);
|
||||
|
||||
void registerMapgen(std::string name, MapgenFactory *mgfactory);
|
||||
void loadParamsFromSettings(Settings *settings);
|
||||
void saveParamsToSettings(Settings *settings);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue