-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbzw.sublime-syntax
126 lines (94 loc) · 5.62 KB
/
bzw.sublime-syntax
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
name: BZW
file_extensions:
- bzw
scope: source.bzw
contexts:
main:
# Comments
- match: '#'
scope: punctuation.definition.comment.bzw
push: line_comment
# Object Headers
- match: '\b(world|options|waterLevel|dynamicColor|textureMatrix|material|transform|physics)\b'
scope: keyword.control.bzw
# World Objects
- match: '\b(arc|base|box|cone|define|group|link|mesh|meshbox|meshpyr|pyramid|sphere|teleporter|tetra|weapon|zone|face|endface|enddef|drawInfo|lod|end)\b'
scope: keyword.control.bzw
# World Parameters
- match: '\b(size|flagHeight|noWalls|freeCtfSpawns)\b'
scope: storage.type.bzw
# Water Parameters
- match: '\b(height|materials)\b'
scope: storage.type.bzw
# Dynamic Colors
- match: '\b(red|green|blue|alpha)\b'
scope: storage.type.bzw
# Textmat Parameters
- match: '\b(scale|spin|shift|center|fixedscale|fixedspin|fixedshift)\b'
scope: storage.type.bzw
# Material Parameters
- match: '\b(texture|addtexture|notextures|notexcolor|notexalpha|texmat|dyncol|ambient|diffuse|color|specular|emission|shininess|resetmat|spheremap|noradar|noshadow|noculling|nosorting|nolighting|alphathresh|groupalpha|occluder)\b'
scope: storage.type.bzw
# Physics Parameters
- match: '\b(linear|angular|slide|death)\b'
scope: storage.type.bzw
# Arc Parameters
- match: '\b(divisions|flatshading|angle|ratio|position|rotation|size|shift|shear|scale|spin|texsize|phydrv|ricochet|smoothbounce|matref|top|bottom|inside|outside|startside|endside)\b'
scope: storage.type.bzw
# Position Parameters
- match: '\b(pos|position|size|rot|rotation)\b'
scope: storage.type.bzw
# Phaseable parameters
- match: '\b(passable|drivethrough|shootthrough|ricochet)\b'
scope: storage.modifier.bzw
# Base Parameters
- match: '\b(color|oncap)\b'
scope: storage.type.bzw
# Box Parameters
- match: '\b(top|bottom|sides|obstacle|outside|texsize|texoffset)\b'
scope: storage.type.bzw
# Teleporter Parameters
- match: '\b(border|from|to)\b'
scope: storage.type.bzw
# Mesh Parameters
- match: '\b(vertex|normal|texcoord|noclusters|passable|vertices|normals|texcoords)\b'
scope: storage.type.bzw
# Pyramid Parameters
- match: '\b(edge|bottom|startside|endside|flipz|angle)\b'
scope: storage.type.bzw
# Sphere Parameters
- match: '\b(hemisphere|hemi|radius)\b'
scope: storage.type.bzw
# World Weapon Parameters
- match: '\b(tilt|initdelay|delay|type|trigger|eventteam)\b'
scope: storage.type.bzw
# Zone Parameters
- match: '\b(zoneflag|flag|safety)\b'
scope: storage.type.bzw
# Misc Parameters
- match: '\b(name|phydrv|team|tint)\b'
scope: storage.type.bzw
# Numbers
- match: '(-?\d*\.{0,1}\d+)\b'
scope: constant.numeric.bzw
# Strings
- match: '\s"(.+)?"\s'
scope: string.quoted.double.bzw
# Options Block Settings
- match: '(-(?:a|adminlagannounce|admsg|advertise|autoTeam|b|c|cr|density|disableBots|f|fb|g|h|handicap|help|helpmsg|j|jitterdrop|jitterwarn|lagannounce|lagdrop|lagwarn|maxidle|mp|mps|ms|mts|noTeamKills|offa|packetlossdrop|packetlosswarn|poll|publictitle|q|rabbit|s|sa|sb|set|sl|spamtime|spamwarn|speedtol|srvmsg|st|sw|synctime|t|tftimeout|time|timemanual|tk|printscore|tkkr|trackplayhistory|vars|worldsize))\b'
scope: constant.language.bzw, meta.options.bzw
- match: '(\+(?:f|r|s))\b'
scope: constant.language.bzw, meta.options.bzw
# BZDB Settings
- match: '\b(_(?:agilityAdVel|agilityTimeWindow|agilityVelDelta|ambientLight|angleTolerance|angularAd|avenueSize|baseSize|boxBase|boxHeight|burrowDepth|burrowSpeedAd|burrowAngularAd|coldetDepth|coldetElements|countdownResumeDelay|cullDepth|cullElements|cullOccluders|disableBots|drawCelestial|drawClouds|drawGround|drawGroundLights|drawMountains|drawSky|endShotDetection|explodeTime|flagAltitude|flagEffectTime|flagHeight|flagPoleWidth|flagPoleSize|flagRadius|fogMode|fogDensity|fogStart|fogEnd|fogColor|friction|gmActivationTime|gmAdLife|gmSize|gmTurnAngle|gravity|handicapScoreDiff|handicapVelAd|handicapAngAd|handicapShotAd|hideFlagsOnRadar|hideTeamFlagsOnRadar|identifyRange|jumpVelocity|laserAdVel|laserAdRate|laserAdLife|latitude|lockOnAngle|longitude|lRAdRate|maxBumpHeight|maxFlagGrabs|maxLOD|mirror|momentumLinAcc|momentumAngAcc|momentumFriction|mGunAdVel|mGunAdRate|mGunAdLife|muzzleFront|muzzleHeight|noClimb|noShadows|noSmallPackets|notRespondingTime|obeseFactor|pauseDropTime|positionTolerance|pyrBase|pyrHeight|radarLimit|rejoinTime|reloadTime|rFireAdVel|rFireAdRate|rFireAdLife|shieldFlight|shockAdLife|shockInRadius|shockOutRadius|shotRadius|shotRange|shotSpeed|shotTailLength|shotsKeepVerticalVelocity|speedChecksLogOnly|srRadiusMult|squishFactor|squishTime|syncTime|syncLocation|tankAngVel|tankExplosionSize|tankHeight|tankLength|tankRadius|tankSpeed|tankWidth|targetingAngle|targetingDistance|teleportBreadth|teleportHeight|teleportTime|teleportWidth|thiefAdLife|thiefAdRate|thiefAdShotVel|thiefTinyFactor|thiefVelAd|thiefDropTime|tinyFactor|trackFade|updateThrottleRate|velocityAd|wallHeight|weapons|wideAngleAng|wingsGravity|wingsJumpCount|wingsJumpVelocity|wingsSlideTime|worldSize))\b'
scope: constant.language.bzw, meta.bzdb.bzw
# Flags
- match: '\s(good|bad|R\*|G\*|B\*|P\*|A|BU|CS|CL|G|GM|IB|ID|JP|L|LG|MG|MQ|N|OO|PZ|QT|F|R|SE|SH|SW|ST|SR|SB|TH|T|US|V|WG|B|BY|CB|FO|JM|LT|M|NJ|O|RC|RO|RT|TR|WA)\s'
scope: constant.language.bzw, meta.flag.bzw
line_comment:
- meta_scope: comment.line.bzw
- match: $
pop: true