mirror of
https://github.com/Relintai/broken_seals_module.git
synced 2024-11-08 10:12:13 +01:00
Fix compile without voxelman.
This commit is contained in:
parent
4d8de70db8
commit
8bfe7efe69
8
SCsub
8
SCsub
@ -4,9 +4,11 @@ Import('env')
|
|||||||
|
|
||||||
module_env = env.Clone()
|
module_env = env.Clone()
|
||||||
|
|
||||||
#Should work with just arrays
|
if os.path.isdir('../voxelman'):
|
||||||
#if os.path.isdir('../mesh_data_resource'):
|
module_env.Append(CPPDEFINES=['VOXELMAN_PRESENT'])
|
||||||
# module_env.Append(CPPDEFINES=['MESH_DATA_RESOURCE_PRESENT'])
|
|
||||||
|
if os.path.isdir('../terraman'):
|
||||||
|
module_env.Append(CPPDEFINES=['TERRAMAN_PRESENT'])
|
||||||
|
|
||||||
sources = [
|
sources = [
|
||||||
|
|
||||||
|
@ -32,8 +32,10 @@ SOFTWARE.
|
|||||||
|
|
||||||
#include "core/math/math_funcs.h"
|
#include "core/math/math_funcs.h"
|
||||||
|
|
||||||
|
#ifdef VOXELMAN_PRESENT
|
||||||
#include "../voxelman/world/default/voxel_chunk_default.h"
|
#include "../voxelman/world/default/voxel_chunk_default.h"
|
||||||
#include "../voxelman/world/voxel_chunk.h"
|
#include "../voxelman/world/voxel_chunk.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../entity_spell_system/singletons/ess.h"
|
#include "../entity_spell_system/singletons/ess.h"
|
||||||
#include "../entity_spell_system/spawners/ess_entity_spawner.h"
|
#include "../entity_spell_system/spawners/ess_entity_spawner.h"
|
||||||
@ -46,6 +48,7 @@ void BiomeTerrarinGenerator::set_current_seed(int value) {
|
|||||||
_current_seed = value;
|
_current_seed = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef VOXELMAN_PRESENT
|
||||||
void BiomeTerrarinGenerator::generate_simple_terrarin(Ref<VoxelChunk> chunk, bool spawn_mobs) {
|
void BiomeTerrarinGenerator::generate_simple_terrarin(Ref<VoxelChunk> chunk, bool spawn_mobs) {
|
||||||
Ref<OpenSimplexNoise> noise;
|
Ref<OpenSimplexNoise> noise;
|
||||||
noise.instance();
|
noise.instance();
|
||||||
@ -118,6 +121,7 @@ void BiomeTerrarinGenerator::generate_simple_terrarin(Ref<VoxelChunk> chunk, boo
|
|||||||
// ESS::get_singleton()->get_entity_spawner()->call("spawn_mob", 0, Math::rand() % 3, v);
|
// ESS::get_singleton()->get_entity_spawner()->call("spawn_mob", 0, Math::rand() % 3, v);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
BiomeTerrarinGenerator::BiomeTerrarinGenerator() {
|
BiomeTerrarinGenerator::BiomeTerrarinGenerator() {
|
||||||
_current_seed = 0;
|
_current_seed = 0;
|
||||||
@ -131,5 +135,7 @@ void BiomeTerrarinGenerator::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("set_current_seed", "value"), &BiomeTerrarinGenerator::set_current_seed);
|
ClassDB::bind_method(D_METHOD("set_current_seed", "value"), &BiomeTerrarinGenerator::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
|
||||||
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"), &BiomeTerrarinGenerator::generate_simple_terrarin);
|
||||||
|
#endif
|
||||||
}
|
}
|
@ -31,7 +31,9 @@ SOFTWARE.
|
|||||||
#include "core/reference.h"
|
#include "core/reference.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef VOXELMAN_PRESENT
|
||||||
class VoxelChunk;
|
class VoxelChunk;
|
||||||
|
#endif
|
||||||
|
|
||||||
class BiomeTerrarinGenerator : public Reference {
|
class BiomeTerrarinGenerator : public Reference {
|
||||||
GDCLASS(BiomeTerrarinGenerator, Reference);
|
GDCLASS(BiomeTerrarinGenerator, Reference);
|
||||||
@ -40,7 +42,9 @@ public:
|
|||||||
int get_current_seed();
|
int get_current_seed();
|
||||||
void set_current_seed(int value);
|
void set_current_seed(int value);
|
||||||
|
|
||||||
|
#ifdef VOXELMAN_PRESENT
|
||||||
void generate_simple_terrarin(Ref<VoxelChunk> chunk, bool spawn_mobs);
|
void generate_simple_terrarin(Ref<VoxelChunk> chunk, bool spawn_mobs);
|
||||||
|
#endif
|
||||||
|
|
||||||
BiomeTerrarinGenerator();
|
BiomeTerrarinGenerator();
|
||||||
~BiomeTerrarinGenerator();
|
~BiomeTerrarinGenerator();
|
||||||
|
Loading…
Reference in New Issue
Block a user