diff options
| author | xolatile | 2025-07-21 12:59:59 +0200 |
|---|---|---|
| committer | xolatile | 2025-07-21 12:59:59 +0200 |
| commit | 6de153293f0ba70aed1f7714f626bc5652a9bd32 (patch) | |
| tree | dd7adba486447aba5aa2e60ab6e20b37a0e3fa29 /data/custom_maps_menu.cfg | |
| parent | d085675aaa6ea427fa6417745387ebc9d2e77afc (diff) | |
| download | xolatile-badassbug-6de153293f0ba70aed1f7714f626bc5652a9bd32.tar.xz xolatile-badassbug-6de153293f0ba70aed1f7714f626bc5652a9bd32.tar.zst | |
Removed steep fur, changed script names, grass textures...
Diffstat (limited to 'data/custom_maps_menu.cfg')
| -rwxr-xr-x | data/custom_maps_menu.cfg | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/data/custom_maps_menu.cfg b/data/custom_maps_menu.cfg new file mode 100755 index 0000000..cac660a --- /dev/null +++ b/data/custom_maps_menu.cfg @@ -0,0 +1,71 @@ +// Custom map menu, ported from Sauerbraten, 7Year aka Xolatile. + +octabase = "^f7" +octamain = "^f1" +unmapsx = 4 +unmapsy = 24 + +custommaps = "" + +loopfiles curmap "packages/maps" "ogz" [ + if (< (indexof $allmaps $curmap) 0) [ + custommaps = (concat $custommaps $curmap) + ] +] + +sy_nume = (listlen $custommaps) + +showcustommaps = [sy_remaps; showgui sy_unmaps] + +sy_remaps = [ + custommaps = "" + loopfiles curmap "packages/maps" "ogz" [ + if (< (indexof $allmaps $curmap) 0) [ + custommaps = (concat $custommaps $curmap) + ] + ] + custommaps = (sortlist $custommaps x y [<=s $x $y]) + amountxy = (+ (div (listlen $custommaps) $unmapsy) 1) + loop syxy $amountxy [ + (concatword "custommaps" $syxy) = "" + ]; syxy = 0 + loop syxy $amountxy [ + (concatword "custommaps" $syxy) + loop unto $unmapsy [ + (concatword "custommaps" $syxy) = (concat $(concatword "custommaps" $syxy) (at $custommaps (+ (* $unmapsy $syxy) $unto))) + ] + ]; syxy = 0; unto = 0 + sy_nume = (listlen $custommaps) +] + +newgui sy_unmaps [ + if (mod $amountxy $unmapsx) [ + sy_unpage = (+ (div $amountxy $unmapsx) 1) + ] [ + sy_unpage = (div $amountxy $unmapsx) + ] + loop syi $sy_unpage [ + guilist [ + loop syj $unmapsx [ + if (< (+ (* $syi $unmapsx) $syj) $amountxy) [ + guistrut $unmapsy 1 + guilist [ + guistrut 27 1 + looplist unto $(concatword "custommaps" (+ (* $syi $unmapsx) $syj )) [ + guibutton (concatword $octabase $unto) (concat map $unto) "cube" + ] + ] + ] + ] + guibar + if (< (+ (* $syi $unmapsx) $syj) $amountxy) [ + guiimage (concatword "packages/maps/" (strreplace $guirolloveraction "map " "") ".jpg") $guirolloveraction 6 1 "data/cube.png" + ] + ] + if (= (+ $syi 1) $sy_unpage) [ + + ] [ + guitab (concatword $octamain (+ $syi 2)) + ] + ] +] (concatword $octamain "Custom Maps (" $sy_nume ")") |
