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

Reformat Dialogue syntax #4

Closed
nndda opened this issue Dec 14, 2023 · 0 comments · Fixed by #11
Closed

Reformat Dialogue syntax #4

nndda opened this issue Dec 14, 2023 · 0 comments · Fixed by #11
Assignees
Labels
enhancement New feature or request parser Anything related to Dialogue parser function

Comments

@nndda
Copy link
Owner

nndda commented Dec 14, 2023

Currently Dialogue 'raw' text file use 4 space indentation to differentiate between character name, dialogue body, and function calls:

character_name
    "dialogue body goes here"
    func()

Godot can use either tab or spaces for indentation.
To avoid any conflict I think its better to use symbols/characters instead. If the whitespaces are trimmed, this also makes indentation optional.

Maybe its better to determine wether the editor is using spaces or tabs using text_editor/behavior/indent/type

Constructing the variable with a direct string input, within a function in a script, also count the function's indents.

func _ready():
    var dlg = Dialogue.new("""
    foo:
       Hello, World!
     """)

Resulted as:

    foo:
       Hello, World!
@nndda nndda added the enhancement New feature or request label Dec 14, 2023
@nndda nndda self-assigned this Dec 14, 2023
@nndda nndda closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2024
@nndda nndda reopened this Feb 13, 2024
@nndda nndda added the parser Anything related to Dialogue parser function label Feb 13, 2024
@nndda nndda linked a pull request Mar 13, 2024 that will close this issue
@nndda nndda closed this as completed in #11 Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request parser Anything related to Dialogue parser function
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant