diff --git a/data/biome_data.cpp b/data/biome_data.cpp index 42e6df5..a551603 100644 --- a/data/biome_data.cpp +++ b/data/biome_data.cpp @@ -96,6 +96,47 @@ void BiomeData::set_prop_datas(const Vector &prop_datas) { } } +//Entities + +Ref BiomeData::get_entity_data(const int index) const { + ERR_FAIL_INDEX_V(index, _entity_datas.size(), Ref()); + + return _entity_datas.get(index); +} +void BiomeData::set_entity_data(const int index, const Ref entity_data) { + ERR_FAIL_INDEX(index, _entity_datas.size()); + + _entity_datas.set(index, entity_data); +} +void BiomeData::add_entity_data(const Ref entity_data) { + _entity_datas.push_back(entity_data); +} +void BiomeData::remove_entity_data(const int index) { + ERR_FAIL_INDEX(index, _entity_datas.size()); + + _entity_datas.remove(index); +} + +int BiomeData::get_entity_data_count() const { + return _entity_datas.size(); +} + +Vector BiomeData::get_entity_datas() { + Vector r; + for (int i = 0; i < _entity_datas.size(); i++) { + r.push_back(_entity_datas[i].get_ref_ptr()); + } + return r; +} +void BiomeData::set_entity_datas(const Vector &entity_datas) { + _entity_datas.clear(); + for (int i = 0; i < entity_datas.size(); i++) { + Ref entity_data = Ref(entity_datas[i]); + + _entity_datas.push_back(entity_data); + } +} + //Environments Ref BiomeData::get_environment_data(const int index) const { ERR_FAIL_INDEX_V(index, _environment_datas.size(), Ref()); @@ -149,6 +190,7 @@ BiomeData::BiomeData() { BiomeData::~BiomeData() { _dungeon_datas.clear(); _prop_datas.clear(); + _entity_datas.clear(); } void BiomeData::_bind_methods() { @@ -188,6 +230,18 @@ void BiomeData::_bind_methods() { ClassDB::bind_method(D_METHOD("set_prop_datas", "prop_datas"), &BiomeData::set_prop_datas); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "prop_datas", PROPERTY_HINT_NONE, "17/17:PropData", PROPERTY_USAGE_DEFAULT, "PropData"), "set_prop_datas", "get_prop_datas"); + //Entities + ClassDB::bind_method(D_METHOD("get_entity_data", "index"), &BiomeData::get_entity_data); + ClassDB::bind_method(D_METHOD("set_entity_data", "index", "data"), &BiomeData::set_entity_data); + ClassDB::bind_method(D_METHOD("add_entity_data", "entity_data"), &BiomeData::add_entity_data); + ClassDB::bind_method(D_METHOD("remove_entity_data", "index"), &BiomeData::remove_entity_data); + + ClassDB::bind_method(D_METHOD("get_entity_data_count"), &BiomeData::get_entity_data_count); + + ClassDB::bind_method(D_METHOD("get_entity_datas"), &BiomeData::get_entity_datas); + ClassDB::bind_method(D_METHOD("set_entity_datas", "entity_datas"), &BiomeData::set_entity_datas); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "entity_datas", PROPERTY_HINT_NONE, "17/17:EntityData", PROPERTY_USAGE_DEFAULT, "EntityData"), "set_entity_datas", "get_entity_datas"); + //Environments ClassDB::bind_method(D_METHOD("get_environment_data", "index"), &BiomeData::get_environment_data); ClassDB::bind_method(D_METHOD("set_environment_data", "index", "data"), &BiomeData::set_environment_data); diff --git a/data/biome_data.h b/data/biome_data.h index 0e71fff..53146cd 100644 --- a/data/biome_data.h +++ b/data/biome_data.h @@ -9,6 +9,7 @@ #include "dungeon_data.h" #include "prop_data.h" #include "../../voxelman/world/environment_data.h" +#include "../../entity_spell_system/entities/data/entity_data.h" class BiomeData : public Resource { GDCLASS(BiomeData, Resource); @@ -42,6 +43,17 @@ public: Vector get_prop_datas(); void set_prop_datas(const Vector &prop_datas); + //Entities + Ref get_entity_data(const int index) const; + void set_entity_data(const int index, const Ref entity_data); + void add_entity_data(const Ref entity_data); + void remove_entity_data(const int index); + + int get_entity_data_count() const; + + Vector get_entity_datas(); + void set_entity_datas(const Vector &entity_datas); + //Environments Ref get_environment_data(const int index) const; void set_environment_data(const int index, const Ref environment_data); @@ -67,6 +79,7 @@ private: Vector2 _temperature_range; Vector > _dungeon_datas; Vector > _prop_datas; + Vector > _entity_datas; Vector > _environment_datas; }; diff --git a/data/dungeon_room_data.cpp b/data/dungeon_room_data.cpp index 1e1402e..bdf10ae 100644 --- a/data/dungeon_room_data.cpp +++ b/data/dungeon_room_data.cpp @@ -1,5 +1,49 @@ #include "dungeon_room_data.h" +//Min Size +int DungeonRoomData::get_min_sizex() { + return _min_sizex; +} +void DungeonRoomData::set_min_sizex(int value) { + _min_sizex = value; +} + +int DungeonRoomData::get_min_sizey() { + return _min_sizey; +} +void DungeonRoomData::set_min_sizey(int value) { + _min_sizey = value; +} + +int DungeonRoomData::get_min_sizez() { + return _min_sizez; +} +void DungeonRoomData::set_min_sizez(int value) { + _min_sizez = value; +} + +//Max Size +int DungeonRoomData::get_max_sizex() { + return _max_sizex; +} +void DungeonRoomData::set_max_sizex(int value) { + _max_sizex = value; +} + +int DungeonRoomData::get_max_sizey() { + return _max_sizey; +} +void DungeonRoomData::set_max_sizey(int value) { + _max_sizey = value; +} + +int DungeonRoomData::get_max_sizez() { + return _max_sizez; +} +void DungeonRoomData::set_max_sizez(int value) { + _max_sizez = value; +} + //Props Ref DungeonRoomData::get_prop_data(const int index) const { ERR_FAIL_INDEX_V(index, _prop_datas.size(), Ref()); @@ -78,6 +122,45 @@ void DungeonRoomData::set_environment_datas(const Vector &environment_d } } +//Entities +Ref DungeonRoomData::get_entity_data(const int index) const { + ERR_FAIL_INDEX_V(index, _entity_datas.size(), Ref()); + + return _entity_datas.get(index); +} +void DungeonRoomData::set_entity_data(const int index, const Ref entity_data) { + ERR_FAIL_INDEX(index, _entity_datas.size()); + + _entity_datas.set(index, entity_data); +} +void DungeonRoomData::add_entity_data(const Ref entity_data) { + _entity_datas.push_back(entity_data); +} +void DungeonRoomData::remove_entity_data(const int index) { + ERR_FAIL_INDEX(index, _entity_datas.size()); + + _entity_datas.remove(index); +} +int DungeonRoomData::get_entity_data_count() const { + return _entity_datas.size(); +} + +Vector DungeonRoomData::get_entity_datas() { + Vector r; + for (int i = 0; i < _entity_datas.size(); i++) { + r.push_back(_entity_datas[i].get_ref_ptr()); + } + return r; +} +void DungeonRoomData::set_entity_datas(const Vector &entity_datas) { + _entity_datas.clear(); + for (int i = 0; i < entity_datas.size(); i++) { + Ref entity_data = Ref(entity_datas[i]); + + _entity_datas.push_back(entity_data); + } +} + Ref DungeonRoomData::setup_room(int seed) { if (has_method("_setup_room")) { return call("_setup_room", seed); @@ -87,7 +170,13 @@ Ref DungeonRoomData::setup_room(int seed) { } DungeonRoomData::DungeonRoomData() { + _min_sizex = 0; + _min_sizey = 0; + _min_sizez = 0; + _max_sizex = 0; + _max_sizey = 0; + _max_sizez = 0; } DungeonRoomData::~DungeonRoomData() { @@ -98,6 +187,32 @@ void DungeonRoomData::_bind_methods() { ClassDB::bind_method(D_METHOD("setup_room", "seed"), &DungeonRoomData::setup_room); + //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); + ADD_PROPERTY(PropertyInfo(Variant::INT, "min_sizex"), "set_min_sizex", "get_min_sizex"); + + ClassDB::bind_method(D_METHOD("get_min_sizey"), &DungeonRoomData::get_min_sizey); + ClassDB::bind_method(D_METHOD("set_min_sizey", "value"), &DungeonRoomData::set_min_sizey); + ADD_PROPERTY(PropertyInfo(Variant::INT, "min_sizey"), "set_min_sizey", "get_min_sizey"); + + ClassDB::bind_method(D_METHOD("get_min_sizez"), &DungeonRoomData::get_min_sizez); + ClassDB::bind_method(D_METHOD("set_min_sizez", "value"), &DungeonRoomData::set_min_sizez); + ADD_PROPERTY(PropertyInfo(Variant::INT, "min_sizez"), "set_min_sizez", "get_min_sizez"); + + //Max Size + ClassDB::bind_method(D_METHOD("get_max_sizex"), &DungeonRoomData::get_max_sizex); + ClassDB::bind_method(D_METHOD("set_max_sizex", "value"), &DungeonRoomData::set_max_sizex); + ADD_PROPERTY(PropertyInfo(Variant::INT, "max_sizex"), "set_max_sizex", "get_max_sizex"); + + ClassDB::bind_method(D_METHOD("get_max_sizey"), &DungeonRoomData::get_max_sizey); + ClassDB::bind_method(D_METHOD("set_max_sizey", "value"), &DungeonRoomData::set_max_sizey); + ADD_PROPERTY(PropertyInfo(Variant::INT, "max_sizey"), "set_max_sizey", "get_max_sizey"); + + ClassDB::bind_method(D_METHOD("get_max_sizez"), &DungeonRoomData::get_max_sizez); + ClassDB::bind_method(D_METHOD("set_max_sizez", "value"), &DungeonRoomData::set_max_sizez); + ADD_PROPERTY(PropertyInfo(Variant::INT, "max_sizez"), "set_max_sizez", "get_max_sizez"); + //Props ClassDB::bind_method(D_METHOD("get_prop_data", "index"), &DungeonRoomData::get_prop_data); ClassDB::bind_method(D_METHOD("set_prop_data", "index", "data"), &DungeonRoomData::set_prop_data); @@ -110,6 +225,18 @@ void DungeonRoomData::_bind_methods() { ClassDB::bind_method(D_METHOD("set_prop_datas", "prop_datas"), &DungeonRoomData::set_prop_datas); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "prop_datas", PROPERTY_HINT_NONE, "17/17:PropData", PROPERTY_USAGE_DEFAULT, "PropData"), "set_prop_datas", "get_prop_datas"); + //Entities + ClassDB::bind_method(D_METHOD("get_entity_data", "index"), &DungeonRoomData::get_entity_data); + ClassDB::bind_method(D_METHOD("set_entity_data", "index", "data"), &DungeonRoomData::set_entity_data); + ClassDB::bind_method(D_METHOD("add_entity_data", "entity_data"), &DungeonRoomData::add_entity_data); + ClassDB::bind_method(D_METHOD("remove_entity_data", "index"), &DungeonRoomData::remove_entity_data); + + ClassDB::bind_method(D_METHOD("get_entity_data_count"), &DungeonRoomData::get_entity_data_count); + + ClassDB::bind_method(D_METHOD("get_entity_datas"), &DungeonRoomData::get_entity_datas); + ClassDB::bind_method(D_METHOD("set_entity_datas", "entity_datas"), &DungeonRoomData::set_entity_datas); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "entity_datas", PROPERTY_HINT_NONE, "17/17:EntityData", PROPERTY_USAGE_DEFAULT, "EntityData"), "set_entity_datas", "get_entity_datas"); + //Environments ClassDB::bind_method(D_METHOD("get_environment_data", "index"), &DungeonRoomData::get_environment_data); ClassDB::bind_method(D_METHOD("set_environment_data", "index", "data"), &DungeonRoomData::set_environment_data); diff --git a/data/dungeon_room_data.h b/data/dungeon_room_data.h index 38b4d86..ac53a2f 100644 --- a/data/dungeon_room_data.h +++ b/data/dungeon_room_data.h @@ -7,10 +7,32 @@ #include "prop_data.h" #include "../../voxelman/world/environment_data.h" +#include "../../entity_spell_system/entities/data/entity_data.h" + class DungeonRoomData : public Resource { GDCLASS(DungeonRoomData, Resource); public: + //Min Size + int get_min_sizex(); + void set_min_sizex(int value); + + int get_min_sizey(); + void set_min_sizey(int value); + + int get_min_sizez(); + void set_min_sizez(int value); + + //Max Size + int get_max_sizex(); + void set_max_sizex(int value); + + int get_max_sizey(); + void set_max_sizey(int value); + + int get_max_sizez(); + void set_max_sizez(int value); + //Prop Data Ref get_prop_data(const int index) const; void set_prop_data(const int index, const Ref prop_data); @@ -35,6 +57,17 @@ public: Ref setup_room(int seed); + //Entities + Ref get_entity_data(const int index) const; + void set_entity_data(const int index, const Ref entity_data); + void add_entity_data(const Ref entity_data); + void remove_entity_data(const int index); + + int get_entity_data_count() const; + + Vector get_entity_datas(); + void set_entity_datas(const Vector &entity_datas); + DungeonRoomData(); ~DungeonRoomData(); @@ -42,7 +75,16 @@ protected: static void _bind_methods(); private: + int _min_sizex; + int _min_sizey; + int _min_sizez; + + int _max_sizex; + int _max_sizey; + int _max_sizez; + Vector > _prop_datas; + Vector > _entity_datas; Vector > _environment_datas; }; diff --git a/main/biome.cpp b/main/biome.cpp index 1b2865b..5278e9d 100644 --- a/main/biome.cpp +++ b/main/biome.cpp @@ -31,6 +31,30 @@ int Biome::get_prop_data_count() const { return _prop_datas.size(); } +//Entities +Ref Biome::get_entity_data(const int index) const { + ERR_FAIL_INDEX_V(index, _entity_datas.size(), Ref()); + + return _entity_datas.get(index); +} +void Biome::set_entity_data(const int index, const Ref entity_data) { + ERR_FAIL_INDEX(index, _entity_datas.size()); + + _entity_datas.set(index, entity_data); +} +void Biome::add_entity_data(const Ref entity_data) { + _entity_datas.push_back(entity_data); +} +void Biome::remove_entity_data(const int index) { + ERR_FAIL_INDEX(index, _entity_datas.size()); + + _entity_datas.remove(index); +} + +int Biome::get_entity_data_count() const { + return _entity_datas.size(); +} + //// Dungeons //// Ref Biome::get_dungeon(const int index) const { ERR_FAIL_INDEX_V(index, _dungeons.size(), Ref()); @@ -73,6 +97,7 @@ Biome::Biome() { Biome::~Biome() { _environment.unref(); _prop_datas.clear(); + _entity_datas.clear(); _dungeons.clear(); } @@ -87,6 +112,7 @@ void Biome::_bind_methods() { 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"); + //Props ClassDB::bind_method(D_METHOD("get_prop_data", "index"), &Biome::get_prop_data); ClassDB::bind_method(D_METHOD("set_prop_data", "index", "data"), &Biome::set_prop_data); ClassDB::bind_method(D_METHOD("add_prop_data", "prop_data"), &Biome::add_prop_data); @@ -94,6 +120,15 @@ void Biome::_bind_methods() { ClassDB::bind_method(D_METHOD("get_prop_data_count"), &Biome::get_prop_data_count); + //Entities + ClassDB::bind_method(D_METHOD("get_entity_data", "index"), &Biome::get_entity_data); + ClassDB::bind_method(D_METHOD("set_entity_data", "index", "data"), &Biome::set_entity_data); + ClassDB::bind_method(D_METHOD("add_entity_data", "entity_data"), &Biome::add_entity_data); + ClassDB::bind_method(D_METHOD("remove_entity_data", "index"), &Biome::remove_entity_data); + + ClassDB::bind_method(D_METHOD("get_entity_data_count"), &Biome::get_entity_data_count); + + //Dungeons ClassDB::bind_method(D_METHOD("get_dungeon", "index"), &Biome::get_dungeon); ClassDB::bind_method(D_METHOD("set_dungeon", "index", "data"), &Biome::set_dungeon); ClassDB::bind_method(D_METHOD("add_dungeon", "dungeon"), &Biome::add_dungeon); diff --git a/main/biome.h b/main/biome.h index 044ed41..46c7734 100644 --- a/main/biome.h +++ b/main/biome.h @@ -7,6 +7,7 @@ #include "../data/prop_data.h" #include "dungeon.h" #include "../../voxelman/world/environment_data.h" +#include "../../entity_spell_system/entities/data/entity_data.h" class Biome : public Reference { GDCLASS(Biome, Reference); @@ -24,6 +25,14 @@ public: int get_prop_data_count() const; + //Entities + Ref get_entity_data(const int index) const; + void set_entity_data(const int index, const Ref entity_data); + void add_entity_data(const Ref entity_data); + void remove_entity_data(const int index); + + int get_entity_data_count() const; + //Dungeons Ref get_dungeon(const int index) const; void set_dungeon(const int index, const Ref dungeon); @@ -44,6 +53,7 @@ protected: private: Ref _environment; Vector > _prop_datas; + Vector > _entity_datas; Vector > _dungeons; }; diff --git a/main/dungeon.cpp b/main/dungeon.cpp index cb4aae5..92dd171 100644 --- a/main/dungeon.cpp +++ b/main/dungeon.cpp @@ -162,17 +162,17 @@ int Dungeon::get_dungeon_corridor_count() const { } //Entities -Ref Dungeon::get_entity_data(const int index) const { +Ref Dungeon::get_entity_data(const int index) const { ERR_FAIL_INDEX_V(index, _entity_datas.size(), Ref()); return _entity_datas.get(index); } -void Dungeon::set_entity_data(const int index, const Ref entity_data) { +void Dungeon::set_entity_data(const int index, const Ref entity_data) { ERR_FAIL_INDEX(index, _entity_datas.size()); _entity_datas.set(index, entity_data); } -void Dungeon::add_entity_data(const Ref entity_data) { +void Dungeon::add_entity_data(const Ref entity_data) { _entity_datas.push_back(entity_data); } void Dungeon::remove_entity_data(const int index) { diff --git a/main/dungeon.h b/main/dungeon.h index 69bd641..52e1e71 100644 --- a/main/dungeon.h +++ b/main/dungeon.h @@ -80,9 +80,9 @@ public: int get_dungeon_corridor_count() const; //Entities - Ref get_entity_data(const int index) const; - void set_entity_data(const int index, const Ref entity_datas); - void add_entity_data(const Ref entity_datas); + Ref get_entity_data(const int index) const; + void set_entity_data(const int index, const Ref entity_datas); + void add_entity_data(const Ref entity_datas); void remove_entity_data(const int index); int get_entity_data_count() const; diff --git a/main/dungeon_room.cpp b/main/dungeon_room.cpp index c20a17e..fab3210 100644 --- a/main/dungeon_room.cpp +++ b/main/dungeon_room.cpp @@ -58,6 +58,14 @@ void DungeonRoom::set_environment(Ref value) { _environment = value; } +Ref DungeonRoom::get_structure() { + return _structure; +} +void DungeonRoom::set_structure(Ref structure) { + _structure = structure; +} + +//Props Ref DungeonRoom::get_prop_data(const int index) const { ERR_FAIL_INDEX_V(index, _prop_datas.size(), Ref()); @@ -81,6 +89,37 @@ int DungeonRoom::get_prop_data_count() const { return _prop_datas.size(); } +//Entities +Ref DungeonRoom::get_entity_data(const int index) const { + ERR_FAIL_INDEX_V(index, _entity_datas.size(), Ref()); + + return _entity_datas.get(index); +} +void DungeonRoom::set_entity_data(const int index, const Ref entity_data) { + ERR_FAIL_INDEX(index, _entity_datas.size()); + + _entity_datas.set(index, entity_data); +} +void DungeonRoom::add_entity_data(const Ref entity_data) { + _entity_datas.push_back(entity_data); +} +void DungeonRoom::remove_entity_data(const int index) { + ERR_FAIL_INDEX(index, _entity_datas.size()); + + _entity_datas.remove(index); +} + +int DungeonRoom::get_entity_data_count() const { + return _entity_datas.size(); +} + + +void DungeonRoom::setup() { + if (has_method("_setup")) { + call("_setup"); + } +} + void DungeonRoom::generate_chunk(Ref chunk) { if (has_method("_generate_chunk")) { call("_generate_chunk", chunk); @@ -107,12 +146,15 @@ DungeonRoom::DungeonRoom() { DungeonRoom::~DungeonRoom() { _environment.unref(); _prop_datas.clear(); + _entity_datas.clear(); } void DungeonRoom::_bind_methods() { + BIND_VMETHOD(MethodInfo("_setup")); BIND_VMETHOD(MethodInfo("_generate_room", PropertyInfo(Variant::OBJECT, "structure", PROPERTY_HINT_RESOURCE_TYPE, "VoxelStructure"))); BIND_VMETHOD(MethodInfo("_generate_chunk", PropertyInfo(Variant::OBJECT, "structure", PROPERTY_HINT_RESOURCE_TYPE, "VoxelChunk"))); + ClassDB::bind_method(D_METHOD("setup"), &DungeonRoom::setup); ClassDB::bind_method(D_METHOD("generate_chunk", "chunk"), &DungeonRoom::generate_chunk); ClassDB::bind_method(D_METHOD("generate_room", "structure"), &DungeonRoom::generate_room); @@ -150,10 +192,23 @@ void DungeonRoom::_bind_methods() { ClassDB::bind_method(D_METHOD("set_environment", "value"), &DungeonRoom::set_environment); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "environment", PROPERTY_HINT_RESOURCE_TYPE, "EnvironmentData"), "set_environment", "get_environment"); + ClassDB::bind_method(D_METHOD("get_structure"), &DungeonRoom::get_structure); + ClassDB::bind_method(D_METHOD("set_structure", "value"), &DungeonRoom::set_structure); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "structure", PROPERTY_HINT_RESOURCE_TYPE, "VoxelStructure"), "set_structure", "get_structure"); + + //Props ClassDB::bind_method(D_METHOD("get_prop_data", "index"), &DungeonRoom::get_prop_data); ClassDB::bind_method(D_METHOD("set_prop_data", "index", "data"), &DungeonRoom::set_prop_data); ClassDB::bind_method(D_METHOD("add_prop_data", "prop_data"), &DungeonRoom::add_prop_data); ClassDB::bind_method(D_METHOD("remove_prop_data", "index"), &DungeonRoom::remove_prop_data); ClassDB::bind_method(D_METHOD("get_prop_data_count"), &DungeonRoom::get_prop_data_count); + + //Entities + ClassDB::bind_method(D_METHOD("get_entity_data", "index"), &DungeonRoom::get_entity_data); + ClassDB::bind_method(D_METHOD("set_entity_data", "index", "data"), &DungeonRoom::set_entity_data); + ClassDB::bind_method(D_METHOD("add_entity_data", "entity_data"), &DungeonRoom::add_entity_data); + ClassDB::bind_method(D_METHOD("remove_entity_data", "index"), &DungeonRoom::remove_entity_data); + + ClassDB::bind_method(D_METHOD("get_entity_data_count"), &DungeonRoom::get_entity_data_count); } diff --git a/main/dungeon_room.h b/main/dungeon_room.h index d956748..731cd90 100644 --- a/main/dungeon_room.h +++ b/main/dungeon_room.h @@ -8,6 +8,7 @@ #include "../../voxelman/world/voxel_structure.h" #include "../data/prop_data.h" #include "../../voxelman/world/environment_data.h" +#include "../../entity_spell_system/entities/data/entity_data.h" class DungeonRoom : public Reference { GDCLASS(DungeonRoom, Reference); @@ -16,6 +17,7 @@ public: int get_seed(); void set_seed(int value); + //Pos int get_posx(); void set_posx(int value); @@ -25,6 +27,7 @@ public: int get_posz(); void set_posz(int value); + //Size int get_sizex(); void set_sizex(int value); @@ -38,6 +41,11 @@ public: Ref get_environment(); void set_environment(Ref value); + //Structure + Ref get_structure(); + void set_structure(Ref structure); + + //Props Ref get_prop_data(const int index) const; void set_prop_data(const int index, const Ref prop_data); void add_prop_data(const Ref prop_data); @@ -45,6 +53,15 @@ public: int get_prop_data_count() const; + //Entities + Ref get_entity_data(const int index) const; + void set_entity_data(const int index, const Ref entity_data); + void add_entity_data(const Ref entity_data); + void remove_entity_data(const int index); + + int get_entity_data_count() const; + + void setup(); void generate_chunk(Ref chunk); void generate_room(Ref structure); @@ -66,7 +83,9 @@ private: int _sizez; Ref _environment; + Ref _structure; Vector > _prop_datas; + Vector > _entity_datas; }; #endif