mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
Updated ESS methods.
This commit is contained in:
parent
80aaca922d
commit
45a3a98a31
@ -123,7 +123,7 @@ func _ready() -> void:
|
||||
character_skeleton = get_node(character_skeleton_path)
|
||||
contact = get_node(contact_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")
|
||||
@ -184,11 +184,11 @@ func _process(delta : float) -> void:
|
||||
# var lod_level : int = int(dst / max_visible_distance_squared * 3.0)
|
||||
|
||||
if dst < 400: #20^2
|
||||
entity.get_character_skeleton().set_lod_level(0)
|
||||
entity.character_skeleton_get().set_lod_level(0)
|
||||
elif dst > 400 and dst < 900: #20^2, 30^2
|
||||
entity.get_character_skeleton().set_lod_level(1)
|
||||
entity.character_skeleton_get().set_lod_level(1)
|
||||
else:
|
||||
entity.get_character_skeleton().set_lod_level(2)
|
||||
entity.character_skeleton_get().set_lod_level(2)
|
||||
|
||||
if not visible:
|
||||
show()
|
||||
@ -273,7 +273,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()
|
||||
@ -308,7 +308,7 @@ func process_input(delta: float) -> void:
|
||||
camera_pivot.set_y_rot(0.0)
|
||||
|
||||
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
|
||||
@ -452,7 +452,7 @@ func process_movement_mob(delta : float) -> void:
|
||||
if entity.starget != null:
|
||||
look_at(entity.starget.body_get().translation, Vector3(0, 1, 0))
|
||||
|
||||
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
|
||||
|
@ -132,7 +132,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
|
||||
|
@ -33,7 +33,7 @@ func _moved():
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("sheath"):
|
||||
get_character_skeleton().toggle_sheath()
|
||||
character_skeleton_get().toggle_sheath()
|
||||
|
||||
func _notification_slevel_up(value):
|
||||
._notification_slevel_up(value)
|
||||
|
@ -25,7 +25,7 @@ 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
|
||||
@ -34,8 +34,8 @@ func _sinteract(entity: Entity) -> void:
|
||||
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()
|
||||
|
||||
@ -60,7 +60,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 = visual_spell_effects
|
||||
|
||||
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):
|
||||
@ -300,7 +300,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);
|
||||
|
||||
@ -318,7 +318,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):
|
||||
pass
|
||||
|
||||
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 = aura_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 = aura_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