mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-02-22 17:18:12 +01:00
Add stat_is_property to ESS.
This commit is contained in:
parent
7f878a892d
commit
da845cb9df
@ -232,6 +232,9 @@ StringName ESS::stat_get_property_name(const int id) const {
|
|||||||
|
|
||||||
return _stat_id_to_property[id];
|
return _stat_id_to_property[id];
|
||||||
}
|
}
|
||||||
|
bool ESS::stat_is_property(const StringName &name) const {
|
||||||
|
return _stat_property_to_id.has(name);
|
||||||
|
}
|
||||||
|
|
||||||
int ESS::stat_get_count() const {
|
int ESS::stat_get_count() const {
|
||||||
return _stat_id_to_name.size();
|
return _stat_id_to_name.size();
|
||||||
@ -361,6 +364,7 @@ void ESS::_bind_methods() {
|
|||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("stat_get_property_id", "name"), &ESS::stat_get_property_id);
|
ClassDB::bind_method(D_METHOD("stat_get_property_id", "name"), &ESS::stat_get_property_id);
|
||||||
ClassDB::bind_method(D_METHOD("stat_get_property_name", "id"), &ESS::stat_get_property_name);
|
ClassDB::bind_method(D_METHOD("stat_get_property_name", "id"), &ESS::stat_get_property_name);
|
||||||
|
ClassDB::bind_method(D_METHOD("stat_is_property", "name"), &ESS::stat_is_property);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("stat_get_count"), &ESS::stat_get_count);
|
ClassDB::bind_method(D_METHOD("stat_get_count"), &ESS::stat_get_count);
|
||||||
|
|
||||||
|
@ -102,6 +102,7 @@ public:
|
|||||||
|
|
||||||
int stat_get_property_id(const StringName &name) const;
|
int stat_get_property_id(const StringName &name) const;
|
||||||
StringName stat_get_property_name(const int id) const;
|
StringName stat_get_property_name(const int id) const;
|
||||||
|
bool stat_is_property(const StringName &name) const;
|
||||||
|
|
||||||
int stat_get_count() const;
|
int stat_get_count() const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user