From 9d82799ffb732fac453b716d49c0220d454f5ec6 Mon Sep 17 00:00:00 2001 From: driAn Date: Sat, 16 Feb 2008 18:12:20 +0000 Subject: [PATCH] voicecom menu git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1652 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/keymap.cfg | 2 +- config/menus_multiplayer.cfg | 84 ++++++++++++++++++------------------ 2 files changed, 44 insertions(+), 42 deletions(-) diff --git a/config/keymap.cfg b/config/keymap.cfg index 10e636b3..2b8ad889 100755 --- a/config/keymap.cfg +++ b/config/keymap.cfg @@ -70,7 +70,7 @@ keymap 114 R "recalc" keymap 115 S "say :)" keymap 116 T "saycommand" keymap 117 U "undo" -keymap 118 V "showmenu voicecom" +keymap 118 V [ if $editing [ paste ] [ showmenu voicecom ] ] keymap 119 W "" keymap 120 X "delent" keymap 121 Y "saycommand %" diff --git a/config/menus_multiplayer.cfg b/config/menus_multiplayer.cfg index e67ad1da..f0ba1f4d 100644 --- a/config/menus_multiplayer.cfg +++ b/config/menus_multiplayer.cfg @@ -45,59 +45,61 @@ menuitem "Open" "mastermode 0" menuitem "Private" "mastermode 1" -newmenu voicecom 1 +newmenu voicecom 1 1 -menuitem "Team Commands" [showmenu "Team Commands"] -menuitem "Team State" [showmenu "Team State"] -menuitem "Team Talk" [showmenu "Team Talk"] -menuitem "Team Shouts" [showmenu "Team Shouts"] -menuitem "Public Talk" [showmenu "Public Talk"] +menuitem "1. Team Commands" [showmenu "Team Commands"] +menuitem "2. Team State" [showmenu "Team State"] +menuitem "3. Team Talk" [showmenu "Team Talk"] +menuitem "4. Team Shouts" [showmenu "Team Shouts"] +menuitem "5. Public Talk" [showmenu "Public Talk"] -alias genvcitem [ - menuitem $arg1 (concat "voicecom" $arg2 (concatword "[" $arg1 "]")) + +alias vcrnd [ // pick random shout if possible + alias len (listlen $arg1) + if (> $len 1) [ + alias r (rnd $len) + voicecom (at $arg1 $r) (at $arg2 $r) + ] [ + voicecom $arg1 $arg2 + ] ] -newmenu "Team Commands" 1 - -genvcitem "Come on, move!" comeonmove -genvcitem "Cover me!" coverme -genvcitem "Spread out!" spreadout -genvcitem "Stay here!" stayhere -genvcitem "Defend the flag!" defendtheflag -genvcitem "Recover the flag!" recovertheflag -genvcitem "Stay together!" staytogether +alias genvcitem [ + if (> (listlen $arg2) 1) [ alias text (at $arg1 0) ] [ alias text $arg1 ] // split multiple shouts + alias action (concatword vcrnd " [" $arg2 "]" " [" $arg1 "]") + menuitem (concatword $arg3 ". " $text) $action // add as numbered list +] -newmenu "Team State" 1 +newmenu "Team Commands" 1 1 -genvcitem "Enemy down" enemydown -genvcitem "I got one" igotone -genvcitem "I made contact" imadecontact -genvcitem "I'm attacking" imattacking -genvcitem "I'm on defense" imondefense -genvcitem "Coming in with the flag!" comminginwiththeflag +genvcitem "Come on, move!" comeonmove 1 +genvcitem "Cover me!" coverme 2 +genvcitem "Spread out!" spreadout 3 +genvcitem "Stay here!" stayhere 4 +genvcitem "Stay together!" staytogether 5 +genvcitem "Defend the flag!" defendtheflag 6 +genvcitem "Recover the flag!" recovertheflag 7 -newmenu "Team Talk" 1 +newmenu "Team State" 1 1 -genvcitem Yes yes -genvcitem Affirmative affirmative -genvcitem "Allright, Sir!" allrightsir -genvcitem "Negative" negative -genvcitem "No can do" nocando -genvcitem "There's no way, Sir!" theresnowaysir -genvcitem "Sorry" sorry +genvcitem ["Enemy down" "I got one"] "enemydown igotone" 1 +genvcitem "I made contact" imadecontact 2 +genvcitem "I'm attacking" imattacking 3 +genvcitem "I'm on defense" imondefense 4 +genvcitem "Coming in with the flag!" comminginwiththeflag 5 + +newmenu "Team Talk" 1 1 -newmenu "Team Shouts" 1 +genvcitem [Yes Affirmative "All right, Sir"] "yes affirmative allrightsir" 1 +genvcitem ["Negative" "No can do" "There's no way, Sir!"] "negative nocando theresnowaysir" 2 +genvcitem "Sorry" sorry 3 +genvcitem "I'm on your team, man!" imonyourteamman 4 +genvcitem ["We did it!" "Go get 'em boys!" "Good job, team!"] "wedidit gogetemboys goodjobteam" 5 -genvcitem "We did it!" wedidit -genvcitem "Go get 'em boys!" gogetemboys -genvcitem "Good job, team!" goodjobteam -genvcitem "I'm on your team, man!" imonyourteamman +newmenu "Public Talk" 1 1 - -newmenu "Public Talk" 1 - -genvcitem "Nice shot" niceshot \ No newline at end of file +genvcitem "Nice shot" niceshot 1