add access to entities with unassigned config slots to edit menus
Mapmodel and -sound entities which refer to unassigned slots are now listed in the "edit slots" menus. From there, the entities can be visited and manually corrected or deleted.
This commit is contained in:
+45
-30
@@ -190,7 +190,7 @@ menuitem "Update mapmodel menus" "mapmodelchanged 1"
|
||||
// Map checks
|
||||
newmenu [Map checks and statistics]
|
||||
menuinit [
|
||||
resetmenu
|
||||
resetcurmenu
|
||||
if $editing [
|
||||
menuitem "Map area checks..." [ showmenu [Map area checks] ]
|
||||
menuitem "Entity statistics" [ showmenu [Entity statistics] ]
|
||||
@@ -213,17 +213,21 @@ menuinit [
|
||||
if (strlen $__mmslot) [
|
||||
push info (editmapmodelslot $__mmslot)
|
||||
menuheader "" (concatword "edit mapmodel slot #" $__mmslot ":\n" (mapmodelslotname $__mmslot))
|
||||
menuitemtextinput "Clipping radius" (at $info 0) [editmapmodelslot $__mmslot $arg1]
|
||||
menuitemtextinput "Clipping height " (at $info 1) [editmapmodelslot $__mmslot "" $arg1]
|
||||
menuitemtextinput "z-Offset " (at $info 2) [editmapmodelslot $__mmslot "" "" $arg1]
|
||||
menuitemtextinput "Scale [0.25 - 4.0] " (at $info 3) [editmapmodelslot $__mmslot "" "" "" $arg1]
|
||||
push __distribution (getmapmodelattributes (mapmodelslotname $__mmslot) distribution)
|
||||
if (! (strlen $__distribution)) [ __distribution = "custom/unsorted" ]
|
||||
menuitem (concat "Distribution:" (pop __distribution)) -1
|
||||
menuitem "" -1
|
||||
menuitemtextinput "Mapmodel path " (concat result (at $info 4)) [editmapmodelslot $__mmslot "" "" "" "" $arg1] "" 250
|
||||
if (&& (strlen $__lastwatchedmapmodel) (! (strcmp $__lastwatchedmapmodel (at $info 4)))) [
|
||||
menuitem (concat " change to" (escape $__lastwatchedmapmodel)) [editmapmodelslot $__mmslot "" "" "" "" $__lastwatchedmapmodel]
|
||||
if (strlen $info) [
|
||||
menuitemtextinput "Clipping radius" (at $info 0) [editmapmodelslot $__mmslot $arg1]
|
||||
menuitemtextinput "Clipping height " (at $info 1) [editmapmodelslot $__mmslot "" $arg1]
|
||||
menuitemtextinput "z-Offset " (at $info 2) [editmapmodelslot $__mmslot "" "" $arg1]
|
||||
menuitemtextinput "Scale [0.25 - 4.0] " (at $info 3) [editmapmodelslot $__mmslot "" "" "" $arg1]
|
||||
push __distribution (getmapmodelattributes (mapmodelslotname $__mmslot) distribution)
|
||||
if (! (strlen $__distribution)) [ __distribution = "custom/unsorted" ]
|
||||
menuitem (concat "Distribution:" (pop __distribution)) -1
|
||||
menuitem "" -1
|
||||
menuitemtextinput "Mapmodel path " (concat result (at $info 4)) [editmapmodelslot $__mmslot "" "" "" "" $arg1] "" 250
|
||||
if (&& (strlen $__lastwatchedmapmodel) (! (strcmp $__lastwatchedmapmodel (at $info 4)))) [
|
||||
menuitem (concat " change to" (escape $__lastwatchedmapmodel)) [editmapmodelslot $__mmslot "" "" "" "" $__lastwatchedmapmodel]
|
||||
]
|
||||
] [
|
||||
menuitem "\f3Unassigned slot" -1
|
||||
]
|
||||
if (strlen (mapmodelslotusage $__mmslot)) [
|
||||
menuitem "" -1 (concat gotoposition (gotoposition))
|
||||
@@ -445,6 +449,10 @@ menuinit [
|
||||
info = (editmapsoundslot $i)
|
||||
if (strlen $info) [
|
||||
menuitem (concatword "edit mapsound slot #" $i ": " $info) (concat alias __sndslot $i ";" showmenu (escape "Edit mapsound slot"))
|
||||
] [
|
||||
if (strlen (mapsoundslotusage $i)) [
|
||||
menuitem (concatword "unassigned mapsound slot #" $i) (concat alias __sndslot $i ";" showmenu (escape "Edit mapsound slot"))
|
||||
]
|
||||
]
|
||||
]
|
||||
pop info
|
||||
@@ -463,22 +471,25 @@ menuinit [
|
||||
if (strlen $__sndslot) [
|
||||
push info (editmapsoundslot $__sndslot) // "<path> <maxuses>"
|
||||
menuheader "" (concatword "edit mapsound slot #" $__sndslot ":\n" (at $info 0))
|
||||
menuitemtextinput "Max simultaneous uses " (at $info 1) [editmapsoundslot $__sndslot "" $arg1]
|
||||
menuitem " (\f4-1: unlimited)" -1
|
||||
menuitem "" -1
|
||||
menuitem (concat "Distribution:" (getmapsoundorigin (at $info 0))) -1
|
||||
menuitem "" -1
|
||||
menuitemtextinput "Mapsound path " (concat result (at $info 0)) [editmapsoundslot $__sndslot $arg1] "" 250
|
||||
if (&& (strlen $__lastwatchedmapsound) (! (strcmp $__lastwatchedmapsound (at $info 0)))) [
|
||||
menuitem (concat " change to" (escape $__lastwatchedmapsound)) [editmapsoundslot $__sndslot $__lastwatchedmapsound]
|
||||
if (strlen $info) [
|
||||
menuitemtextinput "Max simultaneous uses " (at $info 1) [editmapsoundslot $__sndslot "" $arg1]
|
||||
menuitem " (\f4-1: unlimited)" -1
|
||||
menuitem "" -1
|
||||
menuitem (concat "Distribution:" (getmapsoundorigin (at $info 0))) -1
|
||||
menuitem "" -1
|
||||
menuitemtextinput "Mapsound path " (concat result (at $info 0)) [editmapsoundslot $__sndslot $arg1] "" 250
|
||||
if (&& (strlen $__lastwatchedmapsound) (! (strcmp $__lastwatchedmapsound (at $info 0)))) [
|
||||
menuitem (concat " change to" (escape $__lastwatchedmapsound)) [editmapsoundslot $__sndslot $__lastwatchedmapsound]
|
||||
]
|
||||
menuitem "" -1
|
||||
menuitem "\f2Create map entity:" -1
|
||||
menuitemslider [Sound radius: ] 1 25 "$__snd_rad" 1 [] [ __snd_rad = $arg1 ]
|
||||
menuitemslider [Sound size: ] 0 25 "$__snd_size" 1 [] [ __snd_size = $arg1 ]
|
||||
menuitemslider [Sound volume: ] 1 255 "$__snd_vol" 5 [] [ __snd_vol = $arg1 ]
|
||||
menuitem "\f0 Place new entity now" (concat newent sound $__sndslot $__snd_rad $__snd_size $__snd_vol)
|
||||
] [
|
||||
menuitem "\f3Unassigned slot" -1
|
||||
]
|
||||
menuitem "" -1
|
||||
menuitem "\f2Create map entity:" -1
|
||||
menuitemslider [Sound radius: ] 1 25 "$__snd_rad" 1 [] [ __snd_rad = $arg1 ]
|
||||
menuitemslider [Sound size: ] 0 25 "$__snd_size" 1 [] [ __snd_size = $arg1 ]
|
||||
menuitemslider [Sound volume: ] 1 255 "$__snd_vol" 5 [] [ __snd_vol = $arg1 ]
|
||||
menuitem "\f0 Place new entity now" (concat newent sound $__sndslot $__snd_rad $__snd_size $__snd_vol)
|
||||
|
||||
if (strlen (mapsoundslotusage $__sndslot)) [
|
||||
menuitem "" -1 (concat gotoposition (gotoposition))
|
||||
looplist (mapsoundslotusage $__sndslot) ii [
|
||||
@@ -765,6 +776,10 @@ tempalias __rebuildmapmodelmenus [
|
||||
mpath = (mapmodelslotname $i)
|
||||
if (strlen $mpath) [
|
||||
menuitem (concatword "edit slot #" $i ": " (editmapmodelslot $i)) (concat alias __mmslot $i ";" showmenu (escape "Edit mapmodel slot")) (__mm_showmodel2 [Edit mapmodel slots] $mpath)
|
||||
] [
|
||||
if (strlen (mapmodelslotusage $i)) [
|
||||
menuitem (concatword "unassigned slot #" $i) (concat alias __mmslot $i ";" showmenu (escape "Edit mapmodel slot")) [chmenumdl [Edit mapmodel slots] ""]
|
||||
]
|
||||
]
|
||||
]
|
||||
mapmodelchanged 0
|
||||
@@ -909,7 +924,7 @@ menuitem "Clear probe point dummies" __clearprobepointdummies
|
||||
|
||||
newmenu [Walk probe point dummies]
|
||||
menuinit [
|
||||
resetmenu
|
||||
resetcurmenu
|
||||
__placeprobepointdummies
|
||||
menuitem "\f4(return to previous position)" (concat gotoposition (gotoposition)) (concat gotoposition (gotoposition))
|
||||
push i 0
|
||||
@@ -921,7 +936,7 @@ menuinit [
|
||||
pop i ents
|
||||
]
|
||||
|
||||
push __a "resetmenu ; menuitem [\f4(return to previous position)] (concat gotoposition (gotoposition)) (concat gotoposition (gotoposition)) ;"
|
||||
push __a "resetcurmenu ; menuitem [\f4(return to previous position)] (concat gotoposition (gotoposition)) (concat gotoposition (gotoposition)) ;"
|
||||
push __b "looplist $ents i [ menuitem (concatword # $i) (concat gotoentity $i) (concat gotoentity $i) ] ; pop ents"
|
||||
looplist (listoptions ents) e [
|
||||
newmenu (concat Walk $e entities)
|
||||
@@ -931,7 +946,7 @@ pop __a __b
|
||||
|
||||
newmenu [Entity statistics]
|
||||
menuinit [
|
||||
resetmenu
|
||||
resetcurmenu
|
||||
push s 1
|
||||
looplist (listoptions ents) e [
|
||||
push n (listlen (enumentities $e))
|
||||
|
||||
Reference in New Issue
Block a user