CubeScript consts for weapon ID's/map & mode voting/colors // TODO: most aliases in scripts.cfg should be consts???

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6584 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Bukz
2011-08-16 22:55:21 +00:00
parent fc136cca48
commit a6f4452c62
+16 -25
View File
@@ -102,38 +102,29 @@ resetbinds = [ run resetbinds; echo (c 3)All binds have been reset to default va
changeteam = [ if (< (curteam) 4) [ team (at "RVSF CLA RVSF-SPECT CLA-SPECT" (curteam)) ] ]
spectate = [ if $connected [ suicide; sleep 500 [ team SPECTATOR ] ] ]
const NUM_WEAPONS 10
const NUM_MODES 22
loop d $NUM_WEAPONS [ const (at "KNIFE PISTOL CARBINE SHOTGUN SMG SNIPER AR CPISTOL GRENADES AKIMBO" $d) $d ]
loop r $NUM_MODES [ const (at "tdm coop dm surv ts ctf pf btdm bdm lss osok tosok bosok htf tktf ktf tpf tlss bpf blss bts btosok" $r) (addpunct (concat votemap $r (addpunct arg1 3)) 2) ]
// Mode/map-setting aliases.
votemap = [ mode $arg1; map $arg2 ]
tdm = [ votemap 0 $arg1 ]
coop = [ votemap 1 $arg1 ]
dm = [ votemap 2 $arg1 ]
lms = [ votemap 3 $arg1 ]
surv = [ votemap 3 $arg1 ]
ts = [ votemap 4 $arg1 ]
ctf = [ votemap 5 $arg1 ]
pf = [ votemap 6 $arg1 ]
lss = [ votemap 9 $arg1 ]
osok = [ votemap 10 $arg1 ]
tosok = [ votemap 11 $arg1 ]
htf = [ votemap 13 $arg1 ]
vip = [ votemap 13 $arg1 ]
tktf = [ votemap 14 $arg1 ]
ktf = [ votemap 15 $arg1 ]
tpf = [ votemap 16 $arg1 ]
tlss = [ votemap 17 $arg1 ]
// Helper aliases for (c) - easy color insertion. (e.g. echo (red)Hello (blue)world! (white)My fov today is: (orange) $fov)
green = [ result (c 0) ]
blue = [ result (c 1) ]
yellow = [ result (c 2) ]
red = [ result (c 3) ]
gray = [ result (c 4) ]
white = [ result (c 5) ]
dbrown = [ result (c 6) ]
dred = [ result (c 7) ]
purple = [ result (c 8) ]
orange = [ result (c 9) ]
const green [ result (c 0) ]
const blue [ result (c 1) ]
const yellow [ result (c 2) ]
const red [ result (c 3) ]
const gray [ result (c 4) ]
const white [ result (c 5) ]
const dbrown [ result (c 6) ]
const dred [ result (c 7) ]
const purple [ result (c 8) ]
const orange [ result (c 9) ]
// Weapon switching/action utilities.
primary = [ weapon (currentprimary) ]