@nodemod/core 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +60 -0
  2. package/dist/core/cmd.d.ts +148 -0
  3. package/dist/core/cmd.d.ts.map +1 -0
  4. package/dist/core/cmd.js +177 -0
  5. package/dist/core/cmd.js.map +1 -0
  6. package/dist/core/menu.d.ts +300 -0
  7. package/dist/core/menu.d.ts.map +1 -0
  8. package/dist/core/menu.js +449 -0
  9. package/dist/core/menu.js.map +1 -0
  10. package/dist/core/msg.d.ts +300 -0
  11. package/dist/core/msg.d.ts.map +1 -0
  12. package/dist/core/msg.js +374 -0
  13. package/dist/core/msg.js.map +1 -0
  14. package/dist/core/resource.d.ts +137 -0
  15. package/dist/core/resource.d.ts.map +1 -0
  16. package/dist/core/resource.js +171 -0
  17. package/dist/core/resource.js.map +1 -0
  18. package/dist/core/sound.d.ts +262 -0
  19. package/dist/core/sound.d.ts.map +1 -0
  20. package/dist/core/sound.js +300 -0
  21. package/dist/core/sound.js.map +1 -0
  22. package/dist/enhanced/entity.d.ts +263 -0
  23. package/dist/enhanced/entity.d.ts.map +1 -0
  24. package/dist/enhanced/entity.js +447 -0
  25. package/dist/enhanced/entity.js.map +1 -0
  26. package/dist/enhanced/events.d.ts +257 -0
  27. package/dist/enhanced/events.d.ts.map +1 -0
  28. package/dist/enhanced/events.js +350 -0
  29. package/dist/enhanced/events.js.map +1 -0
  30. package/dist/enhanced/player.d.ts +272 -0
  31. package/dist/enhanced/player.d.ts.map +1 -0
  32. package/dist/enhanced/player.js +389 -0
  33. package/dist/enhanced/player.js.map +1 -0
  34. package/dist/enhanced/trace.d.ts +198 -0
  35. package/dist/enhanced/trace.d.ts.map +1 -0
  36. package/dist/enhanced/trace.js +311 -0
  37. package/dist/enhanced/trace.js.map +1 -0
  38. package/dist/index.d.ts +88 -0
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.js +120 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/native/cvar.d.ts +49 -0
  43. package/dist/native/cvar.d.ts.map +1 -0
  44. package/dist/native/cvar.js +169 -0
  45. package/dist/native/cvar.js.map +1 -0
  46. package/dist/native/file.d.ts +221 -0
  47. package/dist/native/file.d.ts.map +1 -0
  48. package/dist/native/file.js +353 -0
  49. package/dist/native/file.js.map +1 -0
  50. package/dist/types/dll.d.ts +109 -0
  51. package/dist/types/engine.d.ts +319 -0
  52. package/dist/types/enums.d.ts +434 -0
  53. package/dist/types/events.d.ts +2432 -0
  54. package/dist/types/index.d.ts +38 -0
  55. package/dist/types/structures.d.ts +1144 -0
  56. package/dist/utils/util.d.ts +202 -0
  57. package/dist/utils/util.d.ts.map +1 -0
  58. package/dist/utils/util.js +318 -0
  59. package/dist/utils/util.js.map +1 -0
  60. package/package.json +167 -0
@@ -0,0 +1,434 @@
1
+ // This file is generated automatically. Don't edit it.
2
+ declare namespace nodemod {
3
+ // Metamod result constants
4
+ const enum META_RES {
5
+ UNSET = 0, // Uninitialized (causes error)
6
+ IGNORED = 1, // Plugin didn't take any action, continue normally
7
+ HANDLED = 2, // Plugin did something, but original function still executes
8
+ OVERRIDE = 3, // Execute original function, but use plugin's return value
9
+ SUPERCEDE = 4 // Skip original function entirely, use plugin's behavior
10
+ }
11
+
12
+ // Alert types for engine functions
13
+ const enum ALERT_TYPE {
14
+ at_notice = 0,
15
+ at_console = 1,
16
+ at_aiconsole = 2,
17
+ at_warning = 3,
18
+ at_error = 4,
19
+ at_logged = 5
20
+ }
21
+
22
+ // Print types for client output
23
+ const enum PRINT_TYPE {
24
+ print_console = 0,
25
+ print_center = 1,
26
+ print_chat = 2
27
+ }
28
+
29
+ // Force types for consistency checking
30
+ const enum FORCE_TYPE {
31
+ force_exactfile = 0,
32
+ force_model_samebounds = 1,
33
+ force_model_specifybounds = 2,
34
+ force_model_specifybounds_if_avail = 3
35
+ }
36
+
37
+ // Message destination types for engine messaging
38
+ const enum MSG_DEST {
39
+ BROADCAST = 0, // Message to all players without delivery guarantee
40
+ ONE = 1, // Message to one player with delivery guarantee
41
+ ALL = 2, // Message with delivery guarantee to all players
42
+ INIT = 3, // Write to the init string
43
+ PVS = 4, // All players in potentially visible set of point
44
+ PAS = 5, // All players in potentially audible set
45
+ PVS_R = 6, // All players in PVS with reliable delivery
46
+ PAS_R = 7, // All players in PAS with reliable delivery
47
+ ONE_UNRELIABLE = 8, // Message to one player without delivery guarantee
48
+ SPEC = 9 // Message to all HLTV proxy
49
+ }
50
+
51
+ // Network message types for Half-Life protocol
52
+ const enum MSG_TYPE {
53
+ BAD = 0,
54
+ NOP = 1,
55
+ DISCONNECT = 2,
56
+ EVENT = 3,
57
+ VERSION = 4,
58
+ SETVIEW = 5,
59
+ SOUND = 6,
60
+ TIME = 7,
61
+ PRINT = 8,
62
+ STUFFTEXT = 9,
63
+ SETANGLE = 10,
64
+ SERVERINFO = 11,
65
+ LIGHTSTYLE = 12,
66
+ UPDATEUSERINFO = 13,
67
+ DELTADESCRIPTION = 14,
68
+ CLIENTDATA = 15,
69
+ STOPSOUND = 16,
70
+ PINGS = 17,
71
+ PARTICLE = 18,
72
+ DAMAGE = 19,
73
+ SPAWNSTATIC = 20,
74
+ EVENT_RELIABLE = 21,
75
+ SPAWNBASELINE = 22,
76
+ TEMPENTITY = 23,
77
+ SETPAUSE = 24,
78
+ SIGNONNUM = 25,
79
+ CENTERPRINT = 26,
80
+ KILLEDMONSTER = 27,
81
+ FOUNDSECRET = 28,
82
+ SPAWNSTATICSOUND = 29,
83
+ INTERMISSION = 30,
84
+ FINALE = 31,
85
+ CDTRACK = 32,
86
+ RESTORE = 33,
87
+ CUTSCENE = 34,
88
+ WEAPONANIM = 35,
89
+ DECALNAME = 36,
90
+ ROOMTYPE = 37,
91
+ ADDANGLE = 38,
92
+ NEWUSERMSG = 39,
93
+ PACKETENTITIES = 40,
94
+ DELTAPACKETENTITIES = 41,
95
+ CHOKE = 42,
96
+ RESOURCELIST = 43,
97
+ NEWMOVEVARS = 44,
98
+ RESOURCEREQUEST = 45,
99
+ CUSTOMIZATION = 46,
100
+ CROSSHAIRANGLE = 47,
101
+ SOUNDFADE = 48,
102
+ FILETXFERFAILED = 49,
103
+ HLTV = 50,
104
+ DIRECTOR = 51,
105
+ VOICEINIT = 52,
106
+ VOICEDATA = 53,
107
+ SENDEXTRAINFO = 54,
108
+ TIMESCALE = 55,
109
+ RESOURCELOCATION = 56,
110
+ SENDCVARVALUE = 57,
111
+ SENDCVARVALUE2 = 58
112
+ }
113
+
114
+ // Sound attenuation constants for pfnEmitSound
115
+ const enum ATTN {
116
+ NONE = 0, // No attenuation
117
+ NORM = 0.8, // Normal attenuation
118
+ IDLE = 2.0, // Idle attenuation
119
+ STATIC = 1.25 // Static attenuation
120
+ }
121
+
122
+ // Sound flags for pfnEmitSound fFlags parameter
123
+ const enum SND {
124
+ SPAWNING = 256, // 1<<8 - We're spawning, used in some cases for ambients
125
+ STOP = 32, // 1<<5 - Stop sound
126
+ CHANGE_VOL = 64, // 1<<6 - Change sound volume
127
+ CHANGE_PITCH = 128 // 1<<7 - Change sound pitch
128
+ }
129
+
130
+ // Console variable (cvar) flags
131
+ const enum FCVAR {
132
+ NONE = 0, // No flags
133
+ ARCHIVE = 1, // 1<<0 - Set to cause it to be saved to vars.rc
134
+ USERINFO = 2, // 1<<1 - Changes the client's info string
135
+ SERVER = 4, // 1<<2 - Notifies players when changed
136
+ EXTDLL = 8, // 1<<3 - Defined by external DLL
137
+ CLIENTDLL = 16, // 1<<4 - Defined by the client dll
138
+ PROTECTED = 32, // 1<<5 - Server cvar, but we don't send the data since it's a password, etc.
139
+ SPONLY = 64, // 1<<6 - This cvar cannot be changed by clients connected to a multiplayer server
140
+ PRINTABLEONLY = 128, // 1<<7 - This cvar's string cannot contain unprintable characters
141
+ UNLOGGED = 256, // 1<<8 - If this is a FCVAR_SERVER, don't log changes to the log file / console
142
+ NOEXTRAWHITEPACE = 512 // 1<<9 - Strip trailing/leading white space from this cvar
143
+ }
144
+
145
+ /** pev(entity, pev_button) or pev(entity, pev_oldbuttons) values */
146
+ const enum IN_BUTTON {
147
+ ATTACK = 1, // 1<<0
148
+ JUMP = 2, // 1<<1
149
+ DUCK = 4, // 1<<2
150
+ FORWARD = 8, // 1<<3
151
+ BACK = 16, // 1<<4
152
+ USE = 32, // 1<<5
153
+ CANCEL = 64, // 1<<6
154
+ LEFT = 128, // 1<<7
155
+ RIGHT = 256, // 1<<8
156
+ MOVELEFT = 512, // 1<<9
157
+ MOVERIGHT = 1024, // 1<<10
158
+ ATTACK2 = 2048, // 1<<11
159
+ RUN = 4096, // 1<<12
160
+ RELOAD = 8192, // 1<<13
161
+ ALT1 = 16384, // 1<<14
162
+ SCORE = 32768 // 1<<15 - Used by client.dll for when scoreboard is held down
163
+ }
164
+
165
+ /** pev(entity, pev_flags) values */
166
+ const enum FL {
167
+ FLY = 1, // 1<<0 - Changes the SV_Movestep() behavior to not need to be on ground
168
+ SWIM = 2, // 1<<1 - Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
169
+ CONVEYOR = 4, // 1<<2
170
+ CLIENT = 8, // 1<<3
171
+ INWATER = 16, // 1<<4
172
+ MONSTER = 32, // 1<<5
173
+ GODMODE = 64, // 1<<6
174
+ NOTARGET = 128, // 1<<7
175
+ SKIPLOCALHOST = 256, // 1<<8 - Don't send entity to local host, it's predicting this entity itself
176
+ ONGROUND = 512, // 1<<9 - At rest / on the ground
177
+ PARTIALGROUND = 1024, // 1<<10 - Not all corners are valid
178
+ WATERJUMP = 2048, // 1<<11 - Player jumping out of water
179
+ FROZEN = 4096, // 1<<12 - Player is frozen for 3rd person camera
180
+ FAKECLIENT = 8192, // 1<<13 - JAC: fake client, simulated server side; don't send network messages to them
181
+ DUCKING = 16384, // 1<<14 - Player flag -- Player is fully crouched
182
+ FLOAT = 32768, // 1<<15 - Apply floating force to this entity when in water
183
+ GRAPHED = 65536, // 1<<16 - Worldgraph has this ent listed as something that blocks a connection
184
+ IMMUNE_WATER = 131072, // 1<<17
185
+ IMMUNE_SLIME = 262144, // 1<<18
186
+ IMMUNE_LAVA = 524288, // 1<<19
187
+ PROXY = 1048576, // 1<<20 - This is a spectator proxy
188
+ ALWAYSTHINK = 2097152, // 1<<21 - Brush model flag -- call think every frame regardless of nextthink - ltime
189
+ BASEVELOCITY = 4194304, // 1<<22 - Base velocity has been applied this frame
190
+ MONSTERCLIP = 8388608, // 1<<23 - Only collide in with monsters who have FL_MONSTERCLIP set
191
+ ONTRAIN = 16777216, // 1<<24 - Player is _controlling_ a train
192
+ WORLDBRUSH = 33554432, // 1<<25 - Not moveable/removeable brush entity
193
+ SPECTATOR = 67108864, // 1<<26 - This client is a spectator
194
+ CUSTOMENTITY = 536870912, // 1<<29 - This is a custom entity
195
+ KILLME = 1073741824, // 1<<30 - This entity is marked for death
196
+ DORMANT = 2147483648 // 1<<31 - Entity is dormant, no updates to client
197
+ }
198
+
199
+ /** engfunc(EngFunc_WalkMove, entity, Float:yaw, Float:dist, iMode) iMode values */
200
+ const enum WALKMOVE {
201
+ NORMAL = 0, // Normal walkmove
202
+ WORLDONLY = 1, // Doesn't hit ANY entities, no matter what the solid type
203
+ CHECKONLY = 2 // Move, but don't touch triggers
204
+ }
205
+
206
+ /** engfunc(EngFunc_MoveToOrigin, entity, Float:goal[3], Float:distance, moveType) moveType values */
207
+ const enum MOVE {
208
+ NORMAL = 0, // normal move in the direction monster is facing
209
+ STRAFE = 1 // moves in direction specified, no matter which way monster is facing
210
+ }
211
+
212
+ /** pev(entity, pev_movetype) values */
213
+ const enum MOVETYPE {
214
+ NONE = 0, // Never moves
215
+ WALK = 3, // Player only - moving on the ground
216
+ STEP = 4, // Gravity, special edge handling -- monsters use this
217
+ FLY = 5, // No gravity, but still collides with stuff
218
+ TOSS = 6, // Gravity/Collisions
219
+ PUSH = 7, // No clip to world, push and crush
220
+ NOCLIP = 8, // No gravity, no collisions, still do velocity/avelocity
221
+ FLYMISSILE = 9, // Extra size to monsters
222
+ BOUNCE = 10, // Just like Toss, but reflect velocity when contacting surfaces
223
+ BOUNCEMISSILE = 11, // Bounce w/o gravity
224
+ FOLLOW = 12, // Track movement of aiment
225
+ PUSHSTEP = 13 // BSP model that needs physics/world collisions
226
+ }
227
+
228
+ /** pev(entity, pev_solid) values */
229
+ const enum SOLID {
230
+ NOT = 0, // No interaction with other objects
231
+ TRIGGER = 1, // Touch on edge, but not blocking
232
+ BBOX = 2, // Touch on edge, block
233
+ SLIDEBOX = 3, // Touch on edge, but not an onground
234
+ BSP = 4 // BSP clip, touch on edge, block
235
+ }
236
+
237
+ /** pev(entity, pev_deadflag) values */
238
+ const enum DEAD {
239
+ NO = 0, // Alive
240
+ DYING = 1, // Playing death animation or still falling off of a ledge waiting to hit ground
241
+ DEAD = 2, // Dead, lying still
242
+ RESPAWNABLE = 3,
243
+ DISCARDBODY = 4
244
+ }
245
+
246
+ /** new Float:takedamage, pev(entity, pev_takedamage, takedamage) values */
247
+ const enum DAMAGE {
248
+ NO = 0.0,
249
+ YES = 1.0,
250
+ AIM = 2.0
251
+ }
252
+
253
+ /** pev(entity, pev_effects) values */
254
+ const enum EF {
255
+ BRIGHTFIELD = 1, // Swirling cloud of particles
256
+ MUZZLEFLASH = 2, // Single frame ELIGHT on entity attachment 0
257
+ BRIGHTLIGHT = 4, // DLIGHT centered at entity origin
258
+ DIMLIGHT = 8, // Player flashlight
259
+ INVLIGHT = 16, // Get lighting from ceiling
260
+ NOINTERP = 32, // Don't interpolate the next frame
261
+ LIGHT = 64, // Rocket flare glow sprite
262
+ NODRAW = 128 // Don't draw entity
263
+ }
264
+
265
+ /** Spectating camera mode constants (usually stored in pev_iuser1) */
266
+ const enum OBS {
267
+ NONE = 0,
268
+ CHASE_LOCKED = 1, // Locked Chase Cam
269
+ CHASE_FREE = 2, // Free Chase Cam
270
+ ROAMING = 3, // Free Look
271
+ IN_EYE = 4, // First Person
272
+ MAP_FREE = 5, // Free Overview
273
+ MAP_CHASE = 6 // Chase Overview
274
+ }
275
+
276
+ /** engfunc(EngFunc_PointContents, Float:origin) return values */
277
+ const enum CONTENTS {
278
+ EMPTY = -1,
279
+ SOLID = -2,
280
+ WATER = -3,
281
+ SLIME = -4,
282
+ LAVA = -5,
283
+ SKY = -6,
284
+ ORIGIN = -7, // Removed at csg time
285
+ CLIP = -8, // Changed to contents_solid
286
+ CURRENT_0 = -9,
287
+ CURRENT_90 = -10,
288
+ CURRENT_180 = -11,
289
+ CURRENT_270 = -12,
290
+ CURRENT_UP = -13,
291
+ CURRENT_DOWN = -14,
292
+ TRANSLUCENT = -15,
293
+ LADDER = -16,
294
+ FLYFIELD = -17,
295
+ GRAVITY_FLYFIELD = -18,
296
+ FOG = -19
297
+ }
298
+
299
+ /** Instant damage values for use with the 3rd parameter of the "Damage" client message */
300
+ const enum DMG {
301
+ GENERIC = 0, // Generic damage was done
302
+ CRUSH = 1, // 1<<0 - Crushed by falling or moving object
303
+ BULLET = 2, // 1<<1 - Shot
304
+ SLASH = 4, // 1<<2 - Cut, clawed, stabbed
305
+ BURN = 8, // 1<<3 - Heat burned
306
+ FREEZE = 16, // 1<<4 - Frozen
307
+ FALL = 32, // 1<<5 - Fell too far
308
+ BLAST = 64, // 1<<6 - Explosive blast damage
309
+ CLUB = 128, // 1<<7 - Crowbar, punch, headbutt
310
+ SHOCK = 256, // 1<<8 - Electric shock
311
+ SONIC = 512, // 1<<9 - Sound pulse shockwave
312
+ ENERGYBEAM = 1024, // 1<<10 - Laser or other high energy beam
313
+ NEVERGIB = 4096, // 1<<12 - With this bit OR'd in, no damage type will be able to gib victims upon death
314
+ ALWAYSGIB = 8192, // 1<<13 - With this bit OR'd in, any damage type can be made to gib victims upon death
315
+ DROWN = 16384, // 1<<14 - Drowning
316
+ PARALYZE = 32768, // 1<<15 - Slows affected creature down
317
+ NERVEGAS = 65536, // 1<<16 - Nerve toxins, very bad
318
+ POISON = 131072, // 1<<17 - Blood poisioning
319
+ RADIATION = 262144, // 1<<18 - Radiation exposure
320
+ DROWNRECOVER = 524288, // 1<<19 - Drowning recovery
321
+ ACID = 1048576, // 1<<20 - Toxic chemicals or acid burns
322
+ SLOWBURN = 2097152, // 1<<21 - In an oven
323
+ SLOWFREEZE = 4194304, // 1<<22 - In a subzero freezer
324
+ MORTAR = 8388608, // 1<<23 - Hit by air raid
325
+ GRENADE = 16777216 // 1<<24 - Counter-Strike only - Hit by HE grenade
326
+ }
327
+
328
+ /** Gib values used on client kill based on instant damage values */
329
+ const enum GIB {
330
+ NORMAL = 0, // Gib if entity was overkilled
331
+ NEVER = 1, // Never gib, no matter how much death damage is done
332
+ ALWAYS = 2, // Always gib
333
+ TRY_HEALTH = -9000 // Gib players if their health is under this value
334
+ }
335
+
336
+ /** Valid constants for fNoMonsters parameter of trace functions */
337
+ const enum IGNORE {
338
+ DONT_IGNORE_MONSTERS = 0,
339
+ MONSTERS = 1,
340
+ MISSILE = 2,
341
+ GLASS = 0x100
342
+ }
343
+
344
+ /** Hull numbers for trace functions */
345
+ const enum HULL {
346
+ POINT = 0,
347
+ HUMAN = 1,
348
+ LARGE = 2,
349
+ HEAD = 3
350
+ }
351
+
352
+ /** Half-Life weapon constants */
353
+ const enum HLW {
354
+ NONE = 0,
355
+ CROWBAR = 1,
356
+ GLOCK = 2,
357
+ PYTHON = 3,
358
+ MP5 = 4,
359
+ CHAINGUN = 5,
360
+ CROSSBOW = 6,
361
+ SHOTGUN = 7,
362
+ RPG = 8,
363
+ GAUSS = 9,
364
+ EGON = 10,
365
+ HORNETGUN = 11,
366
+ HANDGRENADE = 12,
367
+ TRIPMINE = 13,
368
+ SATCHEL = 14,
369
+ SNARK = 15,
370
+ SUIT = 31
371
+ }
372
+
373
+ /** Player physics flags */
374
+ const enum PFLAG {
375
+ ONLADDER = 1, // 1<<0
376
+ ONSWING = 1, // 1<<0
377
+ ONTRAIN = 2, // 1<<1
378
+ ONBARNACLE = 4, // 1<<2
379
+ DUCKING = 8, // 1<<3 - In the process of ducking, but not totally squatted yet
380
+ USING = 16, // 1<<4 - Using a continuous entity
381
+ OBSERVER = 32 // 1<<5 - Player is locked in stationary cam mode
382
+ }
383
+
384
+ /** Player hide HUD values */
385
+ const enum HIDEHUD {
386
+ WEAPONS = 1, // 1<<0
387
+ FLASHLIGHT = 2, // 1<<1
388
+ ALL = 4, // 1<<2
389
+ HEALTH = 8, // 1<<3
390
+ TIMER = 16, // 1<<4
391
+ MONEY = 32, // 1<<5
392
+ CROSSHAIR = 64, // 1<<6
393
+ OBSERVER_CROSSHAIR = 128 // 1<<7
394
+ }
395
+
396
+ /** Entity classification */
397
+ const enum CLASS {
398
+ NONE = 0,
399
+ MACHINE = 1,
400
+ PLAYER = 2,
401
+ HUMAN_PASSIVE = 3,
402
+ HUMAN_MILITARY = 4,
403
+ ALIEN_MILITARY = 5,
404
+ ALIEN_PASSIVE = 6,
405
+ ALIEN_MONSTER = 7,
406
+ ALIEN_PREY = 8,
407
+ ALIEN_PREDATOR = 9,
408
+ INSECT = 10,
409
+ PLAYER_ALLY = 11,
410
+ PLAYER_BIOWEAPON = 12,
411
+ ALIEN_BIOWEAPON = 13,
412
+ VEHICLE = 14,
413
+ BARNACLE = 99
414
+ }
415
+
416
+ /** Entity use states */
417
+ const enum USE {
418
+ OFF = 0,
419
+ ON = 1,
420
+ SET = 2,
421
+ TOGGLE = 3
422
+ }
423
+
424
+ /** PlaybackEvent flags */
425
+ const enum FEV {
426
+ NOTHOST = 1, // 1<<0 - Skip local host for event send
427
+ RELIABLE = 2, // 1<<1 - Send the event reliably
428
+ GLOBAL = 4, // 1<<2 - Send to everybody on the server
429
+ UPDATE = 8, // 1<<3 - Update existing event instead of duplicate
430
+ HOSTONLY = 16, // 1<<4 - Only send to entity specified as the invoker
431
+ SERVER = 32, // 1<<5 - Only send if the event was created on the server
432
+ CLIENT = 64 // 1<<6 - Only issue event client side
433
+ }
434
+ }