mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Fix remaining issues with mapgen scriptapi
This commit is contained in:
parent
3c65d1acec
commit
c28fbd06a8
7 changed files with 26 additions and 22 deletions
|
@ -123,7 +123,8 @@ float BiomeManager::getHumidityAtPosOriginal(v3s16 pos, NoiseParams &np_humidity
|
|||
|
||||
|
||||
// For BiomeGen type 'BiomeGenOriginal'
|
||||
Biome *BiomeManager::getBiomeFromNoiseOriginal(float heat, float humidity, v3s16 pos) const
|
||||
const Biome *BiomeManager::getBiomeFromNoiseOriginal(float heat,
|
||||
float humidity, v3s16 pos) const
|
||||
{
|
||||
Biome *biome_closest = nullptr;
|
||||
Biome *biome_closest_blend = nullptr;
|
||||
|
|
|
@ -90,6 +90,7 @@ struct BiomeParams {
|
|||
s32 seed;
|
||||
};
|
||||
|
||||
// WARNING: this class is not thread-safe
|
||||
class BiomeGen {
|
||||
public:
|
||||
virtual ~BiomeGen() = default;
|
||||
|
@ -233,7 +234,8 @@ public:
|
|||
NoiseParams &np_heat_blend, u64 seed) const;
|
||||
float getHumidityAtPosOriginal(v3s16 pos, NoiseParams &np_humidity,
|
||||
NoiseParams &np_humidity_blend, u64 seed) const;
|
||||
Biome *getBiomeFromNoiseOriginal(float heat, float humidity, v3s16 pos) const;
|
||||
const Biome *getBiomeFromNoiseOriginal(float heat, float humidity,
|
||||
v3s16 pos) const;
|
||||
|
||||
private:
|
||||
BiomeManager() {};
|
||||
|
|
|
@ -359,7 +359,7 @@ bool Schematic::deserializeFromMts(std::istream *is,
|
|||
|
||||
|
||||
bool Schematic::serializeToMts(std::ostream *os,
|
||||
const std::vector<std::string> &names)
|
||||
const std::vector<std::string> &names) const
|
||||
{
|
||||
std::ostream &ss = *os;
|
||||
|
||||
|
@ -383,7 +383,8 @@ bool Schematic::serializeToMts(std::ostream *os,
|
|||
|
||||
|
||||
bool Schematic::serializeToLua(std::ostream *os,
|
||||
const std::vector<std::string> &names, bool use_comments, u32 indent_spaces)
|
||||
const std::vector<std::string> &names, bool use_comments,
|
||||
u32 indent_spaces) const
|
||||
{
|
||||
std::ostream &ss = *os;
|
||||
|
||||
|
|
|
@ -106,9 +106,10 @@ public:
|
|||
bool getSchematicFromMap(Map *map, v3s16 p1, v3s16 p2);
|
||||
|
||||
bool deserializeFromMts(std::istream *is, std::vector<std::string> *names);
|
||||
bool serializeToMts(std::ostream *os, const std::vector<std::string> &names);
|
||||
bool serializeToMts(std::ostream *os,
|
||||
const std::vector<std::string> &names) const;
|
||||
bool serializeToLua(std::ostream *os, const std::vector<std::string> &names,
|
||||
bool use_comments, u32 indent_spaces);
|
||||
bool use_comments, u32 indent_spaces) const;
|
||||
|
||||
void blitToVManip(MMVManip *vm, v3s16 p, Rotation rot, bool force_place);
|
||||
bool placeOnVManip(MMVManip *vm, v3s16 p, u32 flags, Rotation rot, bool force_place);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue