This patch enables an option to keep the map config embedded in the map
file - with autogenerated content. Any changes to map config data will be
written with the map. This includes data by loadnotexture, loadsky,
mapmodel, texture, fog, fogcolour, mapsound and shadowyaw. Once enabled,
all changes with those commands become persistent to the map.
New variables:
mapsoundchanged
Set to "1" with every command that changes mapsound slots. Should be
used to trigger a rebuild of mapsound menus.
New/changed commands:
mapsound
Now returns the number of the created slot.
mapmodel
Now returns the number of the created slot.
texture
Now returns the number of the created slot.
loadsky
Is now a builtin string variable (instead of a command), which means,
that the current value can easily be retrieved or edited.
The skymap name in the argument is now required to start with
"textures/skymaps/" - but that part of the path can be omitted.
examples:
loadsky steini/steini2 (loads textures/skymaps/steini/steini2_*)
loadsky textures/skymaps/steini/steini2 (same)
loadsky ../foo/bar (loads textures/foo/bar_*)
echo $loadsky
getnotexture
Returns the current "notexture" path. (Set by loadnotexture)
dumpmapconfig (available for debug binaries only)
Writes the current automatically generated map config to
dumpmapconfig.txt.
DOCREF mapsoundchanged mapsound mapmodel texture loadsky getnotexture
307 lines
17 KiB
INI
307 lines
17 KiB
INI
persistidents 0
|
|
|
|
newmenu editing
|
|
|
|
menuitem (_ [Mapmodels...]) [ showmenu Mapmodels ]
|
|
menuitem (_ [Lighting...]) [ showmenu Lighting ]
|
|
menuitem (_ [Entities...]) [ showmenu Entities ]
|
|
menuitem (_ [Pickups...]) [ showmenu Pickups ]
|
|
menuitem (_ [Test a skymap...]) [ showmenu skymaps ]
|
|
menuitem (_ [Ambient sounds...]) [ showmenu [Ambient sounds] ]
|
|
menuitem (_ [Arches and slopes...]) [ showmenu Arches ]
|
|
menuitem (_ [Map operations...]) [ showmenu [Map operations] ]
|
|
menuitem (_ [Bots...]) [ showmenu [Creating bot waypoints] ]
|
|
menuitem (_ [Settings...]) [ showmenu [Editing settings] ]
|
|
menuitem (_ Help?) [ echo (yellow) (_ [Please read the AssaultCube README which has a detailed guide on mapediting...]) ]
|
|
|
|
tempalias tmp_cradius 12
|
|
|
|
//Lighting menu.
|
|
newmenu Lighting
|
|
|
|
menuitem (_ [Add white lights ]) [ showmenu [White light] ]
|
|
menuitem (_ [Add coloured lights ]) [ showmenu [Coloured light] ]
|
|
menuitem [] -1
|
|
menuitemcheckbox (_ [Enable fullbright: ]) "$fullbright" [ fullbright $arg1 ]
|
|
menuitem [] -1
|
|
menuitem (_ [Random coloured light: ]) -1
|
|
menuitemtextinput (_ [Radius: ]) [ result $tmp_cradius ] [ if (&& (! (> $arg1 32)) (! (< $arg1 1))) [ tmp_cradius = $arg1 ] [ echo (red)Error: (yellow) $arg1 (white)is not a valid radius for a light entity. ] ]
|
|
menuitem (_ [Place random light...]) [ gencl $tmp_cradius ]
|
|
menuitem (_ [Update random light...]) gencl
|
|
|
|
wlight = 1; wlight1 = 1
|
|
|
|
newmenu [White light]
|
|
|
|
menuitemslider (_ [Light radius: ]) 1 32 "$wlight" 1 [] [ wlight = $arg1 ]
|
|
menuitemslider (_ [Brightness: ]) 1 255 "$wlight1" 5 [] [ wlight1 = $arg1 ]
|
|
menuitem [] -1
|
|
menuitem (concatword (c 2) [ ] "[ OK ]" [ ]) [ newent light $wlight $wlight1 ]
|
|
|
|
clight = 1; clight1 = 1; clight2 = 1; clight3 = 1
|
|
|
|
newmenu [Coloured light]
|
|
|
|
menuitemslider (_ [Light radius: ]) 1 32 "$clight" 1 [] [ clight = $arg1 ]
|
|
menuitem [] -1
|
|
menuitemslider (_ [Red light: ]) 1 255 "$clight1" 5 [] [ clight1 = $arg1 ]
|
|
menuitemslider (_ [Green light: ]) 1 255 "$clight2" 5 [] [ clight2 = $arg1 ]
|
|
menuitemslider (_ [Blue light: ]) 1 255 "$clight3" 5 [] [ clight3 = $arg1 ]
|
|
menuitem [] -1
|
|
menuitem (concatword (c 2) [ ] "[ OK ]") [ newent light $clight $clight1 $clight2 $clight3 ]
|
|
|
|
//Entities menu
|
|
newmenu Entities
|
|
|
|
menuitem (_ [RVSF Spawn point]) [ newent playerstart 1 ]
|
|
menuitem (_ [CLA Spawn point]) [ newent playerstart 0 ]
|
|
menuitem (_ [FFA Spawn point]) [ newent playerstart 100 ]
|
|
menuitem [] -1
|
|
menuitem (_ [RVSF CTF Flag]) [ newent ctf-flag 1 ]
|
|
menuitem (_ [CLA CTF Flag]) [ newent ctf-flag 0 ]
|
|
menuitem [] -1
|
|
menuitem (_ [Ladder entity]) "saycommand /newent ladder " [ echo "Ensure that you have placed the ladder mapmodel first (found in the mapmodels menu)..." ]
|
|
menuitem (_ [Clip entity]) [ showmenu Clips ] [ echo Clips can be used to block off areas that players shouldn't be able to access... ]
|
|
|
|
_clip00 = clip; _clip00status = 0; _clip01 = 0; _clip02 = 1; _clip03 = 1; _clip04 = 1 // Give aliases an initial value.
|
|
|
|
newmenu Clips
|
|
|
|
menuitemslider (_ [Clip type: ]) 0 1 "$_clip00status" 1 [ Clip "Player Clip" ] [ _clip00 = (at [clip plclip] $arg1); _clip00status = $arg1 ]
|
|
menuitemslider (_ [Elevation from ground: ]) 0 50 "$_clip01" 1 [] [ _clip01 = $arg1 ]
|
|
menuitemslider (_ "Length of clip (X): ") 0 50 "$_clip02" 1 [] [ _clip02 = $arg1 ]
|
|
menuitemslider (_ "Width of clip (Y): ") 0 50 "$_clip03" 1 [] [ _clip03 = $arg1 ]
|
|
menuitemslider (_ "Height of clip (Z): ") 0 50 "$_clip04" 1 [] [ _clip04 = $arg1 ]
|
|
menuitem [] -1
|
|
menuitem (concatword (c 2) [ ] "[ OK ]") [ newent $_clip00 $_clip01 $_clip02 $_clip03 $_clip04 ]
|
|
|
|
//Pickups menu
|
|
newmenu Pickups
|
|
|
|
menuitem (_ Health) [ newent health ]
|
|
menuitem (_ [Pistol Magazine]) [ newent pistol ]
|
|
menuitem (_ [Box of Ammo]) [ newent ammobox ]
|
|
menuitem (_ [Kevlar Vest]) [ newent armour ]
|
|
menuitem (_ Helmet) [ newent helmet ]
|
|
menuitem (_ Akimbo) [ newent akimbo ]
|
|
menuitem (_ Grenades) [ newent grenades ]
|
|
|
|
//Arch and slope menu
|
|
newmenu Arches
|
|
|
|
menuitem (_ [Arch with no sideways curves]) [ heightfield 2; arch 0 ]
|
|
menuitem (_ [Arch with sideways curves (delta 1)]) [ heightfield 2; arch 1 ]
|
|
menuitem (_ [Arch with sideways curves (delta 2)]) [ heightfield 2; arch 2 ]
|
|
menuitem (_ [Arch with sideways curves (delta 3)]) [ heightfield 2; arch 3 ]
|
|
menuitem (_ [Arch with sideways curves (delta 4)]) [ heightfield 2; arch 4 ]
|
|
menuitem [] -1
|
|
menuitem (_ [Slope increase 2 left-right]) [ heightfield 0; slope 2 0 ]
|
|
menuitem (_ [Slope decrease 2 left-right]) [ heightfield 0; slope -2 0 ]
|
|
menuitem (_ [Slope increase 2 top-bottom]) [ heightfield 0; slope 0 2 ]
|
|
menuitem (_ [Slope decrease 2 top-bottom]) [ heightfield 0; slope 0 -2 ]
|
|
menuitem (_ [Slope increase 1 left-right]) [ heightfield 0; slope 1 0 ]
|
|
menuitem (_ [Slope decrease 1 left-right]) [ heightfield 0; slope -1 0 ]
|
|
menuitem (_ [Slope increase 1 top-bottom]) [ heightfield 0; slope 0 1 ]
|
|
menuitem (_ [Slope decrease 1 top-bottom]) [ heightfield 0; slope 0 -1 ]
|
|
menuitem [] -1
|
|
menuitem (_ [Fix heightfielding]) [ solid 0; slope 0 0 ]
|
|
|
|
newmenu skymaps
|
|
|
|
menuinit [ echo Please read: (red)/docs/mapediting5.html to find out how to PERMANENTLY add a custom skymap to your map... ]
|
|
|
|
menuitem (_ [At sea skymap]) [ loadsky "textures/skymaps/kothic/atsea" ]
|
|
menuitem (_ [Canyons1 skymap]) [ loadsky "textures/skymaps/ladynighthawk/inhcanyons1" ]
|
|
menuitem (_ [Graveyard skymap]) [ loadsky "textures/skymaps/socksky/grave" ]
|
|
menuitem (_ [Ice Station skymap]) [ loadsky "textures/skymaps/iceflow/iceflow" ]
|
|
menuitem (_ [Mountain skymap]) [ loadsky "textures/skymaps/makke/mountain" ]
|
|
menuitem (_ [Nightball skymap]) [ loadsky "textures/skymaps/socksky/nightball" ]
|
|
menuitem (_ [Powerlines skymap]) [ loadsky "textures/skymaps/humus/powerlines" ]
|
|
menuitem (_ [Rocky skymap]) [ loadsky "textures/skymaps/makke/rocky" ]
|
|
menuitem (_ [Sand skymap]) [ loadsky "textures/skymaps/makke/sand" ]
|
|
menuitem (_ [Steini2 skymap]) [ loadsky "textures/skymaps/steini/steini2" ]
|
|
menuitem (_ [Steini3 skymap]) [ loadsky "textures/skymaps/steini/steini3" ]
|
|
menuitem (_ [Steini4 skymap]) [ loadsky "textures/skymaps/steini/steini4" ]
|
|
|
|
|
|
_closestenttypestatus = 0
|
|
//Map operations
|
|
newmenu [Map operations]
|
|
|
|
menuitem (_ [Newmap (128x128 cubes - recommended)]) [ newmap 7 ]
|
|
menuitem (_ [Newmap (256x256 cubes)]) [ newmap 8 ]
|
|
menuitem (_ [Increase mapsize (2x)]) [ mapenlarge; echo The map size has been increased by 2. However, the new space is solid. To utilize it, you will need to turn it into non-solid space, by selecting it and pressing G. ]
|
|
//menuitem (_ [Edit map message]) [ showmenu [Edit map message] ]
|
|
menuitem (_ [Edit map message]) editmapmsg
|
|
menuitem (_ [Change waterlevel]) [ saycommand [/waterlevel ] ]
|
|
menuitem (_ [Change watercolour]) [ showmenu [Water colour] ]
|
|
menuitem (_ [Generate a random watercolour]) genwc
|
|
menuitem (_ [Generate a random fogcolour]) [ fogcolour (genhex) ]
|
|
menuitem (_ [Print entity stats]) entstats
|
|
menuitem (_ [Select the next closest entity]) nextclosestent
|
|
menuitem (_ [Copy the current closest entity]) copyent
|
|
menuitem (_ [Paste a previously copied entity]) pasteent
|
|
menuitemcheckbox (_ [Show mapmodel clippings: ]) "$showmodelclipping" [ showmodelclipping $arg1 ]
|
|
menuitemslider (_ [Select only these entities: ]) 0 15 "$_closestenttypestatus" 1 [All Light Playerstart Pistol Ammobox Grenades Health Armour Akimbo Mapmodel Ladder CTF-flag Sound Clip Helmet PlayerClip] [ _closestentslider $arg1 ]
|
|
|
|
// "closestenttype" slider...
|
|
_closestentslider = [ closestenttype (at ["" light playerstart pistol ammobox grenades health armour akimbo mapmodel ladder ctf-flag sound clip helmet plclip] $arg1); _closestenttypestatus = $arg1 ]
|
|
|
|
// FIXME: menu can be removed, if editmapmsg is used
|
|
newmenu [Edit map message]
|
|
menuinit [ menumapmsgtext = [] ]
|
|
menuitemtextinput (_ [Edit your map message: ]) "result $mapmsg" [ menumapmsgtext = $arg1 ] [] 256
|
|
menuitem (concatword (c 2) [ ] "[ OK ]") [ mapmsg $menumapmsgtext ]
|
|
|
|
redw = 1; greenw = 1; bluew = 1
|
|
|
|
newmenu [Water colour]
|
|
|
|
menuitemslider (_ [Red pigment: ]) 1 255 "$redw" 5 [] [ redw = $arg1 ]
|
|
menuitemslider (_ [Green pigment: ]) 1 255 "$greenw" 5 [] [ greenw = $arg1 ]
|
|
menuitemslider (_ [Blue pigment: ]) 1 255 "$bluew" 5 [] [ bluew = $arg1 ]
|
|
menuitem [] -1
|
|
menuitem (concatword (c 2) [ ] "[ OK ]") [ watercolour $redw $greenw $bluew ]
|
|
|
|
newmenu [Ambient sounds]
|
|
|
|
menuinit [ ambientsoundmenu = [] ]
|
|
menuitem (_ [Cave drip]) [ ambientsoundmenu = 0; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Cars driving in the distance]) [ ambientsoundmenu = 1; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Humm (01)]) [ ambientsoundmenu = 2; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Humm (02)]) [ ambientsoundmenu = 3; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Crickets at night]) [ ambientsoundmenu = 4; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Water (01)]) [ ambientsoundmenu = 5; showmenu "Ambient sound settings" ]
|
|
menuitem (_ Wind) [ ambientsoundmenu = 6; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Air conditioner]) [ ambientsoundmenu = 7; showmenu "Ambient sound settings" ]
|
|
menuitem (_ Compressor) [ ambientsoundmenu = 8; showmenu "Ambient sound settings" ]
|
|
menuitem (_ Crow) [ ambientsoundmenu = 9; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Dogs (01)]) [ ambientsoundmenu = 10; showmenu "Ambient sound settings" ]
|
|
menuitem (_ Helicopter) [ ambientsoundmenu = 11; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Humm (03)]) [ ambientsoundmenu = 12; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Humm (04)]) [ ambientsoundmenu = 13; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Humm (05)]) [ ambientsoundmenu = 14; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Humm (06)]) [ ambientsoundmenu = 15; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Dogs (02)]) [ ambientsoundmenu = 16; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Night (01)]) [ ambientsoundmenu = 17; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Night (02)]) [ ambientsoundmenu = 18; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Radio comms]) [ ambientsoundmenu = 19; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Radio static]) [ ambientsoundmenu = 20; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Sat-coms]) [ ambientsoundmenu = 21; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Sludge]) [ ambientsoundmenu = 22; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Static (01)]) [ ambientsoundmenu = 23; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Static (02)]) [ ambientsoundmenu = 24; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Vent (01)]) [ ambientsoundmenu = 25; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Vent (02)]) [ ambientsoundmenu = 26; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Water owl]) [ ambientsoundmenu = 27; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Water (02)]) [ ambientsoundmenu = 28; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Water drip]) [ ambientsoundmenu = 29; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Wind (02)]) [ ambientsoundmenu = 30; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Waterpipes (01)]) [ ambientsoundmenu = 31; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Waterpipes (02)]) [ ambientsoundmenu = 32; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Warning alarm]) [ ambientsoundmenu = 33; showmenu "Ambient sound settings" ]
|
|
menuitem (_ Gastank) [ ambientsoundmenu = 34; showmenu "Ambient sound settings" ]
|
|
menuitem (_ Keyboard) [ ambientsoundmenu = 35; showmenu "Ambient sound settings" ]
|
|
menuitem (_ Factory) [ ambientsoundmenu = 36; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Vent (03)]) [ ambientsoundmenu = 37; showmenu "Ambient sound settings" ]
|
|
menuitem (_ Waterfront) [ ambientsoundmenu = 38; showmenu "Ambient sound settings" ]
|
|
menuitem (_ Generator) [ ambientsoundmenu = 39; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Electric buzz]) [ ambientsoundmenu = 40; showmenu "Ambient sound settings" ]
|
|
menuitem (_ Alarm) [ ambientsoundmenu = 41; showmenu "Ambient sound settings" ]
|
|
menuitem (_ Flies) [ ambientsoundmenu = 42; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [Desert hawk]) [ ambientsoundmenu = 43; showmenu "Ambient sound settings" ]
|
|
menuitem (_ Owl) [ ambientsoundmenu = 44; showmenu "Ambient sound settings" ]
|
|
menuitem (_ [City birds]) [ ambientsoundmenu = 45; showmenu "Ambient sound settings" ]
|
|
|
|
soundrad = 1; soundsize = 0; ambientsoundvol = 255
|
|
|
|
newmenu [Ambient sound settings]
|
|
menuinit [ soundrad = 1; soundsize = 0; ambientsoundvol = 255 ]
|
|
menuitemslider (_ [Sound radius: ]) 1 25 "$soundrad" 1 [] [ soundrad = $arg1 ]
|
|
menuitemslider (_ [Sound size: ]) 0 25 "$soundsize" 1 [] [ soundsize = $arg1 ]
|
|
menuitemslider (_ [Sound volume: ]) 1 255 "$ambientsoundvol" 5 [] [ ambientsoundvol = $arg1 ]
|
|
menuitem (concatword (c 2) [ ] "[ OK ]") [ newent sound $ambientsoundmenu $soundrad $soundsize $ambientsoundvol ]
|
|
|
|
showedBAKinfo = 0
|
|
|
|
newmenu [Editing settings]
|
|
menuitemslider (_ [Grid/Selection style: ]) 0 1 "$oldselstyle" 1 [triangles "squares (default)"] [ oldselstyle $arg1 ]
|
|
menuitemslider (_ [Fly speeds multiplier: ]) 1 5 "$flyspeed" 1 [] [ flyspeed $arg1 ]
|
|
menuitemcheckbox (_ [Enable auto save map: ]) "$autosavemap" [ autosavemap = $arg1 ]
|
|
menuitemslider (_ [Time between auto saves (in minutes): ]) 2 60 "(div $timeBetAutoSaves 60000)" 1 [] [ timeBetAutoSaves = (* $arg1 60000) ]
|
|
menuitemtextinput (_ [Make a map backup (.BAK) every: ]) "$numAutoSaveBackups" [ numAutoSaveBackups = $arg1 ] [ if (! $showedBAKinfo) [ echo This setting effects the number of autosavemaps between making a map backup file. "(.BAK)"; showedBAKinfo = 1 ] ] 4
|
|
|
|
//Mapmodels
|
|
newmenu Mapmodels
|
|
menuinit __rebuildmapmodelmenus
|
|
|
|
tempalias __mapmodelcategories [
|
|
platforms "Platforms"
|
|
ladders "Ladders+Stairs"
|
|
stairs "Ladders+Stairs"
|
|
fencing "Fencing"
|
|
plants "Plants"
|
|
lamps "Lights+Lamps"
|
|
street "Street"
|
|
pipes "Pipes"
|
|
office "Office"
|
|
computers "Computers"
|
|
home "Home"
|
|
industrial "Industrial"
|
|
military "Military"
|
|
signs "Signs"
|
|
litter "Other/Litter"
|
|
misc "Other/Misc"
|
|
unsoo "Unsorted/Official"
|
|
unsoa "Unsorted/Akimbo"
|
|
unsom "Unsorted/Map-Config"
|
|
unsorted "Unsorted/Custom"
|
|
]
|
|
|
|
looplist $__mapmodelcategories [key menu] [tempalias (concatword __mm_key_ $key) $menu]
|
|
|
|
tempalias __mm_unassigned [echo (yellow) sry: mapmodel (addpunct $arg1) has no slot assigned. Please edit your map config file.]
|
|
tempalias __mm_showmodel [concat chmenumdl $arg1 $arg2 all 40 3]
|
|
|
|
tempalias __rebuildmapmodelmenus [
|
|
if $mapmodelchanged [
|
|
push __mm_menus "" // menus with content
|
|
push __mm_done "" // done map config slots
|
|
push idxs ""
|
|
looplist $__mapmodelcategories [key menu] [delmenu $menu]
|
|
looplist (getmapmodelattributes explodekeywords sortby: keywords sortby: desc usage distribution) [path keyword desc usage dist] [
|
|
path = (concatword "mapmodels/" $path)
|
|
idxs = (mapmodelslotbyname $path)
|
|
if (|| (! (strlen $keyword)) (< (findlist $__mapmodelcategories $keyword) 0)) [
|
|
keyword = unsorted
|
|
if (strcmp $dist "official") [ keyword = unsoo ] // unless someone writes the missing config files ;)
|
|
if (strcmp $dist "autodownload") [ keyword = unsoa ] // a.k.a "akimbo"
|
|
if (listlen $idxs) [ keyword = unsom ] // has slot in current map config
|
|
]
|
|
keyword = (concatword __mm_key_ $keyword)
|
|
newmenu $$keyword
|
|
concatuniq __mm_menus $$keyword
|
|
if (strlen $desc) [] [desc = $path]
|
|
if (listlen $idxs) [
|
|
__mm_done = (concat $__mm_done $idxs)
|
|
if (> (listlen $idxs) 1) [
|
|
looplist $idxs i [menuitem (concat $desc (concatword "#" $i)) (concat newent mapmodel $i) (__mm_showmodel $$keyword $path) $usage] // several slots for the same mapmodel
|
|
][
|
|
menuitem $desc (concat newent mapmodel $idxs) (__mm_showmodel $$keyword $path) $usage // usual case: one slot per model
|
|
]
|
|
][
|
|
menuitem (concatword "\f4" $desc) (concat __mm_unassigned $path) (__mm_showmodel $$keyword $path) $usage // mapmodel has no slot assigned
|
|
]
|
|
]
|
|
delmenu Mapmodels
|
|
newmenu Mapmodels
|
|
push __mm_sorted ""
|
|
looplist $__mapmodelcategories [key menu] [if (>= (findlist $__mm_menus $menu) 0) [concatuniq __mm_sorted $menu]] // create list of non-empty menus in order of list above
|
|
looplist $__mm_sorted m [menuitem $m (concat showmenu $m)] // only create non-empty menus
|
|
mapmodelchanged 0
|
|
pop menu __mm_menus __mm_sorted __mm_done __mm_unsorted idxs
|
|
]
|
|
]
|
|
|
|
persistidents 1
|