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

continue_story_maximally() does not concatenate multiple lines as expected #79

Open
Bard09 opened this issue Jan 28, 2024 · 1 comment

Comments

@Bard09
Copy link

Bard09 commented Jan 28, 2024

Describe the bug
Calling the continue_story_maximally() method in ink_player.gd (both on the current & godot4 branches) does not concatenate as the description states. It only returns the last rendered line from Ink.

To Reproduce
Call continue_story_maximally() when there are multiple rows of Ink text that need to be returned. Only the last line will appear.

Expected behavior
All lines before the choice stopping point appear as rendered in native Ink.

Ink files
ink_player.gd

Environment:

  • OS: Windows 11
  • Godot version: 4.2 mono
  • inkgd version: godot4 branch
@francoisdlt
Copy link
Contributor

Same problem here. This is how I've worked around the issue :

diff --git a/addons/inkgd/ink_player.gd b/addons/inkgd/ink_player.gd
--- a/addons/inkgd/ink_player.gd
+++ b/addons/inkgd/ink_player.gd
@@ -418,13 +418,11 @@
 	if _story == null:
 		_push_null_story_error()
 		return ""
 
-	var text: String = ""
+	var text: String = self.current_text
 	if self.can_continue:
-		_story.continue_story_maximally()
-
-		text = self.current_text
+		text += _story.continue_story_maximally()
 
 	elif self.has_choices:
 		emit_signal("prompt_choices", self.current_choices)
 	else:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants