mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
Update ESS to get the clientside notification api changes.
This commit is contained in:
parent
2bc4fff27d
commit
84e341bcc6
2
HEADS
2
HEADS
@ -1 +1 @@
|
|||||||
{"engine": {"3.2": "78f0cf40cb4a37b54a27da25349718d1c4b324e5", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "97f10512f8832394389e1109154b8af34a2ef2c6"}, "entity_spell_system": {"master": "d110b3368ffabd83fc3d5719589816184cd90ed3"}, "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": "90ad406d73ea252bb7fb74a7c9d58979fbbd355c"}, "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"}}
|
@ -97,10 +97,7 @@ func _ready() -> void:
|
|||||||
character_skeleton = get_node(character_skeleton_path)
|
character_skeleton = get_node(character_skeleton_path)
|
||||||
entity = get_node("..")
|
entity = get_node("..")
|
||||||
entity.set_character_skeleton(character_skeleton)
|
entity.set_character_skeleton(character_skeleton)
|
||||||
entity.connect("ccast_started", self, "_con_cast_started")
|
entity.connect("notification_ccast", self, "on_notification_ccast")
|
||||||
entity.connect("ccast_failed", self, "_con_cast_failed")
|
|
||||||
entity.connect("ccast_finished", self, "_con_cast_finished")
|
|
||||||
entity.connect("cspell_cast_success", self, "_con_spell_cast_success")
|
|
||||||
entity.connect("sdied", self, "on_sdied")
|
entity.connect("sdied", self, "on_sdied")
|
||||||
entity.connect("isc_controlled_changed", self, "on_c_controlled_changed")
|
entity.connect("isc_controlled_changed", self, "on_c_controlled_changed")
|
||||||
owner = entity
|
owner = entity
|
||||||
@ -541,35 +538,33 @@ remote func cset_position(position : Vector3, rotation : Vector3) -> void:
|
|||||||
rotation = rotation
|
rotation = rotation
|
||||||
|
|
||||||
|
|
||||||
func _con_cast_started(info):
|
func on_notification_ccast(what : int, info : SpellCastInfo) -> void:
|
||||||
if anim_node_state_machine != null and not casting_anim:
|
if what == SpellEnums.NOTIFICATION_CAST_STARTED:
|
||||||
anim_node_state_machine.travel("casting-loop")
|
if anim_node_state_machine != null and not casting_anim:
|
||||||
casting_anim = true
|
anim_node_state_machine.travel("casting-loop")
|
||||||
animation_run = false
|
casting_anim = true
|
||||||
|
animation_run = false
|
||||||
|
elif what == SpellEnums.NOTIFICATION_CAST_FAILED:
|
||||||
|
if anim_node_state_machine != null and casting_anim:
|
||||||
|
anim_node_state_machine.travel("idle-loop")
|
||||||
|
casting_anim = false
|
||||||
|
|
||||||
func _con_cast_failed(info):
|
if animation_run:
|
||||||
if anim_node_state_machine != null and casting_anim:
|
anim_node_state_machine.travel("run-loop")
|
||||||
anim_node_state_machine.travel("idle-loop")
|
elif what == SpellEnums.NOTIFICATION_CAST_FINISHED:
|
||||||
casting_anim = false
|
if anim_node_state_machine != null:
|
||||||
|
anim_node_state_machine.travel("cast-end")
|
||||||
|
casting_anim = false
|
||||||
|
|
||||||
if animation_run:
|
if animation_run:
|
||||||
anim_node_state_machine.travel("run-loop")
|
anim_node_state_machine.travel("run-loop")
|
||||||
|
elif what == SpellEnums.NOTIFICATION_CAST_SUCCESS:
|
||||||
|
if anim_node_state_machine != null:
|
||||||
|
anim_node_state_machine.travel("cast-end")
|
||||||
|
casting_anim = false
|
||||||
|
|
||||||
func _con_cast_finished(info):
|
if animation_run:
|
||||||
if anim_node_state_machine != null:
|
anim_node_state_machine.travel("run-loop")
|
||||||
anim_node_state_machine.travel("cast-end")
|
|
||||||
casting_anim = false
|
|
||||||
|
|
||||||
if animation_run:
|
|
||||||
anim_node_state_machine.travel("run-loop")
|
|
||||||
|
|
||||||
func _con_spell_cast_success(info):
|
|
||||||
if anim_node_state_machine != null:
|
|
||||||
anim_node_state_machine.travel("cast-end")
|
|
||||||
casting_anim = false
|
|
||||||
|
|
||||||
if animation_run:
|
|
||||||
anim_node_state_machine.travel("run-loop")
|
|
||||||
|
|
||||||
|
|
||||||
func on_c_controlled_changed(val):
|
func on_c_controlled_changed(val):
|
||||||
|
@ -91,16 +91,18 @@ func _son_death():
|
|||||||
func set_position(position : Vector3, rotation : Vector3) -> void:
|
func set_position(position : Vector3, rotation : Vector3) -> void:
|
||||||
get_body().set_position(position, rotation)
|
get_body().set_position(position, rotation)
|
||||||
|
|
||||||
func _son_damage_dealt(data):
|
func _notification_sdamage(what, info):
|
||||||
if ai_state != EntityEnums.AI_STATE_ATTACK and data.dealer != self:
|
if what == SpellEnums.NOTIFICATION_DAMAGE_DAMAGE_DEALT:
|
||||||
sstart_attack(data.dealer)
|
if ai_state != EntityEnums.AI_STATE_ATTACK and info.dealer != self:
|
||||||
|
sstart_attack(info.dealer)
|
||||||
|
|
||||||
func _con_damage_dealt(info : SpellDamageInfo) -> void:
|
func _notification_cdamage(what, info):
|
||||||
# if info.dealer ==
|
if what == SpellEnums.NOTIFICATION_DAMAGE_DAMAGE_DEALT:
|
||||||
WorldNumbers.damage(get_body().translation, 1.6, info.damage, info.crit)
|
WorldNumbers.damage(get_body().translation, 1.6, info.damage, info.crit)
|
||||||
|
|
||||||
func _con_heal_dealt(info : SpellHealInfo) -> void:
|
func _notification_cheal(what, info):
|
||||||
WorldNumbers.heal(get_body().translation, 1.6, info.heal, info.crit)
|
if what == SpellEnums.NOTIFICATION_DAMAGE_DAMAGE_DEALT:
|
||||||
|
WorldNumbers.heal(get_body().translation, 1.6, info.heal, info.crit)
|
||||||
|
|
||||||
func _son_xp_gained(value : int) -> void:
|
func _son_xp_gained(value : int) -> void:
|
||||||
if not ESS.get_resource_db().get_xp_data().can_character_level_up(gets_character_level()):
|
if not ESS.get_resource_db().get_xp_data().can_character_level_up(gets_character_level()):
|
||||||
|
@ -42,34 +42,33 @@ func set_target(pentity : Entity) -> void:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
entity = pentity
|
entity = pentity
|
||||||
entity.connect("caura_added", self, "on_caura_added")
|
entity.connect("notification_caura", self, "on_notification_caura")
|
||||||
entity.connect("caura_removed", self, "on_caura_removed")
|
|
||||||
|
|
||||||
func on_caura_added(aura_data : AuraData) -> void:
|
func on_notification_caura(what :int, aura_data : AuraData) -> void:
|
||||||
var created_node : Node = aura_entry_scene.instance()
|
if what == SpellEnums.NOTIFICATION_AURA_ADDED:
|
||||||
|
var created_node : Node = aura_entry_scene.instance()
|
||||||
|
|
||||||
if (not aura_data.aura.debuff):
|
if (not aura_data.aura.debuff):
|
||||||
buff_container_node.add_child(created_node)
|
buff_container_node.add_child(created_node)
|
||||||
created_node.owner = buff_container_node
|
created_node.owner = buff_container_node
|
||||||
else:
|
else:
|
||||||
debuff_container_node.add_child(created_node)
|
debuff_container_node.add_child(created_node)
|
||||||
created_node.owner = debuff_container_node
|
created_node.owner = debuff_container_node
|
||||||
|
|
||||||
created_node.set_aura_data(aura_data)
|
created_node.set_aura_data(aura_data)
|
||||||
|
elif what == SpellEnums.NOTIFICATION_AURA_REMOVED:
|
||||||
func on_caura_removed(aura_data : AuraData) -> void:
|
if (not aura_data.aura.debuff):
|
||||||
if (not aura_data.aura.debuff):
|
for bn in buff_container_node.get_children():
|
||||||
for bn in buff_container_node.get_children():
|
if bn.get_aura_data() == aura_data:
|
||||||
if bn.get_aura_data() == aura_data:
|
buff_container_node.remove_child(bn)
|
||||||
buff_container_node.remove_child(bn)
|
bn.queue_free()
|
||||||
bn.queue_free()
|
return
|
||||||
return
|
else:
|
||||||
else:
|
for bn in debuff_container_node.get_children():
|
||||||
for bn in debuff_container_node.get_children():
|
if bn.get_aura_data() == aura_data:
|
||||||
if bn.get_aura_data() == aura_data:
|
debuff_container_node.remove_child(bn)
|
||||||
debuff_container_node.remove_child(bn)
|
bn.queue_free()
|
||||||
bn.queue_free()
|
return
|
||||||
return
|
|
||||||
|
|
||||||
func set_player(player : Entity) -> void:
|
func set_player(player : Entity) -> void:
|
||||||
set_target(player)
|
set_target(player)
|
||||||
|
@ -46,44 +46,34 @@ func _process(delta: float) -> void:
|
|||||||
|
|
||||||
func set_player(p_player: Entity) -> void:
|
func set_player(p_player: Entity) -> void:
|
||||||
if not player == null:
|
if not player == null:
|
||||||
player.disconnect("ccast_started", self, "_ccast_started")
|
player.disconnect("notification_ccast", self, "on_notification_ccast")
|
||||||
player.disconnect("ccast_failed", self, "_ccast_failed")
|
|
||||||
player.disconnect("ccast_finished", self, "_ccast_finished")
|
|
||||||
player.disconnect("ccast_interrupted", self, "_ccast_interrupted")
|
|
||||||
|
|
||||||
player = p_player
|
player = p_player
|
||||||
|
|
||||||
player.connect("ccast_started", self, "_ccast_started")
|
player.connect("notification_ccast", self, "on_notification_ccast")
|
||||||
player.connect("ccast_failed", self, "_ccast_failed")
|
|
||||||
player.connect("ccast_finished", self, "_ccast_finished")
|
|
||||||
player.connect("ccast_interrupted", self, "_ccast_interrupted")
|
|
||||||
|
|
||||||
|
|
||||||
func _ccast_started(pspell_cast_info: SpellCastInfo) -> void:
|
func on_notification_ccast(what : int, pspell_cast_info: SpellCastInfo) -> void:
|
||||||
set_process(true)
|
if what == SpellEnums.NOTIFICATION_CAST_STARTED:
|
||||||
|
set_process(true)
|
||||||
|
|
||||||
|
spell_cast_info = pspell_cast_info
|
||||||
|
|
||||||
spell_cast_info = pspell_cast_info
|
label.text = spell_cast_info.spell.get_name()
|
||||||
|
|
||||||
label.text = spell_cast_info.spell.get_name()
|
progress_bar.value = spell_cast_info.current_cast_time
|
||||||
|
progress_bar.max_value = spell_cast_info.cast_time
|
||||||
|
|
||||||
progress_bar.value = spell_cast_info.current_cast_time
|
show()
|
||||||
progress_bar.max_value = spell_cast_info.cast_time
|
elif what == SpellEnums.NOTIFICATION_CAST_FAILED:
|
||||||
|
set_process(false)
|
||||||
show()
|
hide()
|
||||||
|
elif what == SpellEnums.NOTIFICATION_CAST_FINISHED:
|
||||||
|
set_process(false)
|
||||||
func _ccast_failed(pspell_cast_info: SpellCastInfo) -> void:
|
hide()
|
||||||
set_process(false)
|
elif what == SpellEnums.NOTIFICATION_CAST_INTERRUPTED:
|
||||||
hide()
|
set_process(false)
|
||||||
|
hide()
|
||||||
func _ccast_finished(pspell_cast_info: SpellCastInfo) -> void:
|
|
||||||
set_process(false)
|
|
||||||
hide()
|
|
||||||
|
|
||||||
func _ccast_interrupted(pspell_cast_info: SpellCastInfo) -> void:
|
|
||||||
set_process(false)
|
|
||||||
hide()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,8 +51,7 @@ func _ready() -> void:
|
|||||||
func set_player(p_player : Entity) -> void:
|
func set_player(p_player : Entity) -> void:
|
||||||
if not _player == null and is_instance_valid(_player):
|
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.getc_resource_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH).disconnect("changed", self, "_on_player_health_changed")
|
||||||
_player.disconnect("caura_added", self, "on_caura_added")
|
_player.disconnect("notification_caura", self, "on_notification_caura")
|
||||||
_player.disconnect("caura_removed", self, "on_caura_removed")
|
|
||||||
_player.disconnect("cdied", self, "cdied")
|
_player.disconnect("cdied", self, "cdied")
|
||||||
_player.disconnect("centity_resource_added", self, "centity_resource_added")
|
_player.disconnect("centity_resource_added", self, "centity_resource_added")
|
||||||
|
|
||||||
@ -76,11 +75,9 @@ func set_player(p_player : Entity) -> void:
|
|||||||
for index in range(_player.getc_aura_count()):
|
for index in range(_player.getc_aura_count()):
|
||||||
var aura : AuraData = _player.getc_aura(index)
|
var aura : AuraData = _player.getc_aura(index)
|
||||||
|
|
||||||
on_caura_added(aura)
|
on_notification_caura(SpellEnums.NOTIFICATION_AURA_ADDED, aura)
|
||||||
|
|
||||||
|
_player.connect("notification_caura", self, "on_notification_caura")
|
||||||
_player.connect("caura_added", self, "on_caura_added")
|
|
||||||
_player.connect("caura_removed", self, "on_caura_removed")
|
|
||||||
_player.connect("cdied", self, "cdied", [], CONNECT_DEFERRED)
|
_player.connect("cdied", self, "cdied", [], CONNECT_DEFERRED)
|
||||||
_player.connect("centity_resource_added", self, "centity_resource_added")
|
_player.connect("centity_resource_added", self, "centity_resource_added")
|
||||||
|
|
||||||
@ -119,20 +116,20 @@ func _on_mana_changed(resource: EntityResource) -> void:
|
|||||||
|
|
||||||
_resource_text.text = str(resource.current_value) + "/" + str(resource.max_value)
|
_resource_text.text = str(resource.current_value) + "/" + str(resource.max_value)
|
||||||
|
|
||||||
func on_caura_added(aura_data : AuraData) -> void:
|
func on_notification_caura(what : int, aura_data : AuraData) -> void:
|
||||||
var created_node : Node = aura_entry_scene.instance()
|
if what == SpellEnums.NOTIFICATION_AURA_ADDED:
|
||||||
|
var created_node : Node = aura_entry_scene.instance()
|
||||||
|
|
||||||
_aura_grid.add_child(created_node)
|
_aura_grid.add_child(created_node)
|
||||||
created_node.owner = _aura_grid
|
created_node.owner = _aura_grid
|
||||||
|
|
||||||
created_node.set_aura_data(aura_data)
|
created_node.set_aura_data(aura_data)
|
||||||
|
elif what == SpellEnums.NOTIFICATION_AURA_REMOVED:
|
||||||
func on_caura_removed(aura_data : AuraData) -> void:
|
for bn in _aura_grid.get_children():
|
||||||
for bn in _aura_grid.get_children():
|
if bn.get_aura_data() == aura_data:
|
||||||
if bn.get_aura_data() == aura_data:
|
_aura_grid.remove_child(bn)
|
||||||
_aura_grid.remove_child(bn)
|
bn.queue_free()
|
||||||
bn.queue_free()
|
return
|
||||||
return
|
|
||||||
|
|
||||||
func _on_player_health_changed(health : EntityResource) -> void:
|
func _on_player_health_changed(health : EntityResource) -> void:
|
||||||
if health.max_value == 0:
|
if health.max_value == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user