lythx / trakman

Trackmania Forever server controller written in TypeScript
https://trakman.ptrk.eu
MIT License
24 stars 4 forks source link

Next-map same as currently played / keeping played history #245

Open xadll opened 7 months ago

xadll commented 7 months ago

XAseco controller kept the history of played maps and does not allow to add to the jukebox a map that was played recently. XAseco has a parameter for this in a config to tell how much history to remember. e.g. the last 10 maps.

In a way, this should also prevents the same map from being played again when there is at least one other map to choose from in the list when the jukebox is empty.

Setup

Starting server with only one map in MatchSettings (C01-Race). Using command /xlist with enabled setting to autojuke added map. Role Owner.

Current behavior table:

Map C01 is played twice in a row.

State Command > Maplist Jukebox Ongoing Next1 Next2
1 > C01 C01 C01
2 ADD map2 > C01,map2 map2 C01 map2 C01
3 UNJUKE map2 > C01,map2 C01 C01 <-- SAME MAP AGAIN map2
4 SKIP > C01,map2 C01 map2 C01

How it should be table:

State Command > Maplist Jukebox Ongoing Next1 Next2
1 > C01 C01 C01
2 ADD map2 > C01,map2 map2 C01 map2 C01/empty
3 UNJUKE map2 > C01,map2 C01 map2 <-- DIFFERENT C01/empty
4 SKIP > C01,map2 map2 C01 map2/empty