update genmapitems

easier than to fix the persistidents vs. push/pop problem :)
This commit is contained in:
ac-stef
2017-06-17 18:37:32 +02:00
parent e96b97a5a5
commit 4b26df11df
+4 -9
View File
@@ -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]