Skip to content

Commit

Permalink
Merge pull request #82 from AnidemDex/update-events
Browse files Browse the repository at this point in the history
Update events
  • Loading branch information
AnidemDex authored Mar 26, 2022
2 parents ee33e63 + 3e2b5da commit 41c7a69
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions addons/textalog/events/character/change_expression.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ func _init() -> void:


func _execute() -> void:
event_node = event_node as DialogNode
if not is_instance_valid(event_node):
var node = get_event_node() as DialogNode
if not is_instance_valid(node):
finish()
return

var portrait_manager:PortraitManager = event_node.portrait_manager
var portrait_manager:PortraitManager = node.portrait_manager

if not is_instance_valid(portrait_manager):
finish()
Expand Down
8 changes: 4 additions & 4 deletions addons/textalog/events/character/join.gd
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ func _init() -> void:


func _execute() -> void:
event_node = event_node as DialogNode
if not is_instance_valid(event_node):
var node = get_event_node() as DialogNode
if not is_instance_valid(node):
finish()
return

var portrait_manager:PortraitManager = event_node.portrait_manager
var portrait_manager:PortraitManager = node.portrait_manager

if not is_instance_valid(portrait_manager):
finish()
return

event_node.visible = true
node.visible = true
portrait_manager.visible = true

portrait_manager.connect("portrait_added", self, "_on_portrait_added", [], CONNECT_ONESHOT)
Expand Down
6 changes: 3 additions & 3 deletions addons/textalog/events/character/leave.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ func _init() -> void:


func _execute() -> void:
event_node = event_node as DialogNode
if not is_instance_valid(event_node):
var node = get_event_node() as DialogNode
if not is_instance_valid(node):
finish()
return

var portrait_manager:PortraitManager = event_node.portrait_manager
var portrait_manager:PortraitManager = node.portrait_manager

if not is_instance_valid(portrait_manager):
finish()
Expand Down
10 changes: 5 additions & 5 deletions addons/textalog/events/dialog/text.gd
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func set_audio_bus(value:String) -> void:
##########

func _show_text() -> void:
event_node.show()
get_event_node().show()
_dialog_manager.display_text()


Expand All @@ -149,7 +149,7 @@ func _prepare_text_to_show() -> void:


func _configure_display_name() -> void:
var name_node:Label = event_node.name_node
var name_node:Label = get_event_node().name_node
if not is_instance_valid(name_node):
return

Expand Down Expand Up @@ -183,12 +183,12 @@ func _on_text_displayed() -> void:


func _execute() -> void:
event_node = event_node as DialogNode
if not is_instance_valid(event_node):
var node = get_event_node() as DialogNode
if not is_instance_valid(node):
finish()
return

_dialog_manager = event_node.dialog_manager as DialogManager
_dialog_manager = node.dialog_manager as DialogManager
if not is_instance_valid(_dialog_manager):
finish()
return
Expand Down

0 comments on commit 41c7a69

Please sign in to comment.