From 735d75c49e5efb241e774560bd6297a0e4a0768c Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 8 Oct 2023 20:26:38 +0200 Subject: [PATCH] Updated ESS methods. --- game/player/Body.gd | 10 ++++---- game/player/Mob.gd | 2 +- game/player/NetworkedPlayer.gd | 2 +- game/scripts/entities/EntityDataGD.gd | 8 +++--- game/scripts/spells/gd_spell_script.gd | 30 +++++++++++----------- game/ui/interface/SetActionbarAsDefault.gd | 2 +- game/ui/keybinds/Keybinds.gd | 4 +-- game/ui/spellbook/SpellBookWindow.gd | 4 +-- game/ui/vendor_window/VendorWindow.gd | 2 +- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/game/player/Body.gd b/game/player/Body.gd index 4d13c3f..f0f606f 100644 --- a/game/player/Body.gd +++ b/game/player/Body.gd @@ -97,7 +97,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") @@ -180,7 +180,7 @@ func process_input(delta: float) -> void: input_dir = key_dir + mouse_dir + touchpad_dir + mouse_move_dir - 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: input_dir = Vector2() @@ -201,7 +201,7 @@ func process_input(delta: float) -> void: func process_movement(delta : float) -> void: - 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: moving = false @@ -236,7 +236,7 @@ func process_movement(delta : float) -> void: func process_movement_player(delta : float) -> void: - 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: moving = false @@ -272,7 +272,7 @@ func process_movement_player(delta : float) -> void: func process_movement_mob(delta : float) -> void: - 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: moving = false diff --git a/game/player/Mob.gd b/game/player/Mob.gd index 5f17558..cc6d788 100644 --- a/game/player/Mob.gd +++ b/game/player/Mob.gd @@ -135,7 +135,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 diff --git a/game/player/NetworkedPlayer.gd b/game/player/NetworkedPlayer.gd index 9483646..fcfd05a 100644 --- a/game/player/NetworkedPlayer.gd +++ b/game/player/NetworkedPlayer.gd @@ -47,7 +47,7 @@ class_name NetworkedPlayerGD ##var animation_run : bool = false # #func _ready() -> void: -# animation_tree = get_character_skeleton().get_animation_tree() +# animation_tree = character_skeleton_get().get_animation_tree() # # if animation_tree != null: # anim_node_state_machine = animation_tree["parameters/playback"] diff --git a/game/scripts/entities/EntityDataGD.gd b/game/scripts/entities/EntityDataGD.gd index 6a1c16d..6cbc09d 100644 --- a/game/scripts/entities/EntityDataGD.gd +++ b/game/scripts/entities/EntityDataGD.gd @@ -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 diff --git a/game/scripts/spells/gd_spell_script.gd b/game/scripts/spells/gd_spell_script.gd index 8354ac1..3cc44d0 100644 --- a/game/scripts/spells/gd_spell_script.gd +++ b/game/scripts/spells/gd_spell_script.gd @@ -238,20 +238,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: @@ -272,10 +272,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): @@ -299,7 +299,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); @@ -317,7 +317,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) @@ -329,7 +329,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 @@ -337,23 +337,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) diff --git a/game/ui/interface/SetActionbarAsDefault.gd b/game/ui/interface/SetActionbarAsDefault.gd index c2cdd07..d30e43d 100644 --- a/game/ui/interface/SetActionbarAsDefault.gd +++ b/game/ui/interface/SetActionbarAsDefault.gd @@ -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) diff --git a/game/ui/keybinds/Keybinds.gd b/game/ui/keybinds/Keybinds.gd index bcc3db4..4bd2281 100644 --- a/game/ui/keybinds/Keybinds.gd +++ b/game/ui/keybinds/Keybinds.gd @@ -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() diff --git a/game/ui/spellbook/SpellBookWindow.gd b/game/ui/spellbook/SpellBookWindow.gd index 4988b5e..6df36bb 100644 --- a/game/ui/spellbook/SpellBookWindow.gd +++ b/game/ui/spellbook/SpellBookWindow.gd @@ -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() diff --git a/game/ui/vendor_window/VendorWindow.gd b/game/ui/vendor_window/VendorWindow.gd index 0fec5ca..16343b3 100644 --- a/game/ui/vendor_window/VendorWindow.gd +++ b/game/ui/vendor_window/VendorWindow.gd @@ -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()