mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-05-09 22:41:39 +02:00
Added is_playable property to EntityData.
This commit is contained in:
parent
12b47f822d
commit
b2d4be96ea
@ -68,17 +68,24 @@ void EntityData::set_entity_interaction_type(EntityEnums::EntityInteractionType
|
|||||||
_interaction_type = value;
|
_interaction_type = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool EntityData::get_is_playable() const {
|
||||||
|
return _is_playable;
|
||||||
|
}
|
||||||
|
void EntityData::set_is_playable(const bool value) {
|
||||||
|
_is_playable = value;
|
||||||
|
}
|
||||||
|
|
||||||
int EntityData::get_immunity_flags() const {
|
int EntityData::get_immunity_flags() const {
|
||||||
return _immunity_flags;
|
return _immunity_flags;
|
||||||
}
|
}
|
||||||
void EntityData::set_immunity_flags(int value) {
|
void EntityData::set_immunity_flags(const int value) {
|
||||||
_immunity_flags = value;
|
_immunity_flags = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int EntityData::get_entity_flags() const {
|
int EntityData::get_entity_flags() const {
|
||||||
return _entity_flags;
|
return _entity_flags;
|
||||||
}
|
}
|
||||||
void EntityData::set_entity_flags(int value) {
|
void EntityData::set_entity_flags(const int value) {
|
||||||
_entity_flags = value;
|
_entity_flags = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,14 +99,14 @@ void EntityData::set_entity_controller(EntityEnums::EntityController value) {
|
|||||||
int EntityData::get_money() const {
|
int EntityData::get_money() const {
|
||||||
return _money;
|
return _money;
|
||||||
}
|
}
|
||||||
void EntityData::set_money(int value) {
|
void EntityData::set_money(const int value) {
|
||||||
_money = value;
|
_money = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int EntityData::get_bag_size() const {
|
int EntityData::get_bag_size() const {
|
||||||
return _bag_size;
|
return _bag_size;
|
||||||
}
|
}
|
||||||
void EntityData::set_bag_size(int value) {
|
void EntityData::set_bag_size(const int value) {
|
||||||
_bag_size = value;
|
_bag_size = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1106,6 +1113,7 @@ EntityData::EntityData() {
|
|||||||
_id = 0;
|
_id = 0;
|
||||||
_money = 0;
|
_money = 0;
|
||||||
_bag_size = 0;
|
_bag_size = 0;
|
||||||
|
_is_playable = false;
|
||||||
|
|
||||||
_entity_type = EntityEnums::ENITIY_TYPE_NONE;
|
_entity_type = EntityEnums::ENITIY_TYPE_NONE;
|
||||||
_interaction_type = EntityEnums::ENITIY_INTERACTION_TYPE_NORMAL;
|
_interaction_type = EntityEnums::ENITIY_INTERACTION_TYPE_NORMAL;
|
||||||
@ -1318,6 +1326,10 @@ void EntityData::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("set_entity_controller", "value"), &EntityData::set_entity_controller);
|
ClassDB::bind_method(D_METHOD("set_entity_controller", "value"), &EntityData::set_entity_controller);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "entity_controller", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_ENTITY_CONTOLLER), "set_entity_controller", "get_entity_controller");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "entity_controller", PROPERTY_HINT_ENUM, EntityEnums::BINDING_STRING_ENTITY_CONTOLLER), "set_entity_controller", "get_entity_controller");
|
||||||
|
|
||||||
|
ClassDB::bind_method(D_METHOD("get_is_playable"), &EntityData::get_is_playable);
|
||||||
|
ClassDB::bind_method(D_METHOD("set_is_playable", "value"), &EntityData::set_is_playable);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "is_playable"), "set_is_playable", "get_is_playable");
|
||||||
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "text_name"), "set_name", "get_name");
|
ADD_PROPERTY(PropertyInfo(Variant::STRING, "text_name"), "set_name", "get_name");
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_text_description"), &EntityData::get_text_description);
|
ClassDB::bind_method(D_METHOD("get_text_description"), &EntityData::get_text_description);
|
||||||
|
@ -79,6 +79,9 @@ public:
|
|||||||
EntityEnums::EntityInteractionType get_entity_interaction_type() const;
|
EntityEnums::EntityInteractionType get_entity_interaction_type() const;
|
||||||
void set_entity_interaction_type(const EntityEnums::EntityInteractionType value);
|
void set_entity_interaction_type(const EntityEnums::EntityInteractionType value);
|
||||||
|
|
||||||
|
bool get_is_playable() const;
|
||||||
|
void set_is_playable(const bool value);
|
||||||
|
|
||||||
int get_immunity_flags() const;
|
int get_immunity_flags() const;
|
||||||
void set_immunity_flags(const int value);
|
void set_immunity_flags(const int value);
|
||||||
|
|
||||||
@ -89,10 +92,10 @@ public:
|
|||||||
void set_entity_controller(const EntityEnums::EntityController value);
|
void set_entity_controller(const EntityEnums::EntityController value);
|
||||||
|
|
||||||
int get_money() const;
|
int get_money() const;
|
||||||
void set_money(int value);
|
void set_money(const int value);
|
||||||
|
|
||||||
int get_bag_size() const;
|
int get_bag_size() const;
|
||||||
void set_bag_size(int value);
|
void set_bag_size(const int value);
|
||||||
|
|
||||||
Ref<EntitySpeciesData> get_entity_species_data() const;
|
Ref<EntitySpeciesData> get_entity_species_data() const;
|
||||||
void set_entity_species_data(const Ref<EntitySpeciesData> &value);
|
void set_entity_species_data(const Ref<EntitySpeciesData> &value);
|
||||||
@ -265,6 +268,8 @@ private:
|
|||||||
|
|
||||||
EntityEnums::EntityInteractionType _interaction_type;
|
EntityEnums::EntityInteractionType _interaction_type;
|
||||||
|
|
||||||
|
bool _is_playable;
|
||||||
|
|
||||||
int _immunity_flags;
|
int _immunity_flags;
|
||||||
int _entity_flags;
|
int _entity_flags;
|
||||||
EntityEnums::EntityController _entity_controller;
|
EntityEnums::EntityController _entity_controller;
|
||||||
|
Loading…
Reference in New Issue
Block a user