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

Map editor generates invalid syntax with sprites with backtick key #2297

Open
MacaylaMarvelous81 opened this issue Sep 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@MacaylaMarvelous81
Copy link
Contributor

MacaylaMarvelous81 commented Sep 5, 2024

Describe the bug
When a sprite with a backtick (`) as its key is placed using the map editor, the editor places the backtick unescaped, ending the string literal causing invalid syntax which is not obvious until closing the map editor.

To Reproduce
Steps to reproduce the behavior:

  1. Add a sprite with a backtick as a key to the legend
  2. Add the sprite to a map in the map editor

Expected behavior
The sprite is placed on the map without breaking syntax, possibly through escaping the backtick.

Actual behavior
The backtick is placed in string and terminates the string early.

Screenshots

Screen.Recording.2024-09-04.at.9.10.20.PM.mov

Since escaping characters means that 1 character may not always = 1 tile, it might be better to just prevent using backtick for a sprite key.

(A separate issue where the map clicked on to edit is not the one that ends up being edited is also exhibited in the video but is not the subject of this issue.)

@MacaylaMarvelous81 MacaylaMarvelous81 added the bug Something isn't working label Sep 5, 2024
@JosiasAurel
Copy link
Contributor

JosiasAurel commented Sep 5, 2024

I think the editor should warn users against using backticks as sprite keys.
What do you think @grymmy ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants