Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Small code improvement for languages using hyphenation

A topic by Smaxx created Apr 13, 2024 Views: 52
Viewing posts 1 to 1
(+1)

In engine\dialogue.moon (and the Lua equivalent), change line 37 from

table.insert(env._choices, {:text, :f, text_sub: text\gsub("\n", "")})

to

table.insert(env._choices, {:text, :f, text_sub: text\gsub("-?\n", "")})

This ensures hyphenation (if used) is removed, too. For example, splitting a word over two lines in German you’d do something like Zeitreparatur-\ngerät, which as a one-liner has to become Zeitreparaturgerät, but previously became Zeitreparatur-gerät.