EvoEsports / EvoSC-sharp

A Trackmania Server Controller written in C# using .NET 8
https://evosc.io
GNU General Public License v3.0
20 stars 13 forks source link

Map List Queue #175

Closed DasNeo closed 1 month ago

DasNeo commented 11 months ago

The queue should be independent of the Map List module and should be located in EvoSC.Common.

It holds a list of maps (or some reference to the map) with an order, provide an interface for adding, inserting, reordering and removing a map and getting the next map in queue.

On match start, the next map should be set. When changing the queue, the next map should also be re-set in case it has changed.

DasNeo commented 11 months ago

@snixtho Should the queue service also provide a method for getting information of the map like name, author etc or should that be handled by the module?

Should the queue be persistent or just be stored in memory?

Can a map be added twice to the queue? e.g. Map A, Map B, Map C, Map A, ...

And a more general question about the map list; who is allowed to add maps to the queue? I thought the queue was a persistent list of maps created by an admin that would just repeat ad infinitum. If I understood the jukebox right, everyone can just add a map to the queue. If everyone is allowed to add maps, who can reorder and remove them?

snixtho commented 11 months ago

Should the queue service also provide a method for getting information of the map like name, author etc or should that be handled by the module?

If the interface is using IMap all that info is there already.

Should the queue be persistent or just be stored in memory?

I would say persistent so that we can restart the controller without the queue being completely cleared.

Can a map be added twice to the queue?

That's a good question, I often find myself in the situation where I wish the map would come again without having to restart the match. So could be a good idea, but maybe add a permission so we can control who is able to queue duplicate maps.

who is allowed to add maps to the queue?

The way we have it right now, all players are allowed by default. But being able to restrict this is useful for various events and special server configurations.

If everyone is allowed to add maps, who can reorder and remove them?

I suppose again, this should be controllable with permissions so server owners can refine and have full control over this. If you join one of our public servers, to see an example, the current situation is like this: anyone can queue a map, and mods/admins can remove all maps from the queue

Another thing I'd like to see is the possibility to control who is able to add multiple maps to the queue. This isn't related to duplicate maps, but rather being able to restrict whether a player can only add one map to the queue at a time. But if they have the permission for it, they can add more than one at the same time.

I also do believe these permission related things should not be part of the map list queue as part of the core. The permissions simply controls who can do what on the interface level, like from the UI, commands etc. So permissions should be checked in the module, not in the core.