mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Add minetest.get_mapgen_edges
(#12999)
This commit is contained in:
parent
e84d259ec7
commit
b3ffc4b327
6 changed files with 103 additions and 17 deletions
|
@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "nodedef.h"
|
||||
#include "util/string.h"
|
||||
#include "util/container.h"
|
||||
#include <utility>
|
||||
|
||||
#define MAPGEN_DEFAULT MAPGEN_V7
|
||||
#define MAPGEN_DEFAULT_NAME "v7"
|
||||
|
@ -139,7 +140,6 @@ struct MapgenParams {
|
|||
s32 getSpawnRangeMax();
|
||||
|
||||
private:
|
||||
void calcMapgenEdges();
|
||||
bool m_mapgen_edges_calculated = false;
|
||||
};
|
||||
|
||||
|
@ -329,3 +329,7 @@ protected:
|
|||
s16 dungeon_ymin;
|
||||
s16 dungeon_ymax;
|
||||
};
|
||||
|
||||
// Calculate exact edges of the outermost mapchunks that are within the set
|
||||
// mapgen_limit. Returns the minimum and maximum edges in nodes in that order.
|
||||
std::pair<s16, s16> get_mapgen_edges(s16 mapgen_limit, s16 chunksize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue