-
Notifications
You must be signed in to change notification settings - Fork 2
/
callbacks.json
87 lines (86 loc) · 6.85 KB
/
callbacks.json
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
{
/* You must escape `\`, so `\\\\\\\\` matches `\\` in a test input. */
"defines":
{
/* These are mostly defined in _defines.json. */
/* There should be no capture groups in here. */
},
"replacements":
[
{
"description": "Adding `PLAYER_STATE` tag to `OnPlayerStateChange`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?OnPlayerStateChange\\s*\\(\\s*playerid\\s*,\\s*newstate\\s*,\\s*oldstate\\s*\\)",
"to": "$1#if !defined PLAYER_STATE\n$1\t#define PLAYER_STATE: _:\n$1#endif\n$1$2 $3OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate)"
},
{
"description": "Adding `CLICK_SOURCE` tag to `OnPlayerClickPlayer`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?OnPlayerClickPlayer\\s*\\(\\s*playerid\\s*,\\s*clickedplayerid\\s*,\\s*source\\s*\\)",
"to": "$1#if !defined CLICK_SOURCE\n$1\t#define CLICK_SOURCE: _:\n$1#endif\n$1$2 $3OnPlayerClickPlayer(playerid, clickedplayerid, CLICK_SOURCE:source)"
},
{
"description": "Adding `EDIT_RESPONSE` tag to `OnPlayerEditObject`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?OnPlayerEditObject\\s*\\(\\s*playerid\\s*,\\s*playerobject\\s*,\\s*objectid\\s*,\\s*response\\s*,\\s*Float\\s*:\\s*fX\\s*,\\s*Float\\s*:\\s*fY\\s*,\\s*Float\\s*:\\s*fZ\\s*,\\s*Float\\s*:\\s*fRotX\\s*,\\s*Float\\s*:\\s*fRotY\\s*,\\s*Float\\s*:\\s*fRotZ\\s*\\)",
"to": "$1#if !defined EDIT_RESPONSE\n$1\t#define EDIT_RESPONSE: _:\n$1#endif\n$1$2 $3OnPlayerEditObject(playerid, playerobject, objectid, EDIT_RESPONSE:response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)"
},
{
"description": "Adding `EDIT_RESPONSE` tag to `OnPlayerEditAttachedObject`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?OnPlayerEditAttachedObject\\s*\\(\\s*playerid\\s*,\\s*response\\s*,\\s*index\\s*,\\s*modelid\\s*,\\s*boneid\\s*,\\s*Float\\s*:\\s*fOffsetX\\s*,\\s*Float\\s*:\\s*fOffsetY\\s*,\\s*Float\\s*:\\s*fOffsetZ\\s*,\\s*Float\\s*:\\s*fRotX\\s*,\\s*Float\\s*:\\s*fRotY\\s*,\\s*Float\\s*:\\s*fRotZ\\s*,\\s*Float\\s*:\\s*fScaleX\\s*,\\s*Float\\s*:\\s*fScaleY\\s*,\\s*Float\\s*:\\s*fScaleZ\\s*\\)",
"to": "$1#if !defined EDIT_RESPONSE\n$1\t#define EDIT_RESPONSE: _:\n$1#endif\n$1$2 $3OnPlayerEditAttachedObject(playerid, EDIT_RESPONSE:response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)"
},
{
"description": "Adding `SELECT_OBJECT` tag to `OnPlayerSelectObject`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?OnPlayerSelectObject\\s*\\(\\s*playerid\\s*,\\s*type\\s*,\\s*objectid\\s*,\\s*modelid\\s*,\\s*Float\\s*:\\s*fX\\s*,\\s*Float\\s*:\\s*fY\\s*,\\s*Float\\s*:\\s*fZ\\s*\\)",
"to": "$1#if !defined SELECT_OBJECT\n$1\t#define SELECT_OBJECT: _:\n$1#endif\n$1$2 $3OnPlayerSelectObject(playerid, SELECT_OBJECT:type, objectid, modelid, Float:fX, Float:fY, Float:fZ)"
},
{
"description": "Adding `BULLET_HIT_TYPE` tag to `OnPlayerWeaponShot`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?OnPlayerWeaponShot\\s*\\(\\s*playerid\\s*,\\s*((?&tag)\\s*+)?weaponid\\s*,\\s*hittype\\s*,\\s*hitid\\s*,\\s*Float\\s*:\\s*fX\\s*,\\s*Float\\s*:\\s*fY\\s*,\\s*Float\\s*:\\s*fZ\\s*\\)",
"to": "$1#if !defined BULLET_HIT_TYPE\n$1\t#define BULLET_HIT_TYPE: _:\n$1#endif\n$1$2 $3OnPlayerWeaponShot(playerid, $4weaponid, BULLET_HIT_TYPE:hittype, hitid, Float:fX, Float:fY, Float:fZ)"
},
{
"description": "Adding `WEAPON` tag to `OnPlayerDeath`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?OnPlayerDeath\\s*\\(\\s*playerid\\s*,\\s*killerid\\s*,\\s*reason\\s*\\)",
"to": "$1#if !defined WEAPON\n$1\t#define WEAPON: _:\n$1#endif\n$1$2 $3OnPlayerDeath(playerid, killerid, WEAPON:reason)"
},
{
"description": "Adding `WEAPON` tag to `OnPlayerWeaponShot`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?OnPlayerWeaponShot\\s*\\(\\s*playerid\\s*,\\s*weaponid\\s*,\\s*((?&tag)\\s*+)?hittype\\s*,\\s*hitid\\s*,\\s*Float\\s*:\\s*fX\\s*,\\s*Float\\s*:\\s*fY\\s*,\\s*Float\\s*:\\s*fZ\\s*\\)",
"to": "$1#if !defined WEAPON\n$1\t#define WEAPON: _:\n$1#endif\n$1$2 $3OnPlayerWeaponShot(playerid, WEAPON:weaponid, $4hittype, hitid, Float:fX, Float:fY, Float:fZ)"
},
{
"description": "Adding `WEAPON` tag to `OnPlayerTakeDamage`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?OnPlayerTakeDamage\\s*\\(\\s*playerid\\s*,\\s*issuerid\\s*,\\s*Float\\s*:\\s*amount\\s*,\\s*weaponid\\s*,\\s*bodypart\\s*\\)",
"to": "$1#if !defined WEAPON\n$1\t#define WEAPON: _:\n$1#endif\n$1$2 $3OnPlayerTakeDamage(playerid, issuerid, Float:amount, WEAPON:weaponid, bodypart)"
},
{
"description": "Adding `WEAPON` tag to `OnPlayerGiveDamage`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?OnPlayerGiveDamage\\s*\\(\\s*playerid\\s*,\\s*damagedid\\s*,\\s*Float\\s*:\\s*amount\\s*,\\s*weaponid\\s*,\\s*bodypart\\s*\\)",
"to": "$1#if !defined WEAPON\n$1\t#define WEAPON: _:\n$1#endif\n$1$2 $3OnPlayerGiveDamage(playerid, damagedid, Float:amount, WEAPON:weaponid, bodypart)"
},
{
"description": "Adding `WEAPON` tag to `OnPlayerGiveDamageActor`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?OnPlayerGiveDamageActor\\s*\\(\\s*playerid\\s*,\\s*damaged_actorid\\s*,\\s*Float\\s*:\\s*amount\\s*,\\s*weaponid\\s*,\\s*bodypart\\s*\\)",
"to": "$1#if !defined WEAPON\n$1\t#define WEAPON: _:\n$1#endif\n$1$2 $3OnPlayerGiveDamage(playerid, damaged_actorid, Float:amount, WEAPON:weaponid, bodypart)"
},
{
"description": "Adding `KEY` tag to `OnPlayerKeyStateChange`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?OnPlayerKeyStateChange\\s*\\(\\s*playerid\\s*,\\s*newkeys\\s*,\\s*oldkeys\\s*\\)",
"to": "$1#if !defined KEY\n$1\t#define KEY: _:\n$1#endif\n$1$2 $3OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys)"
},
{
"description": "Adding `DOWNLOAD_REQUEST` tag to `OnPlayerRequestDownload`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?OnPlayerRequestDownload\\s*\\(\\s*playerid\\s*,\\s*type\\s*,\\s*crc\\s*\\)",
"to": "$1#if !defined DOWNLOAD_REQUEST\n$1\t#define DOWNLOAD_REQUEST: _:\n$1#endif\n$1$2 $3OnPlayerRequestDownload(playerid, DOWNLOAD_REQUEST:type, crc)"
},
{
"description": "Adding `STREAMER_TYPE` tag to `Streamer_OnItemStreamIn`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?Streamer_OnItemStreamIn\\s*\\(\\s*type\\s*,\\s*(STREAMER_ALL_TAGS\\s*:\\s*)?id\\s*,\\s*forplayerid\\s*\\)",
"to": "$1#if !defined STREAMER_TYPE\n$1\t#define STREAMER_TYPE: _:\n$1#endif\n$1$2 $3Streamer_OnItemStreamIn(STREAMER_TYPE:type, $4id, forplayerid)"
},
{
"description": "Adding `STREAMER_TYPE` tag to `Streamer_OnItemStreamOut`",
"from": "((?&start))((?&publics))\\s+((?&prefix))?Streamer_OnItemStreamOut\\s*\\(\\s*type\\s*,\\s*(STREAMER_ALL_TAGS\\s*:\\s*)?id\\s*,\\s*forplayerid\\s*\\)",
"to": "$1#if !defined STREAMER_TYPE\n$1\t#define STREAMER_TYPE: _:\n$1#endif\n$1$2 $3Streamer_OnItemStreamOut(STREAMER_TYPE:type, $4id, forplayerid)"
}
]
}