Same treatment to the crafting related methods.

This commit is contained in:
Relintai 2020-04-28 15:41:48 +02:00
parent 1afc3511f8
commit a5fb39a002
4 changed files with 111 additions and 111 deletions

View File

@ -32,8 +32,8 @@ The module provides a huge number of script callbacks, usually as virtual method
Do not call methods with underscores, all of them has a normal counterpart, always call that.
For example entity has `scraft(int id)` and `_scraft(int id)` (virtual). Always use `scraft(int id)`, it will
call `_scraft(int id)`.
For example entity has `crafts(int id)` and `_crafts(int id)` (virtual). Always use `crafts(int id)`, it will
call `_crafts(int id)`.
For networked classes, every variable is broken up into clientside, and serverside. This makes it easier to
develop games that can also run locally, with less overhead and simpler logic.

View File

@ -320,7 +320,7 @@
<description>
</description>
</method>
<method name="_scraft" qualifiers="virtual">
<method name="_crafts" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="id" type="int">
@ -710,7 +710,7 @@
<description>
</description>
</method>
<method name="addc_craft_recipe">
<method name="craft_addc_recipe">
<return type="void">
</return>
<argument index="0" name="craft_recipe" type="CraftRecipe">
@ -718,7 +718,7 @@
<description>
</description>
</method>
<method name="addc_craft_recipe_id">
<method name="craft_addc_recipe_id">
<return type="void">
</return>
<argument index="0" name="id" type="int">
@ -890,7 +890,7 @@
<description>
</description>
</method>
<method name="adds_craft_recipe">
<method name="craft_adds_recipe">
<return type="void">
</return>
<argument index="0" name="craft_recipe" type="CraftRecipe">
@ -898,7 +898,7 @@
<description>
</description>
</method>
<method name="adds_craft_recipe_id">
<method name="craft_adds_recipe_id">
<return type="void">
</return>
<argument index="0" name="id" type="int">
@ -1528,7 +1528,7 @@
<description>
</description>
</method>
<method name="crequest_craft">
<method name="craft_crequest">
<return type="void">
</return>
<argument index="0" name="id" type="int">
@ -1934,7 +1934,7 @@
<description>
</description>
</method>
<method name="getc_craft_recipe">
<method name="craft_getc_recipe">
<return type="CraftRecipe">
</return>
<argument index="0" name="craft_recipe" type="int">
@ -1942,7 +1942,7 @@
<description>
</description>
</method>
<method name="getc_craft_recipe_count">
<method name="craft_getc_recipe_count">
<return type="int">
</return>
<description>
@ -2152,7 +2152,7 @@
<description>
</description>
</method>
<method name="gets_craft_recipe">
<method name="craft_gets_recipe">
<return type="CraftRecipe">
</return>
<argument index="0" name="index" type="int">
@ -2160,13 +2160,13 @@
<description>
</description>
</method>
<method name="gets_craft_recipe_count">
<method name="craft_gets_recipe_count">
<return type="int">
</return>
<description>
</description>
</method>
<method name="gets_craft_recipe_id">
<method name="craft_gets_recipe_id">
<return type="CraftRecipe">
</return>
<argument index="0" name="id" type="int">
@ -2344,7 +2344,7 @@
<description>
</description>
</method>
<method name="hasc_craft_recipe">
<method name="craft_hasc_recipe">
<return type="bool">
</return>
<argument index="0" name="craft_recipe" type="CraftRecipe">
@ -2352,7 +2352,7 @@
<description>
</description>
</method>
<method name="hasc_craft_recipe_id">
<method name="craft_hasc_recipe_id">
<return type="bool">
</return>
<argument index="0" name="id" type="int">
@ -2416,7 +2416,7 @@
<description>
</description>
</method>
<method name="hass_craft_recipe">
<method name="craft_hass_recipe">
<return type="bool">
</return>
<argument index="0" name="craft_recipe" type="CraftRecipe">
@ -2424,7 +2424,7 @@
<description>
</description>
</method>
<method name="hass_craft_recipe_id">
<method name="craft_hass_recipe_id">
<return type="bool">
</return>
<argument index="0" name="id" type="int">
@ -2740,7 +2740,7 @@
<description>
</description>
</method>
<method name="removec_craft_recipe">
<method name="craft_removec_recipe">
<return type="void">
</return>
<argument index="0" name="craft_recipe" type="CraftRecipe">
@ -2748,7 +2748,7 @@
<description>
</description>
</method>
<method name="removec_craft_recipe_id">
<method name="craft_removec_recipe_id">
<return type="void">
</return>
<argument index="0" name="id" type="int">
@ -2900,7 +2900,7 @@
<description>
</description>
</method>
<method name="removes_craft_recipe">
<method name="craft_removes_recipe">
<return type="void">
</return>
<argument index="0" name="craft_recipe" type="CraftRecipe">
@ -2908,7 +2908,7 @@
<description>
</description>
</method>
<method name="removes_craft_recipe_id">
<method name="craft_removes_recipe_id">
<return type="void">
</return>
<argument index="0" name="id" type="int">
@ -3082,7 +3082,7 @@
<description>
</description>
</method>
<method name="scraft">
<method name="crafts">
<return type="void">
</return>
<argument index="0" name="id" type="int">
@ -4266,7 +4266,7 @@
<description>
</description>
</signal>
<signal name="scraft_recipe_added">
<signal name="crafts_recipe_added">
<argument index="0" name="entity" type="Entity">
</argument>
<argument index="1" name="craft_recipe" type="CraftRecipe">
@ -4274,7 +4274,7 @@
<description>
</description>
</signal>
<signal name="scraft_success">
<signal name="crafts_success">
<argument index="0" name="entity" type="Entity">
</argument>
<argument index="1" name="item" type="ItemInstance">

View File

@ -678,7 +678,7 @@ void Entity::_setup() {
}
for (int i = 0; i < _s_entity_data->get_num_craft_recipes(); ++i) {
adds_craft_recipe(_s_entity_data->get_craft_recipe(i));
craft_adds_recipe(_s_entity_data->get_craft_recipe(i));
}
if (_s_entity_data->get_equipment_data().is_valid()) {
@ -754,7 +754,7 @@ void Entity::_setup() {
Vector<String> recipes = class_profile->get_custom_data("recipes");
for (int i = 0; i < recipes.size(); ++i) {
adds_craft_recipe_id(ESS::get_instance()->get_resource_db()->craft_recipe_path_to_id(recipes.get(i)));
craft_adds_recipe_id(ESS::get_instance()->get_resource_db()->craft_recipe_path_to_id(recipes.get(i)));
}
}
}
@ -1443,7 +1443,7 @@ void Entity::_from_dict(const Dictionary &dict) {
Ref<CraftRecipe> cr = ESS::get_instance()->get_resource_db()->get_craft_recipe_path(crn);
if (cr.is_valid()) {
adds_craft_recipe(cr);
craft_adds_recipe(cr);
}
}
}
@ -1597,16 +1597,16 @@ void Entity::removes_state_ref(int state_index) {
//// Crafting System ////
void Entity::crequest_craft(int id) {
scraft(id);
void Entity::craft_crequest(int id) {
crafts(id);
}
void Entity::scraft(int id) {
if (has_method("_scraft")) {
call("_scraft", id);
void Entity::crafts(int id) {
if (has_method("_crafts")) {
call("_crafts", id);
}
}
bool Entity::hass_craft_recipe(Ref<CraftRecipe> craft_recipe) {
bool Entity::craft_hass_recipe(Ref<CraftRecipe> craft_recipe) {
for (int i = 0; i < _s_craft_recipes.size(); ++i) {
if (_s_craft_recipes.get(i) == craft_recipe) {
return true;
@ -1615,7 +1615,7 @@ bool Entity::hass_craft_recipe(Ref<CraftRecipe> craft_recipe) {
return false;
}
bool Entity::hass_craft_recipe_id(int id) {
bool Entity::craft_hass_recipe_id(int id) {
for (int i = 0; i < _s_craft_recipes.size(); ++i) {
Ref<CraftRecipe> cr = _s_craft_recipes.get(i);
@ -1628,22 +1628,22 @@ bool Entity::hass_craft_recipe_id(int id) {
return false;
}
void Entity::adds_craft_recipe(Ref<CraftRecipe> craft_recipe) {
void Entity::craft_adds_recipe(Ref<CraftRecipe> craft_recipe) {
ERR_FAIL_COND(!craft_recipe.is_valid());
if (hass_craft_recipe(craft_recipe))
if (craft_hass_recipe(craft_recipe))
return;
_s_craft_recipes.push_back(craft_recipe);
emit_signal("scraft_recipe_added", this, craft_recipe);
emit_signal("crafts_recipe_added", this, craft_recipe);
ORPC(addc_craft_recipe_id, craft_recipe->get_id());
ORPC(craft_addc_recipe_id, craft_recipe->get_id());
}
void Entity::adds_craft_recipe_id(int id) {
void Entity::craft_adds_recipe_id(int id) {
ERR_FAIL_COND(!ESS::get_instance());
if (hass_craft_recipe_id(id))
if (craft_hass_recipe_id(id))
return;
Ref<CraftRecipe> craft_recipe = ESS::get_instance()->get_resource_db()->get_craft_recipe(id);
@ -1678,11 +1678,11 @@ void Entity::adds_craft_recipe_id(int id) {
}
}
emit_signal("scraft_recipe_added", this, craft_recipe);
emit_signal("crafts_recipe_added", this, craft_recipe);
ORPC(addc_craft_recipe_id, id);
ORPC(craft_addc_recipe_id, id);
}
void Entity::removes_craft_recipe(Ref<CraftRecipe> craft_recipe) {
void Entity::craft_removes_recipe(Ref<CraftRecipe> craft_recipe) {
for (int i = 0; i < _s_craft_recipes.size(); ++i) {
if (_s_craft_recipes.get(i) == craft_recipe) {
_s_craft_recipes.remove(i);
@ -1690,11 +1690,11 @@ void Entity::removes_craft_recipe(Ref<CraftRecipe> craft_recipe) {
}
}
emit_signal("scraft_recipe_removed", this, craft_recipe);
emit_signal("crafts_recipe_removed", this, craft_recipe);
ORPC(removec_craft_recipe, craft_recipe);
ORPC(craft_removec_recipe, craft_recipe);
}
void Entity::removes_craft_recipe_id(int id) {
void Entity::craft_removes_recipe_id(int id) {
Ref<CraftRecipe> craft_recipe;
for (int i = 0; i < _s_craft_recipes.size(); ++i) {
@ -1706,16 +1706,16 @@ void Entity::removes_craft_recipe_id(int id) {
}
}
emit_signal("scraft_recipe_removed", this, craft_recipe);
emit_signal("crafts_recipe_removed", this, craft_recipe);
ORPC(removec_craft_recipe_id, id);
ORPC(craft_removec_recipe_id, id);
}
Ref<CraftRecipe> Entity::gets_craft_recipe(int index) {
Ref<CraftRecipe> Entity::craft_gets_recipe(int index) {
ERR_FAIL_INDEX_V(index, _s_craft_recipes.size(), Ref<CraftRecipe>());
return _s_craft_recipes.get(index);
}
Ref<CraftRecipe> Entity::gets_craft_recipe_id(int id) {
Ref<CraftRecipe> Entity::craft_gets_recipe_id(int id) {
for (int i = 0; i < _s_craft_recipes.size(); ++i) {
Ref<CraftRecipe> craft_recipe = _s_craft_recipes.get(i);
@ -1726,11 +1726,11 @@ Ref<CraftRecipe> Entity::gets_craft_recipe_id(int id) {
return Ref<CraftRecipe>();
}
int Entity::gets_craft_recipe_count() {
int Entity::craft_gets_recipe_count() {
return _s_craft_recipes.size();
}
bool Entity::hasc_craft_recipe(Ref<CraftRecipe> craft_recipe) {
bool Entity::craft_hasc_recipe(Ref<CraftRecipe> craft_recipe) {
for (int i = 0; i < _c_craft_recipes.size(); ++i) {
if (_c_craft_recipes.get(i) == craft_recipe) {
return true;
@ -1739,7 +1739,7 @@ bool Entity::hasc_craft_recipe(Ref<CraftRecipe> craft_recipe) {
return false;
}
bool Entity::hasc_craft_recipe_id(int id) {
bool Entity::craft_hasc_recipe_id(int id) {
for (int i = 0; i < _c_craft_recipes.size(); ++i) {
Ref<CraftRecipe> cr = _c_craft_recipes.get(i);
@ -1752,18 +1752,18 @@ bool Entity::hasc_craft_recipe_id(int id) {
return false;
}
void Entity::addc_craft_recipe(Ref<CraftRecipe> craft_recipe) {
if (hasc_craft_recipe(craft_recipe))
void Entity::craft_addc_recipe(Ref<CraftRecipe> craft_recipe) {
if (craft_hasc_recipe(craft_recipe))
return;
_c_craft_recipes.push_back(craft_recipe);
emit_signal("ccraft_recipe_added", this, craft_recipe);
}
void Entity::addc_craft_recipe_id(int id) {
void Entity::craft_addc_recipe_id(int id) {
ERR_FAIL_COND(!ESS::get_instance());
if (hasc_craft_recipe_id(id))
if (craft_hasc_recipe_id(id))
return;
Ref<CraftRecipe> craft_recipe = ESS::get_instance()->get_resource_db()->get_craft_recipe(id);
@ -1774,7 +1774,7 @@ void Entity::addc_craft_recipe_id(int id) {
emit_signal("ccraft_recipe_added", this, craft_recipe);
}
void Entity::removec_craft_recipe(Ref<CraftRecipe> craft_recipe) {
void Entity::craft_removec_recipe(Ref<CraftRecipe> craft_recipe) {
for (int i = 0; i < _c_craft_recipes.size(); ++i) {
if (_c_craft_recipes.get(i) == craft_recipe) {
_c_craft_recipes.remove(i);
@ -1784,7 +1784,7 @@ void Entity::removec_craft_recipe(Ref<CraftRecipe> craft_recipe) {
emit_signal("ccraft_recipe_removed", this, craft_recipe);
}
void Entity::removec_craft_recipe_id(int id) {
void Entity::craft_removec_recipe_id(int id) {
Ref<CraftRecipe> craft_recipe;
for (int i = 0; i < _c_craft_recipes.size(); ++i) {
@ -1798,12 +1798,12 @@ void Entity::removec_craft_recipe_id(int id) {
emit_signal("ccraft_recipe_removed", this, craft_recipe);
}
Ref<CraftRecipe> Entity::getc_craft_recipe(int index) {
Ref<CraftRecipe> Entity::craft_getc_recipe(int index) {
ERR_FAIL_INDEX_V(index, _c_craft_recipes.size(), Ref<CraftRecipe>());
return _c_craft_recipes.get(index);
}
int Entity::getc_craft_recipe_count() {
int Entity::craft_getc_recipe_count() {
return _c_craft_recipes.size();
}
@ -5759,10 +5759,10 @@ Entity::Entity() {
//// Crafting System ////
SET_RPC_REMOTE("scraft");
SET_RPC_REMOTE("crafts");
SET_RPC_REMOTE("addc_craft_recipe_id");
SET_RPC_REMOTE("removec_craft_recipe_id");
SET_RPC_REMOTE("craft_addc_recipe_id");
SET_RPC_REMOTE("craft_removec_recipe_id");
//// SpellSystem ////
@ -5948,11 +5948,11 @@ Entity::~Entity() {
_physics_process_scis.clear();
}
void Entity::_scraft(int id) {
if (!hass_craft_recipe_id(id))
void Entity::_crafts(int id) {
if (!craft_hass_recipe_id(id))
return;
Ref<CraftRecipe> recipe = gets_craft_recipe_id(id);
Ref<CraftRecipe> recipe = craft_gets_recipe_id(id);
if (!recipe.is_valid())
return;
@ -6501,7 +6501,7 @@ bool Entity::_set(const StringName &p_name, const Variant &p_value) {
Ref<CraftRecipe> cr = ESS::get_instance()->get_resource_db()->get_craft_recipe_path(crn);
if (cr.is_valid()) {
adds_craft_recipe(cr);
craft_adds_recipe(cr);
}
}
}
@ -7536,35 +7536,35 @@ void Entity::_bind_methods() {
ClassDB::bind_method(D_METHOD("removec_spell_rpc", "id"), &Entity::removec_spell_rpc);
//Crafting
BIND_VMETHOD(MethodInfo("_scraft", PropertyInfo(Variant::INT, "id")));
BIND_VMETHOD(MethodInfo("_crafts", PropertyInfo(Variant::INT, "id")));
ADD_SIGNAL(MethodInfo("scraft_success", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity"), PropertyInfo(Variant::OBJECT, "item", PROPERTY_HINT_RESOURCE_TYPE, "ItemInstance")));
ADD_SIGNAL(MethodInfo("crafts_success", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity"), PropertyInfo(Variant::OBJECT, "item", PROPERTY_HINT_RESOURCE_TYPE, "ItemInstance")));
ADD_SIGNAL(MethodInfo("ccraft_success", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity"), PropertyInfo(Variant::OBJECT, "item", PROPERTY_HINT_RESOURCE_TYPE, "ItemInstance")));
ADD_SIGNAL(MethodInfo("scraft_recipe_added", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity"), PropertyInfo(Variant::OBJECT, "craft_recipe", PROPERTY_HINT_RESOURCE_TYPE, "CraftRecipe")));
ADD_SIGNAL(MethodInfo("crafts_recipe_added", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity"), PropertyInfo(Variant::OBJECT, "craft_recipe", PROPERTY_HINT_RESOURCE_TYPE, "CraftRecipe")));
ADD_SIGNAL(MethodInfo("ccraft_recipe_added", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity"), PropertyInfo(Variant::OBJECT, "craft_recipe", PROPERTY_HINT_RESOURCE_TYPE, "CraftRecipe")));
ClassDB::bind_method(D_METHOD("crequest_craft", "id"), &Entity::crequest_craft);
ClassDB::bind_method(D_METHOD("scraft", "id"), &Entity::scraft);
ClassDB::bind_method(D_METHOD("craft_crequest", "id"), &Entity::craft_crequest);
ClassDB::bind_method(D_METHOD("crafts", "id"), &Entity::crafts);
ClassDB::bind_method(D_METHOD("hass_craft_recipe", "craft_recipe"), &Entity::hass_craft_recipe);
ClassDB::bind_method(D_METHOD("hass_craft_recipe_id", "id"), &Entity::hass_craft_recipe_id);
ClassDB::bind_method(D_METHOD("adds_craft_recipe", "craft_recipe"), &Entity::adds_craft_recipe);
ClassDB::bind_method(D_METHOD("adds_craft_recipe_id", "id"), &Entity::adds_craft_recipe_id);
ClassDB::bind_method(D_METHOD("removes_craft_recipe", "craft_recipe"), &Entity::removes_craft_recipe);
ClassDB::bind_method(D_METHOD("removes_craft_recipe_id", "id"), &Entity::removes_craft_recipe_id);
ClassDB::bind_method(D_METHOD("gets_craft_recipe", "index"), &Entity::gets_craft_recipe);
ClassDB::bind_method(D_METHOD("gets_craft_recipe_id", "id"), &Entity::gets_craft_recipe_id);
ClassDB::bind_method(D_METHOD("gets_craft_recipe_count"), &Entity::gets_craft_recipe_count);
ClassDB::bind_method(D_METHOD("craft_hass_recipe", "craft_recipe"), &Entity::craft_hass_recipe);
ClassDB::bind_method(D_METHOD("craft_hass_recipe_id", "id"), &Entity::craft_hass_recipe_id);
ClassDB::bind_method(D_METHOD("craft_adds_recipe", "craft_recipe"), &Entity::craft_adds_recipe);
ClassDB::bind_method(D_METHOD("craft_adds_recipe_id", "id"), &Entity::craft_adds_recipe_id);
ClassDB::bind_method(D_METHOD("craft_removes_recipe", "craft_recipe"), &Entity::craft_removes_recipe);
ClassDB::bind_method(D_METHOD("craft_removes_recipe_id", "id"), &Entity::craft_removes_recipe_id);
ClassDB::bind_method(D_METHOD("craft_gets_recipe", "index"), &Entity::craft_gets_recipe);
ClassDB::bind_method(D_METHOD("craft_gets_recipe_id", "id"), &Entity::craft_gets_recipe_id);
ClassDB::bind_method(D_METHOD("craft_gets_recipe_count"), &Entity::craft_gets_recipe_count);
ClassDB::bind_method(D_METHOD("hasc_craft_recipe", "craft_recipe"), &Entity::hasc_craft_recipe);
ClassDB::bind_method(D_METHOD("hasc_craft_recipe_id", "id"), &Entity::hasc_craft_recipe_id);
ClassDB::bind_method(D_METHOD("addc_craft_recipe", "craft_recipe"), &Entity::addc_craft_recipe);
ClassDB::bind_method(D_METHOD("addc_craft_recipe_id", "id"), &Entity::addc_craft_recipe_id);
ClassDB::bind_method(D_METHOD("removec_craft_recipe", "craft_recipe"), &Entity::removec_craft_recipe);
ClassDB::bind_method(D_METHOD("removec_craft_recipe_id", "id"), &Entity::removec_craft_recipe_id);
ClassDB::bind_method(D_METHOD("getc_craft_recipe", "craft_recipe"), &Entity::getc_craft_recipe);
ClassDB::bind_method(D_METHOD("getc_craft_recipe_count"), &Entity::getc_craft_recipe_count);
ClassDB::bind_method(D_METHOD("craft_hasc_recipe", "craft_recipe"), &Entity::craft_hasc_recipe);
ClassDB::bind_method(D_METHOD("craft_hasc_recipe_id", "id"), &Entity::craft_hasc_recipe_id);
ClassDB::bind_method(D_METHOD("craft_addc_recipe", "craft_recipe"), &Entity::craft_addc_recipe);
ClassDB::bind_method(D_METHOD("craft_addc_recipe_id", "id"), &Entity::craft_addc_recipe_id);
ClassDB::bind_method(D_METHOD("craft_removec_recipe", "craft_recipe"), &Entity::craft_removec_recipe);
ClassDB::bind_method(D_METHOD("craft_removec_recipe_id", "id"), &Entity::craft_removec_recipe_id);
ClassDB::bind_method(D_METHOD("craft_getc_recipe", "craft_recipe"), &Entity::craft_getc_recipe);
ClassDB::bind_method(D_METHOD("craft_getc_recipe_count"), &Entity::craft_getc_recipe_count);
//Skills
ClassDB::bind_method(D_METHOD("hass_skill_id", "id"), &Entity::hass_skill_id);
@ -7794,7 +7794,7 @@ void Entity::_bind_methods() {
ClassDB::bind_method(D_METHOD("update", "delta"), &Entity::update);
ClassDB::bind_method(D_METHOD("_scraft", "id"), &Entity::_scraft);
ClassDB::bind_method(D_METHOD("_crafts", "id"), &Entity::_crafts);
ClassDB::bind_method(D_METHOD("_son_xp_gained", "value"), &Entity::_son_xp_gained);
ClassDB::bind_method(D_METHOD("_son_character_level_up", "level"), &Entity::_son_character_level_up);
ClassDB::bind_method(D_METHOD("_son_class_level_up", "level"), &Entity::_son_class_level_up);

View File

@ -436,27 +436,27 @@ public:
//// Crafting System ////
void crequest_craft(int id);
void scraft(int id);
void craft_crequest(int id);
void crafts(int id);
bool hass_craft_recipe(Ref<CraftRecipe> craft_recipe);
bool hass_craft_recipe_id(int id);
void adds_craft_recipe(Ref<CraftRecipe> craft_recipe);
void adds_craft_recipe_id(int id);
void removes_craft_recipe(Ref<CraftRecipe> craft_recipe);
void removes_craft_recipe_id(int id);
Ref<CraftRecipe> gets_craft_recipe(int index);
Ref<CraftRecipe> gets_craft_recipe_id(int id);
int gets_craft_recipe_count();
bool craft_hass_recipe(Ref<CraftRecipe> craft_recipe);
bool craft_hass_recipe_id(int id);
void craft_adds_recipe(Ref<CraftRecipe> craft_recipe);
void craft_adds_recipe_id(int id);
void craft_removes_recipe(Ref<CraftRecipe> craft_recipe);
void craft_removes_recipe_id(int id);
Ref<CraftRecipe> craft_gets_recipe(int index);
Ref<CraftRecipe> craft_gets_recipe_id(int id);
int craft_gets_recipe_count();
bool hasc_craft_recipe(Ref<CraftRecipe> craft_recipe);
bool hasc_craft_recipe_id(int id);
void addc_craft_recipe(Ref<CraftRecipe> craft_recipe);
void addc_craft_recipe_id(int id);
void removec_craft_recipe(Ref<CraftRecipe> craft_recipe);
void removec_craft_recipe_id(int id);
Ref<CraftRecipe> getc_craft_recipe(int index);
int getc_craft_recipe_count();
bool craft_hasc_recipe(Ref<CraftRecipe> craft_recipe);
bool craft_hasc_recipe_id(int id);
void craft_addc_recipe(Ref<CraftRecipe> craft_recipe);
void craft_addc_recipe_id(int id);
void craft_removec_recipe(Ref<CraftRecipe> craft_recipe);
void craft_removec_recipe_id(int id);
Ref<CraftRecipe> craft_getc_recipe(int index);
int craft_getc_recipe_count();
//// SpellSystem ////
@ -967,7 +967,7 @@ public:
~Entity();
protected:
void _scraft(int id);
void _crafts(int id);
void _son_xp_gained(int value);
void _son_character_level_up(int level);
void _son_class_level_up(int level);