@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,447 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // Extend the nodemod namespace to include missing methods
4
+ /**
5
+ * Comprehensive entity management system providing enhanced entity creation, searching, and manipulation.
6
+ * Wraps raw nodemod entities with convenient property accessors and utility methods.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * // Find all players
11
+ * const players = nodemodCore.entity.find({ className: 'player' });
12
+ * players.forEach(player => {
13
+ * console.log(`Player at: ${player.origin}`);
14
+ * });
15
+ *
16
+ * // Create a light entity
17
+ * const light = nodemodCore.entity.createLight([100, 200, 300], '_light', 500);
18
+ * if (light) {
19
+ * light.targetName = 'my_light';
20
+ * }
21
+ *
22
+ * // Find entities near a position
23
+ * const nearby = nodemodCore.entity.findInSphere([0, 0, 0], 512, 'weapon_ak47');
24
+ * console.log(`Found ${nearby.length} AK47s nearby`);
25
+ * ```
26
+ */
27
+ class NodemodEntity {
28
+ /** Utility service for entity operations */
29
+ util;
30
+ /**
31
+ * Creates a new NodemodEntity instance.
32
+ *
33
+ * @param utilService - Utility service for entity operations
34
+ */
35
+ constructor(utilService) {
36
+ this.util = utilService;
37
+ }
38
+ /**
39
+ * Creates a new entity with optional class name.
40
+ *
41
+ * @param className - Entity class name (e.g., 'info_player_start', 'weapon_ak47')
42
+ * @returns EntityWrapper for the created entity, or null if creation failed
43
+ *
44
+ * @example
45
+ * ```typescript
46
+ * // Create a generic entity
47
+ * const entity = nodemodCore.entity.create();
48
+ *
49
+ * // Create a specific entity class
50
+ * const weapon = nodemodCore.entity.create('weapon_ak47');
51
+ * if (weapon) {
52
+ * weapon.origin = [100, 200, 300];
53
+ * }
54
+ * ```
55
+ */
56
+ create(className = null) {
57
+ // TODO: Access engine service through dependency injection
58
+ let entity = null;
59
+ if (className) {
60
+ // Try to create named entity first
61
+ entity = nodemod.eng.createNamedEntity(nodemod.eng.allocString(className));
62
+ // If createNamedEntity failed, fall back to createEntity and set classname manually
63
+ if (!entity) {
64
+ entity = nodemod.eng.createEntity();
65
+ if (entity) {
66
+ entity.classname = className;
67
+ }
68
+ }
69
+ }
70
+ else {
71
+ entity = nodemod.eng.createEntity();
72
+ }
73
+ return entity ? this.wrap(entity) : null;
74
+ }
75
+ /**
76
+ * Wraps a raw nodemod entity with enhanced functionality while preserving nodemod.eng compatibility.
77
+ * The entity object itself is returned with additional methods attached, ensuring full compatibility
78
+ * with core nodemod.eng functions.
79
+ *
80
+ * @param entity - The raw nodemod entity to wrap
81
+ * @returns EntityWrapper with enhanced functionality, or null if entity is invalid
82
+ *
83
+ * @example
84
+ * ```typescript
85
+ * const rawEntity = nodemod.eng.pEntityOfEntIndex(1);
86
+ * const wrapped = nodemodCore.entity.wrap(rawEntity);
87
+ * if (wrapped) {
88
+ * console.log(`Entity class: ${wrapped.classname}`);
89
+ * wrapped.health = 100;
90
+ * wrapped.emitSound(0, 'items/healthkit.wav');
91
+ * // Still compatible with nodemod.eng functions:
92
+ * nodemod.eng.setOrigin(wrapped, [0, 0, 0]);
93
+ * }
94
+ * ```
95
+ */
96
+ wrap(entity) {
97
+ if (!entity)
98
+ return null;
99
+ const self = this;
100
+ // Extend the actual entity object with additional methods
101
+ // This preserves full compatibility with nodemod.eng functions
102
+ const wrapper = entity;
103
+ // Add wrapper-specific properties (read-only)
104
+ Object.defineProperty(wrapper, 'id', {
105
+ value: nodemod.eng.indexOfEdict(entity),
106
+ writable: false,
107
+ enumerable: false,
108
+ configurable: false
109
+ });
110
+ // Add utility methods
111
+ wrapper.remove = function () {
112
+ nodemod.eng.removeEntity(entity);
113
+ };
114
+ wrapper.makeStatic = function () {
115
+ nodemod.eng.makeStatic(entity);
116
+ };
117
+ wrapper.setSize = function (mins, maxs) {
118
+ nodemod.eng.setSize(entity, mins, maxs);
119
+ };
120
+ wrapper.dropToFloor = function () {
121
+ return nodemod.eng.dropToFloor(entity);
122
+ };
123
+ wrapper.isOnFloor = function () {
124
+ return nodemod.eng.entIsOnFloor(entity);
125
+ };
126
+ wrapper.emitSound = function (channel, sound, volume = 1, attenuation = 1, flags = 0, pitch = 100) {
127
+ nodemod.eng.emitSound(entity, channel, sound, volume, attenuation, flags, pitch);
128
+ };
129
+ wrapper.getDistance = function (target) {
130
+ if (!target)
131
+ return -1;
132
+ // NOTE: Brush entities (func_wall, func_breakable, etc.) typically have their
133
+ // origin at [0,0,0] even though their actual geometry is elsewhere in the world.
134
+ // This distance calculation uses the origin property, which may not represent
135
+ // the actual location of brush entities. Use findInSphere for accurate proximity
136
+ // detection as it checks against actual entity bounds.
137
+ const origin1 = entity.origin;
138
+ const origin2 = target.origin;
139
+ const dx = origin1[0] - origin2[0];
140
+ const dy = origin1[1] - origin2[1];
141
+ const dz = origin1[2] - origin2[2];
142
+ return Math.sqrt(dx * dx + dy * dy + dz * dz);
143
+ };
144
+ wrapper.getIllum = function () {
145
+ return nodemod.eng.getEntityIllum(entity);
146
+ };
147
+ // Touch/Use handlers
148
+ wrapper.onTouch = function (callback) {
149
+ // Use direct nodemod events to avoid circular dependency
150
+ nodemod.on('dllTouch', (touched, other) => {
151
+ if (touched === entity) {
152
+ callback(self.wrap(other));
153
+ }
154
+ });
155
+ };
156
+ wrapper.onUse = function (callback) {
157
+ nodemod.on('dllUse', (used, other) => {
158
+ if (used === entity) {
159
+ callback(self.wrap(other));
160
+ }
161
+ });
162
+ };
163
+ wrapper.use = function () {
164
+ nodemod.dll.use(entity, entity);
165
+ };
166
+ wrapper.touch = function (other) {
167
+ nodemod.dll.touch(entity, other);
168
+ };
169
+ return wrapper;
170
+ }
171
+ /**
172
+ * Finds entities matching the specified criteria.
173
+ *
174
+ * @param criteria - Search criteria to filter entities
175
+ * @returns Array of EntityWrapper objects matching the criteria
176
+ *
177
+ * @example
178
+ * ```typescript
179
+ * // Find all players
180
+ * const players = nodemodCore.entity.find({ className: 'player' });
181
+ *
182
+ * // Find entities with specific target name
183
+ * const targets = nodemodCore.entity.find({ targetName: 'button_secret' });
184
+ *
185
+ * // Find entities with specific flags
186
+ * const onGroundEntities = nodemodCore.entity.find({
187
+ * flags: nodemod.FL.ONGROUND
188
+ * });
189
+ *
190
+ * // Combine multiple criteria
191
+ * const healthyPlayers = nodemodCore.entity.find({
192
+ * className: 'player',
193
+ * health: 100
194
+ * });
195
+ * ```
196
+ */
197
+ find(criteria) {
198
+ const results = [];
199
+ const seenIds = new Set();
200
+ let entity = null;
201
+ if (criteria.className) {
202
+ entity = nodemod.eng.findEntityByString(null, 'classname', criteria.className);
203
+ while (entity) {
204
+ const entityId = nodemod.eng.indexOfEdict(entity);
205
+ if (seenIds.has(entityId)) {
206
+ break;
207
+ }
208
+ seenIds.add(entityId);
209
+ if (this.matchesCriteria(entity, criteria)) {
210
+ const wrapped = this.wrap(entity);
211
+ if (wrapped)
212
+ results.push(wrapped);
213
+ }
214
+ const nextEntity = nodemod.eng.findEntityByString(entity, 'classname', criteria.className);
215
+ if (nextEntity === entity)
216
+ break; // Prevent infinite loop
217
+ entity = nextEntity;
218
+ }
219
+ }
220
+ else if (criteria.targetName) {
221
+ entity = nodemod.eng.findEntityByString(null, 'targetname', criteria.targetName);
222
+ while (entity) {
223
+ const entityId = nodemod.eng.indexOfEdict(entity);
224
+ if (seenIds.has(entityId)) {
225
+ break;
226
+ }
227
+ seenIds.add(entityId);
228
+ if (this.matchesCriteria(entity, criteria)) {
229
+ const wrapped = this.wrap(entity);
230
+ if (wrapped)
231
+ results.push(wrapped);
232
+ }
233
+ const nextEntity = nodemod.eng.findEntityByString(entity, 'targetname', criteria.targetName);
234
+ if (nextEntity === entity)
235
+ break; // Prevent infinite loop
236
+ entity = nextEntity;
237
+ }
238
+ }
239
+ else {
240
+ // Find all entities matching criteria
241
+ for (let i = 1; i < nodemod.eng.numberOfEntities(); i++) {
242
+ entity = nodemod.eng.pEntityOfEntIndex(i);
243
+ if (entity && this.matchesCriteria(entity, criteria)) {
244
+ const wrapped = this.wrap(entity);
245
+ if (wrapped)
246
+ results.push(wrapped);
247
+ }
248
+ }
249
+ }
250
+ return results;
251
+ }
252
+ /**
253
+ * Finds the first entity matching the specified criteria.
254
+ * Convenience method for when you only need one result.
255
+ *
256
+ * @param criteria - Search criteria to filter entities
257
+ * @returns First EntityWrapper matching criteria, or null if none found
258
+ *
259
+ * @example
260
+ * ```typescript
261
+ * // Find first player
262
+ * const player = nodemodCore.entity.findOne({ className: 'player' });
263
+ * if (player) {
264
+ * console.log(`Player health: ${player.health}`);
265
+ * }
266
+ *
267
+ * // Find specific target
268
+ * const secretButton = nodemodCore.entity.findOne({
269
+ * targetName: 'secret_button'
270
+ * });
271
+ * ```
272
+ */
273
+ findOne(criteria) {
274
+ const results = this.find(criteria);
275
+ return results.length > 0 ? results[0] : null;
276
+ }
277
+ /**
278
+ * Finds entities within a spherical radius of a position.
279
+ * Uses actual entity bounds, not just origin points - works correctly with brush entities.
280
+ *
281
+ * @param origin - Center position [x, y, z] to search from
282
+ * @param radius - Search radius in world units
283
+ * @param className - Optional filter by entity class name
284
+ * @returns Array of EntityWrapper objects within the sphere
285
+ *
286
+ * @example
287
+ * ```typescript
288
+ * // Find all entities near player
289
+ * const playerPos = [100, 200, 300];
290
+ * const nearbyEntities = nodemodCore.entity.findInSphere(playerPos, 512);
291
+ *
292
+ * // Find specific entity types nearby
293
+ * const nearbyWeapons = nodemodCore.entity.findInSphere(
294
+ * playerPos,
295
+ * 256,
296
+ * 'weapon_ak47'
297
+ * );
298
+ *
299
+ * // Find entities in explosion radius
300
+ * const explosionPos = [0, 0, 0];
301
+ * const affected = nodemodCore.entity.findInSphere(explosionPos, 200);
302
+ * affected.forEach(entity => {
303
+ * // Apply damage logic
304
+ * });
305
+ * ```
306
+ */
307
+ findInSphere(origin, radius, className = null) {
308
+ const results = [];
309
+ // HACK: pfnFindEntityInSphere is supposed to return null when no more entities are found,
310
+ // but it doesn't - it keeps returning entities indefinitely, causing infinite loops.
311
+ // We work around this by tracking entity IDs we've already seen.
312
+ // NOTE: findEntityInSphere checks against actual entity bounds, not just origin.
313
+ // For brush entities (func_wall, func_breakable, etc.) with origin at [0,0,0],
314
+ // it correctly detects if their geometry is within the sphere radius.
315
+ const seenIds = new Set();
316
+ let entity = nodemod.eng.findEntityInSphere(null, origin, radius);
317
+ while (entity) {
318
+ const entityId = nodemod.eng.indexOfEdict(entity);
319
+ // Break if we've seen this entity before to prevent infinite loops
320
+ if (seenIds.has(entityId)) {
321
+ break;
322
+ }
323
+ seenIds.add(entityId);
324
+ if (!className || entity.classname === className) {
325
+ const wrapped = this.wrap(entity);
326
+ if (wrapped)
327
+ results.push(wrapped);
328
+ }
329
+ entity = nodemod.eng.findEntityInSphere(entity, origin, radius);
330
+ }
331
+ return results;
332
+ }
333
+ // Get entity by ID
334
+ getById(id) {
335
+ const entity = nodemod.eng.pEntityOfEntIndex(id);
336
+ return entity ? this.wrap(entity) : null;
337
+ }
338
+ // Get all entities
339
+ getAll() {
340
+ const results = [];
341
+ for (let i = 1; i < nodemod.eng.numberOfEntities(); i++) {
342
+ const entity = nodemod.eng.pEntityOfEntIndex(i);
343
+ if (entity && entity.classname) {
344
+ const wrapped = this.wrap(entity);
345
+ if (wrapped)
346
+ results.push(wrapped);
347
+ }
348
+ }
349
+ return results;
350
+ }
351
+ // Helper to match entity criteria
352
+ matchesCriteria(entity, criteria) {
353
+ for (const [key, value] of Object.entries(criteria)) {
354
+ if (key === 'className' && entity.classname !== value)
355
+ return false;
356
+ if (key === 'targetName' && entity.targetname !== value)
357
+ return false;
358
+ if (key === 'target' && entity.target !== value)
359
+ return false;
360
+ if (key === 'model' && entity.model !== value)
361
+ return false;
362
+ if (key === 'health' && entity.health !== value)
363
+ return false;
364
+ if (key === 'flags' && typeof value === 'number' && (entity.flags & value) !== value)
365
+ return false;
366
+ if (key === 'spawnflags' && typeof value === 'number' && (entity.spawnflags & value) !== value)
367
+ return false;
368
+ }
369
+ return true;
370
+ }
371
+ /**
372
+ * Creates a light entity at the specified position.
373
+ *
374
+ * @param origin - Position [x, y, z] for the light
375
+ * @param color - Light color property name (default: '_light')
376
+ * @param brightness - Light brightness value (default: 300)
377
+ * @returns EntityWrapper for the created light, or null if creation failed
378
+ *
379
+ * @example
380
+ * ```typescript
381
+ * // Create standard light
382
+ * const light = nodemodCore.entity.createLight([100, 200, 300]);
383
+ *
384
+ * // Create colored light
385
+ * const redLight = nodemodCore.entity.createLight([0, 0, 0], '_light', 500);
386
+ * if (redLight) {
387
+ * (redLight as any)._color = '255 0 0'; // Red color
388
+ * }
389
+ * ```
390
+ */
391
+ createLight(origin, color = '_light', brightness = 300) {
392
+ const light = this.create('light');
393
+ if (light) {
394
+ light.origin = origin;
395
+ light[color] = brightness;
396
+ }
397
+ return light;
398
+ }
399
+ createInfo(className, origin, angles = [0, 0, 0]) {
400
+ const info = this.create(className);
401
+ if (info) {
402
+ info.origin = origin;
403
+ info.angles = angles;
404
+ }
405
+ return info;
406
+ }
407
+ createTrigger(className, origin, size = [64, 64, 64]) {
408
+ const trigger = this.create(className);
409
+ if (trigger) {
410
+ trigger.origin = origin;
411
+ trigger.setSize([-size[0] / 2, -size[1] / 2, -size[2] / 2], [size[0] / 2, size[1] / 2, size[2] / 2]);
412
+ }
413
+ return trigger;
414
+ }
415
+ /**
416
+ * Removes all entities matching the specified criteria.
417
+ *
418
+ * @param criteria - Search criteria to filter entities for removal
419
+ * @returns Number of entities removed
420
+ *
421
+ * @example
422
+ * ```typescript
423
+ * // Remove all weapons from the map
424
+ * const removed = nodemodCore.entity.removeAll({
425
+ * className: 'weapon_ak47'
426
+ * });
427
+ * console.log(`Removed ${removed} AK47s`);
428
+ *
429
+ * // Remove entities with specific target name
430
+ * nodemodCore.entity.removeAll({
431
+ * targetName: 'cleanup_target'
432
+ * });
433
+ *
434
+ * // Remove all low-health entities
435
+ * nodemodCore.entity.removeAll({
436
+ * health: 1
437
+ * });
438
+ * ```
439
+ */
440
+ removeAll(criteria) {
441
+ const entities = this.find(criteria);
442
+ entities.forEach(entity => entity.remove());
443
+ return entities.length;
444
+ }
445
+ }
446
+ exports.default = NodemodEntity;
447
+ //# sourceMappingURL=entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../src/enhanced/entity.ts"],"names":[],"mappings":";;AA8DA,0DAA0D;AAE1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAqB,aAAa;IAChC,4CAA4C;IACpC,IAAI,CAAc;IAE1B;;;;OAIG;IACH,YAAY,WAAwB;QAClC,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,YAA2B,IAAI;QACpC,2DAA2D;QAC3D,IAAI,MAAM,GAA0B,IAAI,CAAC;QAEzC,IAAI,SAAS,EAAE,CAAC;YACd,mCAAmC;YACnC,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;YAE3E,oFAAoF;YACpF,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;gBACpC,IAAI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