GigiaJ / JondTextTranslator

Translates existing mcfunction files based on ROMs using existing localizations of text dumps
1 stars 0 forks source link

Adjust tellraw to have language data bound to them #47

Open GigiaJ opened 2 years ago

GigiaJ commented 2 years ago

Then upon output handle the extra lines and adjust the talktimes respectively from there.

This will enable respective checks to the original talktimes provided by Jon as well as iterating over for each language a single time. Furthermore, it will allow us to simplify the output talktimes by merely storing each language offset modifier within an integer array to apply upon the related commands.

We might wish to further store talktime offsets for the commands on a per-language basis, or we can simply output as we proceed. This will be left to my discretion when I get to this point.

GigiaJ commented 2 years ago

Update the CommandOutputHandler to null the output if the language data is null

GigiaJ commented 2 years ago

Update to use the longest applicable permutation match

GigiaJ commented 2 years ago

Lines must be broken up by dialogue splitters as the timing for certain events may be tied to a sub dialogue within. This means we need to create a new tellraw object and split them as we were doing so before.

This can be done on a language bases by sorting and iterating over each tellraw based on the language data associated. As each command will have language-specific talkTime which is determined for each specific language this should pose no issue.