codecat / godot-tbloader

TrenchBroom Loader for Godot 4. (Alternative to Qodot)
MIT License
232 stars 29 forks source link

Added support for texture paths with spaces #61

Closed DMartinek closed 1 year ago

DMartinek commented 1 year ago

First congratulation on the great plugin, it works really well!

While testing a few maps I noticed that TrenchBroom exports texture paths with spaces in quotes. Unfortunately the current tokenizer for the map format ignored the quotes and cut the paths at the first space.

I tried to fix this by allowing the tokenizer to skip spaces while parsing the texture scope. It is not the most elegant solution due to introducing scope dependence in the tokenizer but else the entity parsing code was impacted, but it allows usage of spaces in texture filenames now.

codecat commented 1 year ago

It seems like I forgot to review this PR, my apologies! 🙈 Thank you! 🎉