mirror of
https://github.com/Relintai/broken_seals_module.git
synced 2024-11-12 10:25:25 +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()
|
||||
|
||||
#Should work with just arrays
|
||||
#if os.path.isdir('../mesh_data_resource'):
|
||||
# module_env.Append(CPPDEFINES=['MESH_DATA_RESOURCE_PRESENT'])
|
||||
if os.path.isdir('../voxelman'):
|
||||
module_env.Append(CPPDEFINES=['VOXELMAN_PRESENT'])
|
||||
|
||||
if os.path.isdir('../terraman'):
|
||||
module_env.Append(CPPDEFINES=['TERRAMAN_PRESENT'])
|
||||
|
||||
sources = [
|
||||
|
||||
|
@ -32,8 +32,10 @@ SOFTWARE.
|
||||
|
||||
#include "core/math/math_funcs.h"
|
||||
|
||||
#ifdef VOXELMAN_PRESENT
|
||||
#include "../voxelman/world/default/voxel_chunk_default.h"
|
||||
#include "../voxelman/world/voxel_chunk.h"
|
||||
#endif
|
||||
|
||||
#include "../entity_spell_system/singletons/ess.h"
|
||||
#include "../entity_spell_system/spawners/ess_entity_spawner.h"
|
||||
@ -46,6 +48,7 @@ void BiomeTerrarinGenerator::set_current_seed(int value) {
|
||||
_current_seed = value;
|
||||
}
|
||||
|
||||
#ifdef VOXELMAN_PRESENT
|
||||
void BiomeTerrarinGenerator::generate_simple_terrarin(Ref<VoxelChunk> chunk, bool spawn_mobs) {
|
||||
Ref<OpenSimplexNoise> noise;
|
||||
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);
|
||||
// }
|
||||
}
|
||||
#endif
|
||||
|
||||
BiomeTerrarinGenerator::BiomeTerrarinGenerator() {
|
||||
_current_seed = 0;
|
||||
@ -131,5 +135,7 @@ void BiomeTerrarinGenerator::_bind_methods() {
|
||||
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");
|
||||
|
||||
#ifdef VOXELMAN_PRESENT
|
||||
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"
|
||||
#endif
|
||||
|
||||
#ifdef VOXELMAN_PRESENT
|
||||
class VoxelChunk;
|
||||
#endif
|
||||
|
||||
class BiomeTerrarinGenerator : public Reference {
|
||||
GDCLASS(BiomeTerrarinGenerator, Reference);
|
||||
@ -40,7 +42,9 @@ public:
|
||||
int get_current_seed();
|
||||
void set_current_seed(int value);
|
||||
|
||||
#ifdef VOXELMAN_PRESENT
|
||||
void generate_simple_terrarin(Ref<VoxelChunk> chunk, bool spawn_mobs);
|
||||
#endif
|
||||
|
||||
BiomeTerrarinGenerator();
|
||||
~BiomeTerrarinGenerator();
|
||||
|
Loading…
Reference in New Issue
Block a user