Update ESS to the latest, to get all the Entity method renames.

This commit is contained in:
Relintai 2020-04-28 19:09:06 +02:00
parent cbe4e31d3a
commit 3efc211e52
20 changed files with 95 additions and 95 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"3.2": "60609ff0ed357a38b58126791f7372c8aa3e446e", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "97f10512f8832394389e1109154b8af34a2ef2c6"}, "entity_spell_system": {"master": "62d3928ceddaeb2026dfd4a557d963a33a19a38b"}, "ui_extensions": {"master": "6fe4f69fea8d71043b08d959b8085404c9c4fe47"}, "voxelman": {"master": "19f3c1f8ff34331a2f1bedf260637e415b3df7d0"}, "texture_packer": {"master": "b29b499adf570aa7f85af69ef080ff0d5e04afae"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "mesh_data_resource": {"master": "4ee946963a16bbfdb4dbb5df52134d22aa168041"}, "procedural_animations": {"master": "9ae56c17230ba9c6160777650b2b89eecdc8df9e"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "f6d3d65cc6ce4dddfc68054164feec1f612ecd1f"}, "props": {"master": "b2bcb5ea6469b19298cd849c1232ddb5ad26f71c"}}
{"engine": {"3.2": "60609ff0ed357a38b58126791f7372c8aa3e446e", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "97f10512f8832394389e1109154b8af34a2ef2c6"}, "entity_spell_system": {"master": "0a9d4d3c7216f0232222cf9fb106518234c187df"}, "ui_extensions": {"master": "6fe4f69fea8d71043b08d959b8085404c9c4fe47"}, "voxelman": {"master": "19f3c1f8ff34331a2f1bedf260637e415b3df7d0"}, "texture_packer": {"master": "b29b499adf570aa7f85af69ef080ff0d5e04afae"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "mesh_data_resource": {"master": "4ee946963a16bbfdb4dbb5df52134d22aa168041"}, "procedural_animations": {"master": "9ae56c17230ba9c6160777650b2b89eecdc8df9e"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "f6d3d65cc6ce4dddfc68054164feec1f612ecd1f"}, "props": {"master": "b2bcb5ea6469b19298cd849c1232ddb5ad26f71c"}}

View File

@ -98,7 +98,7 @@ func _ready() -> void:
entity = get_node("..")
entity.set_character_skeleton(character_skeleton)
entity.connect("notification_ccast", self, "on_notification_ccast")
entity.connect("sdied", self, "on_sdied")
entity.connect("diesd", self, "on_diesd")
entity.connect("isc_controlled_changed", self, "on_c_controlled_changed")
owner = entity
@ -255,7 +255,7 @@ func process_movement_player(delta : float) -> void:
hvel.y = 0
var target : Vector3 = dir
target *= entity.getc_resource_index(EntityEnums.ENTITY_RESOURCE_INDEX_SPEED).current_value / 100.0 * 4.2
target *= entity.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_SPEED).current_value / 100.0 * 4.2
var accel
if dir.dot(hvel) > 0:
@ -329,7 +329,7 @@ func process_movement_mob(delta : float) -> void:
hvel.y = 0
var target : Vector3 = dir
target *= entity.getc_resource_index(EntityEnums.ENTITY_RESOURCE_INDEX_SPEED).current_value / 100.0 * 4.2
target *= entity.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_SPEED).current_value / 100.0 * 4.2
var accel
if dir.dot(hvel) > 0:
@ -478,12 +478,12 @@ func target(position : Vector2):
if result.collider and result.collider.owner is Entity:
var ent : Entity = result.collider.owner as Entity
entity.crequest_target_change(ent.get_path())
entity.target_crequest_change(ent.get_path())
return
entity.crequest_target_change(NodePath())
entity.target_crequest_change(NodePath())
else:
entity.crequest_target_change(NodePath())
entity.target_crequest_change(NodePath())
func cmouseover(event):
var from = camera.project_ray_origin(event.position)
@ -598,7 +598,7 @@ func on_c_controlled_changed(val):
func on_sdied(entity):
func on_diesd(entity):
if dead:
return

View File

@ -65,8 +65,8 @@ func _son_death():
return
#warning-ignore:unused_variable
for i in range(gets_aura_count()):
removes_aura(gets_aura(0))
for i in range(aura_gets_count()):
aura_removes(aura_gets(0))
dead = true
@ -80,7 +80,7 @@ func _son_death():
ldiff /= 10.0
starget.adds_xp(int(5.0 * scharacter_level * ldiff))
starget.xp_adds(int(5.0 * scharacter_level * ldiff))
starget = null
@ -111,7 +111,7 @@ func _son_xp_gained(value : int) -> void:
var xpr : int = ESS.get_resource_db().get_xp_data().get_character_xp(gets_character_level());
if xpr <= scharacter_xp:
scharacter_levelup(1)
levelup_scharacter(1)
scharacter_xp = 0
func _son_class_level_up(value: int):
@ -143,12 +143,12 @@ func refresh_spells(value: int):
for i in range(arr.size()):
var spell : Spell = arr[i]
if not hass_spell(spell):
var spnum :int = gets_spell_count()
if not spell_hass(spell):
var spnum :int = spell_gets_count()
crequest_spell_learn(spell.id)
spell_learn_requestc(spell.id)
if spnum != gets_spell_count():
if spnum != spell_gets_count():
break
if sfree_spell_points == 0:

View File

@ -171,5 +171,5 @@ func on_centity_resource_added(resorce) -> void:
if health != null:
return
health = entity.getc_resource_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH)
health = entity.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH)
health.connect("changed", self, "c_health_changed")

View File

@ -66,8 +66,8 @@ func update_visibility() -> void:
#warning-ignore:unassigned_variable
var used_to_see : Array = Array()
for i in range(gets_sees_count()):
var ent : Entity = gets_sees(i)
for i in range(sees_gets_count()):
var ent : Entity = sees_gets(i)
used_to_see.append(ent)
@ -89,7 +89,7 @@ func update_visibility() -> void:
if self.get_network_master() != 1:
ESS.entity_spawner.despawn_for(self, ent)
removes_sees(ent)
sees_removes(ent)
for e in currenty_sees_filtered:
var ent : Entity = e as Entity
@ -97,7 +97,7 @@ func update_visibility() -> void:
if self.get_network_master() != 1:
ESS.entity_spawner.spawn_for(self, ent)
adds_sees(ent)
sees_adds(ent)

View File

@ -80,24 +80,24 @@ func attack(delta):
return
var cast : bool = false
if not owner.gets_has_global_cooldown():
if not owner.gcd_hass():
var taspellsdict : Dictionary = _data["target_aura_spells"]
for taskey in taspellsdict.keys():
for tas in taspellsdict[taskey]:
var spell_id : int = tas["spell_id"]
if not owner.hass_spell_id(spell_id):
if not owner.spell_hass_id(spell_id):
continue
if taskey == null:
if target.gets_aura_by(owner, tas["aura_id"]) == null and not owner.hass_cooldown(spell_id):
owner.crequest_spell_cast(spell_id)
if target.aura_gets_by(owner, tas["aura_id"]) == null and not owner.cooldown_hass(spell_id):
owner.spell_crequest_cast(spell_id)
cast = true
break
else:
if target.gets_aura_with_group_by(owner, taskey) == null and not owner.hass_cooldown(spell_id):
owner.crequest_spell_cast(spell_id)
if target.aura_gets_with_group_by(owner, taskey) == null and not owner.cooldown_hass(spell_id):
owner.spell_crequest_cast(spell_id)
cast = true
break
if cast:
@ -107,15 +107,15 @@ func attack(delta):
var sps : Array = _data["spells"]
for spell_id in sps:
if not owner.hass_spell_id(spell_id):
if not owner.spell_hass_id(spell_id):
continue
if not owner.hass_cooldown(spell_id):
owner.crequest_spell_cast(spell_id)
if not owner.cooldown_hass(spell_id):
owner.spell_crequest_cast(spell_id)
cast = true
break
if owner.sis_casting():
if owner.cast_is_castings():
owner.get_body().target_movement_direction = Vector2()
return

View File

@ -50,7 +50,7 @@ func _handle_aura_heal(aura_data : AuraData, shi : SpellHealInfo) -> void:
func _sapply(info : AuraApplyInfo) -> void:
# var add : bool = false
var ad : AuraData = info.target.gets_aura_by(info.caster, info.aura.id)
var ad : AuraData = info.target.aura_gets_by(info.caster, info.aura.id)
if ad == null:
# add = true
@ -71,7 +71,7 @@ func _sapply(info : AuraApplyInfo) -> void:
info.target.adds_state_ref(i)
info.target.adds_aura(ad);
info.target.aura_adds(ad);
else:
ad.remaining_time = time

View File

@ -61,24 +61,24 @@ func _sai_attack(entity):
return
var cast : bool = false
if not entity.gets_has_global_cooldown():
if not entity.gcd_hass():
var taspellsdict : Dictionary = _data["target_aura_spells"]
for taskey in taspellsdict.keys():
for tas in taspellsdict[taskey]:
var spell_id : int = tas["spell_id"]
if not entity.hass_spell_id(spell_id):
if not entity.spell_hass_id(spell_id):
continue
if taskey == null:
if target.gets_aura_by(entity, tas["aura_id"]) == null and not entity.hass_cooldown(spell_id):
entity.crequest_spell_cast(spell_id)
if target.aura_gets_by(entity, tas["aura_id"]) == null and not entity.cooldown_hass(spell_id):
entity.spell_crequest_cast(spell_id)
cast = true
break
else:
if target.gets_aura_with_group_by(entity, taskey) == null and not entity.hass_cooldown(spell_id):
entity.crequest_spell_cast(spell_id)
if target.aura_gets_with_group_by(entity, taskey) == null and not entity.cooldown_hass(spell_id):
entity.spell_crequest_cast(spell_id)
cast = true
break
if cast:
@ -88,16 +88,16 @@ func _sai_attack(entity):
var sps : Array = _data["spells"]
for spell_id in sps:
if not entity.hass_spell_id(spell_id):
if not entity.spell_hass_id(spell_id):
continue
if not entity.hass_cooldown(spell_id):
entity.crequest_spell_cast(spell_id)
if not entity.cooldown_hass(spell_id):
entity.spell_crequest_cast(spell_id)
cast = true
break
if entity.sis_casting():
if entity.cast_is_castings():
mob.target_movement_direction = Vector2()
return
@ -108,7 +108,7 @@ func _sai_attack(entity):
#func _setup_resources(entity):
# var p : EntityResource = ManaResource.new()
#
# entity.adds_resource(p)
# entity.resource_adds(p)
func sort_spells_by_rank(a, b):
if a == null or b == null:

View File

@ -20,15 +20,15 @@ extends SpellGD
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
func _sfinish_cast(info : SpellCastInfo) -> void:
func _cast_finishs(info : SpellCastInfo) -> void:
var target : Entity = info.target
if not is_instance_valid(target):
return
for i in range(target.gets_aura_count()):
for i in range(target.aura_gets_count()):
var ad : AuraData = target.gets_aura(i)
var ad : AuraData = target.aura_gets(i)
if ad.caster == info.caster:
var aura : Aura = ad.aura

View File

@ -22,17 +22,17 @@ class_name SpellGD
# SOFTWARE.
func _sstart_casting(info : SpellCastInfo) -> void:
func _cast_starts(info : SpellCastInfo) -> void:
if needs_target and info.target == null:
return
if info.caster.sis_casting():
if info.caster.cast_is_castings():
return
if cooldown_global_cooldown_enabled and info.caster.gets_has_global_cooldown() or info.caster.hass_category_cooldown(spell_type) or info.caster.hass_cooldown(id):
if cooldown_global_cooldown_enabled and info.caster.gcd_hass() or info.caster.category_cooldown_hass(spell_type) or info.caster.cooldown_hass(id):
return
if !info.caster.hass_spell_id(id):
if !info.caster.spell_hass_id(id):
return
var entity_relation_type = info.caster.gets_relation_to(info.target)
@ -63,7 +63,7 @@ func _sstart_casting(info : SpellCastInfo) -> void:
return
if resource_cost != null and resource_cost.entity_resource_data != null:
var r : EntityResource = info.caster.gets_resource_id(resource_cost.entity_resource_data.id)
var r : EntityResource = info.caster.resource_gets_id(resource_cost.entity_resource_data.id)
if r == null:
return
@ -72,11 +72,11 @@ func _sstart_casting(info : SpellCastInfo) -> void:
return
if cast_enabled:
info.caster.sstart_casting(info)
info.caster.cast_starts(info)
return
if resource_cost != null and resource_cost.entity_resource_data != null:
var r : EntityResource = info.caster.gets_resource_id(resource_cost.entity_resource_data.id)
var r : EntityResource = info.caster.resource_gets_id(resource_cost.entity_resource_data.id)
r.current_value -= resource_cost.cost
@ -94,9 +94,9 @@ func _sstart_casting(info : SpellCastInfo) -> void:
handle_gcd(info)
func _sfinish_cast(info : SpellCastInfo) -> void:
func _cast_finishs(info : SpellCastInfo) -> void:
if resource_cost != null and resource_cost.entity_resource_data != null:
var r : EntityResource = info.caster.gets_resource_id(resource_cost.entity_resource_data.id)
var r : EntityResource = info.caster.resource_gets_id(resource_cost.entity_resource_data.id)
if r.current_value < resource_cost.cost:
info.caster.son_cast_failed(info)
@ -123,7 +123,7 @@ func _sfinish_cast(info : SpellCastInfo) -> void:
func _son_cast_player_moved(info):
if !cast_can_move_while_casting:
info.caster.sfail_cast()
info.caster.cast_fails()
func _son_spell_hit(info):
handle_effect(info)
@ -183,12 +183,12 @@ func handle_effect(info : SpellCastInfo) -> void:
var ad : AuraData = null
if aura.aura_group != null:
ad = info.target.gets_aura_with_group_by(info.caster, aura.aura_group)
ad = info.target.aura_gets_with_group_by(info.caster, aura.aura_group)
else:
ad = info.target.gets_aura_by(info.caster, aura.get_id())
ad = info.target.aura_gets_by(info.caster, aura.get_id())
if ad != null:
info.target.removes_aura_exact(ad)
info.target.aura_removes_exact(ad)
var ainfo : AuraApplyInfo = AuraApplyInfo.new()
@ -203,11 +203,11 @@ func handle_effect(info : SpellCastInfo) -> void:
func handle_cooldown(info : SpellCastInfo) -> void:
if cooldown_cooldown > 0:
info.caster.adds_cooldown(id, cooldown_cooldown)
info.caster.cooldown_adds(id, cooldown_cooldown)
func handle_gcd(info : SpellCastInfo) -> void:
if cooldown_global_cooldown_enabled and cast_cast_time < 0.01:
info.caster.sstart_global_cooldown(info.caster.get_gcd().scurrent)
info.caster.gcd_starts(info.caster.get_gcd().scurrent)
func add_spell_cast_effect(info : SpellCastInfo) -> void:
var basic_spell_effect : SpellEffectVisualBasic = visual_spell_effects as SpellEffectVisualBasic

View File

@ -200,13 +200,13 @@ func _on_button_pressed() -> void:
if (button_entry.item_path == ""):
return
player.crequest_spell_cast(ESS.resource_db.spell_path_to_id(button_entry.item_path))
player.spell_crequest_cast(ESS.resource_db.spell_path_to_id(button_entry.item_path))
elif button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_ITEM:
if (button_entry.item_path == ""):
return
player.crequest_use_item(ESS.resource_db.item_template_path_to_id(button_entry.item_path))
player.item_crequest_use(ESS.resource_db.item_template_path_to_id(button_entry.item_path))
func set_button_entry_data(type: int, item_path: String) -> void:
button_entry.type = type
@ -288,8 +288,8 @@ func set_player(p_player: Entity) -> void:
if player == null:
return
# for i in range(player.getc_cooldown_count()):
# var cooldown : Cooldown = player.getc_cooldown(i)
# for i in range(player.cooldown_getc_count()):
# var cooldown : Cooldown = player.cooldown_getc(i)
player.connect("ccooldown_added", self, "_ccooldown_added")
player.connect("ccooldown_removed", self, "_ccooldown_removed")

View File

@ -181,7 +181,7 @@ func can_drop_data(pos, data) -> bool:
func drop_data(pos, esd) -> void:
if esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_INVENTORY_ITEM:
player.crequest_item_swap(slot_id, esd.get_meta("slot_id"))
player.item_crequest_swap(slot_id, esd.get_meta("slot_id"))
setup_icon()
elif esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_EQUIPPED_ITEM:
player.equip_crequest(ESS.resource_db.get_item_template_path(esd.item_path).id, slot_id)
@ -205,8 +205,8 @@ func set_player(p_player: Entity) -> void:
if player == null:
return
# for i in range(player.getc_cooldown_count()):
# var cooldown : Cooldown = player.getc_cooldown(i)
# for i in range(player.cooldown_getc_count()):
# var cooldown : Cooldown = player.cooldown_getc(i)
player.connect("ccooldown_added", self, "_ccooldown_added")
player.connect("ccooldown_removed", self, "_ccooldown_removed")

View File

@ -49,4 +49,4 @@ func set_item(entity : Entity, item : ItemInstance) -> void:
_use_button.hide()
func use_button_pressed():
_entity.crequest_use_item(_item.item_template.id)
_entity.item_crequest_use(_item.item_template.id)

View File

@ -38,7 +38,7 @@ func _ready():
Logger.error("LootEntry is not setup correctly!")
func on_click():
player.crequest_loot(index)
player.loot_crequest(index)
func set_item(pindex : int, item_instance : ItemInstance, pplayer : Entity) -> void:
index = index

View File

@ -88,7 +88,7 @@ func refresh() -> void:
if a == null:
break
if _player.hasc_talent(a.id):
if _player.talent_hasc(a.id):
known_rank_count += 1
rank_count += 1
@ -116,7 +116,7 @@ func open_popup() -> void:
_popup.popup(Rect2(p, _popup.rect_size))
func upgrade():
_player.crequest_talent_learn(_spec_index, _row, culomn)
_player.talent_crequest_learn(_spec_index, _row, culomn)
func ctalent_learned(entity: Entity, talent_id: int) -> void:
refresh()

View File

@ -50,9 +50,9 @@ func _ready() -> void:
func set_player(p_player : Entity) -> void:
if not _player == null and is_instance_valid(_player):
_player.getc_resource_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH).disconnect("changed", self, "_on_player_health_changed")
_player.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH).disconnect("changed", self, "_on_player_health_changed")
_player.disconnect("notification_caura", self, "on_notification_caura")
_player.disconnect("cdied", self, "cdied")
_player.disconnect("diecd", self, "diecd")
_player.disconnect("centity_resource_added", self, "centity_resource_added")
if _mana != null:
@ -72,19 +72,19 @@ func set_player(p_player : Entity) -> void:
_player = p_player
for index in range(_player.getc_aura_count()):
var aura : AuraData = _player.getc_aura(index)
for index in range(_player.aura_getc_count()):
var aura : AuraData = _player.aura_getc(index)
on_notification_caura(SpellEnums.NOTIFICATION_AURA_ADDED, aura)
_player.connect("notification_caura", self, "on_notification_caura")
_player.connect("cdied", self, "cdied", [], CONNECT_DEFERRED)
_player.connect("diecd", self, "diecd", [], CONNECT_DEFERRED)
_player.connect("centity_resource_added", self, "centity_resource_added")
for i in range(_player.getc_resource_count()):
centity_resource_added(_player.getc_resource_index(i))
for i in range(_player.resource_getc_count()):
centity_resource_added(_player.resource_getc_index(i))
var health = _player.getc_resource_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH)
var health = _player.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH)
_on_player_health_changed(health)
health.connect("changed", self, "_on_player_health_changed")
@ -147,5 +147,5 @@ func _on_player_health_changed(health : EntityResource) -> void:
_health_text.text = str(health.current_value) + "/" + str(health.max_value)
func cdied(entity : Entity) -> void:
func diecd(entity : Entity) -> void:
set_player(null)

View File

@ -51,7 +51,7 @@ func _ready() -> void:
func set_player(p_player: Entity) -> void:
if not _player == null:
_player.getc_resource_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH).disconnect("changed", self, "_on_player_health_changed")
_player.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH).disconnect("changed", self, "_on_player_health_changed")
_player.disconnect("cname_changed", self, "cname_changed")
_player.disconnect("con_level_up", self, "clevel_changed")
_player.disconnect("con_level_changed", self, "clevel_changed")
@ -77,10 +77,10 @@ func set_player(p_player: Entity) -> void:
_player.connect("centity_data_changed", self, "centity_data_changed")
_player.connect("centity_resource_added", self, "centity_resource_added")
for i in range(_player.getc_resource_count()):
centity_resource_added(_player.getc_resource_index(i))
for i in range(_player.resource_getc_count()):
centity_resource_added(_player.resource_getc_index(i))
var health = _player.getc_resource_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH)
var health = _player.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH)
_on_player_health_changed(health)
health.connect("changed", self, "_on_player_health_changed")
@ -142,5 +142,5 @@ func con_xp_gained(entity: Entity, val: int) -> void:
_xp_range.value = _player.ccharacter_xp
func centity_data_changed(data: EntityData) -> void:
var health = _player.getc_resource_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH)
var health = _player.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH)
_on_player_health_changed(health)

View File

@ -68,8 +68,8 @@ func set_category(category: int) -> void:
ch.queue_free()
var count : int = 0
for i in range(_player.gets_craft_recipe_count()):
var cr : CraftRecipe = _player.gets_craft_recipe(i)
for i in range(_player.craft_gets_recipe_count()):
var cr : CraftRecipe = _player.craft_gets_recipe(i)
if cr.category == category:
var rss : Node = recipe_selector_scene.instance()
@ -89,7 +89,7 @@ func set_category(category: int) -> void:
func request_craft() -> void:
_player.crequest_craft(_selected_craft_recipe.id)
_player.craft_crequest(_selected_craft_recipe.id)
for ch in _tools_container.get_children():
ch.refresh()

View File

@ -101,13 +101,13 @@ func refresh_entries() -> void:
var spell : Spell = _spells[spindex]
if not _player.hasc_spell(spell):
if not _player.spell_hasc(spell):
if not show_not_learned:
i += 1
continue
if not show_not_learnable:
if spell.training_required_spell and not _player.hasc_spell(spell.training_required_spell):
if spell.training_required_spell and not _player.spell_hasc(spell.training_required_spell):
i += 1
continue

View File

@ -67,7 +67,7 @@ func set_spell(p_player : Entity, p_spell: Spell) -> void:
_popup.set_spell(_spell)
if not _spell == null:
_spell_known = _player.hasc_spell(p_spell)
_spell_known = _player.spell_hasc(p_spell)
_icon.texture = _spell.icon
_name_label.text = _spell.text_name + " (Rank " + str(_spell.rank) + ")"
@ -85,7 +85,7 @@ func learn_spell() -> void:
if _player.cfree_spell_points <= 0:
return
_player.crequest_spell_learn(_spell.id)
_player.spell_learn_requestc(_spell.id)
func cspell_added(entity: Entity, spell: Spell) -> void:
if spell == _spell:
@ -114,7 +114,7 @@ func update_spell_indicators():
else:
if _spell != null:
if _spell.training_required_spell:
if not _player.hasc_spell(_spell.training_required_spell):
if not _player.spell_hasc(_spell.training_required_spell):
# get_node(known_label_path).hide()
# get_node(learn_button_path).show()