defaultmaps now maps_all
This commit is contained in:
@@ -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 $__maps_all $arg1)) ]
|
||||
|
||||
|
||||
// basic categories
|
||||
|
||||
+11
-2
@@ -14,13 +14,17 @@ menuitem "Quit AssaultCube" quit
|
||||
|
||||
// curated maps per possible gamemodes
|
||||
// TODO: the engine can determine possible modes on mapload - a clever method needs to include saving known/established lists to avoid reworking them on each client start.
|
||||
// Accepting redundancy one could create a list per gamemode; but of the official maps only ac_douze does not fit the basic toggle between with-flags/without-flags maps …
|
||||
// … so we have two extra lists besides "all" & "flags" to cater to it.
|
||||
|
||||
// Add maps to the below list to include them in the normal map menu (also for botmaps). Modes: DM LSS OSOK PF SURV
|
||||
const __maps_all [ac_africa ac_aqueous ac_arabian ac_arctic ac_arctic2 ac_arid ac_avenue ac_coal ac_complex ac_depot ac_desert ac_desert2 ac_desert3 ac_douze ac_dusk ac_edifice ac_elevation ac_gothic ac_industrial ac_ingress ac_kazemat ac_keller ac_lainio ac_mines ac_nocturne ac_origin ac_outpost ac_power ac_rampart 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]
|
||||
// this list is like maps_all but without ac_douze the support TDM TLSS TOSOK TPF and TSURV
|
||||
// this list is like maps_all (but without ac_douze) that support TDM TLSS TOSOK TPF and TSURV
|
||||
const __maps_most [ac_africa ac_aqueous ac_arabian ac_arctic ac_arctic2 ac_arid ac_avenue ac_coal ac_complex ac_depot ac_desert ac_desert2 ac_desert3 ac_dusk ac_edifice ac_elevation ac_gothic ac_industrial ac_ingress ac_kazemat ac_keller ac_lainio ac_mines ac_nocturne ac_origin ac_outpost ac_power ac_rampart 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]
|
||||
// this list is for maps with flags that support CTF KTF and TKTF
|
||||
// this list is for maps with flags that support CTF and KTF
|
||||
const __maps_flags [ac_africa ac_aqueous ac_arabian ac_arctic2 ac_arid ac_avenue ac_coal ac_depot ac_desert3 ac_dusk ac_edifice ac_elevation ac_gothic ac_industrial ac_ingress ac_kazemat ac_keller ac_lainio ac_mines ac_nocturne ac_origin ac_outpost ac_power ac_rampart ac_shine ac_stellar ac_sunset ac_swamp ac_terros ac_urban ac_venison ac_werk]
|
||||
// this list is like maps_flags (but with ac_douze) that support TKTF
|
||||
const __maps_tktf [ac_africa ac_aqueous ac_arabian ac_arctic2 ac_arid ac_avenue ac_coal ac_depot ac_desert3 ac_douze ac_dusk ac_edifice ac_elevation ac_gothic ac_industrial ac_ingress ac_kazemat ac_keller ac_lainio ac_mines ac_nocturne ac_origin ac_outpost ac_power ac_rampart ac_shine ac_stellar ac_sunset ac_swamp ac_terros ac_urban ac_venison ac_werk]
|
||||
|
||||
// Start maps.
|
||||
const __genmapitems [
|
||||
@@ -52,6 +56,11 @@ __genmapitems $__maps_flags
|
||||
menuitem [] -1
|
||||
menuitem "Show all custom maps\i\3" [showmenu all_custom_maps]
|
||||
|
||||
newmenu maps_tktf
|
||||
menutitle "maps with flags"
|
||||
__genmapitems $__maps_tktf
|
||||
menuitem [] -1
|
||||
menuitem "Show all custom maps\i\3" [showmenu all_custom_maps]
|
||||
|
||||
//// Main > Play demo ////
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ const genbotmaps [
|
||||
menuitemmapload $listmapname (concat "tmp_botmap =" $listmapname "; startbotmap")
|
||||
]
|
||||
]
|
||||
genbotmaps $__defaultmaps
|
||||
genbotmaps $__maps_all
|
||||
|
||||
tempalias tmp_botskill good
|
||||
tempalias tmp_numbots 1
|
||||
|
||||
@@ -103,7 +103,7 @@ menuitem [Survivor] [ mode 3; showmenu maps ]
|
||||
menuitem [Capture the Flag] [ mode 5; showmenu maps_flags ]
|
||||
menuitem [Hunt the Flag] [ mode 13; showmenu maps_most ]
|
||||
menuitem [Keep the Flag] [ mode 15; showmenu maps_flags ]
|
||||
menuitem [Team Keep the Flag] [ mode 14; showmenu maps_flags ]
|
||||
menuitem [Team Keep the Flag] [ mode 14; showmenu maps_tktf ]
|
||||
menuitem [Team Pistol Frenzy] [ mode 16; showmenu maps_most ]
|
||||
menuitem [Pistol Frenzy] [ mode 6; showmenu maps ]
|
||||
menuitem [Team Last Swiss Standing] [ mode 17; showmenu maps_most ]
|
||||
|
||||
@@ -23,7 +23,7 @@ looplist [
|
||||
timeBetChkPts 60000
|
||||
timeUntilTele 90000
|
||||
] [ a v ] [ alias $a $v ]
|
||||
alias survMap (rnd (listlen $__defaultmaps))
|
||||
alias survMap (rnd (listlen $__maps_all))
|
||||
|
||||
// reset working variables
|
||||
const survResetAliases [gotCheckPoint lastCheckPoint survIsFinished startedSurvival startedOBCount startPreSurvMillis startSurvMillis survKills survTeleported survTotalDmg survOrigSets backInZone changingspeed changinggamma]
|
||||
@@ -41,7 +41,7 @@ menuitemslider "Map: " 0 -1 "$survMap" [ac_aqueous ac_arabian ac_arctic ac_arid
|
||||
menuitemslider "Difficulty: " 0 3 "$survDifficulty" [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 $__maps_all $survMap) ]
|
||||
|
||||
newmenu [Survival Mode - Customize]
|
||||
menuitemcheckbox "Enable survival damage effects (uses gamespeed/gamma)" "$survDamageEffects" [ survDamageEffects = $arg1 ]
|
||||
|
||||
+1
-1
@@ -303,7 +303,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 $__maps_all (rnd (listlen $__maps_all))) ]
|
||||
const rrnd [ + (rnd (+ (- $arg2 $arg1) 1)) $arg1]
|
||||
|
||||
const listaverage [ push sum "" ; looplist $arg1 n [ +=f sum $n ] ; if (strlen $sum) [ div=f sum (listlen $arg1) ] ; result (pop sum) ]
|
||||
|
||||
@@ -92,10 +92,10 @@ fi
|
||||
if [ "$ANSR" = "y" ] || [ "$ANSR" = "Y" ] || [ "$ANSR" = "yes" ] || [ "$ANSR" = "YES" ] || [ "$1" = "--all" ]; then
|
||||
cd $PATHTOACDIR/config
|
||||
|
||||
# Replacement text for "const defaultmaps":
|
||||
DEFLTMAPS=`echo "const defaultmaps [" $MAPSLIST "]"`
|
||||
# Replacement text for "const defaultmaps"(now __maps_all):
|
||||
DEFLTMAPS=`echo "const __maps_all [" $MAPSLIST "]"`
|
||||
|
||||
sed -i 's/const defaultmaps..*/'"$DEFLTMAPS"'/g' menus.cfg
|
||||
sed -i 's/const __maps_all .*/'"$DEFLTMAPS"'/g' menus.cfg
|
||||
echo "The following official maps are NOT listed for CTF mode currently:"
|
||||
echo $NONCTFLIST
|
||||
echo "Add a map to this list (Y/N)?"
|
||||
|
||||
Reference in New Issue
Block a user