aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapgen.h')
-rw-r--r--src/mapgen.h43
1 files changed, 34 insertions, 9 deletions
diff --git a/src/mapgen.h b/src/mapgen.h
index e29616342..5b189d963 100644
--- a/src/mapgen.h
+++ b/src/mapgen.h
@@ -20,13 +20,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef MAPGEN_HEADER
#define MAPGEN_HEADER
-#include "irrlichttypes_bloated.h"
-#include "util/container.h" // UniqueQueue
-#include "gamedef.h"
#include "nodedef.h"
#include "mapnode.h"
-#include "noise.h"
-#include "settings.h"
+#include "util/string.h"
+#include "util/container.h"
#define DEFAULT_MAPGEN "v6"
@@ -39,11 +36,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define NUM_GEN_NOTIFY 6
+class Settings;
+class ManualMapVoxelManipulator;
+class INodeDefManager;
extern FlagDesc flagdesc_mapgen[];
extern FlagDesc flagdesc_gennotify[];
-class BiomeDefManager;
class Biome;
class EmergeManager;
class MapBlock;
@@ -53,7 +52,6 @@ struct BlockMakeData;
class VoxelArea;
class Map;
-
enum MapgenObject {
MGOBJ_VMANIP,
MGOBJ_HEIGHTMAP,
@@ -131,10 +129,37 @@ public:
struct MapgenFactory {
virtual Mapgen *createMapgen(int mgid, MapgenParams *params,
- EmergeManager *emerge) = 0;
+ EmergeManager *emerge) = 0;
virtual MapgenSpecificParams *createMapgenParams() = 0;
virtual ~MapgenFactory() {}
};
-#endif
+class GenElement {
+public:
+ uint32_t id;
+ std::string name;
+};
+
+class GenElementManager {
+public:
+ static const char *ELEMENT_TITLE;
+ static const size_t ELEMENT_LIMIT = -1;
+ GenElementManager() {}
+ virtual ~GenElementManager();
+
+ virtual GenElement *create(int type) = 0;
+
+ virtual u32 add(GenElement *elem);
+ virtual GenElement *get(u32 id);
+ virtual GenElement *update(u32 id, GenElement *elem);
+ virtual GenElement *remove(u32 id);
+
+ virtual GenElement *getByName(const char *name);
+ virtual GenElement *getByName(std::string &name);
+
+protected:
+ std::vector<GenElement *> m_elements;
+};
+
+#endif