MortenTobiasNielsen / Factorio-TAS-Generator

This is an attempt to create a helper tool for Tool Assisted Speedruns in Factorio. A guide of how to use the tool can be found here: https://www.youtube.com/watch?v=V9tuNoDqc0E&t
MIT License
13 stars 4 forks source link

Added method for printing waiting state #239

Closed theis999 closed 1 year ago

theis999 commented 1 year ago

Core

The core idea, is when the TAS prints a warning it goes into warning_mode. Then when a step is successfully executed it should terminate warning_mode. Terminating warning_mode then prints a brief custom msg and a number of ticks that have elapsed since the mode began.

Validation

I have validated that it works in most instances, but i haven't touched compatibility_mode. However the worst that can happen when a warning_mode termination is omitted, is that the next termination is inaccurate.

localized strings

Factorio has something called localized strings which combines localization and string.format fairly neatly On the lua side they work by {"string_id", param1, param2} where the id is used to specify the string to use and the params are substituted in somewhere specified by the string in locale.

MortenTobiasNielsen commented 1 year ago

Sounds like a nice feature. I will merge it in and test it while I develop my run. :)