From 73bbe9bbcac6b3d0cf77234ff7ccb9caeeaa51ff Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 28 Apr 2020 20:49:03 +0200 Subject: [PATCH] Update ESS to get the event handler renames. --- HEADS | 2 +- game/player/Body.gd | 6 +++--- game/player/Mob.gd | 16 ++++++++-------- game/player/NamePlate.gd | 12 ++++++------ game/scripts/resources/HealthResource.gd | 2 +- game/scripts/resources/ManaResource.gd | 2 +- game/scripts/resources/SpeedResource.gd | 2 +- game/ui/unitframes/UnitframeBase.gd | 10 +++++----- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/HEADS b/HEADS index 2e93bffa..5b16ec45 100644 --- a/HEADS +++ b/HEADS @@ -1 +1 @@ -{"engine": {"3.2": "60609ff0ed357a38b58126791f7372c8aa3e446e", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "97f10512f8832394389e1109154b8af34a2ef2c6"}, "entity_spell_system": {"master": "0a9d4d3c7216f0232222cf9fb106518234c187df"}, "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"}} \ No newline at end of file +{"engine": {"3.2": "60609ff0ed357a38b58126791f7372c8aa3e446e", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "97f10512f8832394389e1109154b8af34a2ef2c6"}, "entity_spell_system": {"master": "2c47f9f55058ba2caab980e605eb90f6ffc93282"}, "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"}} \ No newline at end of file diff --git a/game/player/Body.gd b/game/player/Body.gd index de1d1738..75d49c7f 100644 --- a/game/player/Body.gd +++ b/game/player/Body.gd @@ -501,18 +501,18 @@ func cmouseover(event): if last_mouse_over != null and last_mouse_over != mo: if is_instance_valid(last_mouse_over): - last_mouse_over.onc_mouse_exit() + last_mouse_over.notification_cmouse_exit() last_mouse_over = null if last_mouse_over == null: - mo.onc_mouse_enter() + mo.notification_cmouse_enter() last_mouse_over = mo return if last_mouse_over != null: - last_mouse_over.onc_mouse_exit() + last_mouse_over.notification_cmouse_exit() last_mouse_over = null func analog_force_change(vector, touchpad): diff --git a/game/player/Mob.gd b/game/player/Mob.gd index 65fa4b81..afee81b6 100644 --- a/game/player/Mob.gd +++ b/game/player/Mob.gd @@ -47,16 +47,16 @@ func sstart_attack(entity : Entity) -> void: starget = entity -func _onc_mouse_enter() -> void: +func _notification_cmouse_enter() -> void: if centity_interaction_type == EntityEnums.ENITIY_INTERACTION_TYPE_LOOT: Input.set_default_cursor_shape(Input.CURSOR_CROSS) else: Input.set_default_cursor_shape(Input.CURSOR_MOVE) -func _onc_mouse_exit() -> void: +func _notification_cmouse_exit() -> void: Input.set_default_cursor_shape(Input.CURSOR_ARROW) -func _son_death(): +func _notification_sdeath(): if dead: return @@ -104,7 +104,7 @@ func _notification_cheal(what, info): 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 _notification_sxp_gained(value : int) -> void: if not ESS.get_resource_db().get_xp_data().can_character_level_up(gets_character_level()): return @@ -114,12 +114,12 @@ func _son_xp_gained(value : int) -> void: levelup_scharacter(1) scharacter_xp = 0 -func _son_class_level_up(value: int): - ._son_class_level_up(value) +func _notification_sclass_level_up(value: int): + ._notification_sclass_level_up(value) refresh_spells(value) -func _son_character_level_up(value: int) -> void: - ._son_character_level_up(value) +func _notification_scharacter_level_up(value: int) -> void: + ._notification_scharacter_level_up(value) refresh_spells(value) func refresh_spells(value: int): diff --git a/game/player/NamePlate.gd b/game/player/NamePlate.gd index c9359191..8e21dded 100644 --- a/game/player/NamePlate.gd +++ b/game/player/NamePlate.gd @@ -57,10 +57,10 @@ func _ready(): name_label.text = entity.centity_name entity.connect("cname_changed", self, "cname_changed") - entity.connect("onc_mouse_entered", self, "onc_entity_mouse_entered") - entity.connect("onc_mouse_exited", self, "onc_entity_mouse_exited") - entity.connect("onc_targeted", self, "onc_targeted") - entity.connect("onc_untargeted", self, "onc_untargeted") + entity.connect("notification_cmouse_entered", self, "onc_entity_mouse_entered") + entity.connect("notification_cmouse_exited", self, "onc_entity_mouse_exited") + entity.connect("notification_ctargeted", self, "notification_ctargeted") + entity.connect("notification_cuntargeted", self, "notification_cuntargeted") modulate = normal_color set_scale(normal_scale) @@ -151,13 +151,13 @@ func onc_entity_mouse_exited() -> void: modulate = normal_color interpolate_scale(normal_scale) -func onc_targeted() -> void: +func notification_ctargeted() -> void: targeted = true modulate = targeted_color interpolate_scale(targeted_scale) -func onc_untargeted() -> void: +func notification_cuntargeted() -> void: targeted = false modulate = normal_color diff --git a/game/scripts/resources/HealthResource.gd b/game/scripts/resources/HealthResource.gd index 0cc24b5c..70c7e7af 100644 --- a/game/scripts/resources/HealthResource.gd +++ b/game/scripts/resources/HealthResource.gd @@ -32,7 +32,7 @@ func _init(): func _ons_added(entity): refresh() -func _ons_stat_changed(stat : Stat): +func _notification_sstat_changed(stat : Stat): if stat.id == stamina_stat_id || stat.id == health_stat_id: refresh() diff --git a/game/scripts/resources/ManaResource.gd b/game/scripts/resources/ManaResource.gd index 3b1d3db4..8f53c1ca 100644 --- a/game/scripts/resources/ManaResource.gd +++ b/game/scripts/resources/ManaResource.gd @@ -36,7 +36,7 @@ func _init(): func _ons_added(entity): refresh() -func _ons_stat_changed(stat : Stat): +func _notification_sstat_changed(stat : Stat): if stat.id == int_id || stat.id == spirit_id: refresh() diff --git a/game/scripts/resources/SpeedResource.gd b/game/scripts/resources/SpeedResource.gd index 391a5d94..6c429bc6 100644 --- a/game/scripts/resources/SpeedResource.gd +++ b/game/scripts/resources/SpeedResource.gd @@ -33,7 +33,7 @@ func _init(): func _ons_added(entity): refresh() -func _ons_stat_changed(stat : Stat): +func _notification_sstat_changed(stat : Stat): if stat.id == speed_stat_id: refresh() diff --git a/game/ui/unitframes/UnitframeBase.gd b/game/ui/unitframes/UnitframeBase.gd index 6e25a04f..93594562 100644 --- a/game/ui/unitframes/UnitframeBase.gd +++ b/game/ui/unitframes/UnitframeBase.gd @@ -55,7 +55,7 @@ func set_player(p_player: Entity) -> void: _player.disconnect("cname_changed", self, "cname_changed") _player.disconnect("con_level_up", self, "clevel_changed") _player.disconnect("con_level_changed", self, "clevel_changed") - _player.disconnect("con_xp_gained", self, "con_xp_gained") + _player.disconnect("notification_cxp_gained", self, "notification_cxp_gained") _player.disconnect("centity_data_changed", self, "centity_data_changed") _player.disconnect("centity_resource_added", self, "centity_resource_added") @@ -71,9 +71,9 @@ func set_player(p_player: Entity) -> void: _player = p_player _player.connect("cname_changed", self, "cname_changed") - _player.connect("con_character_level_up", self, "clevel_changed") + _player.connect("notification_ccharacter_level_up", self, "clevel_changed") _player.connect("con_character_level_changed", self, "clevel_changed") - _player.connect("con_xp_gained", self, "con_xp_gained") + _player.connect("notification_cxp_gained", self, "notification_cxp_gained") _player.connect("centity_data_changed", self, "centity_data_changed") _player.connect("centity_resource_added", self, "centity_resource_added") @@ -88,7 +88,7 @@ func set_player(p_player: Entity) -> void: _level_text.text = str(_player.ccharacter_level) clevel_changed(_player, 0) - con_xp_gained(_player, 0) + notification_cxp_gained(_player, 0) func centity_resource_added(res : EntityResource): if res is ManaResource: @@ -138,7 +138,7 @@ func clevel_changed(entity: Entity, value : int) -> void: _xp_range.min_value = 0 _xp_range.max_value = ESS.get_resource_db().get_xp_data().get_character_xp(_player.ccharacter_level) -func con_xp_gained(entity: Entity, val: int) -> void: +func notification_cxp_gained(entity: Entity, val: int) -> void: _xp_range.value = _player.ccharacter_xp func centity_data_changed(data: EntityData) -> void: