livesplit-core icon indicating copy to clipboard operation
livesplit-core copied to clipboard

[ASR] Add duration variable type (+ maybe more)

Open apple1417 opened this issue 1 year ago • 1 comments

Currently, variables can only be set to strings. This means all scripts each need to pull in some string formatting library if they want to use another type. While this isn't really a massive problem, it would be nice if some more types were exposed, so livesplit could handle it all in one place.

The one type in particular which could benefit greatly is durations. There's currently no way for a script to know the main timer format (nor do I think there should be), so if a script does it's own formatting it might look very different. Livesplit also already has a lot of timer formatting settings which could be reused.

If we're going to add a new variable type for durations, it might be worth also adding ones for [u]ints, doubles, and bools too, to flesh out all the primitives.

apple1417 avatar Jun 24 '23 21:06 apple1417

Yeah this was always the plan. When I added variables I wanted to have an MVP implementation first and then later extend it.

CryZe avatar Jun 24 '23 21:06 CryZe