You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initial implementation of cyclic map queue [big description]
Inside there are many things, including:
- added server config option cyclic-tracks-queue
- both queue options in the config allow filters enclosed in {} now
- in parallel to /queue commands, added /qcyclic and /qboth to manipulate
only cyclic queue and both queues at the same time
- queue commands are completely rewritten
- /queue pf commands (for filters) are united with /queue push (for single
maps) by making everything a filter
- the above also includes slight changes to hasTypo and TrackFilter so that
parts of arguments could also be checked for typos and fixed interactively
(maybe it's slightly dirty because the code around hasTypo call has to do
some stuff too, but I cannot think where else I could need it)
- pushing only to regular queue (no matter from which end) triggers pushing
a placeholder into the FRONT (!) of cyclic queue so that first the regular
queue is executed. Popping works the same way, and as placeholders should
be only at the front (even though you can theoretically push one to the
end), shuffling the cyclic queue also only affects non-placeholders.
- fixed a bug where splitQuoted produced one empty item for an empty string
- running a command now updates last activity, so you won't be kicked for
being idle
- some auxiliary stuff is added to CommandManager so that corresponding
queues for karts could be easily integrated later (and also functions for
simultaneous addition to several queues, no idea how to push the same
thing as a map and as a kart but I'll see)
- NETWORKING.md, data/commands.xml and server_config.hpp are updated ofc
Copy file name to clipboardexpand all lines: NETWORKING.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -261,9 +261,12 @@ The current server configuration xml looks like this (this is only an example, j
261
261
<!-- If true and no track is selected, then an addon track can be picked. -->
262
262
<random-selects-addonsvalue="false" />
263
263
264
-
<!-- If non-empty, these tracks are played in the order until the list ends. Can be useful for grands prix. -->
264
+
<!-- If non-empty, these tracks (or track filters if enclosed in curly braces) are played in the order until the list ends. -->
265
265
<tracks-queuevalue="" />
266
266
267
+
<!-- If non-empty, these tracks (or track filters if enclosed in curly braces) are played in the order cyclically, except if something is in the regular tracks queue. -->
268
+
<cyclic-tracks-queuevalue="" />
269
+
267
270
<!-- A custom Grand Prix scoring system to be used, empty for default. -->
Copy file name to clipboardexpand all lines: data/commands.xml
+127-22
Original file line number
Diff line number
Diff line change
@@ -245,84 +245,189 @@ here later. For now, please refer to the code for the strings being used. -->
245
245
<commandname="queue"
246
246
usage="/queue"
247
247
permissions-verbose="everyone"
248
-
description="Contains functions related to track queue. Without arguments, shows the current queue. Arguments can be used only with permissions, check /commands queue and /help queue (argument) for more details."
248
+
description="Contains functions related to track queue (regular one). Without arguments, shows the current queue. Arguments can be used only with permissions, check /commands queue and /help queue (argument) for more details."
249
249
permissions="UP_EVERYONE"
250
250
state-scope="SS_ALWAYS"
251
251
>
252
252
<commandname="push"
253
253
usage="/queue push (item)"
254
254
permissions-verbose="hammers, singleplayers"
255
-
description="Pushes an item (usually the map id) to the back of the track queue."
255
+
description="Pushes an item (map id or filter) to the back of the track queue."
256
256
permissions="UP_SINGLE"
257
257
state-scope="SS_LOBBY"
258
258
/>
259
259
<commandname="push_back"
260
260
usage="/queue push_back (item)"
261
261
permissions-verbose="hammers, singleplayers"
262
-
description="Pushes an item (usually the map id) to the back of the track queue."
262
+
description="Pushes an item (map id or filter) to the back of the track queue."
263
263
permissions="UP_SINGLE"
264
264
state-scope="SS_LOBBY"
265
265
/>
266
266
<commandname="push_front"
267
267
usage="/queue push_front (item)"
268
268
permissions-verbose="hammers, singleplayers"
269
-
description="Pushes an item (usually the map id) to the front of the track queue."
269
+
description="Pushes an item (map id or filter) to the front of the track queue."
270
270
permissions="UP_SINGLE"
271
271
state-scope="SS_LOBBY"
272
272
/>
273
-
<!-- pf commands are temporary -->
274
-
<commandname="pf"
275
-
usage="/queue pf (filter)"
273
+
<commandname="pop"
274
+
usage="/queue pop"
276
275
permissions-verbose="hammers, singleplayers"
277
-
description="Pushes a track filter to the back of the track queue. The command will be removed once it's united with push."
276
+
description="Pops an item from the front of the track queue."
278
277
permissions="UP_SINGLE"
279
278
state-scope="SS_LOBBY"
280
279
/>
281
-
<commandname="pf_back"
282
-
usage="/queue pf_back (filter)"
280
+
<commandname="pop_back"
281
+
usage="/queue pop_back"
283
282
permissions-verbose="hammers, singleplayers"
284
-
description="Pushes a track filter to the back of the track queue. The command will be removed once it's united with push_back."
283
+
description="Pops an item from the back of the track queue."
285
284
permissions="UP_SINGLE"
286
285
state-scope="SS_LOBBY"
287
286
/>
288
-
<commandname="pf_front"
289
-
usage="/queue pf_front (filter)"
287
+
<commandname="pop_front"
288
+
usage="/queue pop_front"
290
289
permissions-verbose="hammers, singleplayers"
291
-
description="Pushes a track filter to the front of the track queue. The command will be removed once it's united with push_front."
290
+
description="Pops an item from the front of the track queue."
291
+
permissions="UP_SINGLE"
292
+
state-scope="SS_LOBBY"
293
+
/>
294
+
<commandname="clear"
295
+
usage="/queue clear"
296
+
permissions-verbose="hammers, singleplayers"
297
+
description="Clears the track queue."
298
+
permissions="UP_SINGLE"
299
+
state-scope="SS_LOBBY"
300
+
/>
301
+
<commandname="shuffle"
302
+
usage="/queue shuffle"
303
+
permissions-verbose="hammers, singleplayers"
304
+
description="Shuffles the track queue."
305
+
permissions="UP_SINGLE"
306
+
state-scope="SS_LOBBY"
307
+
/>
308
+
</command>
309
+
<commandname="qcyclic"
310
+
usage="/qcyclic"
311
+
permissions-verbose="everyone"
312
+
description="Contains functions related to track queue (cyclic one). Without arguments, shows the current queue. Arguments can be used only with permissions, check /commands queue and /help queue (argument) for more details."
313
+
permissions="UP_EVERYONE"
314
+
state-scope="SS_ALWAYS"
315
+
>
316
+
<commandname="push"
317
+
usage="/qcyclic push (item)"
318
+
permissions-verbose="hammers, singleplayers"
319
+
description="Pushes an item (map id or filter) to the back of the track queue."
320
+
permissions="UP_SINGLE"
321
+
state-scope="SS_LOBBY"
322
+
/>
323
+
<commandname="push_back"
324
+
usage="/qcyclic push_back (item)"
325
+
permissions-verbose="hammers, singleplayers"
326
+
description="Pushes an item (map id or filter) to the back of the track queue."
327
+
permissions="UP_SINGLE"
328
+
state-scope="SS_LOBBY"
329
+
/>
330
+
<commandname="push_front"
331
+
usage="/qcyclic push_front (item)"
332
+
permissions-verbose="hammers, singleplayers"
333
+
description="Pushes an item (map id or filter) to the front of the track queue."
292
334
permissions="UP_SINGLE"
293
335
state-scope="SS_LOBBY"
294
336
/>
295
-
<!-- end of pf commands -->
296
337
<commandname="pop"
297
-
usage="/queue pop"
338
+
usage="/qcyclic pop"
298
339
permissions-verbose="hammers, singleplayers"
299
340
description="Pops an item from the front of the track queue."
300
341
permissions="UP_SINGLE"
301
342
state-scope="SS_LOBBY"
302
343
/>
303
344
<commandname="pop_back"
304
-
usage="/queue pop_back"
345
+
usage="/qcyclic pop_back"
305
346
permissions-verbose="hammers, singleplayers"
306
347
description="Pops an item from the back of the track queue."
307
348
permissions="UP_SINGLE"
308
349
state-scope="SS_LOBBY"
309
350
/>
310
351
<commandname="pop_front"
311
-
usage="/queue pop_front"
352
+
usage="/qcyclic pop_front"
312
353
permissions-verbose="hammers, singleplayers"
313
354
description="Pops an item from the front of the track queue."
314
355
permissions="UP_SINGLE"
315
356
state-scope="SS_LOBBY"
316
357
/>
317
358
<commandname="clear"
318
-
usage="/queue clear"
359
+
usage="/qcyclic clear"
319
360
permissions-verbose="hammers, singleplayers"
320
361
description="Clears the track queue."
321
362
permissions="UP_SINGLE"
322
363
state-scope="SS_LOBBY"
323
364
/>
324
365
<commandname="shuffle"
325
-
usage="/queue shuffle"
366
+
usage="/qcyclic shuffle"
367
+
permissions-verbose="hammers, singleplayers"
368
+
description="Shuffles the track queue."
369
+
permissions="UP_SINGLE"
370
+
state-scope="SS_LOBBY"
371
+
/>
372
+
</command>
373
+
<commandname="qboth"
374
+
usage="/qboth"
375
+
permissions-verbose="everyone"
376
+
description="Contains functions related to track queue (both regular and cyclic). Without arguments, shows the current queue. Arguments can be used only with permissions, check /commands queue and /help queue (argument) for more details."
377
+
permissions="UP_EVERYONE"
378
+
state-scope="SS_ALWAYS"
379
+
>
380
+
<commandname="push"
381
+
usage="/qboth push (item)"
382
+
permissions-verbose="hammers, singleplayers"
383
+
description="Pushes an item (map id or filter) to the back of the track queue."
384
+
permissions="UP_SINGLE"
385
+
state-scope="SS_LOBBY"
386
+
/>
387
+
<commandname="push_back"
388
+
usage="/qboth push_back (item)"
389
+
permissions-verbose="hammers, singleplayers"
390
+
description="Pushes an item (map id or filter) to the back of the track queue."
391
+
permissions="UP_SINGLE"
392
+
state-scope="SS_LOBBY"
393
+
/>
394
+
<commandname="push_front"
395
+
usage="/qboth push_front (item)"
396
+
permissions-verbose="hammers, singleplayers"
397
+
description="Pushes an item (map id or filter) to the front of the track queue."
398
+
permissions="UP_SINGLE"
399
+
state-scope="SS_LOBBY"
400
+
/>
401
+
<commandname="pop"
402
+
usage="/qboth pop"
403
+
permissions-verbose="hammers, singleplayers"
404
+
description="Pops an item from the front of the track queue."
405
+
permissions="UP_SINGLE"
406
+
state-scope="SS_LOBBY"
407
+
/>
408
+
<commandname="pop_back"
409
+
usage="/qboth pop_back"
410
+
permissions-verbose="hammers, singleplayers"
411
+
description="Pops an item from the back of the track queue."
412
+
permissions="UP_SINGLE"
413
+
state-scope="SS_LOBBY"
414
+
/>
415
+
<commandname="pop_front"
416
+
usage="/qboth pop_front"
417
+
permissions-verbose="hammers, singleplayers"
418
+
description="Pops an item from the front of the track queue."
419
+
permissions="UP_SINGLE"
420
+
state-scope="SS_LOBBY"
421
+
/>
422
+
<commandname="clear"
423
+
usage="/qboth clear"
424
+
permissions-verbose="hammers, singleplayers"
425
+
description="Clears the track queue."
426
+
permissions="UP_SINGLE"
427
+
state-scope="SS_LOBBY"
428
+
/>
429
+
<commandname="shuffle"
430
+
usage="/qboth shuffle"
326
431
permissions-verbose="hammers, singleplayers"
327
432
description="Shuffles the track queue."
328
433
permissions="UP_SINGLE"
@@ -653,11 +758,11 @@ here later. For now, please refer to the code for the strings being used. -->
653
758
<commandname="preserve"
654
759
usage="/preserve"
655
760
permissions-verbose="everyone"
656
-
description="Shows which settings are preserved when all players leave. Possible settings: mode, elim, laps, queue, replay, direction."
761
+
description="Shows which settings are preserved when all players leave. Possible settings: mode, elim, laps, queue, qcyclic, replay, direction."
0 commit comments