Zyllos / tts_ftc_base_lua_scripts

FTC Map Base Lua Scripts
3 stars 2 forks source link

Spawned objective cards have line breaks in silly places #39

Open ThePants999 opened 3 years ago

ThePants999 commented 3 years ago

When you spawn objective cards, line breaks get inserted into the text in arbitrary places rather than aligned with whitespace. Most of the time, this just makes the text harder to read by breaking a word across two lines. Worst case scenario, though, a break in the middle of a formatting tag results in that formatting not being applied.

image

ThePants999 commented 3 years ago

The extra intelligence would be needed in 9e/TTSLUA/blankObjectiveCard.ttslua in splittedDesc(), but sadly I don't know LUA so I can't submit a PR myself :)

Zyllos commented 3 years ago

I will add, the adding of text, we have put no intelligence into the function and letting TTS do the word wrapping. We have seen this before. Probably would need to just add a function that calculates the length of text for a single line and just add a return.

ThePants999 commented 3 years ago

Unless I've misunderstood what you're saying, that's not true - the code I highlighted (lines 70-81 in particular) are explicitly adding newlines every 90 characters, it's not TTS doing it.