mirror of
https://github.com/Relintai/broken_seals_roguelike.git
synced 2024-11-21 13:17:17 +01:00
Updated ESS methods.
This commit is contained in:
parent
b11f49172b
commit
740e7520f9
@ -84,7 +84,7 @@ func _enter_tree() -> void:
|
||||
|
||||
character_skeleton = get_node(character_skeleton_path)
|
||||
entity = get_node("..")
|
||||
entity.set_character_skeleton(character_skeleton)
|
||||
entity.character_skeleton_set(character_skeleton)
|
||||
# entity.connect("notification_ccast", self, "on_notification_ccast")
|
||||
entity.connect("diesd", self, "on_diesd")
|
||||
entity.connect("onc_entity_controller_changed", self, "on_c_controlled_changed")
|
||||
@ -288,7 +288,7 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||
|
||||
|
||||
func try_move(dx, dy):
|
||||
var state : int = entity.getc_state()
|
||||
var state : int = entity.state_getc()
|
||||
|
||||
if state & EntityEnums.ENTITY_STATE_TYPE_FLAG_ROOT != 0 or state & EntityEnums.ENTITY_STATE_TYPE_FLAG_STUN != 0:
|
||||
return
|
||||
@ -309,12 +309,12 @@ func try_move(dx, dy):
|
||||
world.player_moved()
|
||||
|
||||
func move_towards_target():
|
||||
var state : int = entity.getc_state()
|
||||
var state : int = entity.state_getc()
|
||||
|
||||
if state & EntityEnums.ENTITY_STATE_TYPE_FLAG_ROOT != 0 or state & EntityEnums.ENTITY_STATE_TYPE_FLAG_STUN != 0:
|
||||
return
|
||||
|
||||
var t : Entity = entity.getc_target()
|
||||
var t : Entity = entity.target_getc()
|
||||
|
||||
if !t:
|
||||
return
|
||||
@ -355,7 +355,7 @@ func target(position : Vector2, keep_target : bool = false) -> bool:
|
||||
if !enemy.get_body().visible:
|
||||
return false
|
||||
|
||||
if entity.getc_target() != enemy:
|
||||
if entity.target_getc() != enemy:
|
||||
entity.target_crequest_change(enemy.get_path())
|
||||
return true
|
||||
else:
|
||||
|
@ -136,7 +136,7 @@ func _notification_scharacter_level_up(value: int) -> void:
|
||||
refresh_spells(value)
|
||||
|
||||
func refresh_spells(value: int):
|
||||
if gets_free_spell_points() == 0 and gets_free_class_talent_points() == 0:
|
||||
if free_spell_points_gets() == 0 and class_talent_points_gets_free() == 0:
|
||||
return
|
||||
|
||||
var ecd : EntityClassData = sentity_data.entity_class_data
|
||||
|
@ -165,7 +165,7 @@ func update_visibility():
|
||||
|
||||
if visibility_test(tp.x, tp.y, tpos.x, tpos.y):
|
||||
b.set_visibility(true)
|
||||
e.sets_target(_player)
|
||||
e.target_sets(_player)
|
||||
discovered_enemies.append(e)
|
||||
|
||||
|
||||
@ -494,14 +494,14 @@ func on_visibility_changed():
|
||||
|
||||
if b.visible:
|
||||
b.set_visibility(true)
|
||||
e.sets_target(_player)
|
||||
e.target_sets(_player)
|
||||
else:
|
||||
for e in discovered_enemies:
|
||||
var b = e.get_body()
|
||||
|
||||
if b.visible:
|
||||
b.set_visibility(false)
|
||||
e.sets_target(null)
|
||||
e.target_sets(null)
|
||||
|
||||
func make_cell_visible(x : int, y : int):
|
||||
visibility_map.set_cell(x, y, -1)
|
||||
|
@ -25,14 +25,14 @@ class_name EntityDataGD
|
||||
# SOFTWARE.
|
||||
|
||||
func _sinteract(entity: Entity) -> void:
|
||||
var target : Entity = entity.gets_target()
|
||||
var target : Entity = entity.target_gets()
|
||||
|
||||
if target == null or not is_instance_valid(target):
|
||||
return
|
||||
|
||||
if target.sentity_interaction_type == EntityEnums.ENITIY_INTERACTION_TYPE_LOOT:
|
||||
if target.gets_entity_data().loot_db != null and target.sbag == null:
|
||||
var ldb : LootDataBase = target.gets_entity_data().loot_db
|
||||
if target.entity_data_gets().loot_db != null and target.sbag == null:
|
||||
var ldb : LootDataBase = target.entity_data_gets().loot_db
|
||||
|
||||
var loot : Array = Array()
|
||||
|
||||
@ -57,7 +57,7 @@ func _sinteract(entity: Entity) -> void:
|
||||
entity.ssend_open_window(EntityEnums.ENTITY_WINDOW_VENDOR)
|
||||
|
||||
func _cans_interact(entity):
|
||||
var target : Entity = entity.gets_target()
|
||||
var target : Entity = entity.target_gets()
|
||||
|
||||
if target == null or not is_instance_valid(target):
|
||||
return false
|
||||
|
@ -235,20 +235,20 @@ func add_spell_cast_effect(info : SpellCastInfo) -> void:
|
||||
|
||||
if basic_spell_effect != null:
|
||||
if basic_spell_effect.spell_cast_effect_left_hand != null:
|
||||
info.caster.get_character_skeleton().common_attach_point_add(EntityEnums.COMMON_SKELETON_POINT_LEFT_HAND, basic_spell_effect.spell_cast_effect_left_hand)
|
||||
info.caster.character_skeleton_get().common_attach_point_add(EntityEnums.COMMON_SKELETON_POINT_LEFT_HAND, basic_spell_effect.spell_cast_effect_left_hand)
|
||||
|
||||
if basic_spell_effect.spell_cast_effect_right_hand != null:
|
||||
info.caster.get_character_skeleton().common_attach_point_add(EntityEnums.COMMON_SKELETON_POINT_RIGHT_HAND, basic_spell_effect.spell_cast_effect_right_hand)
|
||||
info.caster.character_skeleton_get().common_attach_point_add(EntityEnums.COMMON_SKELETON_POINT_RIGHT_HAND, basic_spell_effect.spell_cast_effect_right_hand)
|
||||
|
||||
func remove_spell_cast_effect(info : SpellCastInfo) -> void:
|
||||
var basic_spell_effect : SpellEffectVisualBasic = visual_spell_effects as SpellEffectVisualBasic
|
||||
|
||||
if basic_spell_effect != null:
|
||||
if basic_spell_effect.spell_cast_effect_left_hand != null:
|
||||
info.caster.get_character_skeleton().common_attach_point_remove(EntityEnums.COMMON_SKELETON_POINT_LEFT_HAND, basic_spell_effect.spell_cast_effect_left_hand)
|
||||
info.caster.character_skeleton_get().common_attach_point_remove(EntityEnums.COMMON_SKELETON_POINT_LEFT_HAND, basic_spell_effect.spell_cast_effect_left_hand)
|
||||
|
||||
if basic_spell_effect.spell_cast_effect_right_hand != null:
|
||||
info.caster.get_character_skeleton().common_attach_point_remove(EntityEnums.COMMON_SKELETON_POINT_RIGHT_HAND, basic_spell_effect.spell_cast_effect_right_hand)
|
||||
info.caster.character_skeleton_get().common_attach_point_remove(EntityEnums.COMMON_SKELETON_POINT_RIGHT_HAND, basic_spell_effect.spell_cast_effect_right_hand)
|
||||
|
||||
func _notification_ccast(what, info):
|
||||
if what == SpellEnums.NOTIFICATION_CAST_STARTED:
|
||||
@ -269,10 +269,10 @@ func _notification_ccast(what, info):
|
||||
|
||||
if bse != null:
|
||||
if bse.torso_spell_cast_finish_effect != null:
|
||||
info.target.get_character_skeleton().common_attach_point_add_timed(EntityEnums.COMMON_SKELETON_POINT_TORSO, bse.torso_spell_cast_finish_effect_time)
|
||||
info.target.character_skeleton_get().common_attach_point_add_timed(EntityEnums.COMMON_SKELETON_POINT_TORSO, bse.torso_spell_cast_finish_effect_time)
|
||||
|
||||
if bse.root_spell_cast_finish_effect != null:
|
||||
info.target.get_character_skeleton().common_attach_point_add_timed(EntityEnums.COMMON_SKELETON_POINT_ROOT, bse.root_spell_cast_finish_effect_time)
|
||||
info.target.character_skeleton_get().common_attach_point_add_timed(EntityEnums.COMMON_SKELETON_POINT_ROOT, bse.root_spell_cast_finish_effect_time)
|
||||
|
||||
|
||||
func _son_spell_hit(info):
|
||||
@ -297,7 +297,7 @@ func _aura_sapply(info : AuraApplyInfo) -> void:
|
||||
var t : int = 1 << i
|
||||
|
||||
if aura_states_add & t != 0:
|
||||
info.target.adds_state_ref(i)
|
||||
info.target.state_ref_adds(i)
|
||||
|
||||
info.target.aura_adds(ad);
|
||||
|
||||
@ -315,7 +315,7 @@ func _aura_sdeapply(data : AuraData) -> void:
|
||||
var t : int = 1 << i
|
||||
|
||||
if aura_states_add & t != 0:
|
||||
data.owner.removes_state_ref(i)
|
||||
data.owner.state_ref_removes(i)
|
||||
|
||||
deapply_mods(data)
|
||||
|
||||
@ -327,7 +327,7 @@ func deapply_mods(ad : AuraData):
|
||||
|
||||
|
||||
func _con_aura_added(data : AuraData) -> void:
|
||||
if data.owner.get_character_skeleton() == null or data.owner.get_character_skeleton().root_attach_point == null:
|
||||
if data.owner.character_skeleton_get() == null or data.owner.character_skeleton_get().root_attach_point == null:
|
||||
return
|
||||
|
||||
var bse : SpellEffectVisualBasic = visual_spell_effects as SpellEffectVisualBasic
|
||||
@ -335,23 +335,23 @@ func _con_aura_added(data : AuraData) -> void:
|
||||
if bse != null:
|
||||
if bse.root_aura_effect != null:
|
||||
if bse.root_aura_effect_time < 0.00001:
|
||||
data.owner.get_character_skeleton().root_attach_point.add_effect(bse.root_aura_effect)
|
||||
data.owner.character_skeleton_get().root_attach_point.add_effect(bse.root_aura_effect)
|
||||
else:
|
||||
data.owner.get_character_skeleton().root_attach_point.add_effect_timed(bse.root_aura_effect, bse.root_aura_effect_time)
|
||||
data.owner.character_skeleton_get().root_attach_point.add_effect_timed(bse.root_aura_effect, bse.root_aura_effect_time)
|
||||
|
||||
if bse.torso_aura_effect != null:
|
||||
if bse.torso_aura_effect_time < 0.00001:
|
||||
data.owner.get_character_skeleton().torso_attach_point.add_effect(bse.torso_aura_effect)
|
||||
data.owner.character_skeleton_get().torso_attach_point.add_effect(bse.torso_aura_effect)
|
||||
else:
|
||||
data.owner.get_character_skeleton().torso_attach_point.add_effect_timed(bse.torso_aura_effect, bse.torso_aura_effect_time)
|
||||
data.owner.character_skeleton_get().torso_attach_point.add_effect_timed(bse.torso_aura_effect, bse.torso_aura_effect_time)
|
||||
|
||||
func _con_aura_removed(data : AuraData) -> void:
|
||||
var bse : SpellEffectVisualBasic = visual_spell_effects as SpellEffectVisualBasic
|
||||
|
||||
if bse != null:
|
||||
if bse.root_aura_effect != null and bse.root_aura_effect_time < 0.00001:
|
||||
data.owner.get_character_skeleton().root_attach_point.remove_effect(bse.root_aura_effect)
|
||||
data.owner.character_skeleton_get().root_attach_point.remove_effect(bse.root_aura_effect)
|
||||
|
||||
if bse.torso_aura_effect != null and bse.torso_aura_effect_time < 0.00001:
|
||||
data.owner.get_character_skeleton().torso_attach_point.remove_effect(bse.torso_aura_effect)
|
||||
data.owner.character_skeleton_get().torso_attach_point.remove_effect(bse.torso_aura_effect)
|
||||
|
||||
|
@ -9,7 +9,7 @@ func _pressed():
|
||||
if _player && is_instance_valid(_player):
|
||||
var abp : ActionBarProfile = _player.get_action_bar_profile()
|
||||
|
||||
var cp : ClassProfile = ProfileManager.getc_player_profile().get_class_profile(_player.gets_entity_data().get_path())
|
||||
var cp : ClassProfile = ProfileManager.getc_player_profile().get_class_profile(_player.entity_data_gets().get_path())
|
||||
|
||||
cp.get_default_action_bar_profile().from_actionbar_profile(abp)
|
||||
|
||||
|
@ -32,7 +32,7 @@ func set_player(player : Entity):
|
||||
|
||||
_player = player
|
||||
|
||||
on_data_changed(_player.getc_entity_data())
|
||||
on_data_changed(_player.entity_data_getc())
|
||||
|
||||
_player.connect("centity_data_changed", self, "on_data_changed")
|
||||
|
||||
@ -150,7 +150,7 @@ func close():
|
||||
InputMap.load_from_globals()
|
||||
|
||||
if _player:
|
||||
ProfileManager.on_keybinds_changed(_player.getc_entity_data().get_path())
|
||||
ProfileManager.on_keybinds_changed(_player.entity_data_getc().get_path())
|
||||
|
||||
hide()
|
||||
|
||||
|
@ -137,7 +137,7 @@ func refresh_all() -> void:
|
||||
_page = _max_pages
|
||||
|
||||
if ESS.use_spell_points:
|
||||
_spell_points_label.text = "Free spell points: " + str(_player.getc_free_spell_points())
|
||||
_spell_points_label.text = "Free spell points: " + str(_player.free_spell_points_getc())
|
||||
|
||||
refresh_entries()
|
||||
|
||||
@ -162,7 +162,7 @@ func set_player(p_player: Entity) -> void:
|
||||
centity_data_changed(null)
|
||||
|
||||
func cfree_spell_points_changed(entity: Entity, value: int) -> void:
|
||||
_spell_points_label.text = "Free spell points: " + str(_player.getc_free_spell_points())
|
||||
_spell_points_label.text = "Free spell points: " + str(_player.free_spell_points_getc())
|
||||
|
||||
func centity_data_changed(data: EntityData):
|
||||
_spells.clear()
|
||||
|
@ -134,7 +134,7 @@ func _visibility_changed() -> void:
|
||||
if !t:
|
||||
return
|
||||
|
||||
_vendor_item_data = t.getc_entity_data().entity_class_data.get_vendor_item_data()
|
||||
_vendor_item_data = t.entity_data_getc().entity_class_data.get_vendor_item_data()
|
||||
|
||||
_page = 0
|
||||
refresh_all()
|
||||
|
Loading…
Reference in New Issue
Block a user