From 4b26df11dff4046c95a078b8cb438b5e59ae6b6a Mon Sep 17 00:00:00 2001 From: ac-stef Date: Sat, 17 Jun 2017 18:37:32 +0200 Subject: [PATCH] update genmapitems easier than to fix the persistidents vs. push/pop problem :) --- config/menus.cfg | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/config/menus.cfg b/config/menus.cfg index 222de52e..06a2a538 100644 --- a/config/menus.cfg +++ b/config/menus.cfg @@ -21,15 +21,10 @@ const __ctfmaps [ac_aqueous ac_arabian ac_arid ac_avenue ac_cavern ac_depot ac_d // Start maps. const __genmapitems [ - n = (listlen $arg1) - loop i $n [ - __listmapname = (at $arg1 $i) - menuitemmapload $__listmapname [map @__listmapname] - next = (+ $i 1) - if (= $next $n) [ next = 0 ] [] - nextmap = (at $arg1 $next) - (concatword nextmap_ $__listmapname) = $nextmap - ] + looplisti $arg1 m [ + menuitemmapload $m [map @m] + [nextmap_@m] = (at $arg1 (mod (+ $i 1) @(listlen $arg1))) + ] ] newmenu [all maps]