new command sortmapsoundslots
...and some options for sortmapmodelslots and sorttextureslots
All three commands now accept three modifier keywords as arguments:
nosort do not sort the list alphabetically
nomerge do not merge any slots
mergeused merge used and unused (identical) slots freely
By default, the list is sorted and only unused identical slots are merged.
The keywords can be combined in any order. "nomerge" takes priority over
"mergeused".
Examples:
sortmapmodelslots
Sort the mapmodel slot list alphabetically and merge unused identical
slots. Merging an unused slot is pretty much the same as deleting it,
so this command sorts the list and removes unneeded double entries.
sortmapmodelslots nosort
Merges (deletes) unused double entries in the mapmodel slot list.
sorttextureslots nosort mergeused
Merges double entries in the texture slot list. If two identical
entries are used in the map, all uses are mapped to the new combined
slot. This leaves no visual changes on the map. Should be avoided, if
texture slots have been renamed manually - and the the renaming isn't
finished yet.
sortmapsoundslots mergeused
Sorts the mapsound slot list and merges all double entries.
DOCREF sortmapmodelslots sorttextureslots sortmapsoundslots
This commit is contained in:
+24
-2
@@ -179,8 +179,9 @@ menuitem "Delete ALL unused mapmodel slots" [loop ii 256 [ push i (- 255 $ii) ;
|
||||
menuitem "Delete ALL unused texture slots" [loop ii 251 [ push i (- 255 $ii) ; if (&& (strlen (edittextureslot $i)) (strcmp "" (textureslotusage $i))) [deletetextureslot $i] ; pop i]]
|
||||
menuitem "Delete ALL unused mapsound slots" [loop ii 256 [ push i (- 255 $ii) ; if (&& (strlen (editmapsoundslot $i)) (strcmp "" (mapsoundslotusage $i))) [deletemapsoundslot $i] ; pop i]]
|
||||
menuitem "" -1
|
||||
menuitem "Sort all mapmodel slots and merge duplicates" sortmapmodelslots
|
||||
menuitem "Sort all texture slots and merge duplicates" sorttextureslots
|
||||
menuitem "Sort mapmodel slots..." [ showmenu [Sort mapmodel slots] ]
|
||||
menuitem "Sort texture slots..." [ showmenu [Sort texture slots] ]
|
||||
menuitem "Sort mapsound slots..." [ showmenu [Sort mapsound slots] ]
|
||||
menuitem "" -1
|
||||
menuitem "Update mapmodel menus" "mapmodelchanged 1"
|
||||
|
||||
@@ -525,6 +526,27 @@ menuinit [
|
||||
]
|
||||
]
|
||||
|
||||
// sort config slots
|
||||
looplist [__mmsort __mmmerge __texsort __texmerge __sndsort __sndmerge] i [tempalias $i 1]
|
||||
|
||||
newmenu [Sort mapmodel slots]
|
||||
menuitemcheckbox "Sort slots alphabetically" "$__mmsort" [ __mmsort = $arg1 ]
|
||||
menuitemslider "Merge " 0 2 "$__mmmerge" 1 ["no slots" "unused identical slots" "all identical slots"] [ __mmmerge = $arg1 ]
|
||||
menuitem "" -1
|
||||
menuitem "\t\t\f0[Start]" [sortmapmodelslots (at [nosort ""] $__mmsort) (at [nomerge "" mergeused] $__mmmerge)]
|
||||
|
||||
newmenu [Sort texture slots]
|
||||
menuitemcheckbox "Sort slots alphabetically" "$__texsort" [ __texsort = $arg1 ]
|
||||
menuitemslider "Merge " 0 2 "$__texmerge" 1 ["no slots" "unused identical slots" "all identical slots"] [ __texmerge = $arg1 ]
|
||||
menuitem "" -1
|
||||
menuitem "\t\t\f0[Start]" [sorttextureslots (at [nosort ""] $__texsort) (at [nomerge "" mergeused] $__texmerge)]
|
||||
|
||||
newmenu [Sort mapsound slots]
|
||||
menuitemcheckbox "Sort slots alphabetically" "$__sndsort" [ __sndsort = $arg1 ]
|
||||
menuitemslider "Merge " 0 2 "$__sndmerge" 1 ["no slots" "unused identical slots" "all identical slots"] [ __sndmerge = $arg1 ]
|
||||
menuitem "" -1
|
||||
menuitem "\t\t\f0[Start]" [sortmapsoundslots (at [nosort ""] $__sndsort) (at [nomerge "" mergeused] $__sndmerge)]
|
||||
|
||||
//Mapmodels
|
||||
newmenu Mapmodels
|
||||
menuinit __rebuildmapmodelmenus
|
||||
|
||||
Reference in New Issue
Block a user