mirror of
https://github.com/Relintai/terraman.git
synced 2025-04-23 21:43:23 +02:00
Added back the max_concurrent_generations property. This fixes chunk generation on android.
This commit is contained in:
parent
890aadb941
commit
b22fceabe9
@ -92,6 +92,13 @@ void TerraWorld::set_world_height(const float value) {
|
|||||||
_world_height = value;
|
_world_height = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int TerraWorld::get_max_concurrent_generations() {
|
||||||
|
return _max_concurrent_generations;
|
||||||
|
}
|
||||||
|
void TerraWorld::set_max_concurrent_generations(const int value) {
|
||||||
|
_max_concurrent_generations = value;
|
||||||
|
}
|
||||||
|
|
||||||
Ref<TerramanLibrary> TerraWorld::get_library() {
|
Ref<TerramanLibrary> TerraWorld::get_library() {
|
||||||
return _library;
|
return _library;
|
||||||
}
|
}
|
||||||
@ -784,6 +791,7 @@ TerraWorld::TerraWorld() {
|
|||||||
_editable = false;
|
_editable = false;
|
||||||
|
|
||||||
_is_priority_generation = true;
|
_is_priority_generation = true;
|
||||||
|
_max_concurrent_generations = 3;
|
||||||
|
|
||||||
_chunk_size_x = 16;
|
_chunk_size_x = 16;
|
||||||
_chunk_size_z = 16;
|
_chunk_size_z = 16;
|
||||||
@ -987,6 +995,10 @@ void TerraWorld::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("set_world_height", "height"), &TerraWorld::set_world_height);
|
ClassDB::bind_method(D_METHOD("set_world_height", "height"), &TerraWorld::set_world_height);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::REAL, "world_height"), "set_world_height", "get_world_height");
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "world_height"), "set_world_height", "get_world_height");
|
||||||
|
|
||||||
|
ClassDB::bind_method(D_METHOD("get_max_concurrent_generations"), &TerraWorld::get_max_concurrent_generations);
|
||||||
|
ClassDB::bind_method(D_METHOD("set_max_concurrent_generations", "height"), &TerraWorld::set_max_concurrent_generations);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_concurrent_generations"), "set_max_concurrent_generations", "get_max_concurrent_generations");
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_current_seed"), &TerraWorld::get_current_seed);
|
ClassDB::bind_method(D_METHOD("get_current_seed"), &TerraWorld::get_current_seed);
|
||||||
ClassDB::bind_method(D_METHOD("set_current_seed", "value"), &TerraWorld::set_current_seed);
|
ClassDB::bind_method(D_METHOD("set_current_seed", "value"), &TerraWorld::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");
|
||||||
|
@ -85,6 +85,9 @@ public:
|
|||||||
float get_world_height() const;
|
float get_world_height() const;
|
||||||
void set_world_height(const float value);
|
void set_world_height(const float value);
|
||||||
|
|
||||||
|
int get_max_concurrent_generations();
|
||||||
|
void set_max_concurrent_generations(const int value);
|
||||||
|
|
||||||
Ref<TerramanLibrary> get_library();
|
Ref<TerramanLibrary> get_library();
|
||||||
void set_library(const Ref<TerramanLibrary> &library);
|
void set_library(const Ref<TerramanLibrary> &library);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user