Fix typo.

This commit is contained in:
Relintai 2022-10-05 10:30:52 +02:00
parent ece362681d
commit a0472fb6eb
4 changed files with 19 additions and 19 deletions

View File

@ -14,7 +14,7 @@ sources = [
"register_types.cpp", "register_types.cpp",
"biome_terrarin_generator.cpp", "biome_terrain_generator.cpp",
] ]
if ARGUMENTS.get('custom_modules_shared', 'no') == 'yes': if ARGUMENTS.get('custom_modules_shared', 'no') == 'yes':

View File

@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
*/ */
#include "biome_terrarin_generator.h" #include "biome_terrain_generator.h"
#include "core/config/engine.h" #include "core/config/engine.h"
@ -35,15 +35,15 @@ SOFTWARE.
#include "../entity_spell_system/spawners/ess_entity_spawner.h" #include "../entity_spell_system/spawners/ess_entity_spawner.h"
#include "../opensimplex/open_simplex_noise.h" #include "../opensimplex/open_simplex_noise.h"
int BiomeTerrarinGenerator::get_current_seed() { int BiomeTerrainGenerator::get_current_seed() {
return _current_seed; return _current_seed;
} }
void BiomeTerrarinGenerator::set_current_seed(int value) { void BiomeTerrainGenerator::set_current_seed(int value) {
_current_seed = value; _current_seed = value;
} }
#ifdef VOXELMAN_PRESENT #ifdef VOXELMAN_PRESENT
void BiomeTerrarinGenerator::generate_simple_terrarin(Ref<VoxelChunk> chunk, bool spawn_mobs) { void BiomeTerrainGenerator::generate_simple_terrarin(Ref<VoxelChunk> chunk, bool spawn_mobs) {
Ref<OpenSimplexNoise> noise; Ref<OpenSimplexNoise> noise;
noise.instance(); noise.instance();
noise->set_seed(10 * get_current_seed()); noise->set_seed(10 * get_current_seed());
@ -117,19 +117,19 @@ void BiomeTerrarinGenerator::generate_simple_terrarin(Ref<VoxelChunk> chunk, boo
} }
#endif #endif
BiomeTerrarinGenerator::BiomeTerrarinGenerator() { BiomeTerrainGenerator::BiomeTerrainGenerator() {
_current_seed = 0; _current_seed = 0;
} }
BiomeTerrarinGenerator::~BiomeTerrarinGenerator() { BiomeTerrainGenerator::~BiomeTerrainGenerator() {
} }
void BiomeTerrarinGenerator::_bind_methods() { void BiomeTerrainGenerator::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_current_seed"), &BiomeTerrarinGenerator::get_current_seed); ClassDB::bind_method(D_METHOD("get_current_seed"), &BiomeTerrainGenerator::get_current_seed);
ClassDB::bind_method(D_METHOD("set_current_seed", "value"), &BiomeTerrarinGenerator::set_current_seed); ClassDB::bind_method(D_METHOD("set_current_seed", "value"), &BiomeTerrainGenerator::set_current_seed);
ADD_PROPERTY(PropertyInfo(Variant::INT, "current_seed"), "set_current_seed", "get_current_seed"); ADD_PROPERTY(PropertyInfo(Variant::INT, "current_seed"), "set_current_seed", "get_current_seed");
#ifdef VOXELMAN_PRESENT #ifdef VOXELMAN_PRESENT
ClassDB::bind_method(D_METHOD("generate_simple_terrarin", "chunk", "spawn_mobs"), &BiomeTerrarinGenerator::generate_simple_terrarin); ClassDB::bind_method(D_METHOD("generate_simple_terrarin", "chunk", "spawn_mobs"), &BiomeTerrainGenerator::generate_simple_terrarin);
#endif #endif
} }

View File

@ -1,5 +1,5 @@
#ifndef BIOME_TERRARIN_GENERATOR_H #ifndef BIOME_TERRAIN_GENERATOR_H
#define BIOME_TERRARIN_GENERATOR_H #define BIOME_TERRAIN_GENERATOR_H
/* /*
Copyright (c) 2020-2022 Péter Magyar Copyright (c) 2020-2022 Péter Magyar
@ -28,8 +28,8 @@ SOFTWARE.
class VoxelChunk; class VoxelChunk;
#endif #endif
class BiomeTerrarinGenerator : public Reference { class BiomeTerrainGenerator : public Reference {
GDCLASS(BiomeTerrarinGenerator, Reference); GDCLASS(BiomeTerrainGenerator, Reference);
public: public:
int get_current_seed(); int get_current_seed();
@ -39,8 +39,8 @@ public:
void generate_simple_terrarin(Ref<VoxelChunk> chunk, bool spawn_mobs); void generate_simple_terrarin(Ref<VoxelChunk> chunk, bool spawn_mobs);
#endif #endif
BiomeTerrarinGenerator(); BiomeTerrainGenerator();
~BiomeTerrarinGenerator(); ~BiomeTerrainGenerator();
protected: protected:
static void _bind_methods(); static void _bind_methods();

View File

@ -24,10 +24,10 @@ SOFTWARE.
*/ */
#include "biome_terrarin_generator.h" #include "biome_terrain_generator.h"
void register_broken_seals_module_types() { void register_broken_seals_module_types() {
ClassDB::register_class<BiomeTerrarinGenerator>(); ClassDB::register_class<BiomeTerrainGenerator>();
} }
void unregister_broken_seals_module_types() { void unregister_broken_seals_module_types() {