Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4.3 - Fix for #904 #979

Merged
merged 1 commit into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions addons/dialogic/Nodes/DialogNode.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ extends Control
## -----------------------------------------------------------------------------
## The timeline to load when starting the scene
var timeline: String
var timeline_name: String

### MODE
var preview: bool = false
Expand Down Expand Up @@ -398,6 +399,7 @@ func play_audio(name):
## -----------------------------------------------------------------------------
# load a timeline file and start parsing
func set_current_dialog(dialog_path: String):
print(dialog_path)
current_timeline = dialog_path
dialog_script = DialogicResources.get_timeline_json(dialog_path)
return load_dialog()
Expand Down Expand Up @@ -545,8 +547,8 @@ func on_timeline_start():
# save to the default slot
Dialogic.save('', true)
# TODO remove event_start in 2.0
emit_signal("event_start", "timeline", current_timeline)
emit_signal("timeline_start", current_timeline)
emit_signal("event_start", "timeline", timeline_name)
emit_signal("timeline_start", timeline_name)

# emits timeline_end and handles autosaving
func on_timeline_end():
Expand All @@ -556,7 +558,7 @@ func on_timeline_end():
Dialogic.save('', true)
# TODO remove event_end in 2.0
emit_signal("event_end", "timeline")
emit_signal("timeline_end", current_timeline)
emit_signal("timeline_end", timeline_name)

# does checks and calls the above functions
func _emit_timeline_signals():
Expand Down
2 changes: 2 additions & 0 deletions addons/dialogic/Other/DialogicClass.gd
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ static func start(timeline: String = '', default_timeline: String ='', dialog_sc
for t in DialogicUtil.get_timeline_list():
if t['file'] == timeline:
dialog_node.timeline = t['file']
dialog_node.timeline_name = timeline
return returned_dialog_node
# No file found. Show error
dialog_node.dialog_script = {
Expand All @@ -88,6 +89,7 @@ static func start(timeline: String = '', default_timeline: String ='', dialog_sc
var timeline_file = _get_timeline_file_from_name(timeline)
if timeline_file:
dialog_node.timeline = timeline_file
dialog_node.timeline_name = timeline
return returned_dialog_node

# Just in case everything else fails.
Expand Down