diff --git a/data/biome_data.cpp b/data/biome_data.cpp index a551603..0e753bb 100644 --- a/data/biome_data.cpp +++ b/data/biome_data.cpp @@ -1,5 +1,12 @@ #include "biome_data.h" +Vector2 BiomeData::get_level_range() { + return _level_range; +} +void BiomeData::set_level_range(Vector2 value) { + _level_range = value; +} + Vector2 BiomeData::get_humidity_range() { return _humidity_range; } @@ -198,6 +205,10 @@ void BiomeData::_bind_methods() { ClassDB::bind_method(D_METHOD("setup_biome", "seed"), &BiomeData::setup_biome); + ClassDB::bind_method(D_METHOD("get_level_range"), &BiomeData::get_level_range); + ClassDB::bind_method(D_METHOD("set_level_range", "value"), &BiomeData::set_level_range); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "level_range"), "set_level_range", "get_level_range"); + ClassDB::bind_method(D_METHOD("get_humidity_range"), &BiomeData::get_humidity_range); ClassDB::bind_method(D_METHOD("set_humidity_range", "value"), &BiomeData::set_humidity_range); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "humidity_range"), "set_humidity_range", "get_humidity_range"); diff --git a/data/biome_data.h b/data/biome_data.h index 53146cd..49f8282 100644 --- a/data/biome_data.h +++ b/data/biome_data.h @@ -15,6 +15,9 @@ class BiomeData : public Resource { GDCLASS(BiomeData, Resource); public: + Vector2 get_level_range(); + void set_level_range(Vector2 value); + Vector2 get_humidity_range(); void set_humidity_range(Vector2 range); @@ -74,9 +77,11 @@ protected: static void _bind_methods(); private: + Vector2 _level_range; Vector2 _humidity_range; Vector2 _temperature_range; + Vector > _dungeon_datas; Vector > _prop_datas; Vector > _entity_datas; diff --git a/data/dungeon_data.cpp b/data/dungeon_data.cpp index 534152a..49cc541 100644 --- a/data/dungeon_data.cpp +++ b/data/dungeon_data.cpp @@ -1,5 +1,12 @@ #include "dungeon_data.h" +Vector2 DungeonData::get_level_range() { + return _level_range; +} +void DungeonData::set_level_range(Vector2 value) { + _level_range = value; +} + //Min Size int DungeonData::get_min_sizex() { return _min_sizex; @@ -335,6 +342,10 @@ void DungeonData::_bind_methods() { ClassDB::bind_method(D_METHOD("setup_dungeon", "seed"), &DungeonData::setup_dungeon); + ClassDB::bind_method(D_METHOD("get_level_range"), &DungeonData::get_level_range); + ClassDB::bind_method(D_METHOD("set_level_range", "value"), &DungeonData::set_level_range); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "level_range"), "set_level_range", "get_level_range"); + //Min Size ClassDB::bind_method(D_METHOD("get_min_sizex"), &DungeonData::get_min_sizex); ClassDB::bind_method(D_METHOD("set_min_sizex", "value"), &DungeonData::set_min_sizex); diff --git a/data/dungeon_data.h b/data/dungeon_data.h index f22645d..fd1c4c3 100644 --- a/data/dungeon_data.h +++ b/data/dungeon_data.h @@ -15,6 +15,9 @@ class DungeonData : public Resource { GDCLASS(DungeonData, Resource); public: + Vector2 get_level_range(); + void set_level_range(Vector2 value); + //Min Size int get_min_sizex(); void set_min_sizex(int value); @@ -117,6 +120,8 @@ protected: static void _bind_methods(); private: + Vector2 _level_range; + int _min_sizex; int _min_sizey; int _min_sizez; diff --git a/data/dungeon_room_data.cpp b/data/dungeon_room_data.cpp index bdf10ae..96919be 100644 --- a/data/dungeon_room_data.cpp +++ b/data/dungeon_room_data.cpp @@ -1,5 +1,12 @@ #include "dungeon_room_data.h" +Vector2 DungeonRoomData::get_level_range() { + return _level_range; +} +void DungeonRoomData::set_level_range(Vector2 value) { + _level_range = value; +} + //Min Size int DungeonRoomData::get_min_sizex() { return _min_sizex; @@ -187,6 +194,10 @@ void DungeonRoomData::_bind_methods() { ClassDB::bind_method(D_METHOD("setup_room", "seed"), &DungeonRoomData::setup_room); + ClassDB::bind_method(D_METHOD("get_level_range"), &DungeonRoomData::get_level_range); + ClassDB::bind_method(D_METHOD("set_level_range", "value"), &DungeonRoomData::set_level_range); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "level_range"), "set_level_range", "get_level_range"); + //Min Size ClassDB::bind_method(D_METHOD("get_min_sizex"), &DungeonRoomData::get_min_sizex); ClassDB::bind_method(D_METHOD("set_min_sizex", "value"), &DungeonRoomData::set_min_sizex); diff --git a/data/dungeon_room_data.h b/data/dungeon_room_data.h index ac53a2f..40b704f 100644 --- a/data/dungeon_room_data.h +++ b/data/dungeon_room_data.h @@ -13,6 +13,9 @@ class DungeonRoomData : public Resource { GDCLASS(DungeonRoomData, Resource); public: + Vector2 get_level_range(); + void set_level_range(Vector2 value); + //Min Size int get_min_sizex(); void set_min_sizex(int value); @@ -75,6 +78,8 @@ protected: static void _bind_methods(); private: + Vector2 _level_range; + int _min_sizex; int _min_sizey; int _min_sizez; diff --git a/data/planet_data.cpp b/data/planet_data.cpp index ac0c313..6977907 100644 --- a/data/planet_data.cpp +++ b/data/planet_data.cpp @@ -7,6 +7,13 @@ void PlanetData::set_id(const int value) { _id = value; } +Vector2 PlanetData::get_level_range() { + return _level_range; +} +void PlanetData::set_level_range(Vector2 value) { + _level_range = value; +} + Ref PlanetData::get_humidity_noise_params() { return _humidity_noise_params; } @@ -124,6 +131,10 @@ void PlanetData::_bind_methods() { ClassDB::bind_method(D_METHOD("set_id", "value"), &PlanetData::set_id); ADD_PROPERTY(PropertyInfo(Variant::INT, "id"), "set_id", "get_id"); + ClassDB::bind_method(D_METHOD("get_level_range"), &PlanetData::get_level_range); + ClassDB::bind_method(D_METHOD("set_level_range", "value"), &PlanetData::set_level_range); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "level_range"), "set_level_range", "get_level_range"); + ClassDB::bind_method(D_METHOD("get_humidity_noise_params"), &PlanetData::get_humidity_noise_params); ClassDB::bind_method(D_METHOD("set_humidity_noise_params", "value"), &PlanetData::set_humidity_noise_params); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "humidity_noise_params", PROPERTY_HINT_RESOURCE_TYPE, "FastnoiseNoiseParams"), "set_humidity_noise_params", "get_humidity_noise_params"); diff --git a/data/planet_data.h b/data/planet_data.h index b5f9e89..3db87e9 100644 --- a/data/planet_data.h +++ b/data/planet_data.h @@ -16,6 +16,9 @@ public: int get_id() const; void set_id(const int value); + Vector2 get_level_range(); + void set_level_range(Vector2 value); + Ref get_humidity_noise_params(); void set_humidity_noise_params(Ref value); @@ -53,8 +56,10 @@ protected: static void _bind_methods(); private: - int _id; + + Vector2 _level_range; + Ref _humidity_noise_params; Ref _temperature_noise_params; Vector > _biome_datas; diff --git a/main/biome.cpp b/main/biome.cpp index ae33883..59cde3d 100644 --- a/main/biome.cpp +++ b/main/biome.cpp @@ -1,5 +1,12 @@ #include "biome.h" +Vector2 Biome::get_level_range() { + return _level_range; +} +void Biome::set_level_range(Vector2 value) { + _level_range = value; +} + Ref Biome::get_environment() { return _environment; } @@ -108,6 +115,10 @@ void Biome::_bind_methods() { ClassDB::bind_method(D_METHOD("generate_chunk", "chunk", "spawn_mobs"), &Biome::generate_chunk); ClassDB::bind_method(D_METHOD("generate_stack", "chunk", "x", "z", "spawn_mobs"), &Biome::generate_stack); + ClassDB::bind_method(D_METHOD("get_level_range"), &Biome::get_level_range); + ClassDB::bind_method(D_METHOD("set_level_range", "value"), &Biome::set_level_range); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "level_range"), "set_level_range", "get_level_range"); + ClassDB::bind_method(D_METHOD("get_environment"), &Biome::get_environment); ClassDB::bind_method(D_METHOD("set_environment", "value"), &Biome::set_environment); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "environment", PROPERTY_HINT_RESOURCE_TYPE, "EnvironmentData"), "set_environment", "get_environment"); diff --git a/main/biome.h b/main/biome.h index 919ed8a..5e6eed4 100644 --- a/main/biome.h +++ b/main/biome.h @@ -13,6 +13,9 @@ class Biome : public Reference { GDCLASS(Biome, Reference); public: + Vector2 get_level_range(); + void set_level_range(Vector2 value); + //Environment Ref get_environment(); void set_environment(Ref value); @@ -51,6 +54,8 @@ protected: static void _bind_methods(); private: + Vector2 _level_range; + Ref _environment; Vector > _prop_datas; Vector > _entity_datas; diff --git a/main/dungeon.cpp b/main/dungeon.cpp index 5db94f7..df2a488 100644 --- a/main/dungeon.cpp +++ b/main/dungeon.cpp @@ -7,6 +7,13 @@ void Dungeon::set_seed(int value) { _seed = value; } +Vector2 Dungeon::get_level_range() { + return _level_range; +} +void Dungeon::set_level_range(Vector2 value) { + _level_range = value; +} + //Position int Dungeon::get_posx() { return _posx; @@ -245,6 +252,10 @@ void Dungeon::_bind_methods() { ClassDB::bind_method(D_METHOD("set_seed", "value"), &Dungeon::set_seed); ADD_PROPERTY(PropertyInfo(Variant::INT, "seed"), "set_seed", "get_seed"); + ClassDB::bind_method(D_METHOD("get_level_range"), &Dungeon::get_level_range); + ClassDB::bind_method(D_METHOD("set_level_range", "value"), &Dungeon::set_level_range); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "level_range"), "set_level_range", "get_level_range"); + //Position ClassDB::bind_method(D_METHOD("get_posx"), &Dungeon::get_posx); ClassDB::bind_method(D_METHOD("set_posx", "value"), &Dungeon::set_posx); diff --git a/main/dungeon.h b/main/dungeon.h index 6adbeee..f692331 100644 --- a/main/dungeon.h +++ b/main/dungeon.h @@ -19,6 +19,9 @@ public: int get_seed(); void set_seed(int value); + Vector2 get_level_range(); + void set_level_range(Vector2 value); + //Pos int get_posx(); void set_posx(int value); @@ -102,6 +105,8 @@ protected: private: int _seed; + Vector2 _level_range; + int _posx; int _posy; int _posz; diff --git a/main/dungeon_room.cpp b/main/dungeon_room.cpp index c669fec..b07acb4 100644 --- a/main/dungeon_room.cpp +++ b/main/dungeon_room.cpp @@ -7,6 +7,13 @@ void DungeonRoom::set_seed(int value) { _seed = value; } +Vector2 DungeonRoom::get_level_range() { + return _level_range; +} +void DungeonRoom::set_level_range(Vector2 value) { + _level_range = value; +} + //Position int DungeonRoom::get_posx() { return _posx; @@ -162,6 +169,10 @@ void DungeonRoom::_bind_methods() { ClassDB::bind_method(D_METHOD("set_seed", "value"), &DungeonRoom::set_seed); ADD_PROPERTY(PropertyInfo(Variant::INT, "seed"), "set_seed", "get_seed"); + ClassDB::bind_method(D_METHOD("get_level_range"), &DungeonRoom::get_level_range); + ClassDB::bind_method(D_METHOD("set_level_range", "value"), &DungeonRoom::set_level_range); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "level_range"), "set_level_range", "get_level_range"); + //Position ClassDB::bind_method(D_METHOD("get_posx"), &DungeonRoom::get_posx); ClassDB::bind_method(D_METHOD("set_posx", "value"), &DungeonRoom::set_posx); diff --git a/main/dungeon_room.h b/main/dungeon_room.h index 98c928b..77ce196 100644 --- a/main/dungeon_room.h +++ b/main/dungeon_room.h @@ -17,6 +17,9 @@ public: int get_seed(); void set_seed(int value); + Vector2 get_level_range(); + void set_level_range(Vector2 value); + //Pos int get_posx(); void set_posx(int value); @@ -74,6 +77,8 @@ protected: private: int _seed; + Vector2 _level_range; + int _posx; int _posy; int _posz; diff --git a/main/planet.cpp b/main/planet.cpp index c34ed28..6f6f6eb 100644 --- a/main/planet.cpp +++ b/main/planet.cpp @@ -7,6 +7,13 @@ void Planet::set_seed(int value) { _seed = value; } +Vector2 Planet::get_level_range() { + return _level_range; +} +void Planet::set_level_range(Vector2 value) { + _level_range = value; +} + Ref Planet::get_environment() { return _environment; } @@ -74,6 +81,10 @@ void Planet::_bind_methods() { ClassDB::bind_method(D_METHOD("set_seed", "value"), &Planet::set_seed); ADD_PROPERTY(PropertyInfo(Variant::INT, "seed"), "set_seed", "get_seed"); + ClassDB::bind_method(D_METHOD("get_level_range"), &Planet::get_level_range); + ClassDB::bind_method(D_METHOD("set_level_range", "value"), &Planet::set_level_range); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "level_range"), "set_level_range", "get_level_range"); + ClassDB::bind_method(D_METHOD("get_environment"), &Planet::get_environment); ClassDB::bind_method(D_METHOD("set_environment", "value"), &Planet::set_environment); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "environment", PROPERTY_HINT_RESOURCE_TYPE, "EnvironmentData"), "set_environment", "get_environment"); diff --git a/main/planet.h b/main/planet.h index 976d73c..d15cc50 100644 --- a/main/planet.h +++ b/main/planet.h @@ -15,6 +15,9 @@ public: int get_seed(); void set_seed(int value); + Vector2 get_level_range(); + void set_level_range(Vector2 value); + //Environment Ref get_environment(); void set_environment(Ref value); @@ -38,6 +41,7 @@ protected: private: int _seed; + Vector2 _level_range; Ref _environment; Vector > _biomes; };