KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

300 lines
15KB

  1. <?php
  2. /*************************************************************************************
  3. * uscript.php
  4. * ---------------------------------
  5. * Author: pospi (pospi@spadgos.com)
  6. * Copyright: (c) 2007 pospi (http://pospi.spadgos.com)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2007/05/21
  9. *
  10. * UnrealScript language file for GeSHi.
  11. *
  12. * Comments:
  13. * * Main purpose at this time is for Unreal Engine 2 / 2.5
  14. * * Mostly taken from UltraEdit unrealScript wordfile.
  15. *
  16. * CHANGES
  17. * -------
  18. * 2007/05/21 (1.0.8.10)
  19. * - First Release
  20. *
  21. * TODO (updated 2007/05/21)
  22. * -------------------------
  23. * * Update to feature any UE3 classes / keywords when UT3 comes out
  24. *
  25. *************************************************************************************
  26. *
  27. * This file is part of GeSHi.
  28. *
  29. * GeSHi is free software; you can redistribute it and/or modify
  30. * it under the terms of the GNU General Public License as published by
  31. * the Free Software Foundation; either version 2 of the License, or
  32. * (at your option) any later version.
  33. *
  34. * GeSHi is distributed in the hope that it will be useful,
  35. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  36. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  37. * GNU General Public License for more details.
  38. *
  39. * You should have received a copy of the GNU General Public License
  40. * along with GeSHi; if not, write to the Free Software
  41. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  42. *
  43. ************************************************************************************/
  44. $language_data = array (
  45. 'LANG_NAME' => 'Unreal Script',
  46. 'COMMENT_SINGLE' => array(
  47. 1 => '//',
  48. 2 => '#'
  49. ),
  50. 'COMMENT_MULTI' => array('/*' => '*/'),
  51. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  52. 'QUOTEMARKS' => array("'", '"'),
  53. 'ESCAPE_CHAR' => '\\',
  54. 'KEYWORDS' => array(
  55. 1 => array( //declaration keywords
  56. 'simulated', 'state', 'class', 'function', 'event', 'var', 'local',
  57. 'ignores', 'globalconfig', 'config', 'abstract', 'nativereplication', 'native',
  58. 'auto', 'coerce', 'const', 'default',
  59. 'defaultproperties',
  60. 'enum', 'extends', 'expands', 'final', 'guid', 'latent', 'localized',
  61. 'new', 'noexport', 'operator', 'preoperator', 'optional', 'out',
  62. 'private', 'public', 'protected', 'reliable', 'replication',
  63. 'singular', 'static', 'struct', 'transient', 'unreliable',
  64. 'hidedropdown', 'cacheexempt', 'exec', 'delegate', 'import', 'placeable', 'exportstructs'
  65. ),
  66. 2 => array( //control flow keywords
  67. 'for', 'while', 'do', 'if', 'else', 'switch', 'case', 'return', 'break', 'continue',
  68. 'begin', 'loop', 'assert',
  69. 'foreach', 'AllActors', 'DynamicActors', 'ChildActors', 'BasedActors', 'TouchingActors',
  70. 'TraceActors', 'RadiusActors', 'VisibleActors', 'CollidingActors', 'VisibleCollidingActors'
  71. ),
  72. 3 => array( //global (object) functions
  73. 'log', 'warn', 'rot', 'vect', 'Rand', 'Min', 'Max', 'Clamp', 'Abs', 'Sin', 'ASin',
  74. 'Cos', 'ACos', 'Tan', 'ATan', 'Exp', 'Loge', 'Sqrt', 'Square', 'FRand', 'FMin', 'FMax', 'FClamp',
  75. 'Lerp', 'Smerp', 'Ceil', 'Round', 'VSize', 'Normal', 'Invert', 'VRand', 'MirrorVectorByNormal',
  76. 'GetAxes', 'GetUnAxes', 'RotRand', 'OrthoRotation', 'Normalize', 'ClockwiseFrom',
  77. 'Len', 'InStr', 'Mid', 'Left', 'Right', 'Caps', 'Chr', 'Asc', 'Locs',
  78. 'Divide', 'Split', 'StrCmp', 'Repl', 'Eval',
  79. 'InterpCurveEval', 'InterpCurveGetOutputRange', 'InterpCurveGetInputDomain',
  80. 'QuatProduct', 'QuatInvert', 'QuatRotateVector', 'QuatFindBetween', 'QuatFromAxisAndAngle',
  81. 'QuatFromRotator', 'QuatToRotator', 'QuatSlerp',
  82. 'Localize', 'GotoState', 'IsInState', 'GetStateName',
  83. 'ClassIsChildOf', 'IsA', 'Enable', 'Disable',
  84. 'GetPropertyText', 'SetPropertyText', 'GetEnum', 'DynamicLoadObject', 'FindObject',
  85. 'SaveConfig', 'ClearConfig', 'StaticSaveConfig', 'ResetConfig', 'StaticClearConfig',
  86. 'GetPerObjectNames', 'RandRange', 'StopWatch', 'IsOnConsole', 'IsSoaking',
  87. 'PlatformIsMacOS', 'PlatformIsUnix', 'PlatformIsWindows', 'PlatformIs64Bit',
  88. 'BeginState', 'EndState', 'Created', 'AllObjects', 'GetReferencers', 'GetItemName',
  89. 'ReplaceText', 'EatStr'
  90. ),
  91. 4 => array( //common almost-global (actor) functions
  92. 'ClientMessage', 'ConsoleCommand', 'CopyObjectToClipboard', 'TextToSpeech',
  93. 'Error', 'Sleep', 'SetCollision', 'SetCollisionSize', 'SetDrawScale', 'SetDrawScale3D',
  94. 'SetStaticMesh', 'SetDrawType', 'Move', 'SetLocation', 'SetRotation',
  95. 'SetRelativeLocation', 'SetRelativeRotation', 'MoveSmooth', 'AutonomousPhysics',
  96. 'SetBase', 'SetOwner', 'IsJoinedTo', 'GetMeshName', 'PlayAnim', 'LoopAnim', 'TweenAnim',
  97. 'IsAnimating', 'FinishAnim', 'HasAnim', 'StopAnimating', 'FreezeFrameAt', 'SetAnimFrame',
  98. 'IsTweening', 'AnimStopLooping', 'AnimEnd', 'LinkSkelAnim', 'LinkMesh', 'BoneRefresh',
  99. 'GetBoneCoords', 'GetBoneRotation', 'GetRootLocation', 'GetRootRotation', 'AttachToBone',
  100. 'DetachFromBone', 'SetBoneScale', 'UpdateURL', 'GetURLOption', 'SetPhysics', 'KAddImpulse',
  101. 'KImpact', 'KApplyForce', 'Clock', 'UnClock', 'Destroyed', 'GainedChild', 'LostChild',
  102. 'Tick', 'PostNetReceive', 'ClientTrigger', 'Trigger', 'UnTrigger', 'BeginEvent', 'EndEvent',
  103. 'Timer', 'HitWall', 'Falling', 'Landed', 'ZoneChange', 'PhysicsVolumeChange', 'Touch',
  104. 'PostTouch', 'UnTouch', 'Bump', 'BaseChange', 'Attach', 'Detach', 'SpecialHandling',
  105. 'EncroachingOn', 'EncroachedBy', 'RanInto', 'FinishedInterpolation', 'EndedRotation',
  106. 'UsedBy', 'FellOutOfWorld', 'KilledBy', 'TakeDamage', 'HealDamage', 'Trace', 'FastTrace',
  107. 'TraceThisActor', 'spawn', 'Destroy', 'TornOff', 'SetTimer', 'PlaySound', 'PlayOwnedSound',
  108. 'GetSoundDuration', 'MakeNoise', 'BeginPlay', 'GetAllInt', 'RenderOverlays', 'RenderTexture',
  109. 'PreBeginPlay', 'PostBeginPlay', 'PostNetBeginPlay', 'HurtRadius', 'Reset', 'Crash'
  110. ),
  111. 5 => array( //data types
  112. 'none', 'null',
  113. 'float', 'int', 'bool', 'byte', 'char', 'double', 'iterator', 'name', 'string', //primitive
  114. 'plane', 'rotator', 'vector', 'spline', 'coords', 'Quat', 'Range', 'RangeVector', //structs
  115. 'Scale', 'Color', 'Box', 'IntBox', 'FloatBox', 'BoundingVolume', 'Matrix', 'InterpCurvePoint',
  116. 'InterpCurve', 'CompressedPosition', 'TMultiMap', 'PointRegion',
  117. 'KRigidBodyState', 'KSimParams', 'AnimRep', 'FireProperties',
  118. 'lodmesh', 'skeletalmesh', 'mesh', 'StaticMesh', 'MeshInstance', //3d resources
  119. 'sound', //sound resources
  120. 'material', 'texture', 'combiner', 'modifier', 'ColorModifier', 'FinalBlend', //2d resources
  121. 'MaterialSequence', 'MaterialSwitch', 'OpacityModifier', 'TexModifier', 'TexEnvMap',
  122. 'TexCoordSource', 'TexMatrix', 'TexOscillator', 'TexPanner', 'TexRotator', 'TexScaler',
  123. 'RenderedMaterial', 'BitmapMaterial', 'ScriptedTexture', 'ShadowBitmapMaterial', 'Cubemap',
  124. 'FractalTexture', 'FireTexture', 'IceTexture', 'WaterTexture', 'FluidTexture', 'WaveTexture',
  125. 'WetTexture', 'ConstantMaterial', 'ConstantColor', 'FadeColor', 'ParticleMaterial',
  126. 'ProjectorMaterial', 'Shader', 'TerrainMaterial', 'VertexColor'
  127. ),
  128. 6 => array( //misc keywords
  129. 'false', 'true', 'self', 'super', 'MaxInt', 'Pi'
  130. ),
  131. 7 => array( //common actor enums & variables
  132. 'DT_None', 'DT_Sprite', 'DT_Mesh', 'DT_Brush', 'DT_RopeSprite',
  133. 'DT_VerticalSprite', 'DT_TerraForm', 'DT_SpriteAnimOnce', 'DT_StaticMesh', 'DT_DrawType',
  134. 'DT_Particle', 'DT_AntiPortal', 'DT_FluidSurface',
  135. 'PHYS_None', 'PHYS_Walking', 'PHYS_Falling', 'PHYS_Swimming', 'PHYS_Flying',
  136. 'PHYS_Rotating', 'PHYS_Projectile', 'PHYS_Interpolating', 'PHYS_MovingBrush', 'PHYS_Spider',
  137. 'PHYS_Trailer', 'PHYS_Ladder', 'PHYS_RootMotion', 'PHYS_Karma', 'PHYS_KarmaRagDoll',
  138. 'PHYS_Hovering', 'PHYS_CinMotion',
  139. 'ROLE_None', 'ROLE_DumbProxy', 'ROLE_SimulatedProxy',
  140. 'ROLE_AutonomousProxy', 'ROLE_Authority',
  141. 'STY_None', 'STY_Normal', 'STY_Masked', 'STY_Translucent', 'STY_Modulated', 'STY_Alpha',
  142. 'STY_Additive', 'STY_Subtractive', 'STY_Particle', 'STY_AlphaZ',
  143. 'OCCLUSION_None', 'OCCLUSION_BSP', 'OCCLUSION_Default', 'OCCLUSION_StaticMeshes',
  144. 'SLOT_None', 'SLOT_Misc', 'SLOT_Pain', 'SLOT_Interact', 'SLOT_Ambient', 'SLOT_Talk',
  145. 'SLOT_Interface', 'MTRAN_None', 'MTRAN_Instant', 'MTRAN_Segue', 'MTRAN_Fade',
  146. 'MTRAN_FastFade', 'MTRAN_SlowFade',
  147. 'DrawType', 'Physics', 'Owner', 'Base', 'Level', 'Game', 'Instigator', 'RemoteRole', 'Role',
  148. 'LifeSpan', 'Tag', 'Event', 'Location', 'Rotation', 'Velocity', 'Acceleration',
  149. 'RelativeLocation', 'RelativeRotation', 'DrawScale', 'DrawScale3D', 'Skins', 'Style',
  150. 'SoundVolume', 'SoundPitch', 'SoundRadius', 'TransientSoundVolume', 'TransientSoundRadius',
  151. 'CollisionRadius', 'CollisionHeight', 'Mass', 'Buoyancy', 'RotationRate', 'DesiredRotation'
  152. ),
  153. 8 => array( //common non-actor uscript classes
  154. 'Object',
  155. 'CacheManager', 'CameraEffect', 'Canvas', 'CheatManager', 'Commandlet', 'DecoText', 'GUI',
  156. 'InteractionMaster', 'Interactions', 'Interaction', 'KarmaParamsCollision', 'KarmaParamsRBFull',
  157. 'KarmaParamsSkel', 'KarmaParams', 'LevelSummary', 'Locale', 'Manifest', 'MaterialFactory',
  158. 'MeshObject', 'ObjectPool', 'Pallete',
  159. 'ParticleEmitter', 'MeshEmitter', 'BeamEmitter', 'SpriteEmitter', 'SparkEmitter', 'TrailEmitter',
  160. 'Player', 'PlayerInput', 'PlayInfo', 'ReachSpec', 'Resource', 'LatentScriptedAction', 'ScriptedAction',
  161. 'speciesType', 'StreamBase', 'Stream', 'EditorEngine', 'Engine', 'Time', 'WeaponFire',
  162. 'WebApplication', 'WebRequest', 'WebResponse', 'WebSkin', 'xPawnGibGroup', 'xPawnSoundGroup',
  163. 'xUtil'
  164. ),
  165. 9 => array( //common actor-based uscript classes
  166. 'Actor',
  167. 'Controller', 'AIController', 'ScriptedController', 'Bot', 'xBot',
  168. 'PlayerController', 'UnrealPlayer', 'xPlayer',
  169. 'DamageType', 'WeaponDamageType', 'Effects', 'Emitter', 'NetworkEmitter',
  170. 'Gib', 'HUD', 'HudBase', 'Info', 'FluidSurfaceInfo', 'Combo',
  171. 'GameInfo', 'UnrealMPGameInfo', 'DeathMatch', 'TeamGame', 'CTFGame',
  172. 'xCTFGame', 'xBombingRun', 'xDoubleDom', 'xTeamGame',
  173. 'ASGameInfo', 'Invasion', 'ONSOnslaughtGame', 'xDeathmatch',
  174. 'Mutator', 'Inventory', 'Ammunition', 'KeyInventory', 'Powerups', 'Armor', 'Weapon',
  175. 'InventoryAttachment', 'WeaponAttachment',
  176. 'KActor', 'KConstraint', 'KBSJoint', 'KCarWheelJoint', 'KConeLimit', 'KHinge', 'KTire',
  177. 'KVehicleFactory', 'Keypoint', 'AIScript', 'ScriptedSequence', 'ScriptedTrigger',
  178. 'AmbientSound', 'Light', 'SpotLight', 'SunLight', 'TriggerLight',
  179. 'MeshEffect', 'NavigationPoint', 'GameObjective', 'DestroyableObjective',
  180. 'PathNode', 'FlyingPathNode', 'RoadPathNode', 'InventorySpot', 'PlayerStart',
  181. 'Pawn', 'Vehicle', 'UnrealPawn', 'xPawn', 'Monster', 'ASVehicle', 'KVehicle', 'KCar',
  182. 'ONSWeaponPawn', 'SVehicle', 'ONSVehicle', 'ONSChopperCraft', 'ONSHoverCraft',
  183. 'ONSPlaneCraft', 'ONSTreadCraft', 'ONSWheeledCraft',
  184. 'Pickup', 'Ammo', 'UTAmmoPickup', 'ArmorPickup', 'KeyPickup', 'TournamentPickup',
  185. 'Projectile', 'Projector', 'DynamicProjector', 'ShadowProjector', 'xScorch',
  186. 'xEmitter', 'xPickupBase', 'xProcMesh', 'xWeatherEffect', 'PhysicsVolume', 'Volume'
  187. ),
  188. 10 => array( //symbol-like operators
  189. 'dot','cross'
  190. )
  191. ),
  192. 'SYMBOLS' => array(
  193. '+','-','=','/','*','-','%','>','<','&','^','!','|','`','(',')','[',']','{','}',
  194. '<<','>>','$','@'
  195. ),
  196. 'CASE_SENSITIVE' => array(
  197. GESHI_COMMENTS => false,
  198. 1 => false,
  199. 2 => false,
  200. 3 => false,
  201. 4 => false,
  202. 5 => false,
  203. 6 => false,
  204. 7 => false,
  205. 8 => false,
  206. 9 => false,
  207. 10 => false,
  208. ),
  209. 'STYLES' => array(
  210. 'KEYWORDS' => array(
  211. 1 => 'color: #0000FF;',
  212. 2 => 'color: #0000FF;',
  213. 3 => 'color: #0066AA;',
  214. 4 => 'color: #0088FF;',
  215. 5 => 'color: #E000E0;',
  216. 6 => 'color: #900000;',
  217. 7 => 'color: #888800;',
  218. 8 => 'color: #AA6600;',
  219. 9 => 'color: #FF8800;',
  220. 10 => 'color: #0000FF;'
  221. ),
  222. 'COMMENTS' => array(
  223. 1 => 'color: #008080; font-style: italic;',
  224. 2 => 'color: #000000; font-weight: bold;',
  225. 'MULTI' => 'color: #008080; font-style: italic;'
  226. ),
  227. 'ESCAPE_CHAR' => array(
  228. 0 => ''
  229. ),
  230. 'BRACKETS' => array(
  231. 0 => 'color: #000000;'
  232. ),
  233. 'STRINGS' => array(
  234. 0 => 'color: #999999;'
  235. ),
  236. 'NUMBERS' => array(
  237. 0 => 'color: #FF0000;'
  238. ),
  239. 'METHODS' => array(
  240. 0 => 'color: #006600;'
  241. ),
  242. 'SYMBOLS' => array(
  243. 0 => 'color: #669966;'
  244. ),
  245. 'REGEXPS' => array(
  246. 0 => 'color: #E000E0;',
  247. 1 => 'color: #E000E0;'
  248. ),
  249. 'SCRIPT' => array(
  250. 0 => ''
  251. )
  252. ),
  253. 'URLS' => array(
  254. 1 => '',
  255. 2 => '',
  256. 3 => '',
  257. 4 => '',
  258. 5 => '',
  259. 6 => '',
  260. 7 => '',
  261. 8 => 'http://wiki.beyondunreal.com/wiki?search={FNAME}',
  262. 9 => 'http://wiki.beyondunreal.com/wiki?search={FNAME}',
  263. 10 => ''
  264. ),
  265. 'OOLANG' => true,
  266. 'OBJECT_SPLITTERS' => array('.'),
  267. 'REGEXPS' => array( //handle template-style variable definitions
  268. 0 => array(
  269. GESHI_SEARCH => '(class\s*)<(\s*(\w+)\s*)>',
  270. GESHI_REPLACE => "\${1}",
  271. GESHI_MODIFIERS => 'i',
  272. GESHI_BEFORE => '',
  273. GESHI_AFTER => "< \${3} >"
  274. ),
  275. 1 => array(
  276. GESHI_SEARCH => '(array\s*)<(\s*(\w+)\s*)>',
  277. GESHI_REPLACE => "\${1}",
  278. GESHI_MODIFIERS => 'i',
  279. GESHI_BEFORE => '',
  280. GESHI_AFTER => "< \${3} >"
  281. )
  282. ),
  283. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  284. 'SCRIPT_DELIMITERS' => array(
  285. ),
  286. 'HIGHLIGHT_STRICT_BLOCK' => array(
  287. ),
  288. 'PARSER_CONTROL' => array(
  289. 'KEYWORDS' => array(
  290. 10 => array(
  291. 'DISALLOWED_BEFORE' => '(?<!<)(?=DOT>)'
  292. )
  293. )
  294. )
  295. );
  296. ?>