/* Copyright (c) 2019-2020 Péter Magyar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef SPECIES_MODEL_DATA_H #define SPECIES_MODEL_DATA_H #include "core/resource.h" #include "core/color.h" #include "core/ustring.h" #include "core/vector.h" #include "scene/resources/packed_scene.h" #include "../items/item_visual_entry.h" #include "../../entity_enums.h" class ItemVisual; class SpeciesModelData : public Resource { GDCLASS(SpeciesModelData, Resource); public: int get_id(); void set_id(int value); Ref get_body(); void set_body(Ref value); //Entries Ref get_visual(const int bone_index, const int index) const; void set_visual(const int bone_index, const int index, const Ref visual); void add_visual(const int bone_index, const Ref visual); void remove_visual(const int bone_index, const int index); int get_visual_count(const int bone_index) const; Vector get_visuals(const int bone_index); void set_visuals(const int bone_index, const Vector &visuals); //SkinColors Color get_skin_color(const int index) const; void set_skin_color(const int index, const Color skin_color); void add_skin_color(const Color skin_color); void remove_skin_color(const int index); int get_skin_color_count() const; Vector get_skin_colors(); void set_skin_colors(const Vector &skin_colors); //HairStyles Ref get_hair_style(const int index) const; void set_hair_style(const int index, const Ref hair_style); void add_hair_style(const Ref hair_style); void remove_hair_style(const int index); int get_hair_style_count() const; Vector get_hair_styles(); void set_hair_styles(const Vector &hair_styles); //HairColors Color get_hair_color(const int index) const; void set_hair_color(const int index, const Color hair_color); void add_hair_color(const Color hair_color); void remove_hair_color(const int index); int get_hair_color_count() const; Vector get_hair_colors(); void set_hair_colors(const Vector &hair_colors); //Heads Ref get_head(const int index) const; void set_head(const int index, const Ref head); void add_head(const Ref head); void remove_head(const int index); int get_head_count() const; Vector get_heads(); void set_heads(const Vector &heads); SpeciesModelData(); ~SpeciesModelData(); protected: static void _bind_methods(); private: int _id; Ref _body; Vector > _visuals[EntityEnums::SKELETON_POINTS_MAX]; Vector _skin_colors; Vector > _hair_styles; Vector _hair_colors; Vector > _heads; }; #endif