diff --git a/config/favourites.cfg b/config/favourites.cfg index 9e8b83b4..acaedf8d 100644 --- a/config/favourites.cfg +++ b/config/favourites.cfg @@ -41,7 +41,7 @@ // arg1: mapname, arg2: gamemode number, arg3: ping, arg4: minutesremaining, arg5: number of players, arg6: maxclients, arg7: IP, arg8: port, arg9: pongflags // pongflags is bit-coded: bit 0: passworded, bit 1: banned, bit 2: blacklisted, bit 6: mastermode -offmap = [ (+ 1 (findlist $defaultmaps $arg1)) ] +offmap = [ (+ 1 (findlist $__defaultmaps $arg1)) ] // basic categories diff --git a/config/menus.cfg b/config/menus.cfg index eb0d3b06..355ce069 100644 --- a/config/menus.cfg +++ b/config/menus.cfg @@ -1,18 +1,26 @@ // standard menu definitions -newmenu main +//// Main //// +newmenu main menuitem Multiplayer [ showmenu multiplayer ] menuitem Singleplayer [ showmenu singleplayer ] -menuitem Settings [ showmenu settings ] +menuitem Settings [ showmenu Settings ] menuitem Demo [ showmenu [Play demo] ] menuitem Editing [ showmenu editing ] menuitem Help [ showmenu help ] menuitem About [ showmenu about ] menuitem Quit savequit + +// Add maps to the below list to include them in the normal map menu (also for botmaps). +const __defaultmaps [ac_aqueous ac_arabian ac_arctic ac_arid ac_avenue ac_cavern ac_complex ac_depot ac_desert ac_desert2 ac_desert3 ac_douze ac_edifice ac_elevation ac_gothic ac_iceroad ac_industrial ac_ingress ac_keller ac_lainio ac_mines ac_outpost ac_power ac_rattrap ac_scaffold ac_shine ac_snow ac_stellar ac_sunset ac_swamp ac_terros ac_toxic ac_urban ac_venison ac_wasteland ac_werk] + +// Add maps to the below list to include them in the CTF, KTF & TKTF map menu. Maps should contain flags here. +const __ctfmaps [ac_aqueous ac_arabian ac_arid ac_avenue ac_cavern ac_depot ac_desert3 ac_edifice ac_elevation ac_gothic ac_iceroad ac_industrial ac_ingress ac_keller ac_lainio ac_mines ac_outpost ac_power ac_shine ac_stellar ac_sunset ac_swamp ac_terros ac_urban ac_venison ac_werk] + // Start maps. -const genmapitems [ +const __genmapitems [ n = (listlen $arg1) loop i $n [ __listmapname = (at $arg1 $i) @@ -24,61 +32,101 @@ const genmapitems [ ] ] -newmenu maps - -// Add maps to the below list to include them in the normal map menu (also for botmaps). -const defaultmaps [ac_aqueous ac_arabian ac_arctic ac_arid ac_avenue ac_cavern ac_complex ac_depot ac_desert ac_desert2 ac_desert3 ac_douze ac_edifice ac_elevation ac_gothic ac_iceroad ac_industrial ac_ingress ac_keller ac_lainio ac_mines ac_outpost ac_power ac_rattrap ac_scaffold ac_shine ac_snow ac_stellar ac_sunset ac_swamp ac_terros ac_toxic ac_urban ac_venison ac_wasteland ac_werk] -genmapitems $defaultmaps -menuitem [] -1 -menuitem [Show all maps...] [ showmenu [all maps] ] - newmenu [all maps] menudirlist "packages/maps" cgz [map $arg1] -newmenu maps_flags -// Add maps to the below list to include them in the CTF, KTF & TKTF map menu. Maps should contain flags here. -const ctfmaps [ac_aqueous ac_arabian ac_arid ac_avenue ac_cavern ac_depot ac_desert3 ac_edifice ac_elevation ac_gothic ac_iceroad ac_industrial ac_ingress ac_keller ac_lainio ac_mines ac_outpost ac_power ac_shine ac_stellar ac_sunset ac_swamp ac_terros ac_urban ac_venison ac_werk] -genmapitems $ctfmaps +newmenu maps +__genmapitems $__defaultmaps menuitem [] -1 -menuitem [Show all maps..] [showmenu [all maps]] +menuitem "Show all maps\i\3" [ showmenu [all maps] ] + +newmenu maps_flags +__genmapitems $__ctfmaps +menuitem [] -1 +menuitem "Show all maps\i\3" [showmenu [all maps]] + + +//// Main > Play demo //// newmenu [Play demo] menudirlist demos dmo "demo $arg1" -newmenu rewind -menuitemtextinput "Go to [min]: " [ (if (checkalias tmp_setmr) [return $tmp_setmr]) ] [ tempalias tmp_setmr $arg1 ] -menuitem "\f2Confirm" [ if (checkalias tmp_setmr) [setmr $tmp_setmr; delalias tmp_setmr] ] -menuitem "" -1 -menuitemtextinput "Rewind (negative value to forward) [s]: " [ (if (checkalias tmp_rewind) [return $tmp_rewind]) ] [ tempalias tmp_rewind $arg1 ] -menuitem "\f2Confirm" [ if (checkalias tmp_rewind) [rewind $tmp_rewind; delalias tmp_rewind] ] -menuitem "" -1 -menuitem "Cancel" [ delalias tmp_setmr; delalias tmp_rewind ] +//// Watching demo //// (in-game menu that opens when pressing escape while watching a demo) -searchdemo = "" - -newmenu [search specific demo] -menudirlist demos dmo "demo $arg1" 0 searchdemo - -newmenu [search demo] -menuitemtextinput "Part of demo name or description: " "result $searchdemo" [ searchdemo = $arg1 ] -menuitem "\f2\t\t [ Search demo ]" [ showmenu [search specific demo] ] - -// in-game menu that opens when pressing escape while watching a demo. newmenu [Watching demo] menuitem "Stop watching demo" stopdemo menuitem "Restart demo" [ demo $curdemofile ] -menuitem "Rewind demo..." [ showmenu rewind ] +menuitem "Rewind demo\i\3" [ showmenu rewind ] menuitemtextinput "Custom description: " [ getalias (concatword "demodesc_" $curdemofile) ] [ alias (concatword "demodesc_" $curdemofile) $arg1 ] [] 100 menuitem "" -1 menuitem "Watch other demo" [ stopdemo; closecurmenu; showmenu [Play demo] ] -menuitem "Search demo..." [ showmenu [search demo] ] +menuitem "Search demo\i\3" [ showmenu [search demo] ] menuitem "" -1 -menuitem "\f4Main menu..." [ closecurmenu; showmenu main ] +menuitem "\f4Main menu\i\3" [ closecurmenu; showmenu main ] menuitem "\f3Quit AssaultCube" savequit -newmenu about +//// Watching demo > rewind //// +newmenu rewind +tempalias __setmr "" ; tempalias __rewind "" +menuitemtextinput "Go to [min]: " [ result $__setmr ] [ __setmr = $arg1 ] +menuitem "\f2Confirm" [ setmr $__setmr ] +menuitem "" -1 +menuitemtextinput "Rewind (negative value to forward) [s]: " [ result $__rewind ] [ __rewind = $arg1 ] +menuitem "\f2Confirm" [ rewind $__rewind ] +menuitem "" -1 +menuitem "Cancel" 0 + +//// Watching demo > search demo //// + +newmenu [search demo] +alias __searchdemo "" +menuitemtextinput "Part of demo name or description: " "result $__searchdemo" [ __searchdemo = $arg1 ] +menuitem "\f2\t\t [ Search demo ]" [ showmenu [search specific demo] ] + +//// Watching demo > search demo > search specific demo //// + +newmenu [search specific demo] +menudirlist demos dmo "demo $arg1" 0 __searchdemo + + +//// Main > Help //// + +newmenu help +menuitem "AssaultCube reference" [ showmenu reference ] +menuitem "Search the reference" [ showmenu [Reference search] ] +menuitem "Keyboard controls" [ showmenu Keyboard ] +menuitem "View the FAQ\t\t\t\t\t\t" [ load_faq ; showmenu faq ] +menuheader "" "...for further information/help see the README.\n\f4The readme can be found in the base AssaultCube directory." + +//// Main > Help > Reference search //// + +newmenu [Reference search] +tempalias __docsearchstring "" +menuitemtextinput "Search reference for: " "result $__docsearchstring" [ __docsearchstring = $arg1 ; showmenu [Reference search results] ] + +//// Main > Help > Reference search > Reference search results //// + +newmenu [Reference search results] +menuinit [ + resetcurmenu + menusynctabstops 1 + if (strlen $__docsearchstring) [ + menuheader "" (concatword "search results for keyword \f2" $__docsearchstring) + looplist (docfind $__docsearchstring 1) [n l] [ + menuitem (concatword "\fs\f1" $n "\fr \t" (getdoc $n 1)) (concatword "saycommand /" $n) + ] + ] closecurmenu +] + +//// Main > Help > FAQ //// +// see opt/faq.cfg + + +//// Main > About //// + +newmenu about menuitem "AssaultCube Version 1.2" -1 menuitem "" -1 menuitem "AssaultCube is developed by various people around the" -1 @@ -93,39 +141,18 @@ menuitem "AssaultCube is a total-conversion of the CUBE engine" -1 menuitem "by Wouter 'Aardappel' van Oortmerssen, and others:" -1 menuitem "\t\f1http://www.cubeengine.com/" -1 -newmenu help +//// Main > Quit //// -menuitem "AssaultCube reference" [ showmenu reference ] -menuitem "Search the reference" [ showmenu [Reference search] ] -menuitem "Keyboard controls" [ showmenu Keyboard ] -menuitem "View the FAQ\t\t\t\t\t\t" [ load_faq ; showmenu faq ] -menuheader "" "...for further information/help see the README.\n\f4The readme can be found in the base AssaultCube directory." - -tempalias __docsearchstring "" -newmenu [Reference search] -menuitemtextinput "Search reference for: " "result $__docsearchstring" [ __docsearchstring = $arg1 ; showmenu [Reference search results] ] - -newmenu [Reference search results] -menuinit [ - resetcurmenu - menusynctabstops 1 - if (strlen $__docsearchstring) [ - menuheader "" (concatword "search results for keyword \f2" $__docsearchstring) - looplist (docfind $__docsearchstring 1) [n l] [ - menuitem (concatword "\fs\f1" $n "\fr \t" (getdoc $n 1)) (concatword "saycommand /" $n) - ] - ] closecurmenu -] - -// Show quit dialog if enabled newmenu quit menuitem "Yes, quit now" quit menuitem "No" [ showmenu [] ] menuitem "" -1 menuitemcheckbox "Don't ask next time: " [(= $askquit 0)] [askquit = (= $arg1 0)] +// Show quit dialog if enabled const savequit [ if $askquit [ showmenu quit ] quit ] + // Create additional menus... exec config/menus_bot.cfg exec config/menus_edit.cfg diff --git a/config/menus_bot.cfg b/config/menus_bot.cfg index b247399c..177714e6 100644 --- a/config/menus_bot.cfg +++ b/config/menus_bot.cfg @@ -7,7 +7,7 @@ const genbotmaps [ menuitemmapload $listmapname (concat "tmp_botmap =" $listmapname "; startbotmap") ] ] -genbotmaps $defaultmaps +genbotmaps $__defaultmaps tempalias tmp_botskill good tempalias tmp_numbots 1 @@ -67,6 +67,8 @@ const emptymap [ ] ] +//// Main > Singleplayer //// + newmenu singleplayer // teamplay not mature yet diff --git a/config/menus_edit.cfg b/config/menus_edit.cfg index 9c4387b6..934e04b6 100644 --- a/config/menus_edit.cfg +++ b/config/menus_edit.cfg @@ -1,850 +1,28 @@ +//// Main > Editing //// + newmenu editing - menuinit [ if (! $editing) [menuheader "" "\f3You are not in edit mode"] [menuheader] ] -menuitem "Mapmodels..." [ showmenu Mapmodels ] -menuitem "Lighting..." [ showmenu Lighting ] -menuitem "Entities..." [ showmenu Entities ] -menuitem "Pickups..." [ showmenu Pickups ] -menuitem "Textures..." [ showmenu textures ] -menuitem "Skymaps..." [ showmenu skymaps ] -menuitem "Ambient sounds..." [ showmenu [Ambient sounds] ] -menuitem "Arches, slopes and stairs..." [ showmenu Arches ] -menuitem "Map operations..." [ showmenu [Map operations] ] -menuitem "Map settings..." [ showmenu [Map settings] ] -menuitem "Map config operations..." [ showmenu [Map config operations] ] -menuitem "Map checks and statistics..." [ showmenu [Map checks and statistics] ] -menuitem "Bots..." [ showmenu [Creating bot waypoints] ] -menuitem "Settings..." [ showmenu [Editing settings] ] -menuitem "Misc..." [ showmenu [Editing misc] ] -menuitem "Keys..." [ showmenu [Editing keys] ] -menuitem "Deleted entities" [ showmenu "deleted entities" ] - +menuitem "Mapmodels\i\3" [ showmenu Mapmodels ] +menuitem "Lighting\i\3" [ showmenu Lighting ] +menuitem "Entities\i\3" [ showmenu Entities ] +menuitem "Pickups\i\3" [ showmenu Pickups ] +menuitem "Textures\i\3" [ showmenu Textures ] +menuitem "Skymaps\i\3" [ showmenu Skymaps ] +menuitem "Ambient sounds\i\3" [ showmenu [Ambient sounds] ] +menuitem "Arches, slopes and stairs\i\3" [ showmenu Arches ] +menuitem "Map operations\i\3" [ showmenu [Map operations] ] +menuitem "Map settings\i\3" [ showmenu [Map settings] ] +menuitem "Map config operations\i\3" [ showmenu [Map config operations] ] +menuitem "Map checks and statistics\i\3" [ showmenu [Map checks and statistics] ] +menuitem "Bots\i\3" [ showmenu [Creating bot waypoints] ] +menuitem "Settings\i\3" [ showmenu [Editing settings] ] +menuitem "Misc\i\3" [ showmenu [Editing misc] ] +menuitem "Keys\i\3" [ showmenu [Editing keys] ] +menuitem "Deleted entities" [ showmenu "Deleted entities" ] menuitem "Help?" [ echo "\f2Please read the AssaultCube README which has a detailed guide on mapediting..." ] -//Lighting menu. -newmenu Lighting +//// Main > Editing > Mapmodels //// -menuitem "Add white lights " [ showmenu [White light] ] -menuitem "Add coloured lights " [ showmenu [Coloured light] ] -menuitem "" -1 -menuitemcheckbox "Enable fullbright: " "$fullbright" [ fullbright $arg1 ] - -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 "\f2\t [ OK ]\t\t" [ 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 "\f2\t\t [ OK ]" [ newent light $clight $clight1 $clight2 $clight3 ] - -//Entities menu -newmenu Entities - -menuitem "Place RVSF spawn point" [ newent playerstart 1 ] -menuitem "Place CLA spawn point" [ newent playerstart 0 ] -menuitem "Place FFA spawn point" [ newent playerstart 100 ] -menuitemcheckbox "Show all spawn points: " "$showplayerstarts" [ showplayerstarts $arg1 ] -menuitem "" -1 -menuitem "Place RVSF CTF Flag" [ newent ctf-flag 1 ] -menuitem "Place CLA CTF Flag" [ newent ctf-flag 0 ] -menuitem "" -1 -menuitem "Place ladder entity" "saycommand /newent ladder " [ echo "Ensure that you have placed the ladder mapmodel first (found in the mapmodels menu)..." ] -menuitem "Place clip entity..." [ showmenu Clips ] [ echo Clips can be used to block off areas that players shouldn't be able to access... ] -menuitem "" -1 -menuitem "Show list of TODO entities" [ showmenu "TODO entities" ] -menuitem "Show list of deleted entities" [ showmenu "deleted entities" ] - -tempalias _clip00 clip; tempalias _clip00status 0; tempalias _clip01 0; tempalias _clip02 1; tempalias _clip03 1; tempalias _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\t(X): " 0 50 "$_clip02" 1 [] [ _clip02 = $arg1 ] -menuitemslider "Width of clip\t(Y): " 0 50 "$_clip03" 1 [] [ _clip03 = $arg1 ] -menuitemslider "Height of clip\t(Z): " 0 50 "$_clip04" 1 [] [ _clip04 = $arg1 ] -menuitem "" -1 -menuitem "\f2\t\t [ 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 -looplist [__slopeaxis 0 __slopeinc 4 __stairaxis 0 __stairwidth 1 __undoarch "" __archside 1] [n v] [tempalias $n $v] -tempalias __setundoarch [ __undoarch = (concat select (at (selx) 0) (at (sely) 0) (at (selxs) 0) (at (selys) 0) "; if (= (undolevel)" (+ (undolevel) 2) ") [ undolevel" (undolevel) "]") ] -newmenu Arches -menuinit [ chmenutexture (curmenu) map_editor/axes.png " " ] -menuitemslider "Arch sideways curve delta: " 0 5 "$__archside" 1 [] [ __archside = $arg1 ] -menuitem "\t[ Place arch ]" [ __setundoarch ; heightfield 2; arch $__archside ] -menuitem "Edit arches..." [ showmenu "Edit arches" ] -menuitem "" -1 -menuitemslider "Slope axis: " 0 1 "$__slopeaxis" 1 ["West to East (X)" "North to South (Y)"] [ __slopeaxis = $arg1 ] -menuitemslider "Slope increment: " 0 5 "$__slopeinc" 1 ["downwards 3" "downwards 2" "downwards 1" "upwards 1" "upwards 2" "upwards 3"] [ __slopeinc = $arg1 ] -menuitem "\t[ Place slope ]" [ __setundoarch ; heightfield 0; push i (at "3 2 1 -1 -2 -3" $__slopeinc) ; slope (if $__slopeaxis 0 $i) (if $__slopeaxis $i 0) ; pop i ; 0] -menuitem "" -1 -menuitem "Clear heightfielding" [ solid 0; slope 0 0 ] -menuitem "Undo last placed arch or slope" [ __undoarch ; -1 ] -menuitemcheckbox "Automatically enlarge selections after placing arches and slopes" "$enlargearchslopeselections" [ enlargearchslopeselections $arg1 ] -menuitem "Enlarge selections now" enlargevdeltaselections -menuitem "" -1 -menuitemslider "Stairs axis: " 0 1 "$__stairaxis" 1 ["West to East (X)" "North to South (Y)"] [ __stairaxis = $arg1 ] -menuitemslider "Step width: " 0 5 "$__stairwidth" 1 ["downwards 3" "downwards 2" "downwards 1" "upwards 1" "upwards 2" "upwards 3"] [ __stairwidth = $arg1 ] -menuitem "\t[ Place stairs ]" [ push i (at "-3 -2 -1 1 2 3" $__stairwidth) ; stairs (if $__stairaxis 0 $i) (if $__stairaxis $i 0) ; pop i ; 0] - -tempalias __pickarch 2 -tempalias __listarch [ push ii "" ; loop i $arg1 [ if $i [ ii = (concat $ii (archvertex $arg1 $i)) ] ] ; result (pop ii) ] -newmenu "Edit arches" -menuinit [ - resetcurmenu - loop i 50 [ - if (> $i 1) [ - menuitem (concatword "arch width " $i ": " (__listarch $i)) (concat __pickarch = $i "; showmenu [Edit arch]") - ] - ] -] - -newmenu "Edit arch" -menuinit [ - resetcurmenu - menuheader "" (concat "edit arch width" $__pickarch "(symmetrical)") - push ii "" - loop i (div $__pickarch 2) [ - ii = (+ $i 1) - menuitemslider (concat vertex $ii "\t") 0 31 (archvertex $__pickarch $ii) 1 [] (concat archvertex $__pickarch $ii "$arg1 ; archvertex" $__pickarch (- $__pickarch $ii) "$arg1") - ] - pop ii - menuitem "" -1 - menuitem (concat Measure selection for width $__pickarch arch) (concat av (- $__pickarch 1) "(av_measure)") - menuitem "Edit full arch (non-symmetrical)..." [ showmenu "Edit full arch" ] - menuitem "Restore arch of different size (ymmv)..." [ showmenu "Pick custom arch" ] - menuitem "Delete saved custom arch..." [ showmenu "Delete custom arch" ] - menuitem "" -1 - tempalias __archname custom - looplist (enumalias (concatword _arch_ $__pickarch _)) [fn sn] [ - if (= (+ (listlen $$fn) 1) $__pickarch) [ - __archname = $sn - menuitem (concat Restore $sn " " $$fn) (concat av (- $__pickarch 1) (escape $$fn)) - ] - ] - menuitemtextinput "Save arch as " "result $__archname" (concat __archname "= $arg1 ; (concatword _arch_"$__pickarch "_ $arg1) = (__listarch" $__pickarch ")" ) "" 250 -] - -newmenu "Edit full arch" -menuinit [ - resetcurmenu - menuheader "" (concat "edit arch width" $__pickarch "(non-symmetrical)") - loop i $__pickarch [ - if $i [ menuitemslider (concat vertex $i "\t") 0 31 (archvertex $__pickarch $i) 1 [] (concat archvertex $__pickarch $i "$arg1") ] - ] -] - -newmenu "Pick custom arch" -menuinit [ - resetcurmenu - menuheader "" (concat "pick custom arch for width" $__pickarch) - looplist (enumalias _arch_) [fn sn] [ menuitem (concat Use "\fs\f2" $sn $$fn "\fr " as width $__pickarch arch) (concat av (- $__pickarch 1) (escape $$fn)) ] -] - -newmenu "Delete custom arch" -menuinit [ - resetcurmenu - looplist (enumalias _arch_) [fn sn] [ menuitem (concat Delete custom arch "\fs\f2" $sn "\fr" $$fn) (concat delalias (escape $fn)) ] -] - -newmenu skymaps -menuinit [ - resetcurmenu - if (&& $editing (! (getautomapconfig))) [ - menuitem [Enable automapconfig to make changes permanent] [automapconfig ; closemenu (curmenu)] (concat loadsky (escape $loadsky)) - menuitem "" -1 (concat loadsky (escape $loadsky)) - ] - menuitem (concat "Current skymap:" $loadsky) (concat loadsky (escape $loadsky)) - menuitem "" -1 (concat loadsky (escape $loadsky)) - push offskies "" - push userskies "" - push skyname "" - looplist (gettexturelist skymaps/ "" _ft.jpg) [c1 c2 c3 c4] [ - skyname = (escape (concatword $c3 "/" $c4)) - if (strcmp official (gettextureorigin (concatword $c1 "/" $c2))) [ - offskies = (concat $offskies $skyname) - ] [ - userskies = (concat $userskies $skyname) - ] - ] - menuitem "Official skymaps:" -1 (concat loadsky (escape $loadsky)) - looplist $offskies skyname [ - menuitem (concat " " $skyname) (concat loadsky $skyname) (concat loadsky $skyname) - ] - if (strlen $userskies) [ - menuitem "" -1 (concat loadsky (escape $loadsky)) - menuitem "Custom/downloaded skymaps:" -1 (concat loadsky (escape $loadsky)) - looplist $userskies skyname [ - menuitem (concat " " $skyname) (concat loadsky (escape $skyname)) (concat loadsky (escape $skyname)) - ] - ] - pop offskies userskies skyname -] - -_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 "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 -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 ] - -tempalias __enableautomapconfig [ if (&& $editing (! (getautomapconfig))) automapconfig ] - -newmenu [Map settings] -menuinit [ - resetcurmenu - if $editing [ - menuheader "" (concat " Settings for map" (curmap)) - menuitemtextinput (concatword "Water level (" (getvarrange min waterlevel) ".." (getvarrange max waterlevel) ", default " (getvarrange default waterlevel) "):\t") $waterlevel [waterlevel $arg1] - looplisti "red 20 green 25 blue 20 alpha 178" [n v] [ - menuitemtextinput (concatword "Water colour (" $n ", default " $v "):\t") (at (getwatercolour) $i) (concat setwatercolour $n "$arg1") - ] - menuitem "Water colour sliders..." [ showmenu [Water colour] ] - menuitem "" -1 - menuitemtextinput (concatword "Shadow yaw (0..360, default " (getvarrange default shadowyaw) "):\t") $shadowyaw [__enableautomapconfig ; shadowyaw $arg1] - menuitem "" -1 - menuitemtextinput (concatword "Fog distance (" (getvarrange min fog) ".." (getvarrange max fog) ", default " (getvarrange default fog) "):\t") $fog [__enableautomapconfig ; fog $arg1] - menuitemtextinput (concatword "Fog colour (0xrrggbb, default 0x" (h0 6 (getvarrange default fogcolour)) "):\t") (concatword "0x" (h0 6 $fogcolour)) [__enableautomapconfig ; fogcolour $arg1] - menuitem "Fog colour sliders..." [ showmenu [Fog colour] ] - menuitem "" -1 - menuitemtextinput (concatword "Ambient light (0..255 or 0xrrggbb, default 0):\t") (if (< $ambient 256) $ambient (concatword "0x" (h0 6 $ambient))) [ambient $arg1] - menuitem "" -1 - menuitemcheckbox "Map override: Disable water reflection" "$mapoverride_nowaterreflect" [ mapoverride_nowaterreflect $arg1 ] - menuitemcheckbox "Map override: Limit water waveheight" "$mapoverride_limitwaveheight" [ mapoverride_limitwaveheight $arg1 ] - menuitemcheckbox "Map override: Disable stencil shadows" "$mapoverride_nostencilshadows" [ mapoverride_nostencilshadows $arg1 ] - menuitem "" -1 - push n (getnotexture) - if (! (strlen $n)) [n = ] - menuitem (concatword "Notexture:\n" (pop n)) [showmenu "Set notexture"] - menuitem (concatword "Skymap:\n" $loadsky) [showmenu skymaps] - menuitem "" -1 - if (strlen $mapmsg) [ - menuitem (concat "Map message:" $mapmsg) editmapmsg - ] [ - menuitem "Edit map message..." editmapmsg - ] - if (strlen $mapinfo_license) [ - menuitem (concatword "Map license tag: \"" $mapinfo_license "\"") [ showmenu "Select map license" ] - if (strlen $mapinfo_comment) [ - menuitem (concat "Map license comment:" $mapinfo_comment) [ editsvar mapinfo_comment ] - ] [ - menuitem "Edit map license comment..." [ editsvar mapinfo_comment ] - ] - ] [ - menuitem "Select map license..." [ showmenu "Select map license" ] - ] - ] [ - menuitem "menu only available in edit mode" -1 - ] - menuitem "" -1 - menuitem "Show map info..." [ showmenu "Show map info" ] -] - -newmenu [Water colour] -looplisti [red green blue alpha] n [ - menuitemslider (concatword "Water colour (" $n "): ") 0 255 (concat "(at (getwatercolour)" $i ")") 5 [] (concat setwatercolour $i "$arg1") -] - -newmenu [Fog colour] -looplist [red 0xff0000 0x10000 green 0xff00 0x100 blue 0xff 1] [n m f] [ - menuitemslider (concatword "Fog colour (" $n "): ") 0 255 (concat "(div (&b $fogcolour " $m ")" $f ")") 5 [] (concat "__enableautomapconfig ; fogcolour (|b (&b $fogcolour" (^b 0xffffff $m) ") (* $arg1" $f "))") -] - -tempalias __showorigin 0 -tempalias __colororigin [ result (concatword " \fs\f" (if (strcmp $arg1 official) 4 2) "<" $arg1 ">\fr") ] - -// Map config operations -newmenu [Map config operations] - -menuitem "Edit mapmodel slot..." [ showmenu [Edit mapmodel slots] ] -menuitem "Delete unused mapmodel slot..." [ showmenu [Delete unused mapmodel slot] ] -menuitem "" -1 -menuitem "Edit texture slot..." [ showmenu [Edit texture slots] ] -menuitem "" -1 -menuitem "Edit mapsound slot..." [ showmenu [Edit mapsound slots] ] -menuitem "" -1 -menuitem "Delete ALL unused mapmodel slots" [loop ii 256 [ push i (- 255 $ii) ; if (&& (strlen (mapmodelslotname $i)) (strcmp "" (mapmodelslotusage $i))) [deletemapmodelslot $i] ; pop i]] -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 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" -menuitemcheckbox "Show media file origin/distribution" "$__showorigin" [ __showorigin = $arg1 ; mapmodelchanged 1 ] - -// Map checks -newmenu [Map checks and statistics] -menuinit [ - resetcurmenu - if $editing [ - menuitem "Map area checks..." [ showmenu [Map area checks] ] - menuitem "Entity statistics" [ showmenu [Entity statistics] ] - menuitem "Check mapmodels with unconfigured custom textures" [ showmenu [Walk mapmodel entities with unconfigured custom textures] ] - menuitem "Show most visible textures" [ showmenu [Most visible textures] ] - menuitem "Cycle through spawn points" [ gotonextplayerstart ] - ] [ - menuitem "menu only available in edit mode" -1 - ] -] - -tempalias __lastwatchedmapmodel "" -tempalias __mmslot "" - -// Edit mapmodel slots -newmenu [Edit mapmodel slots] -menuinit __rebuildmapmodelmenus - -// Edit mapmodel slot -newmenu [Edit mapmodel slot] -menuinit [ - resetcurmenu - if (strlen $__mmslot) [ - push info (editmapmodelslot $__mmslot) - menuheader "" (concatword "edit mapmodel slot #" $__mmslot ":\n" (mapmodelslotname $__mmslot)) - 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 - looplist [defaults "Defaults:" usage "Usage:" license "License:" version "Version:" requires "Requires:"] [attr hd] [ // also possible: desc "Desc:" author "Author:" - attr = (getmapmodelattributes (mapmodelslotname $__mmslot) $attr) - if (strlen $attr) [ - menuitem (concat $hd $attr) -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 "" -1 - menuitem "Duplicate slot" (concat mapmodel $info) - ] [ - menuitem "\f3Unassigned slot" -1 - ] - if (strlen (mapmodelslotusage $__mmslot)) [ - menuitem "" -1 (concat gotoposition (gotoposition)) - looplist (mapmodelslotusage $__mmslot) ii [ - menuitem (concatword "slot used by map entity #" $ii) (concat gotoentity $ii) (concat gotoentity $ii) - ] - if (strcmp " " (mapmodelslotusage $__mmslot)) [ - menuitem "(this model is required by another model)" -1 - ] - menuitem "" -1 (concat gotoposition (gotoposition)) - ][ - menuitem "" -1 - menuitem "\f3Delete unused slot" (concat deletemapmodelslot $__mmslot) - ] - pop info - ][ - menuitem "no slot selected" -1 - ] -] - -// Delete unused mapmodel slot -newmenu [Delete unused mapmodel slot] -menuinit __rebuildmapmodelmenus - -tempalias __lastwatchedtexture "" -tempalias __texslot "" - -// Edit texture slots -newmenu [Edit texture slots] -menuinit [ - resetcurmenu - menurenderoffset -20 0 - if $editing [ - push ecurmenu (escape (curmenu)) - push info "" - push origin "" - looplisti (textureslotusagelist) [cnt used] [ - info = (edittextureslot $i) - if $__showorigin [ origin = (__colororigin (gettextureorigin (at $info 1))) ] - if (|| $cnt (strlen $info)) [ - if (! (strlen $info)) [ info = " \fs\f3\fr" ] - menuitem (concatword "edit texture slot #" $i ": " $info " (" $cnt " uses, " $used " visible)" $origin) (concat __texslot = $i "; showmenu [Edit texture slot]") (concat chmenutexture $ecurmenu (at $info 1)) - ] - ] - pop info ecurmenu origin - ] [ - menuitem "menu only available in edit mode" -1 - ] -] - -tempalias __defaultskymapdummy kurt/klite1.jpg - -// Edit texture slot -newmenu [Edit texture slot] -menuinit [ - resetcurmenu - if (strlen $__texslot) [ - push info (edittextureslot $__texslot) // " " - chmenutexture (curmenu) (at $info 1) - menurenderoffset -20 0 - menuheader "" (concatword "edit texture slot #" $__texslot ":\n" (at $info 1)) - menuitemtextinput "Scaling factor [0..4] " (at $info 0) [edittextureslot $__texslot $arg1] - menuitem "\f4factor 0 means default (1.0)" -1 - menuitem "" -1 - menuitem (concat "Distribution:" (gettextureorigin (at $info 1))) -1 - menuitem "" -1 - menuitemtextinput "Texture path " (concat result (at $info 1)) [edittextureslot $__texslot "" $arg1] "" 250 - if (&& (strlen $__lastwatchedtexture) (! (strcmp $__lastwatchedtexture (at $info 1)))) [ - menuitem (concat " change to" (escape $__lastwatchedtexture)) [edittextureslot $__texslot "" $__lastwatchedtexture] - ] - if (&& (! $__texslot) (! (strcmp $__defaultskymapdummy (at $info 1)))) [ - menuitem (concat " change to skymap default" (escape $__defaultskymapdummy)) [edittextureslot $__texslot 0 $__defaultskymapdummy] - ] - menuitem "" -1 - menuitem "use as next (upper-)wall texture" [edittexturestack wall $__texslot] - menuitem "use as next floor texture" [edittexturestack floor $__texslot] - menuitem "use as next ceiling texture" [edittexturestack ceiling $__texslot] - push __usage (textureslotusage $__texslot) - if (&& $__texslot (listlen $__usage)) [ - menuitem "" -1 (concat gotoposition (gotoposition)) - looplist $__usage ii [ - menuitem (concatword "slot used by map entity #" $ii) (concat gotoentity $ii) (concat gotoentity $ii) - ] - menuitem "" -1 (concat gotoposition (gotoposition)) - ] - if (strlen (pop __usage)) [ - if (> (listlen (textureslotbyname (at $info 1))) 1) [ - menuitem "" -1 - menuitem "Merge multiple slots using same texture" [showmenu "Texture slot merge"] - ] - pop slots - ] [ - menuitem "" -1 - menuitem "\f3Delete unused slot" (concat deletetextureslot $__texslot) - ] - if (! (strcmp $__lastwatchedtexture (at $info 1))) [ - menuitem "" -1 - menuitem (concat "Pick texture name" (at $info 1)) (concat __lastwatchedtexture = (escape (at $info 1))) - ] - if (! $__texslot) [ - menuitem "" -1 - menuitem (concat "Slot #0 is hardcoded as skymap, please use" $__defaultskymapdummy) -1 - ] [ - if (< $__texslot 5) [ - menuitem "" -1 - menuitem (concatword "Slot #" $__texslot " is the default " (at ["" "cube 1 water" "wall" "floor" "ceiling"] $__texslot) " texture") -1 - ] - ] - pop info - ][ - menuitem "no slot selected" -1 - ] -] - -tempalias __tex_joined "" -tempalias __tex_togo "" - -newmenu "Texture slot merge" -menuinit [ - resetcurmenu - if (strlen $__texslot) [ - push info (edittextureslot $__texslot) // " " - chmenutexture (curmenu) (at $info 1) - menurenderoffset -20 0 - menuheader "" (concatword "merge texture slots using\n" (at $info 1)) - menuitem (concat "Slots using texture" (at $info 1)) -1 - push slots (textureslotbyname (at $info 1)) - push usemap (textureslotusagelist) - menuitem "" -1 - push last (- (listlen $slots) 1) - __tex_togo = (at $slots 0) - __tex_joined = (at $slots $last) - looplist $slots ii [ - menuitem (concatword " #" $ii ": " (edittextureslot $ii) " (" (at $usemap (* $ii 2)) " uses, " (at $usemap (+ (* $ii 2) 1)) " visible)") (concat alias __texslot $ii "; showmenu [Edit texture slot]") - ] - menuitem "" -1 - menuitem "Merge" -1 - menuitemslider " slot #" 0 $last 0 1 $slots (concat "__tex_togo = (at" (escape $slots) "$arg1)") - menuitem "into" -1 - menuitemslider " slot #" 0 $last $last 1 $slots (concat "__tex_joined = (at" (escape $slots) "$arg1)") - menuitem " \f0[OK]" [if (!= $__tex_joined $__tex_togo) [deletetextureslot $__tex_togo purge $__tex_joined]] - pop info slots usemap last - ][ - menuitem "no slot selected" -1 - ] -] - -// Texture browsing menus -newmenu textures -menuitem "Browse official textures" [ showmenu "Official textures" ] -menuitem "Browse custom/downloaded textures" [ showmenu "Custom textures" ] -menuitem "Edit texture slots of current map" [ showmenu "Edit texture slots" ] -menuitem "Set notexture" [ showmenu "Set notexture" ] - -newmenu "Official textures" -menuinit __rebuildtexturemenus - -newmenu "Custom textures" -menuinit __rebuildtexturemenus - -newmenu "Pick texture" -menuinit [ - resetcurmenu - if (strlen $__lastwatchedtexture) [ - chmenutexture (curmenu) $__lastwatchedtexture - push usedslots (textureslotbyname $__lastwatchedtexture) - menuitem (concat "Texture:" $__lastwatchedtexture) -1 - menuitem (concat "Distribution:" (gettextureorigin $__lastwatchedtexture)) -1 - menuitem "" -1 - if (strlen $usedslots) [ - menuitem "Texture is already used in:" -1 - looplist $usedslots i [ - menuitem (concatword " slot #" $i " (scale " (at (edittextureslot $i) 0) ")") (concat "__texslot =" $i "; showmenu [Edit texture slot]") - ] - menuitem "" -1 - usedslots = "once more" - ] - if (! (strlen (edittextureslot 255))) [ - menuitem (concat "Add to map config" $usedslots) (concat texture 0 $__lastwatchedtexture) - menuitem "Add to map config and use as next wall texture" (concat "edittexturestack wall (texture 0" $__lastwatchedtexture ")") - menuitem "Add to map config and use as next floor texture" (concat "edittexturestack floor (texture 0" $__lastwatchedtexture ")") - menuitem "Add to map config and use as next ceiling texture" (concat "edittexturestack ceiling (texture 0" $__lastwatchedtexture ")") - ] [ - menuitem "\f4(no free texture slots available)" -1 - ] - pop usedslots - ][ - menuitem "no texture selected" -1 - ] -] - -newmenu "Set notexture" -menuinit [ - resetcurmenu - menurenderoffset -20 0 - push m (escape (curmenu)) - push t (concat chmenutexture $m "[]") - if (strlen (getnotexture)) [ - menuitem (concat Current notexture: (getnotexture)) (concat loadnotexture (getnotexture)) (concat chmenutexture $m (getnotexture)) - ] - menuitem "Reset notexture" loadnotexture $t // no preview possible - menuitem "" -1 $t - menuitem "\f1Pick a notexture to highlight the areas" -1 $t - looplist (gettexturelist "map_editor/marker" "" ".png") [tpath tname td] [ - fullname = (concatword $tpath "/" $tname) - menuitem (concat Set notexture to $tname) (concat loadnotexture (escape $fullname)) (concat chmenutexture $m (escape $fullname)) - ] - menuitem "" -1 $t - menuitem "\f1Pick a notexture for actual use" -1 $t - menuitem "\f4(as default texture, if custom texture downloads fail)" -1 $t - looplist (concat makke/rock.jpg makke/concrete.jpg (at (edittextureslot 2) 1) (at (edittextureslot 3) 1) (at (edittextureslot 4) 1) $__lastwatchedtexture) fn [ - menuitem (concat Set notexture to $fn) (concat loadnotexture (escape $fn)) (concat chmenutexture $m (escape $fn)) - ] - pop m t -] - -// Browse mapsounds -newmenu [Ambient sounds] -menuitem "Browse official mapsounds" [ showmenu "Official mapsounds" ] -menuitem "Browse custom/downloaded mapsounds" [ showmenu "Custom mapsounds" ] -menuitem "Edit mapsound slots of current map" [ showmenu "Edit mapsound slots" ] - -newmenu "Official mapsounds" -menuinit __rebuildmapsoundmenus - -newmenu "Custom mapsounds" -menuinit __rebuildmapsoundmenus - -tempalias __lastwatchedmapsound "" -tempalias __sndslot "" - -newmenu "Pick mapsound" -menuinit [ - resetcurmenu - if (strlen $__lastwatchedmapsound) [ - push usedslots (mapsoundslotbyname $__lastwatchedmapsound) - menuitem (concat "Mapsound:" $__lastwatchedmapsound) -1 - menuitem (concat "Distribution:" (getmapsoundorigin $__lastwatchedmapsound)) -1 - menuitem "" -1 - if (strlen $usedslots) [ - menuitem "Mapsound is already used in" -1 - looplist $usedslots i [ - menuitem (concatword " slot #" $i " (maxuses: " (at (editmapsoundslot $i) 1) ")") (concat "__sndslot =" $i "; showmenu [Edit mapsound slot]") - ] - menuitem "" -1 - usedslots = "once more" - ] - if (! (strlen (editmapsoundslot 255))) [ - menuitem (concat "\f0Add to map config" $usedslots) (concat mapsound $__lastwatchedmapsound -1) - ] [ - menuitem "\f4(no free mapsound slots available)" -1 - ] - pop usedslots - ][ - menuitem "no mapsound selected" -1 - ] -] - -// Edit mapsound slots -newmenu [Edit mapsound slots] -menuinit [ - resetcurmenu - if $editing [ - push info "" - push origin "" - loop i 256 [ - info = (editmapsoundslot $i) - if (strlen $info) [ - if $__showorigin [ origin = (__colororigin (getmapsoundorigin (at $info 0))) ] - menuitem (concatword "edit mapsound slot #" $i ": " $info $origin) (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 origin - ] [ - menuitem "menu only available in edit mode" -1 - ] -] - -tempalias __snd_rad "1" -tempalias __snd_size "0" -tempalias __snd_vol "255" - -newmenu [Edit mapsound slot] -menuinit [ - resetcurmenu - if (strlen $__sndslot) [ - push info (editmapsoundslot $__sndslot) // " " - menuheader "" (concatword "edit mapsound slot #" $__sndslot ":\n" (at $info 0)) - 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 - ] - if (strlen (mapsoundslotusage $__sndslot)) [ - menuitem "" -1 (concat gotoposition (gotoposition)) - looplist (mapsoundslotusage $__sndslot) ii [ - menuitem (concatword "slot used by map entity #" $ii) (concat gotoentity $ii) (concat gotoentity $ii) - ] - menuitem "" -1 (concat gotoposition (gotoposition)) - ][ - menuitem "" -1 - menuitem "\f3Delete unused slot" (concat deletemapsoundslot $__sndslot) - ] - pop info - ][ - menuitem "no slot selected" -1 - ] -] - -// "closestenttype" slider... -_closestentslider = [ closestenttype (at ["" light playerstart pistol ammobox grenades health armour akimbo mapmodel ladder ctf-flag sound clip helmet plclip] $arg1); _closestenttypestatus = $arg1 ] - -newmenu [Editing settings] -menuitemslider "Grid/Selection style: " 0 1 "$oldselstyle" 1 [triangles "squares (default)"] [ oldselstyle $arg1 ] -menuitemcheckbox "Show mapmodel clippings: " "$showmodelclipping" [ showmodelclipping $arg1 ] -menuitemcheckbox "Show ladder entities: " "$showladderentities" [ showladderentities $arg1 ] -menuitemcheckbox "Show all playerstarts (spawn points): " "$showplayerstarts" [ showplayerstarts $arg1 ] -menuitemslider "Fly speeds multiplier: " 1 5 "$flyspeed" 1 [] [ flyspeed $arg1 ] -// opt/autosave.cfg may add some entries - -newmenu [Editing misc] -menuitem "Load batch map conversion tools" load_convmap [] "\f4(checking and editing of entire map collections)" -menuitem "Load extra map editing scripts" load_mapeditscripts [] "\f4(expert tools for hardcore map optimisations)" -menuitem "Rebuild list of mapmodels" [ echo "\f1This will take a few seconds..." ; sleep 99 [ mapmodelregistryclear ; loadallmapmodels ; echo "\f1Done." ] ] [] "\f2Use this after manually adding or removing mapmodels\nfrom your profile directory. May throw some errors." - -newmenu [Editing keys] -menuitem "Select an action and press ENTER to bind a new key:" -1 -menuitem "" -1 -menuitem "\f2Mousewheel editing:" -1 -menuitemeditkeyinput [Move entity: ] editkey_scroll_moveent -menuitemeditkeyinput [Change vdelta: ] editkey_scroll_vdelta -menuitemeditkeyinput [Change wall/upper wall texture: ] editkey_scroll_walluppertex -menuitemeditkeyinput [Change floor/ceiling texture: ] editkey_scroll_floorceiltex -menuitem "\f4(Keys '1' thru '7' edit entity attributes)" -1 -menuitem "" -1 -menuitem "\f2Edit all selected cubes:" -1 -menuitemeditkeyinput [Make cubes 'solid': ] editkey_cubes_solid -menuitemeditkeyinput [Make cubes 'space': ] editkey_cubes_space -menuitemeditkeyinput [Make cubes 'floor heightfield': ] editkey_cubes_hf_floor -menuitemeditkeyinput [Make cubes 'ceiling heightfield': ] editkey_cubes_hf_ceiling -menuitemeditkeyinput [Make cubes 'corner': ] corner -menuitem "" -1 -menuitemeditkeyinput [Move floor down: ] editkey_move_floor_down -menuitemeditkeyinput [Move floor up: ] editkey_move_floor_up -menuitemeditkeyinput [Move ceiling down: ] editkey_move_ceiling_down -menuitemeditkeyinput [Move ceiling up: ] editkey_move_ceiling_up -menuitemeditkeyinput [Decrease vdelta: ] editkey_vdelta_down -menuitemeditkeyinput [Increase vdelta: ] editkey_vdelta_up -menuitemeditkeyinput [Equalize floor: ] editkey_equalize_floor -menuitemeditkeyinput [Equalize ceiling: ] editkey_equalize_ceiling -menuitem "" -1 -menuitemeditkeyinput [Texture on floor forward: ] editkey_floortex_up -menuitemeditkeyinput [Texture on floor previous: ] editkey_floortex_dn -menuitemeditkeyinput [Texture on wall forward: ] editkey_walltex_up -menuitemeditkeyinput [Texture on wall previous: ] editkey_walltex_dn -menuitemeditkeyinput [Texture on ceiling forward: ] editkey_ceiltex_up -menuitemeditkeyinput [Texture on floor previous: ] editkey_ceiltex_dn -menuitemeditkeyinput [Texture on upper wall forward: ] editkey_uppertex_dn -menuitemeditkeyinput [Texture on upper wall previous: ] editkey_uppertex_up -menuitem "" -1 -menuitem "\f2Misc editing keys:" -1 -menuitemkeyinput [Enter edit mode: ] edittoggle -menuitemeditkeyinput [Exit edit mode: ] edittoggle -menuitemeditkeyinput [Show editing menu: ] editkey_show_menu -menuitemeditkeyinput [Show lighting menu: ] editkey_show_menu_light -menuitem "" -1 -menuitemeditkeyinput [1st meta key: ] editmeta -menuitemeditkeyinput [2nd meta key: ] editkey_editmeta2 -menuitem "" -1 -menuitemeditkeyinput [Occlusion culling on/off: ] toggleocull -menuitemeditkeyinput [Mip display on/off: ] showmip -menuitemeditkeyinput [Fullbright on/off: ] editkey_fullbright -menuitemeditkeyinput [Show cube details on/off: ] showfocuscubedetails -menuitem "" -1 -menuitemeditkeyinput [Copy selected cubes: ] copy -menuitemeditkeyinput [Paste cubes: ] paste -menuitemeditkeyinput [Undo geometry changes: ] undo -menuitemeditkeyinput [Redo: ] redo -menuitem "" -1 -menuitemeditkeyinput [Pin/unpin closest entity: ] toggleclosestentpin -menuitemeditkeyinput [Delete entity: ] editkey_delete_entity -menuitemeditkeyinput [Copy entity: ] copyent -menuitemeditkeyinput [Paste entity: ] pasteent -menuitemeditkeyinput [Edit entity: ] editent -menuitemeditkeyinput [Cycle through TODO entities: ] editkey_scroll_todoents -menuitemeditkeyinput [Cycle through spawns: ] editkey_scroll_spawns -menuitem "" -1 -menuitem "\f2Tag clips:" -1 -menuitemeditkeyinput [Show tag clip volume: ] showtagclipfocus -menuitemeditkeyinput [Remove tag clip: ] editkey_tagclip_none -menuitemeditkeyinput [Create tag 'playerclip': ] editkey_tagclip_plclip -menuitemeditkeyinput [Create tag 'clip': ] editkey_tagclip_clip -menuitem "" -1 -menuitemtextinput [Lookup a keyeditbind: ] [] [ - if (strlen $arg1) [ - echo (concatword "\f9Contents of keyeditbind " (addpunct $arg1) :) - if (strcmp (result (keyeditbind $arg1)) "") [ - echo (addpunct $arg1) is not bound - ][ - echo (keyeditbind $arg1) - ] - ] -] [] 256 -menuitem [] -1 -menuitem [Alternate edit binds...] [ showmenu [Alternate edit binds] ] - -// deleted entities -newmenu "deleted entities" -menuinit [ - resetcurmenu - if (unlistdeletedentity) [ - looplisti (getdeletedentities) [type x y z a1 a2 a3 a4 a5 a6 a7] [ - push desc (concat $type (concatword "[" $x "|" $y "|" $z "]") (concatword "(" $a1 ", " $a2 ", " $a3 ", " $a4 ", " $a5 ", " $a6 ", " $a7 ")")) - if (strcmp $type mapmodel) [desc = (concat $desc (mapmodelslotname $a2))] - if (&& $editing (strcmp $type sound)) [desc = (concat $desc (at (editmapsoundslot $a1) 0))] - if $editing [ - menuitem (pop desc) (concat gotoposition $x $y $z $a1 0 ";" undelent $i) - ][ - menuitem (pop desc) -1 - ] - ] - menuitem "\f3clear this list" "unlistdeletedentity all" - ] [ - menuitem "no deleted entities" -1 - ] -] - -// todo entities -newmenu "TODO entities" -menuinit [ - resetcurmenu - push h 1 - looplisti (enumtodoentities) [n desc] [ - if $editing [ - menuitem (concatword "Entity #" $n ": \fs\f4" (editentity $n) "\fr " $desc) (concat gotoentity $n "; echo" (escape $desc)) - ][ - menuitem (concatword "Entity #" $n ": " $desc) -1 - ] - h = 0 - ] - if (pop h) [ - menuitem "no TODO entities" -1 - ][ - menuitem "" -1 - menuitem "\f3Clear list of TODO entities" cleartodoentities - ] -] - -// 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 @@ -1006,6 +184,125 @@ tempalias __rebuildmapmodelmenus [ ] ] + +//// Main > Editing > Lighting //// + +newmenu Lighting +menuitem "Add white lights " [ showmenu [White light] ] +menuitem "Add coloured lights " [ showmenu [Coloured light] ] +menuitem "" -1 +menuitemcheckbox "Enable fullbright: " "$fullbright" [ fullbright $arg1 ] + +//// Main > Editing > Lighting > White light //// + +newmenu [White light] +__wlight = 1; __wlight1 = 1 +menuitemslider "Light radius: " 1 32 "$__wlight" 1 [] [ __wlight = $arg1 ] +menuitemslider "Brightness: " 1 255 "$__wlight1" 5 [] [ __wlight1 = $arg1 ] +menuitem "" -1 +menuitem "\f2\t [ OK ]\t\t" [ newent light $__wlight $__wlight1 ] + +//// Main > Editing > Lighting > Coloured light //// + +newmenu [Coloured light] +__clight = 1; __clight1 = 1; __clight2 = 1; __clight3 = 1 +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 "\f2\t\t [ OK ]" [ newent light $__clight $__clight1 $__clight2 $__clight3 ] + + +//// Main > Editing > Entities //// + +newmenu Entities +menuitem "Place RVSF spawn point" [ newent playerstart 1 ] +menuitem "Place CLA spawn point" [ newent playerstart 0 ] +menuitem "Place FFA spawn point" [ newent playerstart 100 ] +menuitemcheckbox "Show all spawn points: " "$showplayerstarts" [ showplayerstarts $arg1 ] +menuitem "" -1 +menuitem "Place RVSF CTF Flag" [ newent ctf-flag 1 ] +menuitem "Place CLA CTF Flag" [ newent ctf-flag 0 ] +menuitem "" -1 +menuitem "Place ladder entity" "saycommand /newent ladder " [ echo "Ensure that you have placed the ladder mapmodel first (found in the mapmodels menu)\i\3" ] +menuitem "Place clip entity\i\3" [ showmenu Clips ] +menuitem "" -1 +menuitem "Show list of TODO entities\i\3" [ showmenu "TODO entities" ] +menuitem "Show list of deleted entities\i\3" [ showmenu "Deleted entities" ] + +//// Main > Editing > Entities > Clips //// + +newmenu Clips +alias _clip01 0 ; alias _clip02 1 ; alias _clip03 1 ; alias _clip04 1 ; alias _clip05 0 ; alias _clip06 0 ; alias _clip07 0 +menuinit [ + resetcurmenu + menusynctabstops 1 + if (! $editing) [ menuheader "" "\f3not in edit mode" ] + menuitemslider "Elevation from ground: " 0 50 "$_clip01" 1 [] [ _clip01 = $arg1 ] + menuitemslider "Length (X): \t" 0 50 "$_clip02" 1 [] [ _clip02 = $arg1 ] + menuitemslider "Width (Y):\t" 0 50 "$_clip03" 1 [] [ _clip03 = $arg1 ] + menuitemslider "Height (Z):\t" 0 50 "$_clip04" 1 [] [ _clip04 = $arg1 ] + menuitemslider "Slope:\t" -4 4 "$_clip06" 1 [] [ _clip06 = $arg1 ] + menuitemslider "Shape:\t" 0 3 "$_clip07" 1 "regular sloped-x sloped-y rotated" [ _clip07 = $arg1 ] + menuitem "" -1 + menuitem "\f2\t [ Place clip entity ]" [ newent clip $_clip01 $_clip02 $_clip03 $_clip04 _clip05 $_clip06 $_clip07 ] + menuitem "\f2\t [ Place player clip entity]" [ newent plclip $_clip01 $_clip02 $_clip03 $_clip04 _clip05 $_clip06 $_clip07 ] + if $editing [ + push x (editentity (getclosestent)) + if (|| (strcmp (at $x 0) clip) (strcmp (at $x 0) plclip)) [ + menuitem "" -1 + menuitem (concat "Pick clip size from closest entity:" (at $x 4) (at $x 5) (at $x 6) (at $x 7) (at $x 9) (at $x 10)) [ loop i 7 [ (concatword _clip0 (+ $i 1)) = (at $x (+ $i 4)) ] ; refreshcurmenudelayed ] + ] + ] +] + +//// Main > Editing > Entities > TODO entities //// + +newmenu "TODO entities" +menuinit [ + resetcurmenu + push h 1 + looplisti (enumtodoentities) [n desc] [ + if $editing [ + menuitem (concatword "Entity #" $n ": \fs\f4" (editentity $n) "\fr " $desc) (concat gotoentity $n "; echo" (escape $desc)) + ][ + menuitem (concatword "Entity #" $n ": " $desc) -1 + ] + h = 0 + ] + if (pop h) [ + menuitem "no TODO entities" -1 + ][ + menuitem "" -1 + menuitem "\f3Clear list of TODO entities" cleartodoentities + ] +] + + +//// Main > Editing > Pickups //// + +newmenu Pickups +menuheader "" "\f4place pickup entities" +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 ] + + +//// Main > Editing > Textures //// + +newmenu Textures +menuitem "Browse official textures" [ showmenu "Official textures" ] +menuitem "Browse custom/downloaded textures" [ showmenu "Custom textures" ] +menuitem "Edit texture slots of current map" [ showmenu "Edit texture slots" ] +menuitem "Set notexture" [ showmenu "Set notexture" ] + +tempalias __lastwatchedtexture "" ; tempalias __texslot "" tempalias __rebuildtexturemenus [ if $rereadtexturelists [ delmenu "Official textures" @@ -1034,6 +331,121 @@ tempalias _texmenu_hover [ chmenutexture $arg2 $arg1 ] +//// Main > Editing > Textures > Official textures //// + +newmenu "Official textures" +menuinit __rebuildtexturemenus + +//// Main > Editing > Textures > Custom textures //// + +newmenu "Custom textures" +menuinit __rebuildtexturemenus + +//// Main > Editing > Textures > Official|Custom textures > Pick texture //// + +newmenu "Pick texture" +menuinit [ + resetcurmenu + if (strlen $__lastwatchedtexture) [ + chmenutexture (curmenu) $__lastwatchedtexture + push usedslots (textureslotbyname $__lastwatchedtexture) + menuitem (concat "Texture:" $__lastwatchedtexture) -1 + menuitem (concat "Distribution:" (gettextureorigin $__lastwatchedtexture)) -1 + menuitem "" -1 + if (strlen $usedslots) [ + menuitem "Texture is already used in:" -1 + looplist $usedslots i [ + menuitem (concatword " slot #" $i " (scale " (at (edittextureslot $i) 0) ")") (concat "__texslot =" $i "; showmenu [Edit texture slot]") + ] + menuitem "" -1 + usedslots = "once more" + ] + if (! (strlen (edittextureslot 255))) [ + menuitem (concat "Add to map config" $usedslots) (concat texture 0 $__lastwatchedtexture) + menuitem "Add to map config and use as next wall texture" (concat "edittexturestack wall (texture 0" $__lastwatchedtexture ")") + menuitem "Add to map config and use as next floor texture" (concat "edittexturestack floor (texture 0" $__lastwatchedtexture ")") + menuitem "Add to map config and use as next ceiling texture" (concat "edittexturestack ceiling (texture 0" $__lastwatchedtexture ")") + ] [ + menuitem "\f4(no free texture slots available)" -1 + ] + pop usedslots + ][ + menuitem "no texture selected" -1 + ] +] + +//// Main > Editing > Textures > Set notexture //// + +newmenu "Set notexture" +menuinit [ + resetcurmenu + menurenderoffset -20 0 + push m (escape (curmenu)) + push t (concat chmenutexture $m "[]") + if (strlen (getnotexture)) [ + menuitem (concat Current notexture: (getnotexture)) (concat loadnotexture (getnotexture)) (concat chmenutexture $m (getnotexture)) + ] + menuitem "Reset notexture" loadnotexture $t // no preview possible + menuitem "" -1 $t + menuitem "\f1Pick a notexture to highlight the areas" -1 $t + looplist (gettexturelist "map_editor/marker" "" ".png") [tpath tname td] [ + fullname = (concatword $tpath "/" $tname) + menuitem (concat Set notexture to $tname) (concat loadnotexture (escape $fullname)) (concat chmenutexture $m (escape $fullname)) + ] + menuitem "" -1 $t + menuitem "\f1Pick a notexture for actual use" -1 $t + menuitem "\f4(as default texture, if custom texture downloads fail)" -1 $t + looplist (concat makke/rock.jpg makke/concrete.jpg (at (edittextureslot 2) 1) (at (edittextureslot 3) 1) (at (edittextureslot 4) 1) $__lastwatchedtexture) fn [ + menuitem (concat Set notexture to $fn) (concat loadnotexture (escape $fn)) (concat chmenutexture $m (escape $fn)) + ] + pop m t +] + + +//// Main > Editing > Skymaps //// + +newmenu Skymaps +menuinit [ + resetcurmenu + if (&& $editing (! (getautomapconfig))) [ + menuitem [Enable automapconfig to make changes permanent] [automapconfig ; closemenu (curmenu)] (concat loadsky (escape $loadsky)) + menuitem "" -1 (concat loadsky (escape $loadsky)) + ] + menuitem (concat "Current skymap:" $loadsky) (concat loadsky (escape $loadsky)) + menuitem "" -1 (concat loadsky (escape $loadsky)) + push offskies "" + push userskies "" + push skyname "" + looplist (gettexturelist skymaps/ "" _ft.jpg) [c1 c2 c3 c4] [ + skyname = (escape (concatword $c3 "/" $c4)) + if (strcmp official (gettextureorigin (concatword $c1 "/" $c2))) [ + offskies = (concat $offskies $skyname) + ] [ + userskies = (concat $userskies $skyname) + ] + ] + menuitem "Official skymaps:" -1 (concat loadsky (escape $loadsky)) + looplist $offskies skyname [ + menuitem (concat " " $skyname) (concat loadsky $skyname) (concat loadsky $skyname) + ] + if (strlen $userskies) [ + menuitem "" -1 (concat loadsky (escape $loadsky)) + menuitem "Custom/downloaded skymaps:" -1 (concat loadsky (escape $loadsky)) + looplist $userskies skyname [ + menuitem (concat " " $skyname) (concat loadsky (escape $skyname)) (concat loadsky (escape $skyname)) + ] + ] + pop offskies userskies skyname +] + + +//// Main > Editing > Ambient sounds //// + +newmenu [Ambient sounds] +menuitem "Browse official mapsounds" [ showmenu "Official mapsounds" ] +menuitem "Browse custom/downloaded mapsounds" [ showmenu "Custom mapsounds" ] +menuitem "Edit mapsound slots of current map" [ showmenu "Edit mapsound slots" ] + tempalias __mapsoundtitles [ cavedrip.ogg "Cave drip" distant_cars.ogg "Cars driving in the distance" @@ -1109,6 +521,546 @@ tempalias _sndmenu_exec [ if $editing [ showmenu "Pick mapsound" ] ] +//// Main > Editing > Ambient sounds > Official mapsounds //// + +newmenu "Official mapsounds" +menuinit __rebuildmapsoundmenus + +//// Main > Editing > Ambient sounds > Custom mapsounds //// + +newmenu "Custom mapsounds" +menuinit __rebuildmapsoundmenus + +//// Main > Editing > Ambient sounds > Official|Custom mapsounds > Pick mapsound //// + +newmenu "Pick mapsound" +tempalias __lastwatchedmapsound "" ; tempalias __sndslot "" +menuinit [ + resetcurmenu + if (strlen $__lastwatchedmapsound) [ + push usedslots (mapsoundslotbyname $__lastwatchedmapsound) + menuitem (concat "Mapsound:" $__lastwatchedmapsound) -1 + menuitem (concat "Distribution:" (getmapsoundorigin $__lastwatchedmapsound)) -1 + menuitem "" -1 + if (strlen $usedslots) [ + menuitem "Mapsound is already used in" -1 + looplist $usedslots i [ + menuitem (concatword " slot #" $i " (maxuses: " (at (editmapsoundslot $i) 1) ")") (concat "__sndslot =" $i "; showmenu [Edit mapsound slot]") + ] + menuitem "" -1 + usedslots = "once more" + ] + if (! (strlen (editmapsoundslot 255))) [ + menuitem (concat "\f0Add to map config" $usedslots) (concat mapsound $__lastwatchedmapsound -1) + ] [ + menuitem "\f4(no free mapsound slots available)" -1 + ] + pop usedslots + ][ + menuitem "no mapsound selected" -1 + ] +] + + +//// Main > Editing > Arches //// + +looplist [__slopeaxis 0 __slopeinc 4 __stairaxis 0 __stairwidth 1 __undoarch "" __archside 1] [n v] [tempalias $n $v] +tempalias __setundoarch [ __undoarch = (concat select (at (selx) 0) (at (sely) 0) (at (selxs) 0) (at (selys) 0) "; if (= (undolevel)" (+ (undolevel) 2) ") [ undolevel" (undolevel) "]") ] +newmenu Arches +menuinit [ chmenutexture (curmenu) map_editor/axes.png " " ] +menuitemslider "Arch sideways curve delta: " 0 5 "$__archside" 1 [] [ __archside = $arg1 ] +menuitem "\t[ Place arch ]" [ __setundoarch ; heightfield 2; arch $__archside ] +menuitem "Edit arches\i\3" [ showmenu "Edit arches" ] +menuitem "" -1 +menuitemslider "Slope axis: " 0 1 "$__slopeaxis" 1 ["West to East (X)" "North to South (Y)"] [ __slopeaxis = $arg1 ] +menuitemslider "Slope increment: " 0 5 "$__slopeinc" 1 ["downwards 3" "downwards 2" "downwards 1" "upwards 1" "upwards 2" "upwards 3"] [ __slopeinc = $arg1 ] +menuitem "\t[ Place slope ]" [ __setundoarch ; heightfield 0; push i (at "3 2 1 -1 -2 -3" $__slopeinc) ; slope (if $__slopeaxis 0 $i) (if $__slopeaxis $i 0) ; pop i ; 0] +menuitem "" -1 +menuitem "Clear heightfielding" [ solid 0; slope 0 0 ] +menuitem "Undo last placed arch or slope" [ __undoarch ; -1 ] +menuitemcheckbox "Automatically enlarge selections after placing arches and slopes" "$enlargearchslopeselections" [ enlargearchslopeselections $arg1 ] +menuitem "Enlarge selections now" enlargevdeltaselections +menuitem "" -1 +menuitemslider "Stairs axis: " 0 1 "$__stairaxis" 1 ["West to East (X)" "North to South (Y)"] [ __stairaxis = $arg1 ] +menuitemslider "Step width: " 0 5 "$__stairwidth" 1 ["downwards 3" "downwards 2" "downwards 1" "upwards 1" "upwards 2" "upwards 3"] [ __stairwidth = $arg1 ] +menuitem "\t[ Place stairs ]" [ push i (at "-3 -2 -1 1 2 3" $__stairwidth) ; stairs (if $__stairaxis 0 $i) (if $__stairaxis $i 0) ; pop i ; 0] + +//// Main > Editing > Arches > Edit arches //// + +tempalias __pickarch 2 +tempalias __listarch [ push ii "" ; loop i $arg1 [ if $i [ ii = (concat $ii (archvertex $arg1 $i)) ] ] ; result (pop ii) ] +newmenu "Edit arches" +menuinit [ + resetcurmenu + loop i 50 [ + if (> $i 1) [ + menuitem (concatword "arch width " $i ": " (__listarch $i)) (concat __pickarch = $i "; showmenu [Edit arch]") + ] + ] +] + +//// Main > Editing > Arches > Edit arches > Edit arch //// + +newmenu "Edit arch" +menuinit [ + resetcurmenu + menuheader "" (concat "edit arch width" $__pickarch "(symmetrical)") + push ii "" + loop i (div $__pickarch 2) [ + ii = (+ $i 1) + menuitemslider (concat vertex $ii "\t") 0 31 (archvertex $__pickarch $ii) 1 [] (concat archvertex $__pickarch $ii "$arg1 ; archvertex" $__pickarch (- $__pickarch $ii) "$arg1") + ] + pop ii + menuitem "" -1 + menuitem (concat Measure selection for width $__pickarch arch) (concat av (- $__pickarch 1) "(av_measure)") + menuitem "Edit full arch (non-symmetrical)\i\3" [ showmenu "Edit full arch" ] + menuitem "Restore arch of different size (ymmv)\i\3" [ showmenu "Pick custom arch" ] + menuitem "Delete saved custom arch\i\3" [ showmenu "Delete custom arch" ] + menuitem "" -1 + tempalias __archname custom + looplist (enumalias (concatword _arch_ $__pickarch _)) [fn sn] [ + if (= (+ (listlen $$fn) 1) $__pickarch) [ + __archname = $sn + menuitem (concat Restore $sn " " $$fn) (concat av (- $__pickarch 1) (escape $$fn)) + ] + ] + menuitemtextinput "Save arch as " "result $__archname" (concat __archname "= $arg1 ; (concatword _arch_"$__pickarch "_ $arg1) = (__listarch" $__pickarch ")" ) "" 250 +] + +//// Main > Editing > Arches > Edit arches > Edit arch > Edit full arch //// + +newmenu "Edit full arch" +menuinit [ + resetcurmenu + menuheader "" (concat "edit arch width" $__pickarch "(non-symmetrical)") + loop i $__pickarch [ + if $i [ menuitemslider (concat vertex $i "\t") 0 31 (archvertex $__pickarch $i) 1 [] (concat archvertex $__pickarch $i "$arg1") ] + ] +] + +//// Main > Editing > Arches > Edit arches > Edit arch > Pick custom arch //// + +newmenu "Pick custom arch" +menuinit [ + resetcurmenu + menuheader "" (concat "pick custom arch for width" $__pickarch) + looplist (enumalias _arch_) [fn sn] [ menuitem (concat Use "\fs\f2" $sn $$fn "\fr " as width $__pickarch arch) (concat av (- $__pickarch 1) (escape $$fn)) ] +] + +//// Main > Editing > Arches > Edit arches > Edit arch > Delete custom arch //// + +newmenu "Delete custom arch" +menuinit [ + resetcurmenu + looplist (enumalias _arch_) [fn sn] [ menuitem (concat Delete custom arch "\fs\f2" $sn "\fr" $$fn) (concat delalias (escape $fn)) ] +] + + +//// Main > Editing > Map operations //// + +newmenu [Map operations] +alias _closestenttypestatus 0 +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 "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 +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 ] +_closestentslider = [ closestenttype (at ["" light playerstart pistol ammobox grenades health armour akimbo mapmodel ladder ctf-flag sound clip helmet plclip] $arg1); _closestenttypestatus = $arg1 ] + + +//// Main > Editing > Map settings //// + +newmenu [Map settings] +tempalias __enableautomapconfig [ if (&& $editing (! (getautomapconfig))) automapconfig ] +menuinit [ + resetcurmenu + if $editing [ + menuheader "" (concat " Settings for map" (curmap)) + menuitemtextinput (concatword "Water level (" (getvarrange min waterlevel) ".." (getvarrange max waterlevel) ", default " (getvarrange default waterlevel) "):\t") $waterlevel [waterlevel $arg1] + looplisti "red 20 green 25 blue 20 alpha 178" [n v] [ + menuitemtextinput (concatword "Water colour (" $n ", default " $v "):\t") (at (getwatercolour) $i) (concat setwatercolour $n "$arg1") + ] + menuitem "Water colour sliders\i\3" [ showmenu [Water colour] ] + menuitem "" -1 + menuitemtextinput (concatword "Shadow yaw (0..360, default " (getvarrange default shadowyaw) "):\t") $shadowyaw [__enableautomapconfig ; shadowyaw $arg1] + menuitem "" -1 + menuitemtextinput (concatword "Fog distance (" (getvarrange min fog) ".." (getvarrange max fog) ", default " (getvarrange default fog) "):\t") $fog [__enableautomapconfig ; fog $arg1] + menuitemtextinput (concatword "Fog colour (0xrrggbb, default 0x" (h0 6 (getvarrange default fogcolour)) "):\t") (concatword "0x" (h0 6 $fogcolour)) [__enableautomapconfig ; fogcolour $arg1] + menuitem "Fog colour sliders\i\3" [ showmenu [Fog colour] ] + menuitem "" -1 + menuitemtextinput (concatword "Ambient light (0..255 or 0xrrggbb, default 0):\t") (if (< $ambient 256) $ambient (concatword "0x" (h0 6 $ambient))) [ambient $arg1] + menuitem "" -1 + menuitemcheckbox "Map override: Disable water reflection" "$mapoverride_nowaterreflect" [ mapoverride_nowaterreflect $arg1 ] + menuitemcheckbox "Map override: Limit water waveheight" "$mapoverride_limitwaveheight" [ mapoverride_limitwaveheight $arg1 ] + menuitemcheckbox "Map override: Disable stencil shadows" "$mapoverride_nostencilshadows" [ mapoverride_nostencilshadows $arg1 ] + menuitem "" -1 + push n (getnotexture) + if (! (strlen $n)) [n = ] + menuitem (concatword "Notexture:\n" (pop n)) [showmenu "Set notexture"] + menuitem (concatword "Skymap:\n" $loadsky) [showmenu Skymaps] + menuitem "" -1 + if (strlen $mapmsg) [ + menuitem (concat "Map message:" $mapmsg) editmapmsg + ] [ + menuitem "Edit map message..." editmapmsg + ] + if (strlen $mapinfo_license) [ + menuitem (concatword "Map license tag: \"" $mapinfo_license "\"") [ showmenu "Select map license" ] + if (strlen $mapinfo_comment) [ + menuitem (concat "Map license comment:" $mapinfo_comment) [ editsvar mapinfo_comment ] + ] [ + menuitem "Edit map license comment..." [ editsvar mapinfo_comment ] + ] + ] [ + menuitem "Select map license\i\3" [ showmenu "Select map license" ] + ] + ] [ + menuitem "menu only available in edit mode" -1 + ] + menuitem "" -1 + menuitem "Show map info\i\3" [ showmenu "Show map info" ] +] + +//// Main > Editing > Map settings > Water colour //// + +newmenu [Water colour] +looplisti [red green blue alpha] n [ + menuitemslider (concatword "Water colour (" $n "): ") 0 255 (concat "(at (getwatercolour)" $i ")") 5 [] (concat setwatercolour $i "$arg1") +] + +//// Main > Editing > Map settings > Fog colour //// + +newmenu [Fog colour] +looplist [red 0xff0000 0x10000 green 0xff00 0x100 blue 0xff 1] [n m f] [ + menuitemslider (concatword "Fog colour (" $n "): ") 0 255 (concat "(div (&b $fogcolour " $m ")" $f ")") 5 [] (concat "__enableautomapconfig ; fogcolour (|b (&b $fogcolour" (^b 0xffffff $m) ") (* $arg1" $f "))") +] + +//// Main > Editing > Map settings > Select map license //// +//// Main > Editing > Map settings > Show map info //// +// see menus_licenses.cfg + + +//// Main > Editing > Map config operations //// + +newmenu [Map config operations] +tempalias __showorigin 0 ; tempalias __colororigin [ result (concatword " \fs\f" (if (strcmp $arg1 official) 4 2) "<" $arg1 ">\fr") ] +menuitem "Edit mapmodel slot\i\3" [ showmenu [Edit mapmodel slots] ] +menuitem "Delete unused mapmodel slot\i\3" [ showmenu [Delete unused mapmodel slot] ] +menuitem "" -1 +menuitem "Edit texture slot\i\3" [ showmenu [Edit texture slots] ] +menuitem "" -1 +menuitem "Edit mapsound slot\i\3" [ showmenu [Edit mapsound slots] ] +menuitem "" -1 +menuitem "Delete ALL unused mapmodel slots" [loop ii 256 [ push i (- 255 $ii) ; if (&& (strlen (mapmodelslotname $i)) (strcmp "" (mapmodelslotusage $i))) [deletemapmodelslot $i] ; pop i]] +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 mapmodel slots\i\3" [ showmenu [Sort mapmodel slots] ] +menuitem "Sort texture slots\i\3" [ showmenu [Sort texture slots] ] +menuitem "Sort mapsound slots\i\3" [ showmenu [Sort mapsound slots] ] +menuitem "" -1 +menuitem "Update mapmodel menus" "mapmodelchanged 1" +menuitemcheckbox "Show media file origin/distribution" "$__showorigin" [ __showorigin = $arg1 ; mapmodelchanged 1 ] + +//// Main > Editing > Map config operations > Edit mapmodel slots //// + +newmenu [Edit mapmodel slots] +menuinit __rebuildmapmodelmenus + +//// Main > Editing > Map config operations > Edit mapmodel slots > Edit mapmodel slot //// + +newmenu [Edit mapmodel slot] +tempalias __lastwatchedmapmodel "" ; tempalias __mmslot "" +menuinit [ + resetcurmenu + if (strlen $__mmslot) [ + push info (editmapmodelslot $__mmslot) + menuheader "" (concatword "edit mapmodel slot #" $__mmslot ":\n" (mapmodelslotname $__mmslot)) + 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 + looplist [defaults "Defaults:" usage "Usage:" license "License:" version "Version:" requires "Requires:"] [attr hd] [ // also possible: desc "Desc:" author "Author:" + attr = (getmapmodelattributes (mapmodelslotname $__mmslot) $attr) + if (strlen $attr) [ + menuitem (concat $hd $attr) -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 "" -1 + menuitem "Duplicate slot" (concat mapmodel $info) + ] [ + menuitem "\f3Unassigned slot" -1 + ] + if (strlen (mapmodelslotusage $__mmslot)) [ + menuitem "" -1 (concat gotoposition (gotoposition)) + looplist (mapmodelslotusage $__mmslot) ii [ + menuitem (concatword "slot used by map entity #" $ii) (concat gotoentity $ii) (concat gotoentity $ii) + ] + if (strcmp " " (mapmodelslotusage $__mmslot)) [ + menuitem "(this model is required by another model)" -1 + ] + menuitem "" -1 (concat gotoposition (gotoposition)) + ][ + menuitem "" -1 + menuitem "\f3Delete unused slot" (concat deletemapmodelslot $__mmslot) + ] + pop info + ][ + menuitem "no slot selected" -1 + ] +] + +//// Main > Editing > Map config operations > Delete unused mapmodel slot //// + +newmenu [Delete unused mapmodel slot] +menuinit __rebuildmapmodelmenus + +//// Main > Editing > Map config operations > Edit texture slots //// + +newmenu [Edit texture slots] +menuinit [ + resetcurmenu + menurenderoffset -20 0 + if $editing [ + push ecurmenu (escape (curmenu)) + push info "" + push origin "" + looplisti (textureslotusagelist) [cnt used] [ + info = (edittextureslot $i) + if $__showorigin [ origin = (__colororigin (gettextureorigin (at $info 1))) ] + if (|| $cnt (strlen $info)) [ + if (! (strlen $info)) [ info = " \fs\f3\fr" ] + menuitem (concatword "edit texture slot #" $i ": " $info " (" $cnt " uses, " $used " visible)" $origin) (concat __texslot = $i "; showmenu [Edit texture slot]") (concat chmenutexture $ecurmenu (at $info 1)) + ] + ] + pop info ecurmenu origin + ] [ + menuitem "menu only available in edit mode" -1 + ] +] + +//// Main > Editing > Map config operations > Edit texture slots > Edit texture slot //// + +newmenu [Edit texture slot] +tempalias __defaultskymapdummy kurt/klite1.jpg +menuinit [ + resetcurmenu + if (strlen $__texslot) [ + push info (edittextureslot $__texslot) // " " + chmenutexture (curmenu) (at $info 1) + menurenderoffset -20 0 + menuheader "" (concatword "edit texture slot #" $__texslot ":\n" (at $info 1)) + menuitemtextinput "Scaling factor [0..4] " (at $info 0) [edittextureslot $__texslot $arg1] + menuitem "\f4factor 0 means default (1.0)" -1 + menuitem "" -1 + menuitem (concat "Distribution:" (gettextureorigin (at $info 1))) -1 + menuitem "" -1 + menuitemtextinput "Texture path " (concat result (at $info 1)) [edittextureslot $__texslot "" $arg1] "" 250 + if (&& (strlen $__lastwatchedtexture) (! (strcmp $__lastwatchedtexture (at $info 1)))) [ + menuitem (concat " change to" (escape $__lastwatchedtexture)) [edittextureslot $__texslot "" $__lastwatchedtexture] + ] + if (&& (! $__texslot) (! (strcmp $__defaultskymapdummy (at $info 1)))) [ + menuitem (concat " change to skymap default" (escape $__defaultskymapdummy)) [edittextureslot $__texslot 0 $__defaultskymapdummy] + ] + menuitem "" -1 + menuitem "use as next (upper-)wall texture" [edittexturestack wall $__texslot] + menuitem "use as next floor texture" [edittexturestack floor $__texslot] + menuitem "use as next ceiling texture" [edittexturestack ceiling $__texslot] + push __usage (textureslotusage $__texslot) + if (&& $__texslot (listlen $__usage)) [ + menuitem "" -1 (concat gotoposition (gotoposition)) + looplist $__usage ii [ + menuitem (concatword "slot used by map entity #" $ii) (concat gotoentity $ii) (concat gotoentity $ii) + ] + menuitem "" -1 (concat gotoposition (gotoposition)) + ] + if (strlen (pop __usage)) [ + if (> (listlen (textureslotbyname (at $info 1))) 1) [ + menuitem "" -1 + menuitem "Merge multiple slots using same texture" [showmenu "Texture slot merge"] + ] + pop slots + ] [ + menuitem "" -1 + menuitem "\f3Delete unused slot" (concat deletetextureslot $__texslot) + ] + if (! (strcmp $__lastwatchedtexture (at $info 1))) [ + menuitem "" -1 + menuitem (concat "Pick texture name" (at $info 1)) (concat __lastwatchedtexture = (escape (at $info 1))) + ] + if (! $__texslot) [ + menuitem "" -1 + menuitem (concat "Slot #0 is hardcoded as skymap, please use" $__defaultskymapdummy) -1 + ] [ + if (< $__texslot 5) [ + menuitem "" -1 + menuitem (concatword "Slot #" $__texslot " is the default " (at ["" "cube 1 water" "wall" "floor" "ceiling"] $__texslot) " texture") -1 + ] + ] + pop info + ][ + menuitem "no slot selected" -1 + ] +] + +//// Main > Editing > Map config operations > Edit texture slots > Edit texture slot > Texture slot merge //// + +newmenu "Texture slot merge" +tempalias __tex_joined "" ; tempalias __tex_togo "" +menuinit [ + resetcurmenu + if (strlen $__texslot) [ + push info (edittextureslot $__texslot) // " " + chmenutexture (curmenu) (at $info 1) + menurenderoffset -20 0 + menuheader "" (concatword "merge texture slots using\n" (at $info 1)) + menuitem (concat "Slots using texture" (at $info 1)) -1 + push slots (textureslotbyname (at $info 1)) + push usemap (textureslotusagelist) + menuitem "" -1 + push last (- (listlen $slots) 1) + __tex_togo = (at $slots 0) + __tex_joined = (at $slots $last) + looplist $slots ii [ + menuitem (concatword " #" $ii ": " (edittextureslot $ii) " (" (at $usemap (* $ii 2)) " uses, " (at $usemap (+ (* $ii 2) 1)) " visible)") (concat alias __texslot $ii "; showmenu [Edit texture slot]") + ] + menuitem "" -1 + menuitem "Merge" -1 + menuitemslider " slot #" 0 $last 0 1 $slots (concat "__tex_togo = (at" (escape $slots) "$arg1)") + menuitem "into" -1 + menuitemslider " slot #" 0 $last $last 1 $slots (concat "__tex_joined = (at" (escape $slots) "$arg1)") + menuitem " \f0[OK]" [if (!= $__tex_joined $__tex_togo) [deletetextureslot $__tex_togo purge $__tex_joined]] + pop info slots usemap last + ][ + menuitem "no slot selected" -1 + ] +] + +//// Main > Editing > Map config operations > Edit mapsound slots //// + +// Edit mapsound slots +newmenu [Edit mapsound slots] +menuinit [ + resetcurmenu + if $editing [ + push info "" + push origin "" + loop i 256 [ + info = (editmapsoundslot $i) + if (strlen $info) [ + if $__showorigin [ origin = (__colororigin (getmapsoundorigin (at $info 0))) ] + menuitem (concatword "edit mapsound slot #" $i ": " $info $origin) (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 origin + ] [ + menuitem "menu only available in edit mode" -1 + ] +] + +//// Main > Editing > Map config operations > Edit mapsound slots > Edit mapsound slot //// + +newmenu [Edit mapsound slot] +tempalias __snd_rad "1" ; tempalias __snd_size "0" ; tempalias __snd_vol "255" +menuinit [ + resetcurmenu + if (strlen $__sndslot) [ + push info (editmapsoundslot $__sndslot) // " " + menuheader "" (concatword "edit mapsound slot #" $__sndslot ":\n" (at $info 0)) + 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 + ] + if (strlen (mapsoundslotusage $__sndslot)) [ + menuitem "" -1 (concat gotoposition (gotoposition)) + looplist (mapsoundslotusage $__sndslot) ii [ + menuitem (concatword "slot used by map entity #" $ii) (concat gotoentity $ii) (concat gotoentity $ii) + ] + menuitem "" -1 (concat gotoposition (gotoposition)) + ][ + menuitem "" -1 + menuitem "\f3Delete unused slot" (concat deletemapsoundslot $__sndslot) + ] + pop info + ][ + menuitem "no slot selected" -1 + ] +] + +//// Main > Editing > Map config operations > Sort mapmodel 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)] + +//// Main > Editing > Map config operations > Sort texture slots //// + +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)] + +//// Main > Editing > Map config operations > Sort mapsound slots //// + +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)] + + +//// Main > Editing > Map checks and statistics //// + +newmenu [Map checks and statistics] +menuinit [ + resetcurmenu + if $editing [ + menuitem "Map area checks\i\3" [ showmenu [Map area checks] ] + menuitem "Entity statistics" [ showmenu [Entity statistics] ] + menuitem "Check mapmodels with unconfigured custom textures" [ showmenu [Walk mapmodel entities with unconfigured custom textures] ] + menuitem "Show most visible textures" [ showmenu [Most visible textures] ] + menuitem "Cycle through spawn points" [ gotonextplayerstart ] + ] [ + menuitem "menu only available in edit mode" -1 + ] +] + tempalias __showslopes [ push i 0 looplist (mapareacheck vdelta) n [ @@ -1128,13 +1080,17 @@ tempalias __placeprobepointdummies [ ] ] +//// Main > Editing > Map checks and statistics > Map area checks //// + newmenu [Map area checks] menuitem "Heightfield slope stats" __showslopes menuitem "Goto steepest heightfield position" [ push p (mapareacheck steepest) ; gotoposition (at $p 0) (at $p 1) (at (pop p) 2)] menuitem "Place probe point dummies" __placeprobepointdummies -menuitem "Walk probe point dummies..." [ showmenu [Walk probe point dummies] ] +menuitem "Walk probe point dummies\i\3" [ showmenu [Walk probe point dummies] ] menuitem "Clear probe point dummies" __clearprobepointdummies +//// Main > Editing > Map checks and statistics > Map area checks > Walk probe point dummies //// + newmenu [Walk probe point dummies] menuinit [ resetcurmenu @@ -1147,16 +1103,42 @@ menuinit [ pop ents ] +//// Main > Editing > Map checks and statistics > Entity statistics //// + +newmenu [Entity statistics] +menuinit [ + resetcurmenu + push s 1 + looplist (listoptions ents) e [ + push n (listlen (enumentities $e)) + if $n [ + menuitem (concatword $n " entities of type " $e) (concat showmenu "[Walk" $e "entities]") + s = 0 + ] + pop n + ] + if (pop s) [ + menuitem "No entities" -1 + ] +] + +//// Main > Editing > Map checks and statistics > Entity statistics > Walk ... entities //// + push __a "resetcurmenu ; menuitem [\f4(return to previous position)] (concat gotoposition (gotoposition)) (concat gotoposition (gotoposition)) ;" push __b "looplist $ents i [ menuitem (concatword # $i [ ] (editentity $i)) (concat gotoentity $i) (concat gotoentity $i) ] ; pop ents" looplist (listoptions ents) e [ newmenu (concat Walk $e entities) menuinit (concat $__a "push ents (enumentities" $e ") ;" $__b) ] + +//// Main > Editing > Map checks and statistics > Walk mapmodel entities with unconfigured custom textures //// + newmenu [Walk mapmodel entities with unconfigured custom textures] menuinit (concat $__a "looplist (enumentities mapmodel) i [if (! (strlen (edittextureslot (at (editentity $i) 7)))) [menuitem (concatword # $i [ ] (editentity $i)) (concat gotoentity $i) (concat gotoentity $i)]]") pop __a __b +//// Main > Editing > Map checks and statistics > Most visible textures //// + newmenu [Most visible textures] menuinit [ resetcurmenu @@ -1177,20 +1159,138 @@ menuinit [ ] ] -newmenu [Entity statistics] + +//// Main > Editing > Creating bot waypoints //// +// see menus_bot.cfg + + +//// Main > Editing > Editing settings //// + +newmenu [Editing settings] +menuitemslider "Grid/Selection style: " 0 1 "$oldselstyle" 1 [triangles "squares (default)"] [ oldselstyle $arg1 ] +menuitemcheckbox "Show mapmodel clippings: " "$showmodelclipping" [ showmodelclipping $arg1 ] +menuitemcheckbox "Show ladder entities: " "$showladderentities" [ showladderentities $arg1 ] +menuitemcheckbox "Show all playerstarts (spawn points): " "$showplayerstarts" [ showplayerstarts $arg1 ] +menuitemslider "Fly speeds multiplier: " 1 5 "$flyspeed" 1 [] [ flyspeed $arg1 ] +// opt/autosave.cfg may add some entries + + +//// Main > Editing > Editing misc //// + +newmenu [Editing misc] +menuitem "Load batch map conversion tools" load_convmap [] "\f4(checking and editing of entire map collections)" +menuitem "Load extra map editing scripts" load_mapeditscripts [] "\f4(expert tools for hardcore map optimisations)" +menuitem "Rebuild list of mapmodels" [ echo "\f1This will take a few seconds..." ; sleep 99 [ mapmodelregistryclear ; loadallmapmodels ; echo "\f1Done." ] ] [] "\f2Use this after manually adding or removing mapmodels\nfrom your profile directory. May throw some errors." + + +//// Main > Editing > Editing keys //// + +newmenu [Editing keys] +menuitem "Select an action and press ENTER to bind a new key:" -1 +menuitem "" -1 +menuitem "\f2Mousewheel editing:" -1 +menuitemeditkeyinput [Move entity: ] editkey_scroll_moveent +menuitemeditkeyinput [Change vdelta: ] editkey_scroll_vdelta +menuitemeditkeyinput [Change wall/upper wall texture: ] editkey_scroll_walluppertex +menuitemeditkeyinput [Change floor/ceiling texture: ] editkey_scroll_floorceiltex +menuitem "\f4(Keys '1' thru '7' edit entity attributes)" -1 +menuitem "" -1 +menuitem "\f2Edit all selected cubes:" -1 +menuitemeditkeyinput [Make cubes 'solid': ] editkey_cubes_solid +menuitemeditkeyinput [Make cubes 'space': ] editkey_cubes_space +menuitemeditkeyinput [Make cubes 'floor heightfield': ] editkey_cubes_hf_floor +menuitemeditkeyinput [Make cubes 'ceiling heightfield': ] editkey_cubes_hf_ceiling +menuitemeditkeyinput [Make cubes 'corner': ] corner +menuitem "" -1 +menuitemeditkeyinput [Move floor down: ] editkey_move_floor_down +menuitemeditkeyinput [Move floor up: ] editkey_move_floor_up +menuitemeditkeyinput [Move ceiling down: ] editkey_move_ceiling_down +menuitemeditkeyinput [Move ceiling up: ] editkey_move_ceiling_up +menuitemeditkeyinput [Decrease vdelta: ] editkey_vdelta_down +menuitemeditkeyinput [Increase vdelta: ] editkey_vdelta_up +menuitemeditkeyinput [Equalize floor: ] editkey_equalize_floor +menuitemeditkeyinput [Equalize ceiling: ] editkey_equalize_ceiling +menuitem "" -1 +menuitemeditkeyinput [Texture on floor forward: ] editkey_floortex_up +menuitemeditkeyinput [Texture on floor previous: ] editkey_floortex_dn +menuitemeditkeyinput [Texture on wall forward: ] editkey_walltex_up +menuitemeditkeyinput [Texture on wall previous: ] editkey_walltex_dn +menuitemeditkeyinput [Texture on ceiling forward: ] editkey_ceiltex_up +menuitemeditkeyinput [Texture on floor previous: ] editkey_ceiltex_dn +menuitemeditkeyinput [Texture on upper wall forward: ] editkey_uppertex_dn +menuitemeditkeyinput [Texture on upper wall previous: ] editkey_uppertex_up +menuitem "" -1 +menuitem "\f2Misc editing keys:" -1 +menuitemkeyinput [Enter edit mode: ] edittoggle +menuitemeditkeyinput [Exit edit mode: ] edittoggle +menuitemeditkeyinput [Show editing menu: ] editkey_show_menu +menuitemeditkeyinput [Show lighting menu: ] editkey_show_menu_light +menuitem "" -1 +menuitemeditkeyinput [1st meta key: ] editmeta +menuitemeditkeyinput [2nd meta key: ] editkey_editmeta2 +menuitem "" -1 +menuitemeditkeyinput [Occlusion culling on/off: ] toggleocull +menuitemeditkeyinput [Mip display on/off: ] showmip +menuitemeditkeyinput [Fullbright on/off: ] editkey_fullbright +menuitemeditkeyinput [Show cube details on/off: ] showfocuscubedetails +menuitem "" -1 +menuitemeditkeyinput [Copy selected cubes: ] copy +menuitemeditkeyinput [Paste cubes: ] paste +menuitemeditkeyinput [Undo geometry changes: ] undo +menuitemeditkeyinput [Redo: ] redo +menuitem "" -1 +menuitemeditkeyinput [Pin/unpin closest entity: ] toggleclosestentpin +menuitemeditkeyinput [Delete entity: ] editkey_delete_entity +menuitemeditkeyinput [Copy entity: ] copyent +menuitemeditkeyinput [Paste entity: ] pasteent +menuitemeditkeyinput [Edit entity: ] editent +menuitemeditkeyinput [Cycle through TODO entities: ] editkey_scroll_todoents +menuitemeditkeyinput [Cycle through spawns: ] editkey_scroll_spawns +menuitem "" -1 +menuitem "\f2Tag clips:" -1 +menuitemeditkeyinput [Show tag clip volume: ] showtagclipfocus +menuitemeditkeyinput [Remove tag clip: ] editkey_tagclip_none +menuitemeditkeyinput [Create tag 'playerclip': ] editkey_tagclip_plclip +menuitemeditkeyinput [Create tag 'clip': ] editkey_tagclip_clip +menuitem "" -1 +menuitemtextinput [Lookup a keyeditbind: ] [] [ + if (strlen $arg1) [ + echo (concatword "\f9Contents of keyeditbind " (addpunct $arg1) :) + if (strcmp (result (keyeditbind $arg1)) "") [ + echo (addpunct $arg1) is not bound + ][ + echo (keyeditbind $arg1) + ] + ] +] [] 256 +menuitem [] -1 +menuitem "Alternate edit binds\i\3" [ showmenu [Alternate edit binds] ] + +//// Main > Editing > Editing keys > Alternate edit binds //// + +newmenu [Alternate edit binds] +menuitem "\f2Back" [ closecurmenu ] +menuitem [Click to use alternate edit binds] [ exec config/opt/alternateeditbinds.cfg; closecurmenu ] [ echo "\f3See config/opt/alternateeditbinds.cfg first" ] + + +//// Main > Editing > Deleted entities //// + +newmenu "Deleted entities" menuinit [ resetcurmenu - push s 1 - looplist (listoptions ents) e [ - push n (listlen (enumentities $e)) - if $n [ - menuitem (concatword $n " entities of type " $e) (concat showmenu "[Walk" $e "entities]") - s = 0 + if (unlistdeletedentity) [ + looplisti (getdeletedentities) [type x y z a1 a2 a3 a4 a5 a6 a7] [ + push desc (concat $type (concatword "[" $x "|" $y "|" $z "]") (concatword "(" $a1 ", " $a2 ", " $a3 ", " $a4 ", " $a5 ", " $a6 ", " $a7 ")")) + if (strcmp $type mapmodel) [desc = (concat $desc (mapmodelslotname $a2))] + if (&& $editing (strcmp $type sound)) [desc = (concat $desc (at (editmapsoundslot $a1) 0))] + if $editing [ + menuitem (pop desc) (concat gotoposition $x $y $z $a1 0 ";" undelent $i) + ][ + menuitem (pop desc) -1 + ] ] - pop n - ] - if (pop s) [ - menuitem "No entities" -1 + menuitem "\f3clear this list" "unlistdeletedentity all" + ] [ + menuitem "no deleted entities" -1 ] ] - diff --git a/config/menus_licenses.cfg b/config/menus_licenses.cfg index 727d7eec..f86f7978 100644 --- a/config/menus_licenses.cfg +++ b/config/menus_licenses.cfg @@ -100,6 +100,8 @@ tempalias __maplicense_menutext_custom [ tempalias __maplicense_list [cc-by-nc-nd-3.0 cc-by-nc-sa-3.0 public-domain ac-default custom] +//// Main > Editing > Map settings > Select map license //// + newmenu "Select map license" menuinit [ tempalias __viewlicense $mapinfo_license @@ -122,6 +124,8 @@ tempalias __rebuildmaplicensemenu [ menuselection (curmenu) (+ 3 (pop n)) ] +//// Main > Editing > Map settings > Show map info //// + newmenu "Show map info" menuinit [ resetcurmenu diff --git a/config/menus_multiplayer.cfg b/config/menus_multiplayer.cfg index 1905dd68..39f2de74 100644 --- a/config/menus_multiplayer.cfg +++ b/config/menus_multiplayer.cfg @@ -15,20 +15,20 @@ const joinservermenu [ // Common parts of in-game menus tempalias __ingamemenu_1 [ push t (player1 team) - menuitemtextinput [Nickname: ] "result $curname" [ name $arg1 ] - menuitem [Change weapon...] [ showmenu Weapons ] [ __ingamemenu_showmodel 0 ] - menuitem [Change player skin...] (concat showmenu (at [CLA RVSF] (&b $t 1))) [ __ingamemenu_showmodel 1 ] - menuitem [Change to the enemy team] changeteam [ __ingamemenu_showmodel 0 ] + menuitemtextinput "Nickname: " "result $curname" [ name $arg1 ] + menuitem "Change weapon\i\3" [ showmenu Weapons ] [ __ingamemenu_showmodel 0 ] + menuitem "Change player skin\i\3" (concat showmenu (at [CLA RVSF] (&b $t 1))) [ __ingamemenu_showmodel 1 ] + menuitem "Change to the enemy team" changeteam [ __ingamemenu_showmodel 0 ] menuitem (concat Change to (at "spectate active" (> $t 1)) mode) spectate pop t ] tempalias __ingamemenu_2 [ - menuitem [Get additional server information] [ showmenu serverinfo ] - menuitem [Download a demo...] [ listdemos; showmenu [Download demo] ] - menuitem [] -1 - menuitem "\f4Main menu..." [ closecurmenu; showmenu main ] - menuitem "\f4Browse servers..." [ closecurmenu; joinservermenu ] + menuitem "Get additional server information" [ showmenu serverinfo ] + menuitem "Download a demo\i\3" [ listdemos; showmenu [Download demo] ] + menuitem "" -1 + menuitem "\f4Main menu\i\3" [ closecurmenu; showmenu main ] + menuitem "\f4Browse servers\i\3" [ closecurmenu; joinservermenu ] menuitem "\f3Disconnect from server" disconnect menuitem "\f3Quit AssaultCube" savequit ] @@ -41,93 +41,42 @@ const __ingamemenu_showmodel [ ] ] -// Normal in-game menu that opens when pressing escape and connected to a game. +//// In-Game //// (Normal in-game menu that opens when pressing escape and connected to a game.) + newmenu [In-game] menuinit [ resetcurmenu __ingamemenu_1 - menuitem [] -1 - menuitem [Set mode/map...] [ showmenu Gamemode ] - // menuitem "Kick/ban player..." [ showmenu kick/ban ] // only noobish vote abusers use this, if you really want it, just uncomment - menuitem [Ignore/Unignore all...] [ if $ingall [ unignoreall ] [ ignoreall ] ] - menuitem [Adjust teams...] [ showmenu [Team adjustment] ] + menuitem "" -1 + menuitem "Set mode/map\i\3" [ showmenu Gamemode ] + // menuitem "Kick/ban player\i\3" [ showmenu kick/ban ] // only noobish vote abusers use this, if you really want it, just uncomment + menuitem "Ignore/Unignore all\i\3" [ if $ingall [ unignoreall ] [ ignoreall ] ] + menuitem "Adjust teams\i\3" [ showmenu [Team adjustment] ] __ingamemenu_2 ] menuinitselection 13 -// In-game menu that opens if when you press escape if you're admin state and connected to a game. +//// In-Game admin //// (In-game menu that opens if when you press escape if you're admin state and connected to a game.) + newmenu [In-game admin] menuinit [ resetcurmenu - menuitem [Set mode/map...] [ showmenu Gamemode ] - menuitem [Kick/ban player...] [ showmenu kick/ban ] - menuitem [Adjust teams...] [ showmenu [Team adjustment] ] - menuitem [Change mastermode...] [ showmenu Mastermode ] - menuitem [Change the server description...] [ saycommand "/serverdesc " ] - menuitem [Find a players IP address...] [ saycommand "/whois " ] - menuitem [Give admin...] [ showmenu [give admin] ] - menuitem [] -1 + menuitem "Set mode/map\i\3" [ showmenu Gamemode ] + menuitem "Kick/ban player\i\3" [ showmenu kick/ban ] + menuitem "Adjust teams\i\3" [ showmenu [Team adjustment] ] + menuitem "Change mastermode\i\3" [ showmenu Mastermode ] + menuitem "Change the server description\i\3" [ saycommand "/serverdesc " ] + menuitem "Find a players IP address\i\3" [ saycommand "/whois " ] + menuitem "Give admin\i\3" [ showmenu [give admin] ] + menuitem "" -1 __ingamemenu_1 __ingamemenu_2 ] menuinitselection 17 -// Multiplayer menu only opens through the main menu (when disconnected). -newmenu multiplayer - -menuitem [Join a server] joinservermenu -menuitem [Join a LAN server] [ searchlan 2; showallservers 0; showonlyfavourites 0; showmenu server ] -menuitem [Custom connect] [ showmenu [Custom connect] ] -menuitem [Connect as Admin] [ showmenu [Admin connect] ] -menuitem [] -1 -menuitem [Force serverlist update] [ updatefrommaster 1; joinservermenu ] - -// Fancy custom connect menu. -newmenu [Custom connect] - -menuinit [ tempalias cc1 []; tempalias cc2 []; tempalias cc3 [] ] // Resets the aliases -menuitemtextinput "Server IP/DNS: \t\t" [] [ cc1 = $arg1 ] [] 255 -menuitemtextinput "Server port (optional): \t" [] [ cc2 = $arg1 ] [] 6 -menuitemtextinput "Server password (optional): \t" [] [ cc3 = $arg1 ] [] 128 1 -menuitem "" -1 -menuitem "\f2\t\t [ Connect ]\t\t\t" [ connect $cc1 $cc2 $cc3 ] - -// Connect to a menu as admin. -newmenu [Admin connect] - -menuinit [ tempalias acc1 []; tempalias acc2 []; tempalias acc3 []; echo "\f3To use this menu to connect as administrator, you will need to know the admin password for the server." ] // Resets the aliases -menuitemtextinput "Server IP/DNS: \t\t" [] [ acc1 = $arg1 ] [] 255 -menuitemtextinput "Server port (optional):\t" [] [ acc2 = $arg1 ] [] 6 -menuitemtextinput "Server admin password: \t" [] [ acc3 = $arg1 ] [] 128 1 -menuitem "" -1 -menuitem "\f2\t\t [ Admin connect ]\t\t" [ connectadmin $acc1 $acc2 $acc3 ] - -_kickbanaction = kick -newmenu reason -menuinit [ _kickbanreason = None; if (! (strcmp $_kickbanaction kick)) [ if (! (strcmp $_kickbanaction ban)) [ _kickbanaction = ban ] ] ] -menuitem [intentional TK] [ _kickbanreason = [intentional TK]; showmenu (concat $_kickbanaction player) ] -menuitem [abusive behaviour] [ _kickbanreason = [abusive behaviour]; showmenu (concat $_kickbanaction player) ] -menuitem [bad language] [ _kickbanreason = [bad language]; showmenu (concat $_kickbanaction player) ] -menuitemtextinput [Reason: ] [] [ _kickbanreason = $arg1 ] [] 255 -menuitem $_kickbanaction [ showmenu (concat $_kickbanaction player) ] -menuinitselection 2 - -newmenu kick/ban -menuitem [Kick a player] [ _kickbanaction = kick; showmenu reason ] -menuitem [Ban a player] [ _kickbanaction = ban; showmenu reason ] -//menuitem "Kick a player" [ showmenu "kick player" ] -//menuitem "Ban a player" [ showmenu "ban player" ] -menuitem [Remove all bans] removebans - -newmenu [Team adjustment] - -menuitem [Initiate shuffleteams] shuffleteams -menuitem [Force a team change] [ showmenu [force team] ] -menuitem [Force yourself to enemy team] forceme -menuitem [Initiate autoteam] [ showmenu Auto-team ] +//// In-Game > Gamemode //// newmenu Gamemode - menuitem [Team Deathmatch] [ mode 0; showmenu maps ] menuitem [Deathmatch] [ mode 2; showmenu maps ] menuitem [Team Survivor] [ mode 4; showmenu maps ] @@ -143,53 +92,122 @@ menuitem [Last Swiss Standing] [ mode 9; showmenu maps ] menuitem [One Shot, One Kill] [ mode 10; showmenu maps ] menuitem [Team One Shot, One Kill] [ mode 11; showmenu maps ] -newmenu Mastermode +//// In-Game > kick/ban //// +newmenu kick/ban +menuitem "Kick a player\i\3" [ _kickbanaction = kick; showmenu reason ] +menuitem "Ban a player\i\3" [ _kickbanaction = ban; showmenu reason ] +//menuitem "Kick a player" [ showmenu "kick player" ] +//menuitem "Ban a player" [ showmenu "ban player" ] +menuitem "Remove all bans" removebans + +//// In-Game > kick/ban > reason //// + +newmenu reason +tempalias _kickbanaction kick +menuinit [ _kickbanreason = None; if (! (strcmp $_kickbanaction kick)) [ if (! (strcmp $_kickbanaction ban)) [ _kickbanaction = ban ] ] ] +menuitem [intentional TK] [ _kickbanreason = [intentional TK]; showmenu (concat $_kickbanaction player) ] +menuitem [abusive behaviour] [ _kickbanreason = [abusive behaviour]; showmenu (concat $_kickbanaction player) ] +menuitem [bad language] [ _kickbanreason = [bad language]; showmenu (concat $_kickbanaction player) ] +menuitemtextinput [Reason: ] [] [ _kickbanreason = $arg1 ] [] 255 +menuitem $_kickbanaction [ showmenu (concat $_kickbanaction player) ] +menuinitselection 2 + +//// In-Game > kick/ban > reason > kick player //// +//// In-Game > kick/ban > reason > ban player //// +// hardcoded + +//// In-Game > Team adjustment //// + +newmenu [Team adjustment] +menuitem [Initiate shuffleteams] shuffleteams +menuitem [Force a team change] [ showmenu [force team] ] +menuitem [Force yourself to enemy team] forceme +menuitem [Initiate autoteam] [ showmenu Auto-team ] + +//// In-Game > Team adjustment > force team //// +// hardcoded + +//// In-Game > Team adjustment > Auto-team //// + +newmenu Auto-team +menuitem [Turn auto-team on] [ autoteam 1 ] +menuitem [Turn auto-team off] [ autoteam 0 ] + +//// In-Game admin > Mastermode //// + +newmenu Mastermode menuitem [Unlock the server (open)] [ mastermode 0 ] menuitem [Lock the server (private)] [ mastermode 1 ] menuitem [Lock the server (match mode)] [ mastermode 2 ] -newmenu Auto-team +//// In-Game admin > give admin //// +// hardcoded -menuitem [Turn auto-team on] [ autoteam 1 ] -menuitem [Turn auto-team off] [ autoteam 0 ] + +//// Main > Multiplayer //// (Multiplayer menu only opens through the main menu (when disconnected).) + +newmenu multiplayer +menuitem [Join a server] joinservermenu +menuitem [Join a LAN server] [ searchlan 2; showallservers 0; showonlyfavourites 0; showmenu server ] +menuitem [Custom connect] [ showmenu [Custom connect] ] +menuitem [Connect as Admin] [ showmenu [Admin connect] ] +menuitem [] -1 +menuitem [Force serverlist update] [ updatefrommaster 1; joinservermenu ] + +//// Main > Multiplayer > Custom connect //// + +newmenu [Custom connect] +menuinit [ tempalias cc1 []; tempalias cc2 []; tempalias cc3 [] ] // Resets the aliases +menuitemtextinput "Server IP/DNS: \t\t" [] [ cc1 = $arg1 ] [] 255 +menuitemtextinput "Server port (optional): \t" [] [ cc2 = $arg1 ] [] 6 +menuitemtextinput "Server password (optional): \t" [] [ cc3 = $arg1 ] [] 128 1 +menuitem "" -1 +menuitem "\f2\t\t [ Connect ]\t\t\t" [ connect $cc1 $cc2 $cc3 ] + +//// Main > Multiplayer > Admin connect //// + +newmenu [Admin connect] +menuinit [ tempalias acc1 []; tempalias acc2 []; tempalias acc3 []; echo "\f3To use this menu to connect as administrator, you will need to know the admin password for the server." ] // Resets the aliases +menuitemtextinput "Server IP/DNS: \t\t" [] [ acc1 = $arg1 ] [] 255 +menuitemtextinput "Server port (optional):\t" [] [ acc2 = $arg1 ] [] 6 +menuitemtextinput "Server admin password: \t" [] [ acc3 = $arg1 ] [] 128 1 +menuitem "" -1 +menuitem "\f2\t\t [ Admin connect ]\t\t" [ connectadmin $acc1 $acc2 $acc3 ] + +//// Main > Multiplayer > server //// +// hardcoded + +//// Main > Multiplayer > server > serverbrowser help //// newmenu [serverbrowser help] - -menuitem [F1: Display this help menu] -1 -menuitem [F3: Search for players by nickname...] [ showmenu [search player] ] -menuitem [Search for servers...] [ showmenu [search server] ] -menuitem [F4: Edit favourites...] [ showmenu [edit favourites] ] -menuitem [F5: Update the serverlist from the masterserver] [ updatefrommaster 1; closecurmenu ] -menuitem [F9: Get additional server information] [ showmenu serverinfo ] -menuitem [Edit alternative views in serverbrowser...] [ showmenu [serverbrowser alternative views] ] -menuitem [] -1 -menuitem [Options:] -1 -menuitemcheckbox [F6: Reverse the sort order:] "$serversortdir" [ serversortdir $arg1 ] -menuitemcheckbox [F7: Only show good servers:] "$showonlygoodservers" [ showonlygoodservers $arg1 ] -menuitemcheckbox [F8: Show minutes remaining:] "$showminremain" [ showminremain $arg1 ] -menuitemcheckbox [Sort official maps ontop:] "$serversortpreferofficial" [ serversortpreferofficial $arg1 ] -menuitemcheckbox [Use gamemode acronyms:] "$modeacronyms" [ modeacronyms $arg1 ] -menuitemcheckbox [Show number of all players on the servers:] "$showallplayersnumber" [ showallplayersnumber $arg1 ] +menuitem "F1: Display this help menu" -1 +menuitem "F3: Search for players by nickname\i\3" [ showmenu [search player] ] +menuitem "Search for servers\i\3" [ showmenu [search server] ] +menuitem "F4: Edit favourites\i\3" [ showmenu [edit favourites] ] +menuitem "F5: Update the serverlist from the masterserver" [ updatefrommaster 1; closecurmenu ] +menuitem "F9: Get additional server information\i\3" [ showmenu serverinfo ] +menuitem "Edit alternative views in serverbrowser\i\3" [ showmenu [serverbrowser alternative views] ] +menuitem "" -1 +menuitem "Options:" -1 +menuitemcheckbox "F6: Reverse the sort order:" "$serversortdir" [ serversortdir $arg1 ] +menuitemcheckbox "F7: Only show good servers:" "$showonlygoodservers" [ showonlygoodservers $arg1 ] +menuitemcheckbox "F8: Show minutes remaining:" "$showminremain" [ showminremain $arg1 ] +menuitemcheckbox "Sort official maps ontop:" "$serversortpreferofficial" [ serversortpreferofficial $arg1 ] +menuitemcheckbox "Use gamemode acronyms:" "$modeacronyms" [ modeacronyms $arg1 ] +menuitemcheckbox "Show number of all players on the servers:" "$showallplayersnumber" [ showallplayersnumber $arg1 ] menuitemslider "Favourites tag column:\t" 0 2 "$serverbrowserhidefavtag" 1 ["Show always" "Show when used" "Hide always"] [ serverbrowserhidefavtag $arg1 ] menuitemslider "Server IP & port:\t\t" 0 2 "$serverbrowserhideip" 1 [Show "Show in grey" Hide] [ serverbrowserhideip $arg1 ] menuitemslider "Sort servers by:\t\t" 0 7 "$serversort" 1 [Ping "Number of players" "Max players" "Minutes remaining" "Map name" Gamemode "IP address" "Server description"] [ serversort $arg1 ] menuinitselection 1 -// connecting from the serverbrowser to a password-protected server -// called by sbconnect -newmenu [password required] - -menuinit [ sbpwd = [] ] // Resets the aliases -menuitemvar [result $sbmsg] -menuitem [You need a password to join it.] -1 -menuitem [] -1 -menuitemtextinput "Password: \t" [] [ sbpwd = $arg1 ] [] 128 1 -menuitem [] -1 -menuitem "\f2\t\t [ Connect ]\t\t" [ echo connecting to $sbdesc ; connect $sbdns $sbport $sbpwd ] -menuitem "\f2\t\t [ Connect without password ]\t\t" [ echo connecting to $sbdesc ; connect $sbdns $sbport ] -menuinitselection 3 - +tempalias addallfavcatmenus [ + newmenu [serverbrowser help] + menuitem "" -1 + menuitem "Keys to add/remove servers from categories:" -1 + loop ii (listlen (listfavcats)) [ addfavcatmenu (at (listfavcats) $ii) ] + addallfavcatmenus = [] +] const addfavcatmenu [ tempalias i (+ 1 (findlist (listfavcats) $arg1)) newmenu [edit favourites] @@ -202,50 +220,67 @@ const addfavcatmenu [ ] newmenu (concat favourites $i) menuitemvar ( concatword "concat " "Category name: \f2" (at (listfavcats) (- $i 1)) ) - menuitem [] -1 - menuitemtextinput [Tag: ] (concatword "result $" sbfavourite_ $arg1 _tag) (concatword sbfavourite_ $arg1 _tag " = $arg1") [] 15 - menuitemtextinput [Description: ] (concatword "result $" sbfavourite_ $arg1 _desc) (concatword sbfavourite_ $arg1 _desc " = $arg1") [] 45 - menuitem [] -1 - menuitemslider [Background red:\t] 0 100 (concatword "$" sbfavourite_ $arg1 _red) 10 [] (concatword sbfavourite_ $arg1 _red " = $arg1") - menuitemslider [Background green:\t] 0 100 (concatword "$" sbfavourite_ $arg1 _green) 10 [] (concatword sbfavourite_ $arg1 _green " = $arg1") - menuitemslider [Background blue:\t] 0 100 (concatword "$" sbfavourite_ $arg1 _blue) 10 [] (concatword sbfavourite_ $arg1 _blue " = $arg1") - menuitemslider [Background alpha:\t] 0 100 (concatword "$" sbfavourite_ $arg1 _alpha) 10 [] (concatword sbfavourite_ $arg1 _alpha " = $arg1") - menuitem [] -1 - menuitemtextinput [Keyword list: ] (concatword "result $" sbfavourite_ $arg1 _keys) (concatword sbfavourite_ $arg1 _keys " = $arg1") [] 255 - menuitem [] -1 - menuitemtextinput [Weight: ] (concatword "result $" sbfavourite_ $arg1 _weight) (concatword sbfavourite_ $arg1 _weight " = $arg1") [] 10 - menuitem [] -1 - menuitemslider [] 0 1 (concatword "result $" sbfavourite_ $arg1 _ignore) 1 ["Enable this category" "Ignore this category"] (concatword sbfavourite_ $arg1 _ignore " = $arg1") - menuitem [] -1 - menuitem [Show servers of this category] (concat showonlyfavourites $i ";showmenu server") [ showonlyfavourites 0 ] + menuitem "" -1 + menuitemtextinput "Tag: " (concatword "result $" sbfavourite_ $arg1 _tag) (concatword sbfavourite_ $arg1 _tag " = $arg1") [] 15 + menuitemtextinput "Description: " (concatword "result $" sbfavourite_ $arg1 _desc) (concatword sbfavourite_ $arg1 _desc " = $arg1") [] 45 + menuitem "" -1 + menuitemslider "Background red:\t" 0 100 (concatword "$" sbfavourite_ $arg1 _red) 10 [] (concatword sbfavourite_ $arg1 _red " = $arg1") + menuitemslider "Background green:\t" 0 100 (concatword "$" sbfavourite_ $arg1 _green) 10 [] (concatword sbfavourite_ $arg1 _green " = $arg1") + menuitemslider "Background blue:\t" 0 100 (concatword "$" sbfavourite_ $arg1 _blue) 10 [] (concatword sbfavourite_ $arg1 _blue " = $arg1") + menuitemslider "Background alpha:\t" 0 100 (concatword "$" sbfavourite_ $arg1 _alpha) 10 [] (concatword sbfavourite_ $arg1 _alpha " = $arg1") + menuitem "" -1 + menuitemtextinput "Keyword list: " (concatword "result $" sbfavourite_ $arg1 _keys) (concatword sbfavourite_ $arg1 _keys " = $arg1") [] 255 + menuitem "" -1 + menuitemtextinput "Weight: " (concatword "result $" sbfavourite_ $arg1 _weight) (concatword sbfavourite_ $arg1 _weight " = $arg1") [] 10 + menuitem "" -1 + menuitemslider "" 0 1 (concatword "result $" sbfavourite_ $arg1 _ignore) 1 ["Enable this category" "Ignore this category"] (concatword sbfavourite_ $arg1 _ignore " = $arg1") + menuitem "" -1 + menuitem "Show servers of this category\i\3" (concat showonlyfavourites $i ";showmenu server") [ showonlyfavourites 0 ] ] -const addallfavcatmenus [ - newmenu [serverbrowser help] - menuitem [] -1 - menuitem [Keys to add/remove servers from categories:] -1 - loop ii (listlen (listfavcats)) [ addfavcatmenu (at (listfavcats) $ii) ] -] +//// Main > Multiplayer > server > serverbrowser help > search player //// -lastsearchname = [] newmenu [search player] - -menuitemtextinput [Search servers for a player: ] "result $lastsearchname" [ lastsearchname = $arg1 ] -menuitem "\f2\t\t [ Search ]" [ closecurmenu; searchnickname $lastsearchname] +alias __lastsearchname "" +menuitemtextinput "Search servers for a player: " "result $__lastsearchname" [ __lastsearchname = $arg1 ] +menuitem "\f2\t\t [ Search ]" [ closecurmenu; searchnickname $__lastsearchname] menuinitselection 1 +//// Main > Multiplayer > server > serverbrowser help > search server //// + newmenu [search server] -menuitemtextinput [ Search for server: ] "result $sbfavourite_SEARCH_keys" [ sbfavourite_SEARCH_keys = $arg1 ] +menuitemtextinput " Search for server: " "result $sbfavourite_SEARCH_keys" [ sbfavourite_SEARCH_keys = $arg1 ] menuitem "\f2\t\t[ Search ]" [ showonlyfavourites (addfavcategory SEARCH); showmenu server ] [ showonlyfavourites 0 ] menuinitselection 1 +//// Main > Multiplayer > server > serverbrowser help > edit favourites //// +//// Main > Multiplayer > server > serverbrowser help > serverinfo //// +// hardcoded + +//// Main > Multiplayer > server > serverbrowser help > serverbrowser alternative views //// + newmenu [serverbrowser alternative views] -menuitem [Alt + Mouse wheel (Alt + Up/Down) toggles views in serverbrowser.] -1 -menuitem [] -1 -menuitemtextinput [Categories of favourites in alternative views: ] [getalias serverbrowseraltviews] [alias serverbrowseraltviews $arg1] [] 255 -menuitem [(type just names of categories, and not tags).] -1 +menuitem "Alt + Mouse wheel (Alt + Up/Down) toggles views in serverbrowser." -1 +menuitem "" -1 +menuitemtextinput "Categories of favourites in alternative views: " [getalias serverbrowseraltviews] [alias serverbrowseraltviews $arg1] [] 255 +menuitem "(type just names of categories, and not tags)." -1 menuinitselection 2 + +// connecting from the serverbrowser to a password-protected server +// called by sbconnect + +newmenu [password required] +menuinit [ sbpwd = [] ] // Resets the aliases +menuitemvar [result $sbmsg] +menuitem [You need a password to join it.] -1 +menuitem [] -1 +menuitemtextinput "Password: \t" [] [ sbpwd = $arg1 ] [] 128 1 +menuitem [] -1 +menuitem "\f2\t\t [ Connect ]\t\t" [ echo connecting to $sbdesc ; connect $sbdns $sbport $sbpwd ] +menuitem "\f2\t\t [ Connect without password ]\t\t" [ echo connecting to $sbdesc ; connect $sbdns $sbport ] +menuinitselection 3 + newmenu getmap menuitem [ This server is using a different version of this map...] -1 menuitem [] -1 diff --git a/config/menus_settings.cfg b/config/menus_settings.cfg index 41451d80..b6affe41 100644 --- a/config/menus_settings.cfg +++ b/config/menus_settings.cfg @@ -1,19 +1,204 @@ -newmenu settings -menuitem [Video settings] [ showmenu video ] -menuitem [Head-Up Display settings] [ showmenu HUD ] -menuitem [Gameplay settings] [ showmenu gameplay ] -menuitem [Keyboard settings] [ showmenu Keyboard ] -menuitem [Mouse settings] [ showmenu Mouse ] -menuitem [Sound settings] [ showmenu sound ] -menuitem [Misc settings] [ showmenu Misc ] -menuitem [Mod package settings] [ showmenu "Mod package" ] -menuitem [] -1 -menuitem [Reset all settings] [ showmenu [Reset settings] ] +//// Main > Settings //// +newmenu Settings +menuitem "Video settings\i\3" [ showmenu "\fsVideo" ] +menuitem "Head-Up Display settings\i\3" [ showmenu HUD ] +menuitem "Console settings\i\3" [ showmenu Console ] +menuitem "Gameplay settings\i\3" [ showmenu "\fsGameplay" ] +menuitem "Scoreboard settings\i\3" [ showmenu Scoreboard ] +menuitem "Keyboard settings\i\3" [ showmenu Keyboard ] +menuitem "Mouse settings\i\3" [ showmenu Mouse ] +menuitem "Sound settings\i\3" [ showmenu "\fsSound" ] +menuitem "Misc settings\i\3" [ showmenu Misc ] +menuitem "Mod package settings\i\3" [ showmenu "Mod package" ] +menuitem "" -1 +menuitem "Reset all settings\i\3" [ showmenu [Reset settings] ] + + +//// Main > Settings > Video //// + +newmenu "\fsVideo" +menuitemtextinput [Screen width: ] "$scr_w" [ scr_w $arg1 ] [] 11 +menuitemtextinput [Screen height: ] "$scr_h" [ scr_h $arg1 ] [] 11 +if (&& $desktopw $desktoph) [ + menuitem (concatword "\f2Set\f5 resolution as in desktop (" $desktopw "x" $desktoph ")") [ scr_w $desktopw ; scr_h $desktoph ; refreshcurmenudelayed ] +] +menuitem "Choose resolution from list\i\3" [ showmenu [Display resolutions] ] +menuitem "" -1 +menuitemslider "Graphics detail: " 1 6 "$gfxqualityalias" 1 [Horrible Low Medium Good High "INSANE! (May perform slowly on older gfx)"] [ new_gfx_quality $arg1 ] +menuitem "" -1 +menuitemslider "Field of view: " 75 120 "$fov" 2 [] [ fov $arg1 ] +menuitemcheckbox "Fullscreen: " "$fullscreen" [ fullscreen $arg1 ] +menuitemslider "Vsync: " -1 1 "$vsync" 1 [Default Disabled Enabled] [ vsync $arg1 ] +menuitem "" -1 +menuitemslider "Set temporary gamma for this map: " 30 300 "$gamma" 5 [] [ gamma $arg1 ] +menuitemtextinput "Set default gamma for this map: " [$gamma] [setgamma $arg1] +menuitemtextinput "Set default gamma for maps without own default: " [$defaultgamma] [ defaultgamma = $arg1 ] +menuitem "" -1 +menuitem "Advanced video settings\i\3" [ showmenu [Advanced video settings] ] +menuitem "" -1 +menuitem "\f2\t\t\t [ Apply now! ]" [ resetgl ] +alias defaultgamma 100 + +//// Main > Settings > Video > Display resolutions //// + +newmenu [Display resolutions] +push __getar [ + push n (findlist [1250 1333 1777 1600] (div (* 1000 $arg1) $arg2)) + if (>= $n 0) [ + n = (at [5:4 4:3 16:9 16:10] $n) + ][ + n = (at (concat (concatword "~16:" (div (+ (div (* 160 $arg2) $arg1) 5) 10))) ~5:4 ~4:3) (+ (findlist [125 133] (div (* 100 $arg1) $arg2)) 1)) + ] + pop n +] +push reslist (getdisplayresolutions) +if (strlen $reslist) [ + menuitem "\f4Preferred resolutions:" -1 + looplist $reslist [w h] [ + menuitem (concatword (at ["" " "] (< $w 1000)) $w x $h "\t(" (__getar $w $h) ")") (concat scr_w $w ";" scr_h $h ";" closecurmenu) + ] + menuitem "" -1 + menuitem "\f4More resolutions:" -1 +][ + reslist = "17001 17001" +] +looplist [640 480 800 600 1024 768 1280 720 1280 800 1280 1024 1360 768 1366 768 1440 900 1600 900 1680 1050 1920 1080 1920 1200] [w h] [ + push d (&& (< $w (at $reslist 0)) (< $h (at $reslist 1))) + looplist $reslist [rw rh] [ + if (&& (= $w $rw) (= $h $rh)) [d = 0] + ] + if (pop d) [ + menuitem (concatword (at ["" " "] (< $w 1000)) $w x $h "\t(" (__getar $w $h) ")") (concat scr_w $w ";" scr_h $h ";" closecurmenu) + ] +] +pop reslist __getar + +//// Main > Settings > Video > Advanced video settings //// + +newmenu [Advanced video settings] +const __getshadowq [ + if (&& $stencilshadow (>= $stencilbits 8)) [result 2] [ + if $dynshadow [result 1] [result 0] + ] +] +const __setshadowq_0 [ stencilshadow 0 ; stencilbits 0 ; dynshadow 0 ] // Off +const __setshadowq_1 [ stencilshadow 0 ; stencilbits 0 ; dynshadow 40 ] // Blob +const __setshadowq_2 [ stencilshadow 40 ; stencilbits 8 ; dynshadow 40 ] // Stencil +const __fsaa_valuemap [-1 0 2 4 8 16] +const __aniso_valuemap [0 2 4 8 16] +const __minlod_valuemap [60 100 200 250] +const __watersubdiv_valuemap [16 8 4 2 1] +menuitemslider [Scope FOV: ] 5 60 "$scopefov" 5 [] [ scopefov $arg1 ] +menuitemslider [Antialiasing (FSAA): ] 0 5 "(findlist $__fsaa_valuemap $fsaa)" 1 [Default Off 2 4 8 16] [ fsaa (at $__fsaa_valuemap $arg1) ] +menuitemslider [Anisotropic filtering: ] 0 4 "(findlist $__aniso_valuemap $aniso)" 1 [Off 2 4 8 16] [ aniso (at $__aniso_valuemap $arg1) ] +menuitemslider [Minimal level of detail: ] 0 3 "(findlist $__minlod_valuemap $minlod)" 1 [Low Decent Good Best] [ minlod (at $__minlod_valuemap $arg1) ] +menuitemslider [Light error: ] 1 100 "$lighterror" 5 [] [ lighterror $arg1 ] +menuitemslider [Water subdivision: ] 0 4 "(findlist $__watersubdiv_valuemap $watersubdiv)" 1 ["Lowest quality" "Low quality" "Medium quality" "High quality" "Highest quality"] [ watersubdiv (at $__watersubdiv_valuemap $arg1) ] +menuitemslider [Dynamic shadows: ] 0 2 __getshadowq 1 [Off Blob Stencil] [ (concatword __setshadowq_ $arg1) ] +menuitemslider [Tex-reduce: ] -1 3 "$texreduce" 1 [] [ texreduce $arg1 ] +menuitemcheckbox [Water reflection: ] "$waterreflect" [ waterreflect $arg1 ] +menuitemcheckbox [Dynamic lights: ] "$dynlight" [ dynlight $arg1 ] +menuitemcheckbox [Bulletholes: ] "$bullethole" [ bullethole $arg1 ] +menuitemcheckbox [Scorch: ] "$scorch" [ scorch $arg1 ] +menuitemcheckbox "Ignore map override: Disable water reflection" "$ignoreoverride_nowaterreflect" [ ignoreoverride_nowaterreflect $arg1 ] +menuitemcheckbox "Ignore map override: Limit water waveheight" "$ignoreoverride_limitwaveheight" [ ignoreoverride_limitwaveheight $arg1 ] +menuitemcheckbox "Ignore map override: Disable stencil shadows" "$ignoreoverride_nostencilshadows" [ ignoreoverride_nostencilshadows $arg1 ] +menuitem "" -1 +menuitem [FPS Range\i\3] [ showmenu [FPS Range] ] +menuitem "" -1 +menuitem "\f2\t\t [ Apply now! ]" [ resetgl ] + +//// Main > Settings > Video > Advanced video settings > FPS Range //// + +newmenu [FPS Range] +menuitem [My 486 0wnz y00 (8-10 FPS)] [ closecurmenu; fpsrange 8 10 ] +menuitem [Slow machine (20-25 FPS)] [ closecurmenu; fpsrange 20 25 ] +menuitem [Sensible default (30-40 FPS)] [ closecurmenu; fpsrange 30 40 ] +menuitem [FPS whore (60-60 FPS)] [ closecurmenu; fpsrange 60 60 ] +menuitem [I don't understand LOD (100+ FPS)] [ closecurmenu; fpsrange 100 1000 ] + + +//// Main > Settings > HUD //// + +newmenu HUD +alias wallclockformat "" // strftime formatting +alias wallclockformatlist ["" %H:%M %H:%M:%S %I:%M%p %I:%M:%S%p U%H:%M U%H:%M:%S] //"U" at beginning means UTC/GMT time +menuitem [Show:] -1 +menuitemcheckbox [ Gun ] "$hudgun" [ hudgun $arg1 ] +menuitemcheckbox [ Team icon ] "(= $hideteam 0)" [ hideteam (= $arg1 0) ] +menuitemcheckbox [ Icons ] "(= $hidehudequipment 0)" [ hidehudequipment (= $arg1 0) ] +menuitemcheckbox [ Console ] "(= $hideconsole 0)" [ hideconsole (= $arg1 0) ] +menuitemcheckbox [ Player names ] "$showtargetname" [ showtargetname $arg1 ] +menuitemcheckbox [ Spectator info ] "(= $hidespecthud 0)" [ hidespecthud (= $arg1 0) ] +menuitemcheckbox [ Quick messages ] "(= $hidehudmsgs 0)" [ hidehudmsgs (= $arg1 0) ] +menuitemcheckbox [ Damage direction indicator ] "(= $hidedamageindicator 0)" [ hidedamageindicator (= $arg1 0) ] +menuitemcheckbox [ Damage screen flash ] "$damagescreen" [ damagescreen $arg1 ] +menuitemslider [ Damage maxroll ] 0 (getvarrange max maxrolleffect) "$maxrolleffect" 1 [] [ maxrolleffect $arg1 ] +menuitemcheckbox [ Crosshair team-sign ] "$crosshairteamsign" [ crosshairteamsign $arg1 ] +menuitemcheckbox [ Team score counters ] "(= $hideteamscorehud 0)" [ hideteamscorehud (= $arg1 0) ] +menuitemcheckbox [ KTF flag direction indicator ] "(! $hidektfindicator)" [ hidektfindicator (! $arg1) ] +menuitemcheckbox [ Radar ] "(= $hideradar 0)" [ hideradar (= $arg1 0) ] +menuitemslider [ Radar zoom: ] 5 500 [ $radarheight ] 5 [][ radarheight $arg1 ] +menuitemslider [ Votes: ] 0 2 "$hidevote" 1 ["Always show" "Show until you vote" "Never show"] [ hidevote $arg1 ] +menuitemslider [ Graphics statistics: ] 0 2 "$showstats" 1 [None "FPS Only" All] [ showstats $arg1 ] +menuitemslider [ Game time: ] 0 2 "$gametimedisplay" 1 [None "Count backward" "Count forward"] [ gametimedisplay $arg1 ] +menuitemslider [ Wall clock: ] 0 6 [findlist $wallclockformatlist $wallclockformat] 1 [None "HH:MM (local, 24h)" "HH:MM:SS (local, 24h)" "HH:MM (local, 12h)" "HH:MM:SS (local, 12h)" "HH:MM (UTC/GMT)" "HH:MM:SS (UTC/GMT)"] [ alias wallclockformat (at $wallclockformatlist $arg1)] +menuitemslider [ Extra messages: ] 0 3 "$hudextras" 1 ["No extra messages" "Show extra messages in console" "Pop up extra messages!" "SPAM EXTRA MESSAGES!"] [ hudextras $arg1 ] +menuitemslider [ Hand alignment: ] 0 1 "$righthanded" 1 [Left-handed Right-handed] [ righthanded $arg1 ] +menuitemslider [ Max-roll: ] 0 (getvarrange max maxroll) "$maxroll" 1 [] [ maxroll $arg1 ] +menuitemslider [ Spectator max-roll: ] 0 (getvarrange max maxrollremote) "$maxrollremote" 2 [] [ maxrollremote $arg1 ] + + +//// Main > Settings > Console //// + +newmenu Console +menuitem "\f4Regular console:" -1 +menuitemslider "Console size (lines): " 0 20 "$consize" 1 [] [ consize $arg1 ] +menuitemslider "Console fade time (seconds until lines disappear): " 5 60 "$confade" 5 [] [ confade $arg1 ] +menuitemslider "Console transparency: " 120 255 "$conalpha" 15 [] [ conalpha $arg1 ] +menuitem "\f4Full consoles:" -1 +menuitemslider "Full console size (percent screen height): " 0 100 "$fullconsize" 5 [] [ fullconsize $arg1 ] +menuitemslider "2nd full console size (percent screen height): " 0 100 "$altconsize" 5 [] [ altconsize $arg1 ] +menuitem "\f4Keys:" -1 +menuitemkeyinput "Toggle (full-)console key: " key_toggleconsole +menuitemkeyinput "Rewind console key: " key_console_rewind +menuitemkeyinput "Forward console key: " key_console_forward +menuitemkeyinput "End of console key: " key_console_end +menuitemkeyinput "Scroll console key (+ mousewheel): " key_console_scroll +menuitem "\f4Inlined console graphics settings:" -1 +menuitemslider (concatword "Igraph size (" (getigraph ")") "): ") 80 300 "$igraphsize" 5 [] [ igraphsize $arg1 ] +menuitemslider "Igraph size for menu icons (\i\1): " 80 160 "$igraphsizehardcoded" 5 [] [ igraphsizehardcoded $arg1 ] +menuitemcheckbox "Stop igraph animation: " "! $igraphanimate" [ igraphanimate (! $arg1) ] +menuitemcheckbox "Disable igraphs: " "$hideigraphs" [ hideigraphs $arg1 ] + + +//// Main > Settings > Gameplay //// + +newmenu "\fsGameplay" +alias nickhighlight 0 +alias __gibsgore 1 +menuitemtextinput "Nickname: " "result $curname" [ name $arg1 ] +menuitemslider "Player skins: " 0 2 "$teamdisplaymode" 1 [Normal "Colored vests" "Full color"] [ teamdisplaymode $arg1 ] +menuitemslider "Custom player skins: " 0 2 "$hidecustomskins" 1 ["Always show" "Show in non-team modes" "Never show"] [ hidecustomskins $arg1 ] +menuitem "" -1 +menuitemcheckbox "Reduced violence mode: " "$poniesmodeon" [ reducedviolencemode $arg1 ] +menuitemslider "Gib gore: " 0 4 "$__gibsgore" 1 [Off Normal Good Messy Unrealistic] [ gibsgore $arg1 ] +menuitemslider "Name highlight color: " 0 9 "$nickhighlight" 1 [ "\f0green \f5(default)" "\f1blue" "\f2yellow" "\f3red" "\f4gray" "white" "\f6dark brown" "\f7dark red" "\f8purple" "\f9orange" ] [ nickhighlight = $arg1; HIGHLIGHT = (concatword "\f" $nickhighlight) ] +menuitemcheckbox "Show scores on death: " "$showscoresondeath" [ showscoresondeath $arg1 ] +menuitem "Change to the enemy team" changeteam +menuitem "Change weapon\i\3" [ showmenu Weapons ] +menuitem "Change player skin\i\3" [ showmenu (at [CLA RVSF] (player1 team)) ] +menuitem "Weapon settings\i\3" [ showmenu [Weapon Settings] ] +menuitem "Edit kill messages\i\3" [ showmenu [Kill Messages] ] +menuitem "Bot settings\i\3" [ showmenu [Bot settings] ] +menuitem "" -1 +menuitemcheckbox "Use high-res player skins" "(>= (findlist (zipmodlist active) protox_hq_reskin) 0)" [ if $arg1 [addzipmod protox_hq_reskin; resetgl] [zipmodremove protox_hq_reskin; resetgl] ] + +//// Main > Settings > Gameplay > Weapons //// newmenu Weapons - menuinit [ menuselection (curmenu) (findlist "assault subgun sniper shotgun carbine" $nextprimary) ] menumdl weapons/assault/menu mapmodel 75 12 looplist [ @@ -24,8 +209,9 @@ looplist [ carbine "TMP-M&A Carbine" ] [ w desc ] [execute (format [menuitem [%2] [nextprimary %1 ; echo %2 selected] [chmenumdl Weapons weapons/%1/menu mapmodel 75 12] ] $w $desc) ] -newmenu CLA +//// Main > Settings > Gameplay > CLA //// +newmenu CLA menuinit [ menuselection CLA (player1 skin_cla) ] menumdl playermodels/CLA/01 all 50 4 menuitem [Comandante] [ skin_cla 0 ] [ chmenumdl CLA playermodels/CLA/01 all 50 4 ] @@ -33,8 +219,9 @@ menuitem [Psycho] [ skin_cla 1 ] [ chmenumdl CLA playermodels/CLA/02 all 50 menuitem [Bomber] [ skin_cla 2 ] [ chmenumdl CLA playermodels/CLA/03 all 50 4 ] menuitem [Ripper] [ skin_cla 3 ] [ chmenumdl CLA playermodels/CLA/04 all 50 4 ] -newmenu RVSF +//// Main > Settings > Gameplay > RVSF //// +newmenu RVSF menuinit [menuselection RVSF (player1 skin_rvsf)] menumdl playermodels/RVSF/01 all 50 4 menuitem [Alpha] [ skin_rvsf 0 ] [ chmenumdl RVSF playermodels/RVSF/01 all 50 4 ] @@ -44,22 +231,472 @@ menuitem [Viper] [ skin_rvsf 3 ] [ chmenumdl RVSF playermodels/RVSF/04 all 50 4 menuitem [Swat] [ skin_rvsf 4 ] [ chmenumdl RVSF playermodels/RVSF/05 all 50 4 ] menuitem [Police] [ skin_rvsf 5 ] [ chmenumdl RVSF playermodels/RVSF/06 all 50 4 ] -newmenu [QUICK setup] +//// Main > Settings > Gameplay > Weapon Settings //// -menuitemtextinput [Nickname: ] [] [ name $arg1 ] -menuitemcheckbox [Use high-res player skins] "(>= (findlist (zipmodlist active) protox_hq_reskin) 0)" [ if $arg1 [addzipmod protox_hq_reskin] [zipmodremove protox_hq_reskin] ] -menuitemtextinput [Resolution (width): ] "$scr_w" [ scr_w $arg1 ] -menuitemtextinput [Resolution (height): ] "$scr_h" [ scr_h $arg1 ] +newmenu [Weapon Settings] +looplist [ subgun 3 assault 2 akimbo 2 ] [ g n ] [ alias (concatword __burstshots_ $g) $n ] +menuitemslider [Play hit sounds: ] 0 2 "$hitsound" 1 [Off "When server detects hits" "When client detects hits"] [ hitsound $arg1 ] +menuitemcheckbox [Auto weapon reload: ] "$autoreload" [ autoreload $arg1 ] +menuitemcheckbox [Auto switch to akimbo upon pickup: ] "$akimboautoswitch" [ akimboautoswitch $arg1 ] +menuitemslider [Akimbo end action: ] 0 3 "$akimboendaction" 1 ["Switch to knife" "Stay with pistol" "Switch to grenades" "Switch to primary"] [ akimboendaction $arg1 ] +menuitemcheckbox [SMG - Full Auto?] "(= (burstshots SUBGUN -1) 0)" [ if (= $arg1 0) [ burstshots SUBGUN $__burstshots_subgun ] [ burstshots SUBGUN 0 ]; refreshcurmenu ] +menuitemcheckbox [AR - Full Auto?] "(= (burstshots ASSAULT -1) 0)" [ if (= $arg1 0) [ burstshots ASSAULT $__burstshots_assault ] [ burstshots ASSAULT 0 ]; refreshcurmenu ] +menuitemcheckbox [Akimbo - Full Auto?] "(= (burstshots AKIMBO -1) 0)" [ if (= $arg1 0) [ burstshots AKIMBO $__burstshots_akimbo ] [ burstshots AKIMBO 0 ]; refreshcurmenu ] +menuitemslider [SMG - Shots per burst: ] 0 29 "$__burstshots_subgun" 1 [] [ burstshots SUBGUN $arg1; __burstshots_subgun = $arg1 ; refreshcurmenu ] +menuitemslider [AR - Shots per burst: ] 0 19 "$__burstshots_assault" 1 [] [ burstshots ASSAULT $arg1; __burstshots_assault = $arg1 ; refreshcurmenu ] +menuitemslider [Akimbo - Shots per burst: ] 0 19 "$__burstshots_akimbo" 1 [] [ burstshots AKIMBO $arg1; __burstshots_akimbo = $arg1 ; refreshcurmenu ] + +//// Main > Settings > Gameplay > Kill Messages //// + +newmenu [Kill Messages] +menuitem "\f9Frag messages: " -1 +menuitemtextinput "Pistol: " [ fragmessage PISTOL ] [ fragmessage PISTOL $arg1 ] [] 15 +menuitemtextinput "Carbine: " [ fragmessage CARBINE ] [ fragmessage CARBINE $arg1 ] [] 15 +menuitemtextinput "Shotgun: " [ fragmessage SHOTGUN ] [ fragmessage SHOTGUN $arg1 ] [] 15 +menuitemtextinput "SMG: " [ fragmessage SUBGUN ] [ fragmessage SUBGUN $arg1 ] [] 15 +menuitemtextinput "Sniper: " [ fragmessage SNIPER ] [ fragmessage SNIPER $arg1 ] [] 15 +menuitemtextinput "AR: " [ fragmessage ASSAULT ] [ fragmessage ASSAULT $arg1 ] [] 15 +//menuitemtextinput "CPistol: " [ fragmessage CPISTOL ] [ fragmessage CPISTOL $arg1 ] [] 15 +menuitemtextinput "Akimbo: " [ fragmessage AKIMBO ] [ fragmessage AKIMBO $arg1 ] [] 15 +menuitem [] -1 +menuitem "\f9Gib messages: " -1 +menuitemtextinput "Knife: " [ gibmessage KNIFE ] [ gibmessage KNIFE $arg1 ] [] 15 +menuitemtextinput "Shotgun: " [ gibmessage SHOTGUN ] [ gibmessage SHOTGUN $arg1 ] [] 15 +menuitemtextinput "Sniper: " [ gibmessage SNIPER ] [ gibmessage SNIPER $arg1 ] [] 15 +menuitemtextinput "Grenades: " [ gibmessage GRENADE ] [ gibmessage GRENADE $arg1 ] [] 15 + +//// Main > Settings > Gameplay > Bot settings //// +// see menus_bot.cfg + + +//// Main > Settings > Scoreboard //// + +newmenu Scoreboard +const __DEFAULT_SCOREBOARD [ + sc_flags Flags + sc_frags Frags + sc_deaths Deaths + sc_ratio Ratio + sc_score Score + sc_lag Lag + sc_clientnum "Client number" + sc_name Name +] +menuitem "\f40 has the highest priority" -1 +menuitem "\f4-1 disables the item entirely" -1 +menuitem "" -1 +looplist $__DEFAULT_SCOREBOARD [ var desc ] [ + menuitemslider (concatword $desc ": ") (getvarrange min $var) 7 (concatword "$" $var) 1 [] (concat $var "$arg1") +] +menuitem "" -1 +menuitem "Reset to default scoreboard" [ looplist $__DEFAULT_SCOREBOARD [ var desc ] [ $var (getvarrange default $var) ] ; refreshcurmenudelayed ] + + +//// Main > Settings > Keyboard //// + +newmenu Keyboard +menuitem "General keys\i\3" [ showmenu [General keys] ] +menuitem "Edit mode keys\i\3" [ showmenu [Editing keys] ] +menuitem "Spectate mode keys\i\3" [ showmenu [Spectating keys] ] +menuitem "" -1 +menuitem "Reset all keybinds to default settings\i\3" [ showmenu [Reset Binds] ] + +//// Main > Settings > Keyboard > General keys //// + +newmenu [General keys] +menuitem [Select an action and press ENTER to bind a new key:] -1 +menuitem "" -1 +menuitem "\f2Movement:" -1 +menuitemkeyinput [Forwards: ] forward +menuitemkeyinput [Left: ] left +menuitemkeyinput [Backwards: ] backward +menuitemkeyinput [Right: ] right +menuitemkeyinput [Jump: ] jump +menuitemkeyinput [Crouch: ] crouch +menuitem "" -1 +menuitem "\f2Weapon:" -1 +menuitemkeyinput [Attack: ] attack +menuitemkeyinput [Special action: ] altaction +menuitemkeyinput [Knife attack: ] key_knifeattack +menuitemkeyinput [Quick grenade throw: ] quicknadethrow +menuitemkeyinput [Reload: ] reload +menuitemkeyinput [Weapon menu: ] key_showmenuweapons +menuitemkeyinput [Primary weapon: ] primary +menuitemkeyinput [Secondary weapon: ] secondary +menuitemkeyinput [Grenades: ] grenades +menuitemkeyinput [Knife: ] melee +menuitemkeyinput [Next weapon: ] key_universaldelta_plus +menuitemkeyinput [Previous weapon: ] key_universaldelta_minus +menuitemkeyinput [Last weapon: ] key_prevweapon +menuitem "" -1 +menuitem "\f2Gameplay:" -1 +menuitemkeyinput [Show scores: ] key_showscores +menuitemkeyinput [Map overview: ] key_showmap +menuitemkeyinput [Drop flag: ] dropflag +menuitemkeyinput [Chat: ] saycommand +menuitemkeyinput [Team chat: ] key_teamchat +menuitemkeyinput [Quick answer to private message: ] quickanswer +menuitemkeyinput [Voice menu: ] key_showmenuvoicecom +menuitem "" -1 +menuitem "\f2Console:" -1 +menuitemkeyinput [Toggle console: ] key_toggleconsole +menuitemkeyinput [Rewind console: ] key_console_rewind +menuitemkeyinput [Forward console: ] key_console_forward +menuitemkeyinput [End of console: ] key_console_end +menuitem "" -1 +menuitem "\f2Mousewheel actions (need holding the key):" -1 +menuitemkeyinput [Scroll console: ] key_console_scroll +menuitemkeyinput [Adjust gamma: ] key_domodifier_1 +menuitemkeyinput [Adjust FOV: ] key_domodifier_2 +menuitem "" -1 +menuitem "\f2Misc keys:" -1 +menuitemkeyinput [Commandline: ] key_commandline +menuitemkeyinput [Screenshot: ] screenshot +menuitemkeyinput [Fullscreen: ] fullscreentoggle +menuitemkeyinput [Enter edit mode: ] edittoggle +menuitemkeyinput [Pause game: ] key_pause +menuitem "" -1 +menuitemtextinput [Lookup a keybind: ] [] [ + if (strlen $arg1) [ + echo (concatword "\f9Contents of keybind " (addpunct $arg1) :) + if (strcmp (result (keybind $arg1)) "") [ + echo (addpunct $arg1) is not bound + ][ + echo (keybind $arg1) + ] + ] +] [] 256 +menuitem "" -1 + +//// Main > Settings > Keyboard > Editing keys //// +// see menus_edit.cfg + +//// Main > Settings > Keyboard > Spectating keys //// + +newmenu [Spectating keys] +menuitem "Select an action and press ENTER to bind a new key:" -1 +menuitem "" -1 +menuitem "\f2Demo watching:" -1 +menuitemspectkeyinput [Toggle game speed: ] speckey_demo_togglespeed +menuitemspectkeyinput [Increase game speed: ] speckey_demo_gamespeedup +menuitemspectkeyinput [Decrease game speed: ] speckey_demo_gamespeeddown +menuitemspectkeyinput [Reset game speed: ] speckey_demo_gamespeedreset +menuitem "" -1 +menuitem "\f2Misc spectating keys:" -1 +menuitemspectkeyinput [Whois spectated player: ] speckey_whois_spectatecn +menuitem "" -1 +menuitemtextinput [Lookup a keyspecbind: ] [] [ + if (strlen $arg1) [ + echo (concatword "\f9Contents of keyspecbind " (addpunct $arg1) :) + if (strcmp (result (keyspecbind $arg1)) "") [ + echo (addpunct $arg1) is not bound + ][ + echo (keyspecbind $arg1) + ] + ] +] [] 256 +menuitem "" -1 + +//// Main > Settings > Keyboard > Reset Binds //// + +newmenu [Reset Binds] +menuitemcheckbox [Yes, reset all binds: ] [ tempalias __resetbindsyes 0 ] [ __resetbindsyes = $arg1 ] +menuitem "\f2 [ Apply! ] " [ if $__resetbindsyes resetbinds [ showmenu [] ] ] + + +//// Main > Settings > Mouse //// + +newmenu Mouse +menuitemcheckbox "Invert mouse: " "$invmouse" [ invmouse $arg1 ] +menuitemcheckbox "Automatic Sniper-scope sensitivity: " "$autoscopesens" [ autoscopesens $arg1 ] +menuitemtextinput "Mouse Sensitivity: " "$sensitivity" [ sensitivity $arg1 ] +menuitemtextinput "Mouse Acceleration: " "$mouseaccel" [ mouseaccel $arg1 ] +menuitemtextinput "Filter mouse (for bad ones): " "$mfilter" [ mfilter $arg1 ] +menuitemtextinput "Sniper-scope sensitivity scale: " "$scopesensscale" [ scopesensscale $arg1 ] +menuitem "" -1 +menuitem "Customize crosshairs\i\3" [ showmenu [Customize crosshairs] ] + +//// Main > Settings > Mouse > Customize crosshairs //// + +newmenu [Customize crosshairs] +tempalias __crosshairset teammate +menuitemslider "Crosshair size: " 0 50 "$crosshairsize" 5 [] [ crosshairsize $arg1 ] +menuitem "Change default crosshair\i\3" [ tempalias __crosshairset default ; showmenu Crosshairs ] +menuitem "Change scope crosshair\i\3" [ tempalias __crosshairset scope ; showmenu Crosshairs ] +menuitem "" -1 +menuitemslider "Choose crosshair: " 0 (- (listlen (listoptions crosshairnames)) 1) [findlist (listoptions crosshairnames) $__crosshairset] 1 (listoptions crosshairnames) [ tempalias __crosshairset (at (listoptions crosshairnames) $arg1) ; refreshcurmenu ] +menuitemvar [ concat "Change" $__crosshairset "crosshair\i\3" ] [ showmenu Crosshairs ] +menuitem "" -1 +menuitemcheckbox "Crosshair effect: change color for low health" [ (at "0 1 1 0" $crosshairfx) ] [ crosshairfx (at (if $arg1 ["2 1 2 1"] ["0 3 0 3"]) $crosshairfx) ] +menuitemcheckbox "Crosshair effect: show assault rifle spread increase" [ (at "0 1 0 1" $crosshairfx) ] [ crosshairfx (at (if $arg1 ["3 1 1 3"] ["0 2 2 0"]) $crosshairfx) ] + +//// Main > Settings > Mouse > Customize crosshairs > Crosshairs //// + +newmenu Crosshairs +menuinit [ + resetcurmenu + menuheader "" (concatword "'" $__crosshairset "' crosshair") + menudirlist "packages/crosshairs" png [ loadcrosshair $__crosshairset (concatword $arg1 .png) ] 1 +] + + +//// Main > Settings > Sound //// + +newmenu "\fsSound" +alias __soundquality 3 +menuitemslider "Sound volume: " 0 255 "$soundvol" 16 [] [ soundvol $arg1 ] +menuitemslider "Music volume: " 0 255 "$musicvol" 16 [] [ musicvol $arg1 ] +menuitemslider "Sound detail: " 1 3 "($__soundquality)" 1 [Low Medium High] [ __set_sound_quality $arg1 ] +menuitem "" -1 +menuitem "Mute/Un-mute specific sounds\i\3" [ showmenu [Mute specific sounds] ] +menuitem "" -1 +menuitem "Advanced settings:" -1 +menuitemslider " Sounds at once: " 0 100 "$maxsoundsatonce" 2 [] [ maxsoundsatonce $arg1 ] +menuitemslider " Voice-coms: " 0 2 "$voicecomsounds" 1 [Off On "Team only"] [ voicecomsounds $arg1 ] +menuitemslider " Heartbeat: " 0 99 "$heartbeat" 5 [] [ heartbeat $arg1 ] +menuitemcheckbox " Footsteps: " "$footsteps" [ footsteps $arg1 ] +menuitemcheckbox " Disable own footsteps: " "(= $localfootsteps)" [ localfootsteps (! $arg1) ] +menuitemcheckbox " Bullet hit: " "$bulletbouncesound" [ bulletbouncesound $arg1 ] +menuitemcheckbox " Bullet near-miss: " "$bulletairsound" [ bulletairsound $arg1 ] + +//// Main > Settings > Sound > Mute specific sounds //// + +newmenu [Mute specific sounds] +menuitem "Weapon sounds\i\3" [ showmenu [Mute weapon sounds] ] +menuitem "Bullet/explosion sounds\i\3" [ showmenu [Mute bullet/explosion sounds] ] +menuitem "Pain/death sounds\i\3" [ showmenu [Mute pain/death sounds] ] +menuitem "Pickup sounds\i\3" [ showmenu [Mute pickup sounds] ] +menuitem "Movement sounds\i\3" [ showmenu [Mute movement sounds] ] +menuitem "Voice-com sounds\i\3" [ showmenu [Mute voice-coms] ] +menuitem "Other sounds\i\3" [ showmenu [Mute other sounds] ] +menuitem "" -1 +menuitem "Un-mute all sounds" [ unmuteallsounds ] + +looplist [ + "Mute weapon sounds" WEAPON + "Mute pickup sounds" PICKUP + "Mute pain/death sounds" "PAIN OWNPAIN" + "Mute movement sounds" MOVEMENT + "Mute bullet/explosion sounds" BULLET + "Mute other sounds" OTHER + "Mute voice-coms" VOICECOM + ] [ mt sc ] [ + newmenu $mt + looplist (enumsounds $sc) [ idx desc ] [ menuitemcheckbox (concatword $desc ": ") (concat ! "(soundmuted" $idx ")") (concat mutesound $idx "$arg1") ] +] + + +//// Main > Settings > Misc //// + +newmenu Misc +alias askquit 1 +alias showmenuonstartup 1 +alias menufilesort_cgz 0 +alias menufilesort_dmo 0 +tempalias __fontlist [ default serif mono ] +tempalias __screenshottypes ["JPEG (Terrible Quality)" "JPEG (Bad Quality)" "JPEG (Good Quality)" "JPEG (Best Quality)" "PNG (Lossless)" "BMP (Lossless)"] +tempalias __getscreenshottype [ + tempalias __screenshottype (at "5 0 4" $screenshottype) // 0:BMP 1:JPG 2:PNG + if (= $screenshottype 1) [ + looplist [50 70 85] q [ if (< $q $jpegquality) [ += __screenshottype 1 ] ] + ] + result $__screenshottype +] +menuitemcheckbox "Auto map download: " "$autogetmap" [ autogetmap $arg1 ] +menuitem "Configure auto media download \i\1" [ showmenu "Autodownload config"] +menuitemcheckbox "Show gamemodes as acronyms: " "$modeacronyms" [ modeacronyms $arg1 ] +menuitemcheckbox "Show quit dialog when quitting: " "$askquit" [ askquit = $arg1 ] +menuitemcheckbox "Show main menu when starting AC: " "$showmenuonstartup" [ showmenuonstartup = $arg1 ] +menuitemcheckbox "Auto-screenshot: " "$autoscreenshot" [ autoscreenshot $arg1 ] +menuitemcheckbox "Allow HUD echos: " "$allowhudechos" [ allowhudechos $arg1 ] +menuitemslider "Servers to ping at once: " 0 50 "$maxservpings" 5 [] [ maxservpings $arg1 ] +menuitemslider "Milliseconds between pinging servers: " 1000 60000 "$servpingrate" 1000 [] [ servpingrate $arg1 ] +menuitemslider "Screenshot type: " 0 5 __getscreenshottype 1 $__screenshottypes [ screenshottype (at "1 1 1 1 2 0" $arg1) ; if (< $arg1 4) [ jpegquality (at [50 70 85 100] $arg1) ] ] +menuitemslider "Font type: " 0 2 [findlist $__fontlist (curfont)] 1 [Default Serif Monospace] [ setfont (at $__fontlist $arg1) ] +menuitemslider "Mini-map background style: " 0 2 "$showmapbackdrop" 1 ["Fully Transparent" Black White/Transparent] [ showmapbackdrop $arg1 ] +menuitemslider "Menu map file sort order: " 0 (- (listlen (listoptions menufilesortorders)) 1) "$menufilesort_cgz" 1 (listoptions menufilesortorders) [menufilesort_cgz = $arg1] +menuitemslider "Menu demo file sort order: " 0 (- (listlen (listoptions menufilesortorders)) 1) "$menufilesort_dmo" 1 (listoptions menufilesortorders) [menufilesort_dmo = $arg1] +menuitem "Edit hook script \i\1" [ showmenu "Edit cubescript hook" ] + +//// Main > Settings > Misc > Autodownload config //// + +newmenu "Autodownload config" +tempalias __pcksrv "" +menuinit [ + resetcurmenu + push serverlist (getpckserver) + push words (listlen $serverlist) + if (! $words) [ + menuitem "no package servers configured" -1 + ] [ + if (= $words 1) [ + menuitem $serverlist -1 + ] [ + menuitem "\f2priority\tping\tstatus\thost address" -1 + looplist $serverlist [host priority ping resolved] [ + resolved = (at ["\f2no response" "\f0ok"] $resolved) + if (<= $priority -1000) [ resolved = "\f2disabled" ] + if (<= $priority -10000) [ resolved = "\f3deleted" ] + menuitem (concatword (if (<= $priority -1000) "" $priority) "\t" $ping "\t\fs" $resolved "\fr\t" $host) (concat alias __pcksrv "[" (escape $host) $priority $ping (escape $resolved) "] ; showmenu [Configure package server]") + ] + ] + ] + menuitem "" -1 + menuitemcheckbox "Enable auto media download: " "$autodownload" [ autodownload $arg1 ] + menuitem "Add package server -->" [ inputcommand "" "addpckserver $cmdbuf" "enter host address:" ] + menuitem "" -1 + menuitem "\f4you need to restart the game for changes to take effect" -1 + pop serverlist words +] + +//// Main > Settings > Misc > Autodownload config > Configure package server //// + +newmenu "Configure package server" +menuinit [ + resetcurmenu + if (!= (listlen $__pcksrv) 4) [ + menuitem "----- no server selected ------" -1 + ] [ + push priority (at $__pcksrv 1) + menuitem (concatword "Host address \t\f2" (at $__pcksrv 0)) -1 + menuitemtextinput "Priority \t" $priority [addpckserver (at $__pcksrv 0) $arg1] + menuitem (concatword "Ping \t" (at $__pcksrv 2)) -1 + menuitem (concatword "Status \t" (at $__pcksrv 3)) -1 + menuitem "" -1 + if (<= $priority -1000) [ + menuitem "\f0[Enable server]" (concat addpckserver (at $__pcksrv 0) 0 "; closecurmenu") + ] [ + menuitem "\f3[Disable server]" (concat addpckserver (at $__pcksrv 0) -1000 "; closecurmenu") + ] + if (> $priority -10000) [ + menuitem "\f3[Mark server for deletion]" (concat addpckserver (at $__pcksrv 0) -10000 "; closecurmenu") + ] + pop priority + ] +] + +//// Main > Settings > Misc > Edit cubescript hook //// + +newmenu "Edit cubescript hook" +menuinit [ + resetcurmenu + looplist [ + autoexec "after autoexec.cfg" + afterinit "after saved.cfg but before autoexec.cfg" + mapstartalways "when a map was loaded" + onLastMin "when the last minute of a game has started" + start_intermission "when a game ended" + onNewMap "when a new (empty) map was created" + onPM "when you got a private message" + onConnect "after a player connected" + onDisconnect "after a player disconnected" + onCallVote "when a vote was called" + onVoteEnd "after voting ended" + onChangeVote "when a vote is changed" + ] [ cmd desc ] [ + menuitem (concatword "\fs\f2" $cmd ":\fr gets executed " $desc) (concat editalias $cmd) "" (if (checkalias $cmd) [ concatword "\fs\f4current: \fr" $$cmd ]) + ] +] + + +//// Main > Settings > Mod package //// + +newmenu "Mod package" +tempalias __zip "" +menuinit [ + resetcurmenu + menurenderoffset -20 0 + push ecurmenu (escape (curmenu)) + push activezips (zipmodlist active) + push inactivezips (zipmodlist inactive) + if (strlen $activezips) [ + menuitem "\f2Currently used mod packages (highest priority listed first)" -1 (concat chmenutexture $ecurmenu "") + looplist $activezips zip [ + menuitem (concatword "\fs\f9" $zip ":\fr " (at (zipmodgetdesc $zip) 0)) (concat alias __zip $zip "; showmenu [Configure mod package]") (concatword chmenutexture " " $ecurmenu "../modpreviews/" $zip ".jpg " $zip) + ] + menuitem "" -1 (concat chmenutexture $ecurmenu "") + ] + if (strlen $inactivezips) [ + menuitem "\f2Unused mod packages" -1 (concat chmenutexture $ecurmenu "") + looplist $inactivezips zip [ + menuitem (concatword "\fs\f9" $zip ":\fr " (at (zipmodgetdesc $zip) 0)) (concat alias __zip $zip "; showmenu [Configure mod package]") (concatword chmenutexture " " $ecurmenu "../modpreviews/" $zip ".jpg " $zip) + ] + menuitem "" -1 (concat chmenutexture $ecurmenu "") + ] + if (|| (strlen $activezips) (strlen $inactivezips)) [ ] [ menuitem "--- no mod packages available ---" -1 ] + if (strlen $activezips) [ menuitem "\f3Deactivate all mod packages" zipmodclear ] + menuitem "\f3Refresh textures (has no effect on already loaded models)" [ resetgl ; updateigraphs ] + pop activezips inactivezips ecurmenu +] + +//// Main > Settings > Mod package > Configure mod package //// + +newmenu "Configure mod package" +menuinit [ + resetcurmenu + menurenderoffset -20 0 + push ecurmenu (escape (curmenu)) + push activezips (zipmodlist active) + if (strlen $__zip) [ + chmenutexture (curmenu) (concatword "../modpreviews/" $__zip ".jpg") $__zip + push __c "\f2" + looplist (zipmodgetdesc $__zip) desc [ if (strlen $desc) [ menuitem (concat $__c $desc) -1 ] ; alias __c "" ] + pop __c + menuitem (concat "\f4revision:" (zipmodgetrevision $__zip)) -1 + menuitem "" -1 + if (< (findlist $activezips $__zip) 0) [ + menuitem (concatword "\f0Add \f9" $__zip "\f0 to the list of used mod packages") (concat addzipmod $__zip) + ] [ + menuitem (concatword "\f3Remove \f9" $__zip "\f0 from the list of used mod packages") (concat zipmodremove $__zip) + ] + menuitem "" -1 + menuitem "Show list of files in package" "showmenu [Show files in package]" + ] [ + menuitem "no zip selected" -1 + ] + pop activezips ecurmenu +] + +//// Main > Settings > Mod package > Configure mod package > Show files in package //// + +newmenu "Show files in package" +menuinit [ + resetcurmenu + if (strlen $__zip) [ + menuitem (concat "Files in package\f9" $__zip) -1 + menuitem "" -1 + looplist (zipmodgetfiles $__zip) aa [ menuitem $aa -1 ] + ] [ + menuitem "no zip selected" -1 + ] +] + + +//// Main > Settings > Reset settings //// + +newmenu [Reset settings] +menuinit [ tempalias __resetyes 0 ] +menuitemcheckbox "Yes, reset all settings: " [ $__resetyes ] [ __resetyes = $arg1 ] +menuitem "\f2 [ Apply! ] " [ if $__resetyes [ resetcfg 1; quit ] [ showmenu [] ] ] [ if $__resetyes [ echo "\f3Choose [Apply] and AssaultCube will now quit and your settings will be reset." ] ] + + +//// QUICK setup //// + +newmenu [QUICK setup] +menuitemtextinput "Nickname: " [] [ name $arg1 ] +menuitemcheckbox "Use high-res player skins" "(>= (findlist (zipmodlist active) protox_hq_reskin) 0)" [ if $arg1 [addzipmod protox_hq_reskin] [zipmodremove protox_hq_reskin] ] +menuitemtextinput "Resolution (width): " "$scr_w" [ scr_w $arg1 ] +menuitemtextinput "Resolution (height): " "$scr_h" [ scr_h $arg1 ] if (&& $desktopw $desktoph) [ menuitem (concatword "\f2Set\f5 resolution as in desktop (" $desktopw "x" $desktoph ")") [ scr_w $desktopw ; scr_h $desktoph ; refreshcurmenudelayed ] ] -menuitemcheckbox [Fullscreen: ] "$fullscreen" [ fullscreen $arg1 ] -menuitemtextinput [Mouse sensitivity: ] "$sensitivity" [ sensitivity $arg1 ] -menuitemcheckbox [Reduced violence mode: ] "$poniesmodeon" [ reducedviolencemode $arg1 ] -menuitemslider [Graphics detail: ] 1 6 "$gfxqualityalias" 1 [Horrible Low Medium Good High "INSANE! (May perform slowly on older gfx)"] [ new_gfx_quality $arg1 ] -menuitemslider [Sound detail: ] 1 3 "$__soundquality" 1 [Low Medium High] [ __set_sound_quality $arg1 ] -menuitemslider [Field of view: ] 75 120 "$fov" 2 [] [ fov $arg1 ] -menuitem [] -1 +menuitemcheckbox "Fullscreen: " "$fullscreen" [ fullscreen $arg1 ] +menuitemtextinput "Mouse sensitivity: " "$sensitivity" [ sensitivity $arg1 ] +menuitemcheckbox "Reduced violence mode: " "$poniesmodeon" [ reducedviolencemode $arg1 ] +menuitemslider "Graphics detail: " 1 6 "$gfxqualityalias" 1 [Horrible Low Medium Good High "INSANE! (May perform slowly on older gfx)"] [ new_gfx_quality $arg1 ] +menuitemslider "Sound detail: " 1 3 "$__soundquality" 1 [Low Medium High] [ __set_sound_quality $arg1 ] +menuitemslider "Field of view: " 75 120 "$fov" 2 [] [ fov $arg1 ] +menuitem "" -1 menuitem "\f0\t\t\t [ OK; View FAQ ]" [ closecurmenu; resetgl; load_faq ; showmenu faq ] menuitem "\f2\t\t\t [ OK ]" [ closecurmenu; resetgl ] @@ -230,335 +867,6 @@ const __set_sound_quality [ ] ] -newmenu [Reset settings] -menuinit [ resetyes = 0 ] // Ensures this menu works correctly. -menuitemcheckbox [Yes, reset all settings: ] [ resetyes = 1 ] [ resetyes = $arg1 ] -menuitem "\f2 [ Apply! ] " [ if $resetyes [ resetcfg 1; quit ] [ showmenu [] ] ] [ echo "\f3If the above option is ticked, AssaultCube will now quit and your settings will be reset." ] // If checkbox is ticked, reset settings and quit, otherwise, close menus. - -newmenu Keyboard - -menuitem [General keys...] [ showmenu [General keys] ] -menuitem [Edit mode keys...] [ showmenu [Editing keys] ] -menuitem [Spectate mode keys...] [ showmenu [Spectating keys] ] -menuitem [] -1 -menuitem [Reset keybinds to default settings...] [ showmenu [Reset Binds] ] - -newmenu [General keys] - -menuitem [Select an action and press ENTER to bind a new key:] -1 -menuitem [] -1 -menuitem "\f2Movement:" -1 -menuitemkeyinput [Forwards: ] forward -menuitemkeyinput [Left: ] left -menuitemkeyinput [Backwards: ] backward -menuitemkeyinput [Right: ] right -menuitemkeyinput [Jump: ] jump -menuitemkeyinput [Crouch: ] crouch -menuitem "" -1 -menuitem "\f2Weapon:" -1 -menuitemkeyinput [Attack: ] attack -menuitemkeyinput [Special action: ] altaction -menuitemkeyinput [Knife attack: ] key_knifeattack -menuitemkeyinput [Quick grenade throw: ] quicknadethrow -menuitemkeyinput [Reload: ] reload -menuitemkeyinput [Weapon menu: ] key_showmenuweapons -menuitemkeyinput [Primary weapon: ] primary -menuitemkeyinput [Secondary weapon: ] secondary -menuitemkeyinput [Grenades: ] grenades -menuitemkeyinput [Knife: ] melee -menuitemkeyinput [Next weapon: ] key_universaldelta_plus -menuitemkeyinput [Previous weapon: ] key_universaldelta_minus -menuitemkeyinput [Last weapon: ] key_prevweapon -menuitem "" -1 -menuitem "\f2Gameplay:" -1 -menuitemkeyinput [Show scores: ] key_showscores -menuitemkeyinput [Map overview: ] key_showmap -menuitemkeyinput [Drop flag: ] dropflag -menuitemkeyinput [Chat: ] saycommand -menuitemkeyinput [Team chat: ] key_teamchat -menuitemkeyinput [Quick answer to private message: ] quickanswer -menuitemkeyinput [Voice menu: ] key_showmenuvoicecom -menuitem "" -1 -menuitem "\f2Console:" -1 -menuitemkeyinput [Toggle console: ] key_toggleconsole -menuitemkeyinput [Rewind console: ] key_console_rewind -menuitemkeyinput [Forward console: ] key_console_forward -menuitemkeyinput [End of console: ] key_console_end -menuitem "" -1 -menuitem "\f2Mousewheel actions (need holding the key):" -1 -menuitemkeyinput [Scroll console: ] key_console_scroll -menuitemkeyinput [Adjust gamma: ] key_domodifier_1 -menuitemkeyinput [Adjust FOV: ] key_domodifier_2 -menuitem "" -1 -menuitem "\f2Misc keys:" -1 -menuitemkeyinput [Commandline: ] key_commandline -menuitemkeyinput [Screenshot: ] screenshot -menuitemkeyinput [Fullscreen: ] fullscreentoggle -menuitemkeyinput [Enter edit mode: ] edittoggle -menuitemkeyinput [Pause game: ] key_pause -menuitem [] -1 -menuitemtextinput [Lookup a keybind: ] [] [ - if (strlen $arg1) [ - echo (concatword "\f9Contents of keybind " (addpunct $arg1) :) - if (strcmp (result (keybind $arg1)) "") [ - echo (addpunct $arg1) is not bound - ][ - echo (keybind $arg1) - ] - ] -] [] 256 -menuitem [] -1 - -newmenu [Spectating keys] - -menuitem "Select an action and press ENTER to bind a new key:" -1 -menuitem "" -1 -menuitem "\f2Demo watching:" -1 -menuitemspectkeyinput [Toggle game speed: ] speckey_demo_togglespeed -menuitemspectkeyinput [Increase game speed: ] speckey_demo_gamespeedup -menuitemspectkeyinput [Decrease game speed: ] speckey_demo_gamespeeddown -menuitemspectkeyinput [Reset game speed: ] speckey_demo_gamespeedreset -menuitem "" -1 -menuitem "\f2Misc spectating keys:" -1 -menuitemspectkeyinput [Whois spectated player: ] speckey_whois_spectatecn -menuitem [] -1 -menuitemtextinput [Lookup a keyspecbind: ] [] [ - if (strlen $arg1) [ - echo (concatword "\f9Contents of keyspecbind " (addpunct $arg1) :) - if (strcmp (result (keyspecbind $arg1)) "") [ - echo (addpunct $arg1) is not bound - ][ - echo (keyspecbind $arg1) - ] - ] -] [] 256 -menuitem [] -1 - -newmenu Mouse -menuitemcheckbox [Invert mouse: ] "$invmouse" [ invmouse $arg1 ] -menuitemcheckbox [Automatic Sniper-scope sensitivity: ] "$autoscopesens" [ autoscopesens $arg1 ] -menuitemtextinput [Mouse Sensitivity: ] "$sensitivity" [ sensitivity $arg1 ] -menuitemtextinput [Mouse Acceleration: ] "$mouseaccel" [ mouseaccel $arg1 ] -menuitemtextinput [Filter mouse (for bad ones): ] "$mfilter" [ mfilter $arg1 ] -menuitemtextinput [Sniper-scope sensitivity scale: ] "$scopesensscale" [ scopesensscale $arg1 ] -menuitem [] -1 -menuitem [Customize crosshairs... ] [ showmenu [Customize crosshairs] ] - -const __crosshairlist [ result (listoptions crosshairnames) ] -tempalias __crosshairset (findlist (__crosshairlist) default) - -newmenu [Customize crosshairs] -menuitemslider [Crosshair size: ] 0 50 "$crosshairsize" 5 [] [ crosshairsize $arg1 ] -menuitem [Change default crosshair... ] [ tempalias __crosshairset (findlist (__crosshairlist) default); showmenu Crosshairs ] -menuitem [Change scope crosshair... ] [ tempalias __crosshairset (findlist (__crosshairlist) scope); showmenu Crosshairs ] -menuitem [] -1 -menuitemslider [Choose specific crosshair: ] 0 (- (listlen (__crosshairlist)) 1) "$__crosshairset" 1 (__crosshairlist) [ tempalias __crosshairset $arg1 ] -menuitem [Change specific crosshair... ] [ showmenu Crosshairs ] -menuitem [] -1 -menuitemcheckbox [Crosshair effect: change color for low health] [ (at "0 1 1 0" $crosshairfx) ] [ crosshairfx (at (if $arg1 ["2 1 2 1"] ["0 3 0 3"]) $crosshairfx) ] -menuitemcheckbox [Crosshair effect: show assault rifle spread increase] [ (at "0 1 0 1" $crosshairfx) ] [ crosshairfx (at (if $arg1 ["3 1 1 3"] ["0 2 2 0"]) $crosshairfx) ] - -newmenu Crosshairs -menuinit [ - resetcurmenu - menuheader "" (concatword "'" (at (__crosshairlist) $__crosshairset) "' crosshair") - menudirlist "packages/crosshairs" png [ loadcrosshair (at (__crosshairlist) $__crosshairset) (concatword $arg1 .png) ] 1 -] - -newmenu [Alternate edit binds] -menuitem "\f2Back" [ closecurmenu ] -menuitem [Click to use alternate edit binds] [ exec config/opt/alternateeditbinds.cfg; closecurmenu ] [ echo "\f3See config/opt/alternateeditbinds.cfg first" ] - -newmenu [Reset Binds] -menuitemcheckbox [Yes, reset all binds: ] [ resetbindsyes = 0 ] [ resetbindsyes = $arg1 ] -menuitem "\f2 [ Apply! ] " [ if $resetbindsyes resetbinds [ showmenu [] ] ] - -alias defaultgamma 100 - -newmenu video - -menuitemtextinput [Screen width: ] "$scr_w" [ scr_w $arg1 ] [] 11 -menuitemtextinput [Screen height: ] "$scr_h" [ scr_h $arg1 ] [] 11 -if (&& $desktopw $desktoph) [ - menuitem (concatword "\f2Set\f5 resolution as in desktop (" $desktopw "x" $desktoph ")") [ scr_w $desktopw ; scr_h $desktoph ; refreshcurmenudelayed ] -] -menuitem [Choose resolution from list...] [ showmenu [Display resolutions] ] -menuitem [] -1 -menuitemslider [Graphics detail: ] 1 6 "$gfxqualityalias" 1 [Horrible Low Medium Good High "INSANE! (May perform slowly on older gfx)"] [ new_gfx_quality $arg1 ] -menuitem [] -1 -menuitemslider [Field of view: ] 75 120 "$fov" 2 [] [ fov $arg1 ] -menuitemcheckbox [Fullscreen: ] "$fullscreen" [ fullscreen $arg1 ] -menuitemslider [Vsync: ] -1 1 "$vsync" 1 [Default Disabled Enabled] [ vsync $arg1 ] -menuitem [] -1 -menuitemslider [Set temporary gamma for this map: ] 30 300 "$gamma" 5 [] [ gamma $arg1 ] -menuitemtextinput [Set default gamma for this map: ] [$gamma] [setgamma $arg1] -menuitemtextinput [Set default gamma for maps without own default: ] [$defaultgamma] [ defaultgamma = $arg1 ] -menuitem [] -1 -menuitem [Advanced video settings...] [ showmenu [Advanced video settings] ] -menuitem [] -1 -menuitem "\f2\t\t\t [ Apply now! ]" [ resetgl ] - -newmenu [Display resolutions] -push __getar [ - push n (findlist [1250 1333 1777 1600] (div (* 1000 $arg1) $arg2)) - if (>= $n 0) [ - n = (at [5:4 4:3 16:9 16:10] $n) - ][ - n = (at (concat (concatword "~16:" (div (+ (div (* 160 $arg2) $arg1) 5) 10))) ~5:4 ~4:3) (+ (findlist [125 133] (div (* 100 $arg1) $arg2)) 1)) - ] - pop n -] -push reslist (getdisplayresolutions) -if (strlen $reslist) [ - menuitem "\f4Preferred resolutions:" -1 - looplist $reslist [w h] [ - menuitem (concatword (at ["" " "] (< $w 1000)) $w x $h "\t(" (__getar $w $h) ")") (concat scr_w $w ";" scr_h $h ";" closecurmenu) - ] - menuitem "" -1 - menuitem "\f4More resolutions:" -1 -][ - reslist = "17001 17001" -] -looplist [640 480 800 600 1024 768 1280 720 1280 800 1280 1024 1360 768 1366 768 1440 900 1600 900 1680 1050 1920 1080 1920 1200] [w h] [ - push d (&& (< $w (at $reslist 0)) (< $h (at $reslist 1))) - looplist $reslist [rw rh] [ - if (&& (= $w $rw) (= $h $rh)) [d = 0] - ] - if (pop d) [ - menuitem (concatword (at ["" " "] (< $w 1000)) $w x $h "\t(" (__getar $w $h) ")") (concat scr_w $w ";" scr_h $h ";" closecurmenu) - ] -] -pop reslist __getar - -const fsaa_valuemap [-1 0 2 4 8 16] -const aniso_valuemap [0 2 4 8 16] -const minlod_valuemap [60 100 200 250] -const watersubdiv_valuemap [16 8 4 2 1] - -newmenu [Advanced video settings] - -menuitemslider [Scope FOV: ] 5 60 "$scopefov" 5 [] [ scopefov $arg1 ] -menuitemslider [Antialiasing (FSAA): ] 0 5 "(findlist $fsaa_valuemap $fsaa)" 1 [Default Off 2 4 8 16] [ fsaa (at $fsaa_valuemap $arg1) ] -menuitemslider [Anisotropic filtering: ] 0 4 "(findlist $aniso_valuemap $aniso)" 1 [Off 2 4 8 16] [ aniso (at $aniso_valuemap $arg1) ] -menuitemslider [Minimal level of detail: ] 0 3 "(findlist $minlod_valuemap $minlod)" 1 [Low Decent Good Best] [ minlod (at $minlod_valuemap $arg1) ] -menuitemslider [Light error: ] 1 100 "$lighterror" 5 [] [ lighterror $arg1 ] -menuitemslider [Water subdivision: ] 0 4 "(findlist $watersubdiv_valuemap $watersubdiv)" 1 ["Lowest quality" "Low quality" "Medium quality" "High quality" "Highest quality"] [ watersubdiv (at $watersubdiv_valuemap $arg1) ] -menuitemslider [Dynamic shadows: ] 0 2 getshadowq 1 [Off Blob Stencil] [ setshadowq $arg1 ] -menuitemslider [Tex-reduce: ] -1 3 "$texreduce" 1 [] [ texreduce $arg1 ] -menuitemcheckbox [Water reflection: ] "$waterreflect" [ waterreflect $arg1 ] - -const getshadowq [ - if (&& $stencilshadow (>= $stencilbits 8)) [result 2] [ - if $dynshadow [result 1] [result 0] - ] -] - -const setshadowq [ - if (= $arg1 2) [ - stencilshadow 40 - stencilbits 8 - dynshadow 40 - ] [ - if (= $arg1 1) [ - stencilshadow 0 - stencilbits 0 - dynshadow 40 - ] [ - stencilshadow 0 - stencilbits 0 - dynshadow 0 - ] - ] -] - -menuitemcheckbox [Dynamic lights: ] "$dynlight" [ dynlight $arg1 ] -menuitemcheckbox [Bulletholes: ] "$bullethole" [ bullethole $arg1 ] -menuitemcheckbox [Scorch: ] "$scorch" [ scorch $arg1 ] -menuitemcheckbox "Ignore map override: Disable water reflection" "$ignoreoverride_nowaterreflect" [ ignoreoverride_nowaterreflect $arg1 ] -menuitemcheckbox "Ignore map override: Limit water waveheight" "$ignoreoverride_limitwaveheight" [ ignoreoverride_limitwaveheight $arg1 ] -menuitemcheckbox "Ignore map override: Disable stencil shadows" "$ignoreoverride_nostencilshadows" [ ignoreoverride_nostencilshadows $arg1 ] -menuitem [] -1 -menuitem [FPS Range...] [ showmenu [FPS Range] ] -menuitem [] -1 -menuitem "\f2\t\t [ Apply now! ]" [ resetgl ] - -newmenu [FPS Range] - -menuitem [My 486 0wnz y00 (8-10 FPS)] [ closecurmenu; fpsrange 8 10 ] -menuitem [Slow machine (20-25 FPS)] [ closecurmenu; fpsrange 20 25 ] -menuitem [Sensible default (30-40 FPS)] [ closecurmenu; fpsrange 30 40 ] -menuitem [FPS whore (60-60 FPS)] [ closecurmenu; fpsrange 60 60 ] -menuitem [I don't understand LOD (100+ FPS)] [ closecurmenu; fpsrange 100 1000 ] - - -const default_bursts [3 2 2] -const refreshcurmenu [ push __curmenu (curmenu); closecurmenu; showmenu (pop __curmenu) ] - -newmenu [Weapon Settings] -menuitemslider [Play hit sounds: ] 0 2 "$hitsound" 1 [Off "When server detects hits" "When client detects hits"] [ hitsound $arg1 ] -menuitemcheckbox [Auto weapon reload: ] "$autoreload" [ autoreload $arg1 ] -menuitemcheckbox [Auto switch to akimbo upon pickup: ] "$akimboautoswitch" [ akimboautoswitch $arg1 ] -menuitemslider [Akimbo end action: ] 0 3 "$akimboendaction" 1 ["Switch to knife" "Stay with pistol" "Switch to grenades" "Switch to primary"] [ akimboendaction $arg1 ] -menuitemcheckbox [SMG - Full Auto?] "(= (burstshots SUBGUN -1) 0)" [ if (= $arg1 0) [ burstshots SUBGUN (at $default_bursts 0) ] [ burstshots SUBGUN 0 ]; refreshcurmenu ] -menuitemcheckbox [AR - Full Auto?] "(= (burstshots ASSAULT -1) 0)" [ if (= $arg1 0) [ burstshots ASSAULT (at $default_bursts 1) ] [ burstshots ASSAULT 0 ]; refreshcurmenu ] -menuitemcheckbox [Akimbo - Full Auto?] "(= (burstshots AKIMBO -1) 0)" [ if (= $arg1 0) [ burstshots AKIMBO (at $default_bursts 2) ] [ burstshots AKIMBO 0 ]; refreshcurmenu ] -menuitemslider [SMG - Shots per burst: ] 0 29 "(burstshots SUBGUN -1)" 1 [] [ burstshots SUBGUN $arg1; refreshcurmenu ] -menuitemslider [AR - Shots per burst: ] 0 19 "(burstshots ASSAULT -1)" 1 [] [ burstshots ASSAULT $arg1; refreshcurmenu ] -menuitemslider [Akimbo - Shots per burst: ] 0 19 "(burstshots AKIMBO -1)" 1 [] [ burstshots AKIMBO $arg1; refreshcurmenu ] - -alias nickhighlight 0 -alias __gibsgore 1 - -newmenu gameplay -menuitemtextinput [Nickname: ] "result $curname" [ name $arg1 ] -menuitemslider [Player skins: ] 0 2 "$teamdisplaymode" 1 [Normal "Colored vests" "Full color"] [ teamdisplaymode $arg1 ] -menuitemslider [Custom player skins: ] 0 2 "$hidecustomskins" 1 ["Always show" "Show in non-team modes" "Never show"] [ hidecustomskins $arg1 ] -menuitem [] -1 -menuitemcheckbox [Reduced violence mode: ] "$poniesmodeon" [ reducedviolencemode $arg1 ] -menuitemslider [Gib gore: ] 0 4 "$__gibsgore" 1 [Off Normal Good Messy Unrealistic] [ gibsgore $arg1 ] -menuitemslider [Name highlight color: ] 0 9 "$nickhighlight" 1 [ "\f0green \f5(default)" "\f1blue" "\f2yellow" "\f3red" "\f4gray" "white" "\f6dark brown" "\f7dark red" "\f8purple" "\f9orange" ] [ nickhighlight = $arg1; HIGHLIGHT = (concatword "\f" $nickhighlight) ] -menuitemcheckbox [Show scores on death: ] "$showscoresondeath" [ showscoresondeath $arg1 ] -menuitem [Change to the enemy team] changeteam -menuitem [Change weapon...] [ showmenu Weapons ] -menuitemcheckbox [Use high-res player skins] "(>= (findlist (zipmodlist active) protox_hq_reskin) 0)" [ if $arg1 [addzipmod protox_hq_reskin; resetgl] [zipmodremove protox_hq_reskin; resetgl] ] -menuitem [Change player skin...] [ showmenu (at [CLA RVSF] (player1 team)) ] -menuitem [Weapon settings...] [ showmenu [Weapon Settings] ] -menuitem [Edit kill messages...] [ showmenu [Kill Messages] ] -menuitem [Bot settings...] [ showmenu [Bot settings] ] - -alias askquit 1 -alias showmenuonstartup 1 -alias menufilesort_cgz 0 -alias menufilesort_dmo 0 -tempalias __fontlist [ default serif mono ] - -tempalias __screenshottypes ["JPEG (Terrible Quality)" "JPEG (Bad Quality)" "JPEG (Good Quality)" "JPEG (Best Quality)" "PNG (Lossless)" "BMP (Lossless)"] -tempalias __getscreenshottype [ - tempalias __screenshottype (at "5 0 4" $screenshottype) // 0:BMP 1:JPG 2:PNG - if (= $screenshottype 1) [ - looplist [50 70 85] q [ if (< $q $jpegquality) [ += __screenshottype 1 ] ] - ] - result $__screenshottype -] - -newmenu Misc -menuitemcheckbox [Auto map download: ] "$autogetmap" [ autogetmap $arg1 ] -menuitem [Configure auto media download --> ] [ showmenu "Autodownload config"] -menuitemcheckbox [Show gamemodes as acronyms: ] "$modeacronyms" [ modeacronyms $arg1 ] -menuitemcheckbox [Show quit dialog when quitting: ] "$askquit" [ askquit = $arg1 ] -menuitemcheckbox [Show main menu when starting AC: ] "$showmenuonstartup" [ showmenuonstartup = $arg1 ] -menuitemcheckbox [Auto-screenshot: ] "$autoscreenshot" [ autoscreenshot $arg1 ] -menuitemcheckbox [Allow HUD echos: ] "$allowhudechos" [ allowhudechos $arg1 ] -menuitemslider [Servers to ping at once: ] 0 50 "$maxservpings" 5 [] [ maxservpings $arg1 ] -menuitemslider [Milliseconds between pinging servers: ] 1000 60000 "$servpingrate" 1000 [] [ servpingrate $arg1 ] -menuitemslider [Screenshot type: ] 0 5 __getscreenshottype 1 $__screenshottypes [ screenshottype (at "1 1 1 1 2 0" $arg1) ; if (< $arg1 4) [ jpegquality (at [50 70 85 100] $arg1) ] ] -menuitemslider [Console size: ] 0 20 "$consize" 1 [] [ consize $arg1 ] -menuitemslider [Font type: ] 0 2 [findlist $__fontlist (curfont)] 1 [Default Serif Monospace] [ setfont (at $__fontlist $arg1) ] -menuitemslider [Mini-map background style: ] 0 2 "$showmapbackdrop" 1 ["Fully Transparent" Black White/Transparent] [ showmapbackdrop $arg1 ] -menuitemslider [Menu map file sort order: ] 0 (- (listlen (listoptions menufilesortorders)) 1) "$menufilesort_cgz" 1 (listoptions menufilesortorders) [menufilesort_cgz = $arg1] -menuitemslider [Menu demo file sort order: ] 0 (- (listlen (listoptions menufilesortorders)) 1) "$menufilesort_dmo" 1 (listoptions menufilesortorders) [menufilesort_dmo = $arg1] -menuitem [Edit hook script --> ] [ showmenu "Edit cubescript hook" ] - // Reduced game violence mode... alias poniesmodeon 0 @@ -572,264 +880,6 @@ const reducedviolencemode [ pop x ] -const __DEFAULT_SCOREBOARD [ - sc_flags Flags - sc_frags Frags - sc_deaths Deaths - sc_ratio Ratio - sc_score Score - sc_lag Lag - sc_clientnum "Client number" - sc_name Name -] - -newmenu [Customize your scoreboard] -menuitem "0 has the highest priority..." -1 -menuitem "-1 disables the item entirely..." -1 -menuitem "" -1 -looplist $__DEFAULT_SCOREBOARD [ var desc ] [ - menuitemslider (concatword $desc ": ") (getvarrange min $var) 7 (concatword "$" $var) 1 [] (concat $var "$arg1") -] -menuitem "" -1 -menuitem "Reset to default scoreboard..." [ looplist $__DEFAULT_SCOREBOARD [ var desc ] [ $var (getvarrange default $var) ] ; refreshcurmenudelayed ] -menuitem "" -1 -menuitem "\t\t\f2[ Back ]" closecurmenu - -alias wallclockformat "" // strftime formatting -alias wallclockformatlist ["" %H:%M %H:%M:%S %I:%M%p %I:%M:%S%p U%H:%M U%H:%M:%S] //"U" at beginning means UTC/GMT time - -newmenu HUD - -menuitem [Show:] -1 -menuitemcheckbox [ Gun ] "$hudgun" [ hudgun $arg1 ] -menuitemcheckbox [ Team icon ] "(= $hideteam 0)" [ hideteam (= $arg1 0) ] -menuitemcheckbox [ Icons ] "(= $hidehudequipment 0)" [ hidehudequipment (= $arg1 0) ] -menuitemcheckbox [ Console ] "(= $hideconsole 0)" [ hideconsole (= $arg1 0) ] -menuitemcheckbox [ Player names ] "$showtargetname" [ showtargetname $arg1 ] -menuitemcheckbox [ Spectator info ] "(= $hidespecthud 0)" [ hidespecthud (= $arg1 0) ] -menuitemcheckbox [ Quick messages ] "(= $hidehudmsgs 0)" [ hidehudmsgs (= $arg1 0) ] -menuitemcheckbox [ Damage direction indicator ] "(= $hidedamageindicator 0)" [ hidedamageindicator (= $arg1 0) ] -menuitemcheckbox [ Damage screen flash ] "$damagescreen" [ damagescreen $arg1 ] -menuitemslider [ Damage maxroll ] 0 (getvarrange max maxrolleffect) "$maxrolleffect" 1 [] [ maxrolleffect $arg1 ] -menuitemcheckbox [ Crosshair team-sign ] "$crosshairteamsign" [ crosshairteamsign $arg1 ] -menuitemcheckbox [ Team score counters ] "(= $hideteamscorehud 0)" [ hideteamscorehud (= $arg1 0) ] -menuitemcheckbox [ KTF flag direction indicator ] "(! $hidektfindicator)" [ hidektfindicator (! $arg1) ] -menuitemcheckbox [ Radar ] "(= $hideradar 0)" [ hideradar (= $arg1 0) ] -menuitemslider [ Radar zoom: ] 5 500 [ $radarheight ] 5 [][ radarheight $arg1 ] -menuitemslider [ Votes: ] 0 2 "$hidevote" 1 ["Always show" "Show until you vote" "Never show"] [ hidevote $arg1 ] -menuitemslider [ Graphics statistics: ] 0 2 "$showstats" 1 [None "FPS Only" All] [ showstats $arg1 ] -menuitemslider [ Game time: ] 0 2 "$gametimedisplay" 1 [None "Count backward" "Count forward"] [ gametimedisplay $arg1 ] -menuitemslider [ Wall clock: ] 0 6 [findlist $wallclockformatlist $wallclockformat] 1 [None "HH:MM (local, 24h)" "HH:MM:SS (local, 24h)" "HH:MM (local, 12h)" "HH:MM:SS (local, 12h)" "HH:MM (UTC/GMT)" "HH:MM:SS (UTC/GMT)"] [ alias wallclockformat (at $wallclockformatlist $arg1)] -menuitemslider [ Extra messages: ] 0 3 "$hudextras" 1 ["No extra messages" "Show extra messages in console" "Pop up extra messages!" "SPAM EXTRA MESSAGES!"] [ hudextras $arg1 ] -menuitemslider [ Hand alignment: ] 0 1 "$righthanded" 1 [Left-handed Right-handed] [ righthanded $arg1 ] -menuitemslider [ Max-roll: ] 0 (getvarrange max maxroll) "$maxroll" 1 [] [ maxroll $arg1 ] -menuitemslider [ Spectator max-roll: ] 0 (getvarrange max maxrollremote) "$maxrollremote" 2 [] [ maxrollremote $arg1 ] -menuitem [] -1 -menuitem [Customize your scoreboard...] [ showmenu [Customize your scoreboard] ] - -alias __soundquality 3 - -newmenu sound - -menuitemslider [Sound volume: ] 0 255 "$soundvol" 16 [] [ soundvol $arg1 ] -menuitemslider [Music volume: ] 0 255 "$musicvol" 16 [] [ musicvol $arg1 ] -menuitemslider [Sound detail: ] 1 3 "($__soundquality)" 1 [Low Medium High] [ __set_sound_quality $arg1 ] -menuitem [] -1 -menuitem [Mute/Un-mute specific sounds...] [ showmenu [Mute specific sounds] ] -menuitem [] -1 -menuitem [Advanced settings:] -1 -menuitemslider [ Sounds at once: ] 0 100 "$maxsoundsatonce" 2 [] [ maxsoundsatonce $arg1 ] -menuitemslider [ Voice-coms: ] 0 2 "$voicecomsounds" 1 [Off On "Team only"] [ voicecomsounds $arg1 ] -menuitemslider [ Heartbeat: ] 0 99 "$heartbeat" 5 [] [ heartbeat $arg1 ] -menuitemcheckbox [ Footsteps: ] "$footsteps" [ footsteps $arg1 ] -menuitemcheckbox [ Disable own footsteps: ] "(= $localfootsteps)" [ localfootsteps (! $arg1) ] -menuitemcheckbox [ Bullet hit: ] "$bulletbouncesound" [ bulletbouncesound $arg1 ] -menuitemcheckbox [ Bullet near-miss: ] "$bulletairsound" [ bulletairsound $arg1 ] - -newmenu [Mute specific sounds] - -menuitem [Weapon sounds] [ showmenu [Mute weapon sounds] ] -menuitem [Bullet/explosion sounds] [ showmenu [Mute bullet/explosion sounds] ] -menuitem [Pain/death sounds] [ showmenu [Mute pain/death sounds] ] -menuitem [Pickup sounds] [ showmenu [Mute pickup sounds] ] -menuitem [Movement sounds] [ showmenu [Mute movement sounds] ] -menuitem [Voice-com sounds] [ showmenu [Mute voice-coms] ] -menuitem [Other sounds] [ showmenu [Mute other sounds] ] -menuitem [] -1 -menuitem [Un-mute all sounds...] [ unmuteallsounds ] - -looplist [ - "Mute weapon sounds" WEAPON - "Mute pickup sounds" PICKUP - "Mute pain/death sounds" "PAIN OWNPAIN" - "Mute movement sounds" MOVEMENT - "Mute bullet/explosion sounds" BULLET - "Mute other sounds" OTHER - "Mute voice-coms" VOICECOM - ] [ mt sc ] [ - newmenu $mt - looplist (enumsounds $sc) [ idx desc ] [ menuitemcheckbox (concatword $desc ": ") (concat ! "(soundmuted" $idx ")") (concat mutesound $idx "$arg1") ] -] - -newmenu [Kill Messages] -menuitem "\f9Frag messages: " -1 -menuitemtextinput [Pistol: ] [fragmessage 1] [ fragmessage 1 $arg1 ] [] 15 -menuitemtextinput [Carbine: ] [fragmessage 2] [ fragmessage 2 $arg1 ] [] 15 -menuitemtextinput [Shotgun: ] [fragmessage 3] [ fragmessage 3 $arg1 ] [] 15 -menuitemtextinput [SMG: ] [fragmessage 4] [ fragmessage 4 $arg1 ] [] 15 -menuitemtextinput [Sniper: ] [fragmessage 5] [ fragmessage 5 $arg1 ] [] 15 -menuitemtextinput [AR: ] [fragmessage 6] [ fragmessage 6 $arg1 ] [] 15 -menuitemtextinput [CPistol: ] [fragmessage 7] [ fragmessage 7 $arg1 ] [] 15 -menuitemtextinput [Akimbo: ] [fragmessage 9] [ fragmessage 9 $arg1 ] [] 15 -menuitem [] -1 -menuitem "\f9Gib messages: " -1 -menuitemtextinput [Knife: ] [gibmessage 0] [ gibmessage 0 $arg1 ] [] 15 -menuitemtextinput [Shotgun: ] [gibmessage 3] [ gibmessage 3 $arg1 ] [] 15 -menuitemtextinput [Sniper: ] [gibmessage 5] [ gibmessage 5 $arg1 ] [] 15 -menuitemtextinput [Grenades: ] [gibmessage 8] [ gibmessage 8 $arg1 ] [] 15 - -tempalias __pckserv "" - -newmenu "Autodownload config" -menuinit [ - resetcurmenu - push serverlist (getpckserver) - push words (listlen $serverlist) - if (! $words) [ - menuitem "no package servers configured" -1 - ] [ - if (= $words 1) [ - menuitem $serverlist -1 - ] [ - menuitem "\f2priority\tping\tstatus\thost address" -1 - looplist $serverlist [host priority ping resolved] [ - resolved = (at ["\f2no response" "\f0ok"] $resolved) - if (<= $priority -1000) [ resolved = "\f2disabled" ] - if (<= $priority -10000) [ resolved = "\f3deleted" ] - menuitem (concatword (if (<= $priority -1000) "" $priority) "\t" $ping "\t\fs" $resolved "\fr\t" $host) (concat alias __pcksrv "[" (escape $host) $priority $ping (escape $resolved) "] ; showmenu [Configure package server]") - ] - ] - ] - menuitem "" -1 - menuitemcheckbox [Enable auto media download: ] "$autodownload" [ autodownload $arg1 ] - menuitem "Add package server -->" [ inputcommand "" "addpckserver $cmdbuf" "enter host address:" ] - menuitem "" -1 - menuitem "\f4you need to restart the game for changes to take effect" -1 - pop serverlist words -] - -newmenu "Edit cubescript hook" -menuinit [ - resetcurmenu - looplist [ - autoexec "after autoexec.cfg" - afterinit "after saved.cfg but before autoexec.cfg" - mapstartalways "when a map was loaded" - onLastMin "when the last minute of a game has started" - start_intermission "when a game ended" - onNewMap "when a new (empty) map was created" - onPM "when you got a private message" - onConnect "after a player connected" - onDisconnect "after a player disconnected" - onCallVote "when a vote was called" - onVoteEnd "after voting ended" - onChangeVote "when a vote is changed" - ] [ cmd desc ] [ - menuitem (concatword "\fs\f2" $cmd ":\fr gets executed " $desc) (concat editalias $cmd) "" (if (checkalias $cmd) [ concatword "\fs\f4current: \fr" $$cmd ]) - ] -] - - -newmenu "Configure package server" -menuinit [ - resetcurmenu - if (!= (listlen $__pcksrv) 4) [ - menuitem "----- no server selected ------" -1 - ] [ - push priority (at $__pcksrv 1) - menuitem (concatword "Host address \t\f2" (at $__pcksrv 0)) -1 - menuitemtextinput "Priority \t" $priority [addpckserver (at $__pcksrv 0) $arg1] - menuitem (concatword "Ping \t" (at $__pcksrv 2)) -1 - menuitem (concatword "Status \t" (at $__pcksrv 3)) -1 - menuitem "" -1 - if (<= $priority -1000) [ - menuitem "\f0[Enable server]" (concat addpckserver (at $__pcksrv 0) 0 "; closecurmenu") - ] [ - menuitem "\f3[Disable server]" (concat addpckserver (at $__pcksrv 0) -1000 "; closecurmenu") - ] - if (> $priority -10000) [ - menuitem "\f3[Mark server for deletion]" (concat addpckserver (at $__pcksrv 0) -10000 "; closecurmenu") - ] - pop priority - ] -] - -tempalias __zip "" - -newmenu "Mod package" -menuinit [ - resetcurmenu - menurenderoffset -20 0 - push ecurmenu (escape (curmenu)) - push activezips (zipmodlist active) - push inactivezips (zipmodlist inactive) - if (strlen $activezips) [ - menuitem "\f2Currently used mod packages (highest priority listed first)" -1 (concat chmenutexture $ecurmenu "") - looplist $activezips zip [ - menuitem (concatword "\fs\f9" $zip ":\fr " (at (zipmodgetdesc $zip) 0)) (concat alias __zip $zip "; showmenu [Configure mod package]") (concatword chmenutexture " " $ecurmenu "../modpreviews/" $zip ".jpg " $zip) - ] - menuitem "" -1 (concat chmenutexture $ecurmenu "") - ] - if (strlen $inactivezips) [ - menuitem "\f2Unused mod packages" -1 (concat chmenutexture $ecurmenu "") - looplist $inactivezips zip [ - menuitem (concatword "\fs\f9" $zip ":\fr " (at (zipmodgetdesc $zip) 0)) (concat alias __zip $zip "; showmenu [Configure mod package]") (concatword chmenutexture " " $ecurmenu "../modpreviews/" $zip ".jpg " $zip) - ] - menuitem "" -1 (concat chmenutexture $ecurmenu "") - ] - if (|| (strlen $activezips) (strlen $inactivezips)) [ ] [ menuitem "--- no mod packages available ---" -1 ] - if (strlen $activezips) [ menuitem "\f3Deactivate all mod packages" zipmodclear ] - menuitem "\f3Refresh textures (has no effect on already loaded models)" [ resetgl ; updateigraphs ] - pop activezips inactivezips ecurmenu -] - -newmenu "Configure mod package" -menuinit [ - resetcurmenu - menurenderoffset -20 0 - push ecurmenu (escape (curmenu)) - push activezips (zipmodlist active) - if (strlen $__zip) [ - chmenutexture (curmenu) (concatword "../modpreviews/" $__zip ".jpg") $__zip - push __c "\f2" - looplist (zipmodgetdesc $__zip) desc [ if (strlen $desc) [ menuitem (concat $__c $desc) -1 ] ; alias __c "" ] - pop __c - menuitem (concat "\f4revision:" (zipmodgetrevision $__zip)) -1 - menuitem "" -1 - if (< (findlist $activezips $__zip) 0) [ - menuitem (concatword "\f0Add \f9" $__zip "\f0 to the list of used mod packages") (concat addzipmod $__zip) - ] [ - menuitem (concatword "\f3Remove \f9" $__zip "\f0 from the list of used mod packages") (concat zipmodremove $__zip) - ] - menuitem "" -1 - menuitem "Show list of files in package" "showmenu [Show files in package]" - ] [ - menuitem "no zip selected" -1 - ] - pop activezips ecurmenu -] - -newmenu "Show files in package" -menuinit [ - resetcurmenu - if (strlen $__zip) [ - menuitem (concat "Files in package\f9" $__zip) -1 - menuitem "" -1 - looplist (zipmodgetfiles $__zip) aa [ menuitem $aa -1 ] - ] [ - menuitem "no zip selected" -1 - ] -] // game account management menus diff --git a/config/opt/autosave.cfg b/config/opt/autosave.cfg index 5e648daa..35c4e1a0 100644 --- a/config/opt/autosave.cfg +++ b/config/opt/autosave.cfg @@ -23,7 +23,7 @@ const execAutoSave [ const doAutoSave [ if $autosavemap [ - if (&& (! (strstr $defaultmaps (curmap))) (strlen (curmap))) [ + if (&& (! (strstr $__defaultmaps (curmap))) (strlen (curmap))) [ if $editing execAutoSave [ if (= $gamemode (modenum coop)) execAutoSave ] diff --git a/config/opt/faq.cfg b/config/opt/faq.cfg index d3a725c8..1bc3b3bb 100644 --- a/config/opt/faq.cfg +++ b/config/opt/faq.cfg @@ -85,8 +85,9 @@ faqAnswer_8 = [ "http://assault.cubers.net/docs/license.html - AssaultCube Licensing Information" ] -newmenu faq +//// Main > Help > FAQ //// +newmenu faq loop i (listlen $faqQuestions) [ menuitem (concatword (at ["\f2" "\fD"] (&b $i 1)) (format [#%1: ] (+ $i 1)) (at $faqQuestions $i)) -1 diff --git a/config/opt/parsestring.cfg b/config/opt/parsestring.cfg index 403e81a4..6242064b 100644 --- a/config/opt/parsestring.cfg +++ b/config/opt/parsestring.cfg @@ -52,8 +52,8 @@ const trimAllUnnecessaryWhitespace [ ] ] 1 if (&& (&& (!= $charsbegin -1) (!= $charsend -1)) (!= $charsbegin $charsend)) [ - return (substr $strtotrim $charsbegin (- (+ $charsend 1) $charsbegin)) - ] [ return $strtotrim ] + result (substr $strtotrim $charsbegin (- (+ $charsend 1) $charsbegin)) + ] [ result $strtotrim ] ] // trimAllWhitespace - Returns a modified string after removing any whitespace characters from the original. const trimAllWhitespace [ @@ -64,6 +64,6 @@ const trimAllWhitespace [ trimmedstr = (concatword $trimmedstr $twh) ] ] - return $trimmedstr + result $trimmedstr ] diff --git a/config/opt/survival.cfg b/config/opt/survival.cfg index 65851e60..b163e486 100644 --- a/config/opt/survival.cfg +++ b/config/opt/survival.cfg @@ -23,7 +23,7 @@ looplist [ timeBetChkPts 60000 timeUntilTele 90000 ] [ a v ] [ alias $a $v ] -alias survMap (rnd (listlen $defaultmaps)) +alias survMap (rnd (listlen $__defaultmaps)) // reset working variables const survResetAliases [gotCheckPoint lastCheckPoint survIsFinished startedSurvival startedOBCount startPreSurvMillis startSurvMillis survKills survTeleported survTotalDmg survOrigSets backInZone changingspeed changinggamma] @@ -37,11 +37,11 @@ const survDifList ["6 1 60000 90000 20" "8 2 45000 60000 30" "10 3 30000 45000 4 const survSetDif [if (checkrange $arg1 0 3) [ survDifficulty = $arg1; loop sdl 5 [ (at $survSetsList $sdl) = (at (at $survDifList $survDifficulty) $sdl) ] ] [ sleep 1000 [ echo "\f3Error: \f5invalid difficulty, defaulting to" (genSurvDifStr 0) ] 1; survSetDif 0 ]; nonSurvDefaults = 0 ] newmenu [Survival Mode] -menuitemslider "Map: " 0 (- (listlen $defaultmaps) 1) "$survMap" 1 [ac_aqueous ac_arabian ac_arctic ac_arid ac_avenue ac_cavern ac_complex ac_depot ac_desert ac_desert2 ac_desert3 ac_douze ac_edifice ac_elevation ac_gothic ac_iceroad ac_industrial ac_ingress ac_keller ac_lainio ac_mines ac_outpost ac_power ac_rattrap ac_scaffold ac_shine ac_snow ac_stellar ac_sunset ac_swamp ac_terros ac_toxic ac_urban ac_venison ac_wasteland ac_werk] [ survMap = $arg1 ] +menuitemslider "Map: " 0 (- (listlen $__defaultmaps) 1) "$survMap" 1 [ac_aqueous ac_arabian ac_arctic ac_arid ac_avenue ac_cavern ac_complex ac_depot ac_desert ac_desert2 ac_desert3 ac_douze ac_edifice ac_elevation ac_gothic ac_iceroad ac_industrial ac_ingress ac_keller ac_lainio ac_mines ac_outpost ac_power ac_rattrap ac_scaffold ac_shine ac_snow ac_stellar ac_sunset ac_swamp ac_terros ac_toxic ac_urban ac_venison ac_wasteland ac_werk] [ survMap = $arg1 ] menuitemslider "Difficulty: " 0 3 "$survDifficulty" 1 [easy intermediate hard impossible] [ survSetDif $arg1 ] menuitem [] -1 menuitem "\t\t Customize..." [ showmenu [Survival Mode - Customize] ] -menuitem "\t\t\f2 [ Start! ]" [ survival (at $defaultmaps $survMap) ] +menuitem "\t\t\f2 [ Start! ]" [ survival (at $__defaultmaps $survMap) ] newmenu [Survival Mode - Customize] menuitemcheckbox "Enable survival damage effects (uses gamespeed/gamma)" "$survDamageEffects" [ survDamageEffects = $arg1 ] diff --git a/config/resetbinds.cfg b/config/resetbinds.cfg index 618d6622..a8f8f52c 100644 --- a/config/resetbinds.cfg +++ b/config/resetbinds.cfg @@ -27,7 +27,7 @@ alias key_prevweapon [ weapon (prevweapon) ] alias key_pause [ paused (! $paused) ] alias editkey_editmeta2 [ editmeta2down = 1 ; onrelease [ editmeta2down = 0 ] ] -alias editkey_delete_entity [if $editmeta2down [showmenu "deleted entities" ; menuselection "deleted entities" (- (unlistdeletedentity) 1)] [if $editmetakeydown undelent delent]] +alias editkey_delete_entity [if $editmeta2down [showmenu "Deleted entities" ; menuselection "Deleted entities" (- (unlistdeletedentity) 1)] [if $editmetakeydown undelent delent]] alias editkey_show_menu [ showmenu editing ] alias editkey_show_menu_light [ showmenu Lighting ] alias editkey_equalize_floor [ equalize 0 ] diff --git a/config/scripts.cfg b/config/scripts.cfg index def4bcfa..73c2c1b6 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -60,10 +60,10 @@ const fullscreentoggle [ fullscreen (! $fullscreen) ] const editsvar [ inputcommand $$arg1 (concatword "push q (addpunct $cmdbuf) ; " $arg1 " (at $q 0) ; pop q") (concatword "edit " $arg1 :) ] const editmapmsg [ editsvar mapmsg ] const editalias [ if (checkalias $arg1) 0 [ alias $arg1 "" ] ; inputcommand $$arg1 (concatword "push q (addpunct $cmdbuf) ; " $arg1 " = (at $q 0) ; pop q") (concatword "edit " $arg1 :) ] -const return [ result $arg1 ] const run [ push n (concatword "exec config/" $arg1 ".cfg ") ; loop i (- $numargs 1) [ n = (concat $n (getalias (concatword "arg" (+ $i 2)))) ] ; n ; pop n] const closecurmenu [ closemenu (curmenu) ] const resetcurmenu [ delmenu (curmenu) ; newmenu (curmenu) ] +const refreshcurmenu [ push __curmenu (curmenu); closecurmenu; showmenu (pop __curmenu) ] const refreshcurmenudelayed [ push __curmenu (curmenu); closecurmenu; sleep 0 [ showmenu (pop __curmenu) ] ] // Auto-completions @@ -287,7 +287,7 @@ const join [ connect $arg1 $arg2 $arg3 ] const reconnect [ if $numargs [ tempalias svpass $arg1 ] [ tempalias svpass [] ]; if $connected [ tempalias svdata (curserver); afterdisconnect [ connect (at $svdata 0) (at $svdata 1) $svpass ] ] ] const dlmap [ getmap $arg1 [ sleep 2500 (concat map $arg1) ] ] -const rndmap [ result (at $defaultmaps (rnd (listlen $defaultmaps))) ] +const rndmap [ result (at $__defaultmaps (rnd (listlen $__defaultmaps))) ] const rrnd [ + (rnd (- $arg2 $arg1)) $arg1 ] const ++ [ if (checkalias $arg1) [ += $arg1 1 ] ] diff --git a/source/src/client.cpp b/source/src/client.cpp index d9507b00..d3e97a6e 100644 --- a/source/src/client.cpp +++ b/source/src/client.cpp @@ -862,16 +862,18 @@ void shiftgametime(int newmillis) } } -void setminutesremaining(int *minutes) +void setminutesremaining(char *minutes) { - shiftgametime(gametimemaximum - (*minutes)*60000); + if(*minutes) shiftgametime(gametimemaximum - ATOI(minutes) * 60000); } +COMMANDN(setmr, setminutesremaining, "s"); -void rewinddemo(int *seconds) +void rewinddemo(char *seconds) { int gamemillis = gametimecurrent+(lastmillis-lastgametimeupdate); - shiftgametime(gamemillis - (*seconds)*1000); + if(*seconds) shiftgametime(gamemillis - ATOI(seconds) * 1000); } +COMMANDN(rewind, rewinddemo, "s"); COMMAND(sendmap, "s"); COMMAND(getmap, "ss"); @@ -880,6 +882,4 @@ COMMAND(resetsecuremaps, ""); COMMAND(securemap, "s"); COMMAND(getdemo, "is"); COMMAND(listdemos, ""); -COMMANDN(setmr, setminutesremaining, "i"); -COMMANDN(rewind, rewinddemo, "i");