mirror of
https://github.com/Relintai/broken_seals_2d.git
synced 2024-11-11 20:35:10 +01:00
Updated ESS methods.
This commit is contained in:
parent
ffe37524ff
commit
ff27359ade
@ -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")
|
||||
@ -117,7 +117,7 @@ func on_centity_data_changed(entd : EntityData):
|
||||
character_skeleton.queue_free()
|
||||
|
||||
character_skeleton = sk
|
||||
entity.set_character_skeleton(character_skeleton)
|
||||
entity.character_skeleton_set(character_skeleton)
|
||||
|
||||
if character_skeleton:
|
||||
add_child(character_skeleton)
|
||||
@ -197,7 +197,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()
|
||||
@ -218,7 +218,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
|
||||
@ -253,7 +253,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
|
||||
@ -289,7 +289,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
|
||||
|
@ -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
|
||||
|
@ -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"]
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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()
|
||||
|
||||
@ -164,7 +164,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()
|
||||
|
@ -80,7 +80,7 @@ func _process(delta):
|
||||
if _player == null:
|
||||
return
|
||||
|
||||
var target : Entity = _player.getc_target()
|
||||
var target : Entity = _player.target_getc()
|
||||
|
||||
if target != _trainer:
|
||||
hide()
|
||||
@ -247,7 +247,7 @@ func onc_open_winow_request(window_id : int) -> void:
|
||||
if window_id != EntityEnums.ENTITY_WINDOW_TRAINER:
|
||||
return
|
||||
|
||||
_trainer = _player.getc_target()
|
||||
_trainer = _player.target_getc()
|
||||
|
||||
show()
|
||||
|
||||
|
@ -75,7 +75,7 @@ func _process(delta):
|
||||
if _player == null:
|
||||
return
|
||||
|
||||
var target : Entity = _player.getc_target()
|
||||
var target : Entity = _player.target_getc()
|
||||
|
||||
if target != _vendor:
|
||||
hide()
|
||||
@ -156,7 +156,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()
|
||||
@ -179,7 +179,7 @@ func onc_open_winow_request(window_id : int) -> void:
|
||||
if window_id != EntityEnums.ENTITY_WINDOW_VENDOR:
|
||||
return
|
||||
|
||||
_vendor = _player.getc_target()
|
||||
_vendor = _player.target_getc()
|
||||
|
||||
show()
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user