mirror of
https://github.com/Relintai/world_generator.git
synced 2024-11-12 10:15:07 +01:00
Fix compile when the props module isn't present.
This commit is contained in:
parent
97f10512f8
commit
c10d7b7b8c
4
SCsub
4
SCsub
@ -13,6 +13,10 @@ if os.path.isdir('../voxelman'):
|
||||
if os.path.isdir('../fastnoise'):
|
||||
module_env.Append(CPPDEFINES=['FASTNOISE_PRESENT'])
|
||||
|
||||
if os.path.isdir('../props'):
|
||||
module_env.Append(CPPDEFINES=['PROPS_PRESENT'])
|
||||
|
||||
|
||||
sources = [
|
||||
|
||||
"register_types.cpp",
|
||||
|
@ -169,6 +169,7 @@ void Biome::_setup_library(Ref<VoxelmanLibrary> library) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PROPS_PRESENT
|
||||
for (int i = 0; i < _data->get_prop_data_count(); ++i) {
|
||||
Ref<WorldGeneratorPropData> s = _data->get_prop_data(i);
|
||||
|
||||
@ -179,6 +180,7 @@ void Biome::_setup_library(Ref<VoxelmanLibrary> library) {
|
||||
library->add_prop(s->get_prop());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
void Biome::setup_library(Ref<Resource> library) {
|
||||
|
@ -183,6 +183,7 @@ void DungeonRoom::_setup_library(Ref<VoxelmanLibrary> library) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PROPS_PRESENT
|
||||
for (int i = 0; i < _data->get_prop_data_count(); ++i) {
|
||||
Ref<WorldGeneratorPropData> s = _data->get_prop_data(i);
|
||||
|
||||
@ -193,6 +194,7 @@ void DungeonRoom::_setup_library(Ref<VoxelmanLibrary> library) {
|
||||
library->add_prop(pd);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void DungeonRoom::generate_chunk(Ref<VoxelChunk> chunk, bool spawn_mobs) {
|
||||
|
Loading…
Reference in New Issue
Block a user