Fix errors

This commit is contained in:
JeremyStar™ 2024-05-17 01:50:07 +02:00
parent 126ca9f412
commit 78b85fca1b
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
2 changed files with 11 additions and 2 deletions

View file

@ -52,6 +52,9 @@ func _process(_delta: float) -> void:
switch_slide(current_slide + 1)
if Input.is_action_just_pressed("navigate_backwards"):
switch_slide(current_slide - 1)
func _update_variables() -> void:
logger.diag("Updating variables")
entrypoint = presenloader.entrypoint_node
manifest = presenloader.manifest

View file

@ -38,6 +38,9 @@ func _ready() -> void:
# Register cleanup hook
core.register_cleanup_hook(func() -> void: queue_free())
# Add 'communication' as a child
add_child(communication)
func load_presentation(load_path: String) -> String:
logger.info(core.misc.stringify_variables("Loading presentation located at %path%", { "path": load_path }))
path = load_path
@ -90,6 +93,9 @@ func load_presentation(load_path: String) -> String:
# Inject entrypoint
inject_entrypoint()
# Update 'communication''s variables
communication._update_variables()
return ""
func check_required_files() -> String:
@ -233,10 +239,10 @@ func inject_entrypoint() -> void:
entrypoint_node.api = communication
# Add to SceneTree
get_tree().root.add_child(entrypoint_node)
get_tree().root.add_child.call_deferred(entrypoint_node)
# Execute initialize()
await entrypoint_node.initialize()
entrypoint_node.initialize.call_deferred()
# +++ etc +++
func write_temporary_file(bytes: PackedByteArray) -> void: