_sourcemod_builtins.py 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163
  1. # -*- coding: utf-8 -*-
  2. """
  3. pygments.lexers._sourcemod_builtins
  4. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. This file contains the names of SourceMod functions.
  6. It is able to re-generate itself.
  7. Do not edit the FUNCTIONS list by hand.
  8. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
  9. :license: BSD, see LICENSE for details.
  10. """
  11. from __future__ import print_function
  12. FUNCTIONS = (
  13. 'OnEntityCreated',
  14. 'OnEntityDestroyed',
  15. 'OnGetGameDescription',
  16. 'OnLevelInit',
  17. 'SDKHook',
  18. 'SDKHookEx',
  19. 'SDKUnhook',
  20. 'SDKHooks_TakeDamage',
  21. 'SDKHooks_DropWeapon',
  22. 'TopMenuHandler',
  23. 'CreateTopMenu',
  24. 'LoadTopMenuConfig',
  25. 'AddToTopMenu',
  26. 'GetTopMenuInfoString',
  27. 'GetTopMenuObjName',
  28. 'RemoveFromTopMenu',
  29. 'DisplayTopMenu',
  30. 'DisplayTopMenuCategory',
  31. 'FindTopMenuCategory',
  32. 'SetTopMenuTitleCaching',
  33. 'OnAdminMenuCreated',
  34. 'OnAdminMenuReady',
  35. 'GetAdminTopMenu',
  36. 'AddTargetsToMenu',
  37. 'AddTargetsToMenu2',
  38. 'RedisplayAdminMenu',
  39. 'TEHook',
  40. 'AddTempEntHook',
  41. 'RemoveTempEntHook',
  42. 'TE_Start',
  43. 'TE_IsValidProp',
  44. 'TE_WriteNum',
  45. 'TE_ReadNum',
  46. 'TE_WriteFloat',
  47. 'TE_ReadFloat',
  48. 'TE_WriteVector',
  49. 'TE_ReadVector',
  50. 'TE_WriteAngles',
  51. 'TE_WriteFloatArray',
  52. 'TE_Send',
  53. 'TE_WriteEncodedEnt',
  54. 'TE_SendToAll',
  55. 'TE_SendToClient',
  56. 'CreateKeyValues',
  57. 'KvSetString',
  58. 'KvSetNum',
  59. 'KvSetUInt64',
  60. 'KvSetFloat',
  61. 'KvSetColor',
  62. 'KvSetVector',
  63. 'KvGetString',
  64. 'KvGetNum',
  65. 'KvGetFloat',
  66. 'KvGetColor',
  67. 'KvGetUInt64',
  68. 'KvGetVector',
  69. 'KvJumpToKey',
  70. 'KvJumpToKeySymbol',
  71. 'KvGotoFirstSubKey',
  72. 'KvGotoNextKey',
  73. 'KvSavePosition',
  74. 'KvDeleteKey',
  75. 'KvDeleteThis',
  76. 'KvGoBack',
  77. 'KvRewind',
  78. 'KvGetSectionName',
  79. 'KvSetSectionName',
  80. 'KvGetDataType',
  81. 'KeyValuesToFile',
  82. 'FileToKeyValues',
  83. 'StringToKeyValues',
  84. 'KvSetEscapeSequences',
  85. 'KvNodesInStack',
  86. 'KvCopySubkeys',
  87. 'KvFindKeyById',
  88. 'KvGetNameSymbol',
  89. 'KvGetSectionSymbol',
  90. 'TE_SetupSparks',
  91. 'TE_SetupSmoke',
  92. 'TE_SetupDust',
  93. 'TE_SetupMuzzleFlash',
  94. 'TE_SetupMetalSparks',
  95. 'TE_SetupEnergySplash',
  96. 'TE_SetupArmorRicochet',
  97. 'TE_SetupGlowSprite',
  98. 'TE_SetupExplosion',
  99. 'TE_SetupBloodSprite',
  100. 'TE_SetupBeamRingPoint',
  101. 'TE_SetupBeamPoints',
  102. 'TE_SetupBeamLaser',
  103. 'TE_SetupBeamRing',
  104. 'TE_SetupBeamFollow',
  105. 'HookEvent',
  106. 'HookEventEx',
  107. 'UnhookEvent',
  108. 'CreateEvent',
  109. 'FireEvent',
  110. 'CancelCreatedEvent',
  111. 'GetEventBool',
  112. 'SetEventBool',
  113. 'GetEventInt',
  114. 'SetEventInt',
  115. 'GetEventFloat',
  116. 'SetEventFloat',
  117. 'GetEventString',
  118. 'SetEventString',
  119. 'GetEventName',
  120. 'SetEventBroadcast',
  121. 'GetUserMessageType',
  122. 'GetUserMessageId',
  123. 'GetUserMessageName',
  124. 'StartMessage',
  125. 'StartMessageEx',
  126. 'EndMessage',
  127. 'MsgHook',
  128. 'MsgPostHook',
  129. 'HookUserMessage',
  130. 'UnhookUserMessage',
  131. 'StartMessageAll',
  132. 'StartMessageOne',
  133. 'InactivateClient',
  134. 'ReconnectClient',
  135. 'GetMaxEntities',
  136. 'GetEntityCount',
  137. 'IsValidEntity',
  138. 'IsValidEdict',
  139. 'IsEntNetworkable',
  140. 'CreateEdict',
  141. 'RemoveEdict',
  142. 'GetEdictFlags',
  143. 'SetEdictFlags',
  144. 'GetEdictClassname',
  145. 'GetEntityNetClass',
  146. 'ChangeEdictState',
  147. 'GetEntData',
  148. 'SetEntData',
  149. 'GetEntDataFloat',
  150. 'SetEntDataFloat',
  151. 'GetEntDataEnt2',
  152. 'SetEntDataEnt2',
  153. 'GetEntDataVector',
  154. 'SetEntDataVector',
  155. 'GetEntDataString',
  156. 'SetEntDataString',
  157. 'FindSendPropOffs',
  158. 'FindSendPropInfo',
  159. 'FindDataMapOffs',
  160. 'FindDataMapInfo',
  161. 'GetEntSendPropOffs',
  162. 'GetEntProp',
  163. 'SetEntProp',
  164. 'GetEntPropFloat',
  165. 'SetEntPropFloat',
  166. 'GetEntPropEnt',
  167. 'SetEntPropEnt',
  168. 'GetEntPropVector',
  169. 'SetEntPropVector',
  170. 'GetEntPropString',
  171. 'SetEntPropString',
  172. 'GetEntPropArraySize',
  173. 'GetEntDataArray',
  174. 'SetEntDataArray',
  175. 'GetEntityAddress',
  176. 'GetEntityClassname',
  177. 'float',
  178. 'FloatMul',
  179. 'FloatDiv',
  180. 'FloatAdd',
  181. 'FloatSub',
  182. 'FloatFraction',
  183. 'RoundToZero',
  184. 'RoundToCeil',
  185. 'RoundToFloor',
  186. 'RoundToNearest',
  187. 'FloatCompare',
  188. 'SquareRoot',
  189. 'Pow',
  190. 'Exponential',
  191. 'Logarithm',
  192. 'Sine',
  193. 'Cosine',
  194. 'Tangent',
  195. 'FloatAbs',
  196. 'ArcTangent',
  197. 'ArcCosine',
  198. 'ArcSine',
  199. 'ArcTangent2',
  200. 'RoundFloat',
  201. 'operator%',
  202. 'DegToRad',
  203. 'RadToDeg',
  204. 'GetURandomInt',
  205. 'GetURandomFloat',
  206. 'SetURandomSeed',
  207. 'SetURandomSeedSimple',
  208. 'RemovePlayerItem',
  209. 'GivePlayerItem',
  210. 'GetPlayerWeaponSlot',
  211. 'IgniteEntity',
  212. 'ExtinguishEntity',
  213. 'TeleportEntity',
  214. 'ForcePlayerSuicide',
  215. 'SlapPlayer',
  216. 'FindEntityByClassname',
  217. 'GetClientEyeAngles',
  218. 'CreateEntityByName',
  219. 'DispatchSpawn',
  220. 'DispatchKeyValue',
  221. 'DispatchKeyValueFloat',
  222. 'DispatchKeyValueVector',
  223. 'GetClientAimTarget',
  224. 'GetTeamCount',
  225. 'GetTeamName',
  226. 'GetTeamScore',
  227. 'SetTeamScore',
  228. 'GetTeamClientCount',
  229. 'SetEntityModel',
  230. 'GetPlayerDecalFile',
  231. 'GetPlayerJingleFile',
  232. 'GetServerNetStats',
  233. 'EquipPlayerWeapon',
  234. 'ActivateEntity',
  235. 'SetClientInfo',
  236. 'GivePlayerAmmo',
  237. 'SetClientListeningFlags',
  238. 'GetClientListeningFlags',
  239. 'SetListenOverride',
  240. 'GetListenOverride',
  241. 'IsClientMuted',
  242. 'TR_GetPointContents',
  243. 'TR_GetPointContentsEnt',
  244. 'TR_TraceRay',
  245. 'TR_TraceHull',
  246. 'TR_TraceRayFilter',
  247. 'TR_TraceHullFilter',
  248. 'TR_TraceRayEx',
  249. 'TR_TraceHullEx',
  250. 'TR_TraceRayFilterEx',
  251. 'TR_TraceHullFilterEx',
  252. 'TR_GetFraction',
  253. 'TR_GetEndPosition',
  254. 'TR_GetEntityIndex',
  255. 'TR_DidHit',
  256. 'TR_GetHitGroup',
  257. 'TR_GetPlaneNormal',
  258. 'TR_PointOutsideWorld',
  259. 'SortIntegers',
  260. 'SortFloats',
  261. 'SortStrings',
  262. 'SortFunc1D',
  263. 'SortCustom1D',
  264. 'SortCustom2D',
  265. 'SortADTArray',
  266. 'SortFuncADTArray',
  267. 'SortADTArrayCustom',
  268. 'CompileRegex',
  269. 'MatchRegex',
  270. 'GetRegexSubString',
  271. 'SimpleRegexMatch',
  272. 'TF2_GetPlayerClass',
  273. 'TF2_SetPlayerClass',
  274. 'TF2_RemoveWeaponSlot',
  275. 'TF2_RemoveAllWeapons',
  276. 'TF2_IsPlayerInCondition',
  277. 'TF2_GetObjectType',
  278. 'TF2_GetObjectMode',
  279. 'NominateMap',
  280. 'RemoveNominationByMap',
  281. 'RemoveNominationByOwner',
  282. 'GetExcludeMapList',
  283. 'GetNominatedMapList',
  284. 'CanMapChooserStartVote',
  285. 'InitiateMapChooserVote',
  286. 'HasEndOfMapVoteFinished',
  287. 'EndOfMapVoteEnabled',
  288. 'OnNominationRemoved',
  289. 'OnMapVoteStarted',
  290. 'CreateTimer',
  291. 'KillTimer',
  292. 'TriggerTimer',
  293. 'GetTickedTime',
  294. 'GetMapTimeLeft',
  295. 'GetMapTimeLimit',
  296. 'ExtendMapTimeLimit',
  297. 'GetTickInterval',
  298. 'OnMapTimeLeftChanged',
  299. 'IsServerProcessing',
  300. 'CreateDataTimer',
  301. 'ByteCountToCells',
  302. 'CreateArray',
  303. 'ClearArray',
  304. 'CloneArray',
  305. 'ResizeArray',
  306. 'GetArraySize',
  307. 'PushArrayCell',
  308. 'PushArrayString',
  309. 'PushArrayArray',
  310. 'GetArrayCell',
  311. 'GetArrayString',
  312. 'GetArrayArray',
  313. 'SetArrayCell',
  314. 'SetArrayString',
  315. 'SetArrayArray',
  316. 'ShiftArrayUp',
  317. 'RemoveFromArray',
  318. 'SwapArrayItems',
  319. 'FindStringInArray',
  320. 'FindValueInArray',
  321. 'ProcessTargetString',
  322. 'ReplyToTargetError',
  323. 'MultiTargetFilter',
  324. 'AddMultiTargetFilter',
  325. 'RemoveMultiTargetFilter',
  326. 'OnBanClient',
  327. 'OnBanIdentity',
  328. 'OnRemoveBan',
  329. 'BanClient',
  330. 'BanIdentity',
  331. 'RemoveBan',
  332. 'CreateTrie',
  333. 'SetTrieValue',
  334. 'SetTrieArray',
  335. 'SetTrieString',
  336. 'GetTrieValue',
  337. 'GetTrieArray',
  338. 'GetTrieString',
  339. 'RemoveFromTrie',
  340. 'ClearTrie',
  341. 'GetTrieSize',
  342. 'GetFunctionByName',
  343. 'CreateGlobalForward',
  344. 'CreateForward',
  345. 'GetForwardFunctionCount',
  346. 'AddToForward',
  347. 'RemoveFromForward',
  348. 'RemoveAllFromForward',
  349. 'Call_StartForward',
  350. 'Call_StartFunction',
  351. 'Call_PushCell',
  352. 'Call_PushCellRef',
  353. 'Call_PushFloat',
  354. 'Call_PushFloatRef',
  355. 'Call_PushArray',
  356. 'Call_PushArrayEx',
  357. 'Call_PushString',
  358. 'Call_PushStringEx',
  359. 'Call_Finish',
  360. 'Call_Cancel',
  361. 'NativeCall',
  362. 'CreateNative',
  363. 'ThrowNativeError',
  364. 'GetNativeStringLength',
  365. 'GetNativeString',
  366. 'SetNativeString',
  367. 'GetNativeCell',
  368. 'GetNativeCellRef',
  369. 'SetNativeCellRef',
  370. 'GetNativeArray',
  371. 'SetNativeArray',
  372. 'FormatNativeString',
  373. 'RequestFrameCallback',
  374. 'RequestFrame',
  375. 'OnRebuildAdminCache',
  376. 'DumpAdminCache',
  377. 'AddCommandOverride',
  378. 'GetCommandOverride',
  379. 'UnsetCommandOverride',
  380. 'CreateAdmGroup',
  381. 'FindAdmGroup',
  382. 'SetAdmGroupAddFlag',
  383. 'GetAdmGroupAddFlag',
  384. 'GetAdmGroupAddFlags',
  385. 'SetAdmGroupImmuneFrom',
  386. 'GetAdmGroupImmuneCount',
  387. 'GetAdmGroupImmuneFrom',
  388. 'AddAdmGroupCmdOverride',
  389. 'GetAdmGroupCmdOverride',
  390. 'RegisterAuthIdentType',
  391. 'CreateAdmin',
  392. 'GetAdminUsername',
  393. 'BindAdminIdentity',
  394. 'SetAdminFlag',
  395. 'GetAdminFlag',
  396. 'GetAdminFlags',
  397. 'AdminInheritGroup',
  398. 'GetAdminGroupCount',
  399. 'GetAdminGroup',
  400. 'SetAdminPassword',
  401. 'GetAdminPassword',
  402. 'FindAdminByIdentity',
  403. 'RemoveAdmin',
  404. 'FlagBitsToBitArray',
  405. 'FlagBitArrayToBits',
  406. 'FlagArrayToBits',
  407. 'FlagBitsToArray',
  408. 'FindFlagByName',
  409. 'FindFlagByChar',
  410. 'FindFlagChar',
  411. 'ReadFlagString',
  412. 'CanAdminTarget',
  413. 'CreateAuthMethod',
  414. 'SetAdmGroupImmunityLevel',
  415. 'GetAdmGroupImmunityLevel',
  416. 'SetAdminImmunityLevel',
  417. 'GetAdminImmunityLevel',
  418. 'FlagToBit',
  419. 'BitToFlag',
  420. 'ServerCommand',
  421. 'ServerCommandEx',
  422. 'InsertServerCommand',
  423. 'ServerExecute',
  424. 'ClientCommand',
  425. 'FakeClientCommand',
  426. 'FakeClientCommandEx',
  427. 'PrintToServer',
  428. 'PrintToConsole',
  429. 'ReplyToCommand',
  430. 'GetCmdReplySource',
  431. 'SetCmdReplySource',
  432. 'IsChatTrigger',
  433. 'ShowActivity2',
  434. 'ShowActivity',
  435. 'ShowActivityEx',
  436. 'FormatActivitySource',
  437. 'SrvCmd',
  438. 'RegServerCmd',
  439. 'ConCmd',
  440. 'RegConsoleCmd',
  441. 'RegAdminCmd',
  442. 'GetCmdArgs',
  443. 'GetCmdArg',
  444. 'GetCmdArgString',
  445. 'CreateConVar',
  446. 'FindConVar',
  447. 'ConVarChanged',
  448. 'HookConVarChange',
  449. 'UnhookConVarChange',
  450. 'GetConVarBool',
  451. 'SetConVarBool',
  452. 'GetConVarInt',
  453. 'SetConVarInt',
  454. 'GetConVarFloat',
  455. 'SetConVarFloat',
  456. 'GetConVarString',
  457. 'SetConVarString',
  458. 'ResetConVar',
  459. 'GetConVarDefault',
  460. 'GetConVarFlags',
  461. 'SetConVarFlags',
  462. 'GetConVarBounds',
  463. 'SetConVarBounds',
  464. 'GetConVarName',
  465. 'QueryClientConVar',
  466. 'GetCommandIterator',
  467. 'ReadCommandIterator',
  468. 'CheckCommandAccess',
  469. 'CheckAccess',
  470. 'IsValidConVarChar',
  471. 'GetCommandFlags',
  472. 'SetCommandFlags',
  473. 'FindFirstConCommand',
  474. 'FindNextConCommand',
  475. 'SendConVarValue',
  476. 'AddServerTag',
  477. 'RemoveServerTag',
  478. 'CommandListener',
  479. 'AddCommandListener',
  480. 'RemoveCommandListener',
  481. 'CommandExists',
  482. 'OnClientSayCommand',
  483. 'OnClientSayCommand_Post',
  484. 'TF2_IgnitePlayer',
  485. 'TF2_RespawnPlayer',
  486. 'TF2_RegeneratePlayer',
  487. 'TF2_AddCondition',
  488. 'TF2_RemoveCondition',
  489. 'TF2_SetPlayerPowerPlay',
  490. 'TF2_DisguisePlayer',
  491. 'TF2_RemovePlayerDisguise',
  492. 'TF2_StunPlayer',
  493. 'TF2_MakeBleed',
  494. 'TF2_GetClass',
  495. 'TF2_CalcIsAttackCritical',
  496. 'TF2_OnIsHolidayActive',
  497. 'TF2_IsHolidayActive',
  498. 'TF2_IsPlayerInDuel',
  499. 'TF2_RemoveWearable',
  500. 'TF2_OnConditionAdded',
  501. 'TF2_OnConditionRemoved',
  502. 'TF2_OnWaitingForPlayersStart',
  503. 'TF2_OnWaitingForPlayersEnd',
  504. 'TF2_OnPlayerTeleport',
  505. 'SQL_Connect',
  506. 'SQL_DefConnect',
  507. 'SQL_ConnectCustom',
  508. 'SQLite_UseDatabase',
  509. 'SQL_CheckConfig',
  510. 'SQL_GetDriver',
  511. 'SQL_ReadDriver',
  512. 'SQL_GetDriverIdent',
  513. 'SQL_GetDriverProduct',
  514. 'SQL_SetCharset',
  515. 'SQL_GetAffectedRows',
  516. 'SQL_GetInsertId',
  517. 'SQL_GetError',
  518. 'SQL_EscapeString',
  519. 'SQL_QuoteString',
  520. 'SQL_FastQuery',
  521. 'SQL_Query',
  522. 'SQL_PrepareQuery',
  523. 'SQL_FetchMoreResults',
  524. 'SQL_HasResultSet',
  525. 'SQL_GetRowCount',
  526. 'SQL_GetFieldCount',
  527. 'SQL_FieldNumToName',
  528. 'SQL_FieldNameToNum',
  529. 'SQL_FetchRow',
  530. 'SQL_MoreRows',
  531. 'SQL_Rewind',
  532. 'SQL_FetchString',
  533. 'SQL_FetchFloat',
  534. 'SQL_FetchInt',
  535. 'SQL_IsFieldNull',
  536. 'SQL_FetchSize',
  537. 'SQL_BindParamInt',
  538. 'SQL_BindParamFloat',
  539. 'SQL_BindParamString',
  540. 'SQL_Execute',
  541. 'SQL_LockDatabase',
  542. 'SQL_UnlockDatabase',
  543. 'SQLTCallback',
  544. 'SQL_IsSameConnection',
  545. 'SQL_TConnect',
  546. 'SQL_TQuery',
  547. 'SQL_CreateTransaction',
  548. 'SQL_AddQuery',
  549. 'SQLTxnSuccess',
  550. 'SQLTxnFailure',
  551. 'SQL_ExecuteTransaction',
  552. 'CloseHandle',
  553. 'CloneHandle',
  554. 'MenuHandler',
  555. 'CreateMenu',
  556. 'DisplayMenu',
  557. 'DisplayMenuAtItem',
  558. 'AddMenuItem',
  559. 'InsertMenuItem',
  560. 'RemoveMenuItem',
  561. 'RemoveAllMenuItems',
  562. 'GetMenuItem',
  563. 'GetMenuSelectionPosition',
  564. 'GetMenuItemCount',
  565. 'SetMenuPagination',
  566. 'GetMenuPagination',
  567. 'GetMenuStyle',
  568. 'SetMenuTitle',
  569. 'GetMenuTitle',
  570. 'CreatePanelFromMenu',
  571. 'GetMenuExitButton',
  572. 'SetMenuExitButton',
  573. 'GetMenuExitBackButton',
  574. 'SetMenuExitBackButton',
  575. 'SetMenuNoVoteButton',
  576. 'CancelMenu',
  577. 'GetMenuOptionFlags',
  578. 'SetMenuOptionFlags',
  579. 'IsVoteInProgress',
  580. 'CancelVote',
  581. 'VoteMenu',
  582. 'VoteMenuToAll',
  583. 'VoteHandler',
  584. 'SetVoteResultCallback',
  585. 'CheckVoteDelay',
  586. 'IsClientInVotePool',
  587. 'RedrawClientVoteMenu',
  588. 'GetMenuStyleHandle',
  589. 'CreatePanel',
  590. 'CreateMenuEx',
  591. 'GetClientMenu',
  592. 'CancelClientMenu',
  593. 'GetMaxPageItems',
  594. 'GetPanelStyle',
  595. 'SetPanelTitle',
  596. 'DrawPanelItem',
  597. 'DrawPanelText',
  598. 'CanPanelDrawFlags',
  599. 'SetPanelKeys',
  600. 'SendPanelToClient',
  601. 'GetPanelTextRemaining',
  602. 'GetPanelCurrentKey',
  603. 'SetPanelCurrentKey',
  604. 'RedrawMenuItem',
  605. 'InternalShowMenu',
  606. 'GetMenuVoteInfo',
  607. 'IsNewVoteAllowed',
  608. 'PrefetchSound',
  609. 'EmitAmbientSound',
  610. 'FadeClientVolume',
  611. 'StopSound',
  612. 'EmitSound',
  613. 'EmitSentence',
  614. 'GetDistGainFromSoundLevel',
  615. 'AmbientSHook',
  616. 'NormalSHook',
  617. 'AddAmbientSoundHook',
  618. 'AddNormalSoundHook',
  619. 'RemoveAmbientSoundHook',
  620. 'RemoveNormalSoundHook',
  621. 'EmitSoundToClient',
  622. 'EmitSoundToAll',
  623. 'ATTN_TO_SNDLEVEL',
  624. 'GetGameSoundParams',
  625. 'EmitGameSound',
  626. 'EmitAmbientGameSound',
  627. 'EmitGameSoundToClient',
  628. 'EmitGameSoundToAll',
  629. 'PrecacheScriptSound',
  630. 'strlen',
  631. 'StrContains',
  632. 'strcmp',
  633. 'strncmp',
  634. 'StrEqual',
  635. 'strcopy',
  636. 'Format',
  637. 'FormatEx',
  638. 'VFormat',
  639. 'StringToInt',
  640. 'StringToIntEx',
  641. 'IntToString',
  642. 'StringToFloat',
  643. 'StringToFloatEx',
  644. 'FloatToString',
  645. 'BreakString',
  646. 'TrimString',
  647. 'SplitString',
  648. 'ReplaceString',
  649. 'ReplaceStringEx',
  650. 'GetCharBytes',
  651. 'IsCharAlpha',
  652. 'IsCharNumeric',
  653. 'IsCharSpace',
  654. 'IsCharMB',
  655. 'IsCharUpper',
  656. 'IsCharLower',
  657. 'StripQuotes',
  658. 'CharToUpper',
  659. 'CharToLower',
  660. 'FindCharInString',
  661. 'StrCat',
  662. 'ExplodeString',
  663. 'ImplodeStrings',
  664. 'GetVectorLength',
  665. 'GetVectorDistance',
  666. 'GetVectorDotProduct',
  667. 'GetVectorCrossProduct',
  668. 'NormalizeVector',
  669. 'GetAngleVectors',
  670. 'GetVectorAngles',
  671. 'GetVectorVectors',
  672. 'AddVectors',
  673. 'SubtractVectors',
  674. 'ScaleVector',
  675. 'NegateVector',
  676. 'MakeVectorFromPoints',
  677. 'BaseComm_IsClientGagged',
  678. 'BaseComm_IsClientMuted',
  679. 'BaseComm_SetClientGag',
  680. 'BaseComm_SetClientMute',
  681. 'FormatUserLogText',
  682. 'FindPluginByFile',
  683. 'FindTarget',
  684. 'AcceptEntityInput',
  685. 'SetVariantBool',
  686. 'SetVariantString',
  687. 'SetVariantInt',
  688. 'SetVariantFloat',
  689. 'SetVariantVector3D',
  690. 'SetVariantPosVector3D',
  691. 'SetVariantColor',
  692. 'SetVariantEntity',
  693. 'GameRules_GetProp',
  694. 'GameRules_SetProp',
  695. 'GameRules_GetPropFloat',
  696. 'GameRules_SetPropFloat',
  697. 'GameRules_GetPropEnt',
  698. 'GameRules_SetPropEnt',
  699. 'GameRules_GetPropVector',
  700. 'GameRules_SetPropVector',
  701. 'GameRules_GetPropString',
  702. 'GameRules_SetPropString',
  703. 'GameRules_GetRoundState',
  704. 'OnClientConnect',
  705. 'OnClientConnected',
  706. 'OnClientPutInServer',
  707. 'OnClientDisconnect',
  708. 'OnClientDisconnect_Post',
  709. 'OnClientCommand',
  710. 'OnClientSettingsChanged',
  711. 'OnClientAuthorized',
  712. 'OnClientPreAdminCheck',
  713. 'OnClientPostAdminFilter',
  714. 'OnClientPostAdminCheck',
  715. 'GetMaxClients',
  716. 'GetMaxHumanPlayers',
  717. 'GetClientCount',
  718. 'GetClientName',
  719. 'GetClientIP',
  720. 'GetClientAuthString',
  721. 'GetClientAuthId',
  722. 'GetSteamAccountID',
  723. 'GetClientUserId',
  724. 'IsClientConnected',
  725. 'IsClientInGame',
  726. 'IsClientInKickQueue',
  727. 'IsClientAuthorized',
  728. 'IsFakeClient',
  729. 'IsClientSourceTV',
  730. 'IsClientReplay',
  731. 'IsClientObserver',
  732. 'IsPlayerAlive',
  733. 'GetClientInfo',
  734. 'GetClientTeam',
  735. 'SetUserAdmin',
  736. 'GetUserAdmin',
  737. 'AddUserFlags',
  738. 'RemoveUserFlags',
  739. 'SetUserFlagBits',
  740. 'GetUserFlagBits',
  741. 'CanUserTarget',
  742. 'RunAdminCacheChecks',
  743. 'NotifyPostAdminCheck',
  744. 'CreateFakeClient',
  745. 'SetFakeClientConVar',
  746. 'GetClientHealth',
  747. 'GetClientModel',
  748. 'GetClientWeapon',
  749. 'GetClientMaxs',
  750. 'GetClientMins',
  751. 'GetClientAbsAngles',
  752. 'GetClientAbsOrigin',
  753. 'GetClientArmor',
  754. 'GetClientDeaths',
  755. 'GetClientFrags',
  756. 'GetClientDataRate',
  757. 'IsClientTimingOut',
  758. 'GetClientTime',
  759. 'GetClientLatency',
  760. 'GetClientAvgLatency',
  761. 'GetClientAvgLoss',
  762. 'GetClientAvgChoke',
  763. 'GetClientAvgData',
  764. 'GetClientAvgPackets',
  765. 'GetClientOfUserId',
  766. 'KickClient',
  767. 'KickClientEx',
  768. 'ChangeClientTeam',
  769. 'GetClientSerial',
  770. 'GetClientFromSerial',
  771. 'FindStringTable',
  772. 'GetNumStringTables',
  773. 'GetStringTableNumStrings',
  774. 'GetStringTableMaxStrings',
  775. 'GetStringTableName',
  776. 'FindStringIndex',
  777. 'ReadStringTable',
  778. 'GetStringTableDataLength',
  779. 'GetStringTableData',
  780. 'SetStringTableData',
  781. 'AddToStringTable',
  782. 'LockStringTables',
  783. 'AddFileToDownloadsTable',
  784. 'GetEntityFlags',
  785. 'SetEntityFlags',
  786. 'GetEntityMoveType',
  787. 'SetEntityMoveType',
  788. 'GetEntityRenderMode',
  789. 'SetEntityRenderMode',
  790. 'GetEntityRenderFx',
  791. 'SetEntityRenderFx',
  792. 'SetEntityRenderColor',
  793. 'GetEntityGravity',
  794. 'SetEntityGravity',
  795. 'SetEntityHealth',
  796. 'GetClientButtons',
  797. 'EntityOutput',
  798. 'HookEntityOutput',
  799. 'UnhookEntityOutput',
  800. 'HookSingleEntityOutput',
  801. 'UnhookSingleEntityOutput',
  802. 'SMC_CreateParser',
  803. 'SMC_ParseFile',
  804. 'SMC_GetErrorString',
  805. 'SMC_ParseStart',
  806. 'SMC_SetParseStart',
  807. 'SMC_ParseEnd',
  808. 'SMC_SetParseEnd',
  809. 'SMC_NewSection',
  810. 'SMC_KeyValue',
  811. 'SMC_EndSection',
  812. 'SMC_SetReaders',
  813. 'SMC_RawLine',
  814. 'SMC_SetRawLine',
  815. 'BfWriteBool',
  816. 'BfWriteByte',
  817. 'BfWriteChar',
  818. 'BfWriteShort',
  819. 'BfWriteWord',
  820. 'BfWriteNum',
  821. 'BfWriteFloat',
  822. 'BfWriteString',
  823. 'BfWriteEntity',
  824. 'BfWriteAngle',
  825. 'BfWriteCoord',
  826. 'BfWriteVecCoord',
  827. 'BfWriteVecNormal',
  828. 'BfWriteAngles',
  829. 'BfReadBool',
  830. 'BfReadByte',
  831. 'BfReadChar',
  832. 'BfReadShort',
  833. 'BfReadWord',
  834. 'BfReadNum',
  835. 'BfReadFloat',
  836. 'BfReadString',
  837. 'BfReadEntity',
  838. 'BfReadAngle',
  839. 'BfReadCoord',
  840. 'BfReadVecCoord',
  841. 'BfReadVecNormal',
  842. 'BfReadAngles',
  843. 'BfGetNumBytesLeft',
  844. 'CreateProfiler',
  845. 'StartProfiling',
  846. 'StopProfiling',
  847. 'GetProfilerTime',
  848. 'OnPluginStart',
  849. 'AskPluginLoad2',
  850. 'OnPluginEnd',
  851. 'OnPluginPauseChange',
  852. 'OnGameFrame',
  853. 'OnMapStart',
  854. 'OnMapEnd',
  855. 'OnConfigsExecuted',
  856. 'OnAutoConfigsBuffered',
  857. 'OnAllPluginsLoaded',
  858. 'GetMyHandle',
  859. 'GetPluginIterator',
  860. 'MorePlugins',
  861. 'ReadPlugin',
  862. 'GetPluginStatus',
  863. 'GetPluginFilename',
  864. 'IsPluginDebugging',
  865. 'GetPluginInfo',
  866. 'FindPluginByNumber',
  867. 'SetFailState',
  868. 'ThrowError',
  869. 'GetTime',
  870. 'FormatTime',
  871. 'LoadGameConfigFile',
  872. 'GameConfGetOffset',
  873. 'GameConfGetKeyValue',
  874. 'GameConfGetAddress',
  875. 'GetSysTickCount',
  876. 'AutoExecConfig',
  877. 'RegPluginLibrary',
  878. 'LibraryExists',
  879. 'GetExtensionFileStatus',
  880. 'OnLibraryAdded',
  881. 'OnLibraryRemoved',
  882. 'ReadMapList',
  883. 'SetMapListCompatBind',
  884. 'OnClientFloodCheck',
  885. 'OnClientFloodResult',
  886. 'CanTestFeatures',
  887. 'GetFeatureStatus',
  888. 'RequireFeature',
  889. 'LoadFromAddress',
  890. 'StoreToAddress',
  891. 'CreateStack',
  892. 'PushStackCell',
  893. 'PushStackString',
  894. 'PushStackArray',
  895. 'PopStackCell',
  896. 'PopStackString',
  897. 'PopStackArray',
  898. 'IsStackEmpty',
  899. 'PopStack',
  900. 'OnPlayerRunCmd',
  901. 'BuildPath',
  902. 'OpenDirectory',
  903. 'ReadDirEntry',
  904. 'OpenFile',
  905. 'DeleteFile',
  906. 'ReadFileLine',
  907. 'ReadFile',
  908. 'ReadFileString',
  909. 'WriteFile',
  910. 'WriteFileString',
  911. 'WriteFileLine',
  912. 'ReadFileCell',
  913. 'WriteFileCell',
  914. 'IsEndOfFile',
  915. 'FileSeek',
  916. 'FilePosition',
  917. 'FileExists',
  918. 'RenameFile',
  919. 'DirExists',
  920. 'FileSize',
  921. 'FlushFile',
  922. 'RemoveDir',
  923. 'CreateDirectory',
  924. 'GetFileTime',
  925. 'LogToOpenFile',
  926. 'LogToOpenFileEx',
  927. 'PbReadInt',
  928. 'PbReadFloat',
  929. 'PbReadBool',
  930. 'PbReadString',
  931. 'PbReadColor',
  932. 'PbReadAngle',
  933. 'PbReadVector',
  934. 'PbReadVector2D',
  935. 'PbGetRepeatedFieldCount',
  936. 'PbSetInt',
  937. 'PbSetFloat',
  938. 'PbSetBool',
  939. 'PbSetString',
  940. 'PbSetColor',
  941. 'PbSetAngle',
  942. 'PbSetVector',
  943. 'PbSetVector2D',
  944. 'PbAddInt',
  945. 'PbAddFloat',
  946. 'PbAddBool',
  947. 'PbAddString',
  948. 'PbAddColor',
  949. 'PbAddAngle',
  950. 'PbAddVector',
  951. 'PbAddVector2D',
  952. 'PbRemoveRepeatedFieldValue',
  953. 'PbReadMessage',
  954. 'PbReadRepeatedMessage',
  955. 'PbAddMessage',
  956. 'SetNextMap',
  957. 'GetNextMap',
  958. 'ForceChangeLevel',
  959. 'GetMapHistorySize',
  960. 'GetMapHistory',
  961. 'GeoipCode2',
  962. 'GeoipCode3',
  963. 'GeoipCountry',
  964. 'MarkNativeAsOptional',
  965. 'RegClientCookie',
  966. 'FindClientCookie',
  967. 'SetClientCookie',
  968. 'GetClientCookie',
  969. 'SetAuthIdCookie',
  970. 'AreClientCookiesCached',
  971. 'OnClientCookiesCached',
  972. 'CookieMenuHandler',
  973. 'SetCookiePrefabMenu',
  974. 'SetCookieMenuItem',
  975. 'ShowCookieMenu',
  976. 'GetCookieIterator',
  977. 'ReadCookieIterator',
  978. 'GetCookieAccess',
  979. 'GetClientCookieTime',
  980. 'LoadTranslations',
  981. 'SetGlobalTransTarget',
  982. 'GetClientLanguage',
  983. 'GetServerLanguage',
  984. 'GetLanguageCount',
  985. 'GetLanguageInfo',
  986. 'SetClientLanguage',
  987. 'GetLanguageByCode',
  988. 'GetLanguageByName',
  989. 'CS_OnBuyCommand',
  990. 'CS_OnCSWeaponDrop',
  991. 'CS_OnGetWeaponPrice',
  992. 'CS_OnTerminateRound',
  993. 'CS_RespawnPlayer',
  994. 'CS_SwitchTeam',
  995. 'CS_DropWeapon',
  996. 'CS_TerminateRound',
  997. 'CS_GetTranslatedWeaponAlias',
  998. 'CS_GetWeaponPrice',
  999. 'CS_GetClientClanTag',
  1000. 'CS_SetClientClanTag',
  1001. 'CS_GetTeamScore',
  1002. 'CS_SetTeamScore',
  1003. 'CS_GetMVPCount',
  1004. 'CS_SetMVPCount',
  1005. 'CS_GetClientContributionScore',
  1006. 'CS_SetClientContributionScore',
  1007. 'CS_GetClientAssists',
  1008. 'CS_SetClientAssists',
  1009. 'CS_AliasToWeaponID',
  1010. 'CS_WeaponIDToAlias',
  1011. 'CS_IsValidWeaponID',
  1012. 'CS_UpdateClientModel',
  1013. 'LogToGame',
  1014. 'SetRandomSeed',
  1015. 'GetRandomFloat',
  1016. 'GetRandomInt',
  1017. 'IsMapValid',
  1018. 'IsDedicatedServer',
  1019. 'GetEngineTime',
  1020. 'GetGameTime',
  1021. 'GetGameTickCount',
  1022. 'GetGameDescription',
  1023. 'GetGameFolderName',
  1024. 'GetCurrentMap',
  1025. 'PrecacheModel',
  1026. 'PrecacheSentenceFile',
  1027. 'PrecacheDecal',
  1028. 'PrecacheGeneric',
  1029. 'IsModelPrecached',
  1030. 'IsDecalPrecached',
  1031. 'IsGenericPrecached',
  1032. 'PrecacheSound',
  1033. 'IsSoundPrecached',
  1034. 'CreateDialog',
  1035. 'GetEngineVersion',
  1036. 'PrintToChat',
  1037. 'PrintToChatAll',
  1038. 'PrintCenterText',
  1039. 'PrintCenterTextAll',
  1040. 'PrintHintText',
  1041. 'PrintHintTextToAll',
  1042. 'ShowVGUIPanel',
  1043. 'CreateHudSynchronizer',
  1044. 'SetHudTextParams',
  1045. 'SetHudTextParamsEx',
  1046. 'ShowSyncHudText',
  1047. 'ClearSyncHud',
  1048. 'ShowHudText',
  1049. 'ShowMOTDPanel',
  1050. 'DisplayAskConnectBox',
  1051. 'EntIndexToEntRef',
  1052. 'EntRefToEntIndex',
  1053. 'MakeCompatEntRef',
  1054. 'SetClientViewEntity',
  1055. 'SetLightStyle',
  1056. 'GetClientEyePosition',
  1057. 'CreateDataPack',
  1058. 'WritePackCell',
  1059. 'WritePackFloat',
  1060. 'WritePackString',
  1061. 'ReadPackCell',
  1062. 'ReadPackFloat',
  1063. 'ReadPackString',
  1064. 'ResetPack',
  1065. 'GetPackPosition',
  1066. 'SetPackPosition',
  1067. 'IsPackReadable',
  1068. 'LogMessage',
  1069. 'LogToFile',
  1070. 'LogToFileEx',
  1071. 'LogAction',
  1072. 'LogError',
  1073. 'OnLogAction',
  1074. 'GameLogHook',
  1075. 'AddGameLogHook',
  1076. 'RemoveGameLogHook',
  1077. 'FindTeamByName',
  1078. 'StartPrepSDKCall',
  1079. 'PrepSDKCall_SetVirtual',
  1080. 'PrepSDKCall_SetSignature',
  1081. 'PrepSDKCall_SetAddress',
  1082. 'PrepSDKCall_SetFromConf',
  1083. 'PrepSDKCall_SetReturnInfo',
  1084. 'PrepSDKCall_AddParameter',
  1085. 'EndPrepSDKCall',
  1086. 'SDKCall',
  1087. 'GetPlayerResourceEntity',
  1088. )
  1089. if __name__ == '__main__': # pragma: no cover
  1090. import re
  1091. import sys
  1092. try:
  1093. from urllib import FancyURLopener
  1094. except ImportError:
  1095. from urllib.request import FancyURLopener
  1096. from pygments.util import format_lines
  1097. # urllib ends up wanting to import a module called 'math' -- if
  1098. # pygments/lexers is in the path, this ends badly.
  1099. for i in range(len(sys.path)-1, -1, -1):
  1100. if sys.path[i].endswith('/lexers'):
  1101. del sys.path[i]
  1102. class Opener(FancyURLopener):
  1103. version = 'Mozilla/5.0 (Pygments Sourcemod Builtins Update)'
  1104. opener = Opener()
  1105. def get_version():
  1106. f = opener.open('http://docs.sourcemod.net/api/index.php')
  1107. r = re.compile(r'SourceMod v\.<b>([\d\.]+(?:-\w+)?)</td>')
  1108. for line in f:
  1109. m = r.search(line)
  1110. if m is not None:
  1111. return m.groups()[0]
  1112. raise ValueError('No version in api docs')
  1113. def get_sm_functions():
  1114. f = opener.open('http://docs.sourcemod.net/api/SMfuncs.js')
  1115. r = re.compile(r'SMfunctions\[\d+\] = Array \("(?:public )?([^,]+)",".+"\);')
  1116. functions = []
  1117. for line in f:
  1118. m = r.match(line)
  1119. if m is not None:
  1120. functions.append(m.groups()[0])
  1121. return functions
  1122. def regenerate(filename, natives):
  1123. with open(filename) as fp:
  1124. content = fp.read()
  1125. header = content[:content.find('FUNCTIONS = (')]
  1126. footer = content[content.find("if __name__ == '__main__':")-1:]
  1127. with open(filename, 'w') as fp:
  1128. fp.write(header)
  1129. fp.write(format_lines('FUNCTIONS', natives))
  1130. fp.write(footer)
  1131. def run():
  1132. version = get_version()
  1133. print('> Downloading function index for SourceMod %s' % version)
  1134. functions = get_sm_functions()
  1135. print('> %d functions found:' % len(functions))
  1136. functionlist = []
  1137. for full_function_name in functions:
  1138. print('>> %s' % full_function_name)
  1139. functionlist.append(full_function_name)
  1140. regenerate(__file__, functionlist)
  1141. run()