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",
"biome_terrarin_generator.cpp",
"biome_terrain_generator.cpp",
]
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.
*/
#include "biome_terrarin_generator.h"
#include "biome_terrain_generator.h"
#include "core/config/engine.h"
@ -35,15 +35,15 @@ SOFTWARE.
#include "../entity_spell_system/spawners/ess_entity_spawner.h"
#include "../opensimplex/open_simplex_noise.h"
int BiomeTerrarinGenerator::get_current_seed() {
int BiomeTerrainGenerator::get_current_seed() {
return _current_seed;
}
void BiomeTerrarinGenerator::set_current_seed(int value) {
void BiomeTerrainGenerator::set_current_seed(int value) {
_current_seed = value;
}
#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;
noise.instance();
noise->set_seed(10 * get_current_seed());
@ -117,19 +117,19 @@ void BiomeTerrarinGenerator::generate_simple_terrarin(Ref<VoxelChunk> chunk, boo
}
#endif
BiomeTerrarinGenerator::BiomeTerrarinGenerator() {
BiomeTerrainGenerator::BiomeTerrainGenerator() {
_current_seed = 0;
}
BiomeTerrarinGenerator::~BiomeTerrarinGenerator() {
BiomeTerrainGenerator::~BiomeTerrainGenerator() {
}
void BiomeTerrarinGenerator::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_current_seed"), &BiomeTerrarinGenerator::get_current_seed);
ClassDB::bind_method(D_METHOD("set_current_seed", "value"), &BiomeTerrarinGenerator::set_current_seed);
void BiomeTerrainGenerator::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_current_seed"), &BiomeTerrainGenerator::get_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");
#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
}

View File

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