Thrive icon indicating copy to clipboard operation
Thrive copied to clipboard

Add a system for music tracks to specify they are context specific

Open hhyyrylainen opened this issue 2 years ago • 0 comments

so for patch specific music we need a new feature in the jukebox to only play certain tracks in a given context.

To start off I think we should make it so that there's a list of active contexts in the jukebox, those context are mandatory to give as a parameter when changing category (other contexts would be cleared). Then the tracks in a category are modified so that they have an optional field called something like "ExclusiveToContext" (type should probably be a list of strings) that way certain tracks would only be allowed to be played when one of their exclusive context tags would be set. One alternative design would be to have an enum with the possible context values, which I think might be nice as that would avoid typos in the track configurations, which would be pretty hard to test for (to notice that one track never gets played).

In the future we can expand this system to add extra features like exclusive tracks being able to specify they take priority over normal tracks when they can be played, and maybe setting a context (like in combat) could force a track change early.

hhyyrylainen avatar Jul 22 '22 09:07 hhyyrylainen