@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,272 @@
1
+ import type NodemodUtil from '../utils/util';
2
+ import type NodemodMsg from '../core/msg';
3
+ import type NodemodSound from '../core/sound';
4
+ /**
5
+ * Extended entity interface with player-specific properties.
6
+ */
7
+ export interface PlayerEntity extends nodemod.Entity {
8
+ /** Number of player deaths */
9
+ deaths?: number;
10
+ }
11
+ /**
12
+ * Comprehensive player information with enhanced functionality.
13
+ * Includes both properties and convenience methods for player management.
14
+ */
15
+ export interface PlayerInfo {
16
+ /** Player entity reference */
17
+ entity: nodemod.Entity;
18
+ /** Player entity index */
19
+ id: number;
20
+ /** Player display name */
21
+ name: string;
22
+ /** Steam ID */
23
+ steamId: string;
24
+ /** User ID */
25
+ userId: number;
26
+ /** WON ID */
27
+ wonId: number;
28
+ /** Current health */
29
+ health: number;
30
+ /** Current armor value */
31
+ armor: number;
32
+ /** Kill count (frags) */
33
+ frags: number;
34
+ /** Death count */
35
+ deaths: number;
36
+ /** Position coordinates [x, y, z] */
37
+ origin: number[];
38
+ /** View angles [pitch, yaw, roll] */
39
+ angles: number[];
40
+ /** Movement velocity [x, y, z] */
41
+ velocity: number[];
42
+ /** Whether player is alive */
43
+ isAlive: boolean;
44
+ /** Whether player is connected */
45
+ isConnected: boolean;
46
+ /** Player team number */
47
+ team: number;
48
+ /** Player model name */
49
+ model: string;
50
+ /** Top color value */
51
+ topColor: number;
52
+ /** Bottom color value */
53
+ bottomColor: number;
54
+ /** Send message to this player */
55
+ sendMessage: (message: string) => void;
56
+ /** Teleport player to position */
57
+ teleport: (origin: number[], angles?: number[] | null) => void;
58
+ /** Kill this player */
59
+ kill: () => void;
60
+ /** Kick this player */
61
+ kick: (reason?: string) => void;
62
+ /** Ban this player */
63
+ ban: (duration?: number, reason?: string) => void;
64
+ }
65
+ /**
66
+ * Basic player statistics for scoreboards and tracking.
67
+ */
68
+ export interface PlayerStats {
69
+ /** Player entity index */
70
+ id: number;
71
+ /** Player display name */
72
+ name: string;
73
+ /** Kill count */
74
+ frags: number;
75
+ /** Death count */
76
+ deaths: number;
77
+ /** Current health */
78
+ health: number;
79
+ /** Current armor */
80
+ armor: number;
81
+ /** Steam ID */
82
+ steamId: string;
83
+ }
84
+ /**
85
+ * Enhanced player management system providing comprehensive player operations and information.
86
+ * Handles player lookup, messaging, teleportation, moderation, and statistics.
87
+ *
88
+ * @example
89
+ * ```typescript
90
+ * // Get all connected players
91
+ * const players = nodemodCore.player.getAll();
92
+ * players.forEach(player => {
93
+ * console.log(`${player.name}: ${player.frags} kills, ${player.deaths} deaths`);
94
+ * });
95
+ *
96
+ * // Find a specific player
97
+ * const admin = nodemodCore.player.getByName('AdminPlayer');
98
+ * if (admin) {
99
+ * admin.sendMessage('Welcome back, admin!');
100
+ * admin.teleport([100, 200, 300]);
101
+ * }
102
+ *
103
+ * // Broadcast message to all players
104
+ * nodemodCore.player.broadcast('Round starting in 10 seconds!', 'center');
105
+ *
106
+ * // Get players near a position
107
+ * const nearby = nodemodCore.player.getPlayersInRadius([0, 0, 0], 500);
108
+ * nearby.forEach(player => {
109
+ * player.sendMessage('You are near spawn!');
110
+ * });
111
+ * ```
112
+ */
113
+ export default class NodemodPlayer {
114
+ /** Utility service for entity operations */
115
+ private util;
116
+ /** Message service for player communication */
117
+ private msg;
118
+ /** Sound service for audio feedback */
119
+ private sound;
120
+ /**
121
+ * Creates a new NodemodPlayer instance.
122
+ *
123
+ * @param utilService - Utility service for entity operations
124
+ * @param msgService - Message service for player communication
125
+ * @param soundService - Sound service for audio feedback
126
+ */
127
+ constructor(utilService: NodemodUtil, msgService: NodemodMsg, soundService: NodemodSound);
128
+ /**
129
+ * Gets all connected players with enhanced information.
130
+ *
131
+ * @returns Array of PlayerInfo objects for all connected players
132
+ *
133
+ * @example
134
+ * ```typescript
135
+ * const players = nodemodCore.player.getAll();
136
+ * console.log(`${players.length} players online`);
137
+ *
138
+ * players.forEach(player => {
139
+ * if (player.health < 25) {
140
+ * player.sendMessage('Your health is low!', 'hud');
141
+ * }
142
+ * });
143
+ * ```
144
+ */
145
+ getAll(): PlayerInfo[];
146
+ /**
147
+ * Gets a player by their entity index.
148
+ *
149
+ * @param id - Entity index of the player
150
+ * @returns PlayerInfo object or null if not found
151
+ *
152
+ * @example
153
+ * ```typescript
154
+ * const player = nodemodCore.player.getById(1);
155
+ * if (player) {
156
+ * console.log(`Player 1 is ${player.name}`);
157
+ * }
158
+ * ```
159
+ */
160
+ getById(id: number): PlayerInfo | null;
161
+ /**
162
+ * Gets a player by their Steam ID.
163
+ *
164
+ * @param steamId - Steam ID to search for
165
+ * @returns PlayerInfo object or null if not found
166
+ *
167
+ * @example
168
+ * ```typescript
169
+ * const player = nodemodCore.player.getBySteamId('STEAM_0:1:12345');
170
+ * if (player) {
171
+ * console.log(`Found player: ${player.name}`);
172
+ * }
173
+ * ```
174
+ */
175
+ getBySteamId(steamId: string): PlayerInfo | null;
176
+ /**
177
+ * Gets a player by their name.
178
+ *
179
+ * @param name - Player name to search for (exact match)
180
+ * @returns PlayerInfo object or null if not found
181
+ *
182
+ * @example
183
+ * ```typescript
184
+ * const admin = nodemodCore.player.getByName('AdminPlayer');
185
+ * if (admin) {
186
+ * admin.sendMessage('Admin privileges detected');
187
+ * }
188
+ * ```
189
+ */
190
+ getByName(name: string): PlayerInfo | null;
191
+ getPlayerInfo(entity: nodemod.Entity): PlayerInfo | null;
192
+ getPlayerTeam(entity: nodemod.Entity): number;
193
+ /**
194
+ * Sends a message to a player using various display methods.
195
+ *
196
+ * @param entity - Target player entity
197
+ * @param message - Message text to send
198
+ * @param type - Message display type ('chat', 'hud', 'console', 'center')
199
+ *
200
+ * @example
201
+ * ```typescript
202
+ * const player = nodemodCore.player.getById(1);
203
+ * if (player) {
204
+ * // Different message types
205
+ * nodemodCore.player.sendMessage(player.entity, 'Welcome!', 'chat');
206
+ * nodemodCore.player.sendMessage(player.entity, 'Health: 100', 'hud');
207
+ * nodemodCore.player.sendMessage(player.entity, 'Debug info', 'console');
208
+ * nodemodCore.player.sendMessage(player.entity, 'ROUND START!', 'center');
209
+ * }
210
+ * ```
211
+ */
212
+ sendMessage(entity: nodemod.Entity, message: string, type?: string): void;
213
+ teleport(entity: nodemod.Entity, origin: number[], angles?: number[] | null): boolean;
214
+ kill(entity: nodemod.Entity): boolean;
215
+ kick(entity: nodemod.Entity, reason?: string): boolean;
216
+ ban(entity: nodemod.Entity, duration?: number, reason?: string): {
217
+ steamId: string;
218
+ duration: number;
219
+ reason: string;
220
+ } | null;
221
+ setHealth(entity: nodemod.Entity, health: number): number;
222
+ setArmor(entity: nodemod.Entity, armor: number): number;
223
+ setFrags(entity: nodemod.Entity, frags: number): number;
224
+ setMaxSpeed(entity: nodemod.Entity, speed: number): void;
225
+ getDistance(entity1: nodemod.Entity, entity2: nodemod.Entity): number;
226
+ canSee(entity: nodemod.Entity, target: nodemod.Entity): boolean;
227
+ getStats(entity: nodemod.Entity): PlayerStats | null;
228
+ findPlayers(criteria: Partial<PlayerInfo>): PlayerInfo[];
229
+ getPlayersInRadius(origin: number[], radius: number): PlayerInfo[];
230
+ /**
231
+ * Broadcasts a message to all connected players.
232
+ *
233
+ * @param message - Message text to broadcast
234
+ * @param type - Message display type ('chat', 'hud', 'console', 'center')
235
+ *
236
+ * @example
237
+ * ```typescript
238
+ * // Broadcast to all players
239
+ * nodemodCore.player.broadcast('Server restarting in 5 minutes!', 'center');
240
+ *
241
+ * // Chat message to all
242
+ * nodemodCore.player.broadcast('Welcome to the server!', 'chat');
243
+ *
244
+ * // HUD message for all
245
+ * nodemodCore.player.broadcast('Round: 3/10', 'hud');
246
+ * ```
247
+ */
248
+ broadcast(message: string, type?: string): void;
249
+ /**
250
+ * Creates a fake client (bot player) for testing or gameplay purposes.
251
+ *
252
+ * @param name - Name for the bot player
253
+ * @returns PlayerInfo object for the created bot, or null if creation failed
254
+ *
255
+ * @example
256
+ * ```typescript
257
+ * // Create a basic bot
258
+ * const bot = nodemodCore.player.createBot('TestBot');
259
+ * if (bot) {
260
+ * console.log(`Created bot: ${bot.name}`);
261
+ * bot.teleport([0, 0, 0]);
262
+ * }
263
+ *
264
+ * // Create named bots
265
+ * const bots = ['Bot1', 'Bot2', 'Bot3'].map(name =>
266
+ * nodemodCore.player.createBot(name)
267
+ * ).filter(bot => bot !== null);
268
+ * ```
269
+ */
270
+ createBot(name?: string): PlayerInfo | null;
271
+ }
272
+ //# sourceMappingURL=player.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"player.d.ts","sourceRoot":"","sources":["../../src/enhanced/player.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,OAAO,CAAC,MAAM;IAClD,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,8BAA8B;IAC9B,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC;IACvB,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CA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M,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE;IAUlE;;;;;;;;;;;;;;;;;OAiBG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAe,GAAG,IAAI;IAMvD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,SAAS,CAAC,IAAI,GAAE,MAAc,GAAG,UAAU,GAAG,IAAI;CAInD"}
@@ -0,0 +1,389 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const msg_1 = require("../core/msg");
4
+ /**
5
+ * Enhanced player management system providing comprehensive player operations and information.
6
+ * Handles player lookup, messaging, teleportation, moderation, and statistics.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * // Get all connected players
11
+ * const players = nodemodCore.player.getAll();
12
+ * players.forEach(player => {
13
+ * console.log(`${player.name}: ${player.frags} kills, ${player.deaths} deaths`);
14
+ * });
15
+ *
16
+ * // Find a specific player
17
+ * const admin = nodemodCore.player.getByName('AdminPlayer');
18
+ * if (admin) {
19
+ * admin.sendMessage('Welcome back, admin!');
20
+ * admin.teleport([100, 200, 300]);
21
+ * }
22
+ *
23
+ * // Broadcast message to all players
24
+ * nodemodCore.player.broadcast('Round starting in 10 seconds!', 'center');
25
+ *
26
+ * // Get players near a position
27
+ * const nearby = nodemodCore.player.getPlayersInRadius([0, 0, 0], 500);
28
+ * nearby.forEach(player => {
29
+ * player.sendMessage('You are near spawn!');
30
+ * });
31
+ * ```
32
+ */
33
+ class NodemodPlayer {
34
+ /** Utility service for entity operations */
35
+ util;
36
+ /** Message service for player communication */
37
+ msg;
38
+ /** Sound service for audio feedback */
39
+ sound;
40
+ /**
41
+ * Creates a new NodemodPlayer instance.
42
+ *
43
+ * @param utilService - Utility service for entity operations
44
+ * @param msgService - Message service for player communication
45
+ * @param soundService - Sound service for audio feedback
46
+ */
47
+ constructor(utilService, msgService, soundService) {
48
+ this.util = utilService;
49
+ this.msg = msgService;
50
+ this.sound = soundService;
51
+ }
52
+ /**
53
+ * Gets all connected players with enhanced information.
54
+ *
55
+ * @returns Array of PlayerInfo objects for all connected players
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * const players = nodemodCore.player.getAll();
60
+ * console.log(`${players.length} players online`);
61
+ *
62
+ * players.forEach(player => {
63
+ * if (player.health < 25) {
64
+ * player.sendMessage('Your health is low!', 'hud');
65
+ * }
66
+ * });
67
+ * ```
68
+ */
69
+ getAll() {
70
+ return nodemod.players.map((entity) => this.getPlayerInfo(entity)).filter(p => p !== null);
71
+ }
72
+ /**
73
+ * Gets a player by their entity index.
74
+ *
75
+ * @param id - Entity index of the player
76
+ * @returns PlayerInfo object or null if not found
77
+ *
78
+ * @example
79
+ * ```typescript
80
+ * const player = nodemodCore.player.getById(1);
81
+ * if (player) {
82
+ * console.log(`Player 1 is ${player.name}`);
83
+ * }
84
+ * ```
85
+ */
86
+ getById(id) {
87
+ const entity = nodemod.eng.pEntityOfEntIndex(id);
88
+ return entity && entity.netname ? this.getPlayerInfo(entity) : null;
89
+ }
90
+ /**
91
+ * Gets a player by their Steam ID.
92
+ *
93
+ * @param steamId - Steam ID to search for
94
+ * @returns PlayerInfo object or null if not found
95
+ *
96
+ * @example
97
+ * ```typescript
98
+ * const player = nodemodCore.player.getBySteamId('STEAM_0:1:12345');
99
+ * if (player) {
100
+ * console.log(`Found player: ${player.name}`);
101
+ * }
102
+ * ```
103
+ */
104
+ getBySteamId(steamId) {
105
+ const entity = nodemod.players.find((p) => nodemod.eng.getPlayerAuthId(p) === steamId);
106
+ return entity ? this.getPlayerInfo(entity) : null;
107
+ }
108
+ /**
109
+ * Gets a player by their name.
110
+ *
111
+ * @param name - Player name to search for (exact match)
112
+ * @returns PlayerInfo object or null if not found
113
+ *
114
+ * @example
115
+ * ```typescript
116
+ * const admin = nodemodCore.player.getByName('AdminPlayer');
117
+ * if (admin) {
118
+ * admin.sendMessage('Admin privileges detected');
119
+ * }
120
+ * ```
121
+ */
122
+ getByName(name) {
123
+ const entity = nodemod.players.find((p) => p.netname === name);
124
+ return entity ? this.getPlayerInfo(entity) : null;
125
+ }
126
+ // Get comprehensive player information
127
+ getPlayerInfo(entity) {
128
+ if (!entity || !entity.netname)
129
+ return null;
130
+ const id = nodemod.eng.indexOfEdict(entity);
131
+ const infoBuffer = nodemod.eng.getInfoKeyBuffer(entity);
132
+ return {
133
+ entity,
134
+ id,
135
+ name: entity.netname,
136
+ steamId: nodemod.eng.getPlayerAuthId(entity),
137
+ userId: nodemod.eng.getPlayerUserId(entity),
138
+ wonId: nodemod.eng.getPlayerWONId(entity),
139
+ // Player state
140
+ health: entity.health,
141
+ armor: entity.armorvalue,
142
+ frags: entity.frags,
143
+ deaths: entity.deaths || 0,
144
+ // Position & movement
145
+ origin: [entity.origin[0], entity.origin[1], entity.origin[2]],
146
+ angles: [entity.angles[0], entity.angles[1], entity.angles[2]],
147
+ velocity: [entity.velocity[0], entity.velocity[1], entity.velocity[2]],
148
+ // Status
149
+ isAlive: entity.health > 0,
150
+ isConnected: true,
151
+ team: this.getPlayerTeam(entity),
152
+ // Info keys
153
+ model: nodemod.eng.infoKeyValue(infoBuffer, 'model') || '',
154
+ topColor: parseInt(nodemod.eng.infoKeyValue(infoBuffer, 'topcolor') || '0'),
155
+ bottomColor: parseInt(nodemod.eng.infoKeyValue(infoBuffer, 'bottomcolor') || '0'),
156
+ // Utility methods
157
+ sendMessage: (message) => this.sendMessage(entity, message),
158
+ teleport: (origin, angles = null) => this.teleport(entity, origin, angles),
159
+ kill: () => this.kill(entity),
160
+ kick: (reason = '') => this.kick(entity, reason),
161
+ ban: (duration = 0, reason = '') => this.ban(entity, duration, reason)
162
+ };
163
+ }
164
+ // Get player team (game-specific logic may be needed)
165
+ getPlayerTeam(entity) {
166
+ // Default implementation - may need game-specific override
167
+ return entity.team || 0;
168
+ }
169
+ /**
170
+ * Sends a message to a player using various display methods.
171
+ *
172
+ * @param entity - Target player entity
173
+ * @param message - Message text to send
174
+ * @param type - Message display type ('chat', 'hud', 'console', 'center')
175
+ *
176
+ * @example
177
+ * ```typescript
178
+ * const player = nodemodCore.player.getById(1);
179
+ * if (player) {
180
+ * // Different message types
181
+ * nodemodCore.player.sendMessage(player.entity, 'Welcome!', 'chat');
182
+ * nodemodCore.player.sendMessage(player.entity, 'Health: 100', 'hud');
183
+ * nodemodCore.player.sendMessage(player.entity, 'Debug info', 'console');
184
+ * nodemodCore.player.sendMessage(player.entity, 'ROUND START!', 'center');
185
+ * }
186
+ * ```
187
+ */
188
+ sendMessage(entity, message, type = 'chat') {
189
+ const entityObj = this.util.forceEntityObject(entity);
190
+ if (!entityObj)
191
+ return;
192
+ switch (type) {
193
+ case 'chat':
194
+ this.util.sendChat(message, entityObj);
195
+ break;
196
+ case 'hud':
197
+ this.util.showHudText(entityObj, message);
198
+ break;
199
+ case 'console':
200
+ nodemod.eng.clientPrintf(entityObj, 1, `${message}\n`);
201
+ break;
202
+ case 'center':
203
+ this.msg.send({
204
+ type: msg_1.MsgTypes.centerprint,
205
+ entity: entityObj,
206
+ data: [{ type: 'string', value: message }]
207
+ });
208
+ break;
209
+ }
210
+ }
211
+ // Teleport player
212
+ teleport(entity, origin, angles = null) {
213
+ const entityObj = this.util.forceEntityObject(entity);
214
+ if (!entityObj)
215
+ return false;
216
+ // Set origin
217
+ nodemod.eng.setOrigin(entityObj, origin);
218
+ // Set angles if provided
219
+ if (angles) {
220
+ entityObj.angles[0] = angles[0] || 0;
221
+ entityObj.angles[1] = angles[1] || 0;
222
+ entityObj.angles[2] = angles[2] || 0;
223
+ }
224
+ return true;
225
+ }
226
+ // Kill player
227
+ kill(entity) {
228
+ const entityObj = this.util.forceEntityObject(entity);
229
+ if (!entityObj)
230
+ return false;
231
+ entityObj.health = 0;
232
+ return true;
233
+ }
234
+ // Kick player
235
+ kick(entity, reason = 'Kicked by admin') {
236
+ const id = this.util.forceEntityId(entity);
237
+ if (id === null)
238
+ return false;
239
+ nodemod.eng.serverCommand(`kick #${id} "${reason}"\n`);
240
+ return true;
241
+ }
242
+ // Ban player (requires external ban system)
243
+ ban(entity, duration = 0, reason = 'Banned by admin') {
244
+ const entityObj = this.util.forceEntityObject(entity);
245
+ if (!entityObj)
246
+ return null;
247
+ const steamId = nodemod.eng.getPlayerAuthId(entityObj);
248
+ const durationText = duration > 0 ? ` for ${duration} minutes` : ' permanently';
249
+ // This would need integration with a ban system
250
+ this.kick(entity, `Banned${durationText}: ${reason}`);
251
+ return { steamId, duration, reason };
252
+ }
253
+ // Set player properties
254
+ setHealth(entity, health) {
255
+ const entityObj = this.util.forceEntityObject(entity);
256
+ if (!entityObj)
257
+ return 0;
258
+ entityObj.health = Math.max(0, health);
259
+ return entityObj.health;
260
+ }
261
+ setArmor(entity, armor) {
262
+ const entityObj = this.util.forceEntityObject(entity);
263
+ if (!entityObj)
264
+ return 0;
265
+ entityObj.armorvalue = Math.max(0, armor);
266
+ return entityObj.armorvalue;
267
+ }
268
+ setFrags(entity, frags) {
269
+ const entityObj = this.util.forceEntityObject(entity);
270
+ if (!entityObj)
271
+ return 0;
272
+ entityObj.frags = frags;
273
+ return entityObj.frags;
274
+ }
275
+ // Set player speed
276
+ setMaxSpeed(entity, speed) {
277
+ const entityObj = this.util.forceEntityObject(entity);
278
+ if (!entityObj)
279
+ return;
280
+ nodemod.eng.setClientMaxspeed(entityObj, speed);
281
+ }
282
+ // Get player distance
283
+ getDistance(entity1, entity2) {
284
+ const e1 = this.util.forceEntityObject(entity1);
285
+ const e2 = this.util.forceEntityObject(entity2);
286
+ if (!e1 || !e2)
287
+ return -1;
288
+ const dx = e1.origin[0] - e2.origin[0];
289
+ const dy = e1.origin[1] - e2.origin[1];
290
+ const dz = e1.origin[2] - e2.origin[2];
291
+ return Math.sqrt(dx * dx + dy * dy + dz * dz);
292
+ }
293
+ // Check if player can see another entity
294
+ canSee(entity, target) {
295
+ const entityObj = this.util.forceEntityObject(entity);
296
+ const targetObj = this.util.forceEntityObject(target);
297
+ if (!entityObj || !targetObj)
298
+ return false;
299
+ const trace = {};
300
+ let x = nodemod.eng.traceLine([entityObj.origin[0], entityObj.origin[1], entityObj.origin[2] + entityObj.view_ofs[2]], [targetObj.origin[0], targetObj.origin[1], targetObj.origin[2] + 16], 0, // IGNORE_MONSTERS
301
+ entityObj);
302
+ return trace.fraction >= 1.0 || trace.hit === targetObj;
303
+ }
304
+ // Player statistics
305
+ getStats(entity) {
306
+ const entityObj = this.util.forceEntityObject(entity);
307
+ if (!entityObj)
308
+ return null;
309
+ return {
310
+ id: nodemod.eng.indexOfEdict(entityObj),
311
+ name: entityObj.netname,
312
+ frags: entityObj.frags,
313
+ deaths: entityObj.deaths || 0,
314
+ health: entityObj.health,
315
+ armor: entityObj.armorvalue,
316
+ steamId: nodemod.eng.getPlayerAuthId(entityObj)
317
+ };
318
+ }
319
+ // Find players by criteria
320
+ findPlayers(criteria) {
321
+ return this.getAll().filter(player => {
322
+ for (const [key, value] of Object.entries(criteria)) {
323
+ if (key in player && player[key] !== value)
324
+ return false;
325
+ }
326
+ return true;
327
+ });
328
+ }
329
+ // Get players in radius
330
+ getPlayersInRadius(origin, radius) {
331
+ return this.getAll().filter(player => {
332
+ const dx = player.origin[0] - origin[0];
333
+ const dy = player.origin[1] - origin[1];
334
+ const dz = player.origin[2] - origin[2];
335
+ const distance = Math.sqrt(dx * dx + dy * dy + dz * dz);
336
+ return distance <= radius;
337
+ });
338
+ }
339
+ /**
340
+ * Broadcasts a message to all connected players.
341
+ *
342
+ * @param message - Message text to broadcast
343
+ * @param type - Message display type ('chat', 'hud', 'console', 'center')
344
+ *
345
+ * @example
346
+ * ```typescript
347
+ * // Broadcast to all players
348
+ * nodemodCore.player.broadcast('Server restarting in 5 minutes!', 'center');
349
+ *
350
+ * // Chat message to all
351
+ * nodemodCore.player.broadcast('Welcome to the server!', 'chat');
352
+ *
353
+ * // HUD message for all
354
+ * nodemodCore.player.broadcast('Round: 3/10', 'hud');
355
+ * ```
356
+ */
357
+ broadcast(message, type = 'chat') {
358
+ this.getAll().forEach(player => {
359
+ this.sendMessage(player.entity, message, type);
360
+ });
361
+ }
362
+ /**
363
+ * Creates a fake client (bot player) for testing or gameplay purposes.
364
+ *
365
+ * @param name - Name for the bot player
366
+ * @returns PlayerInfo object for the created bot, or null if creation failed
367
+ *
368
+ * @example
369
+ * ```typescript
370
+ * // Create a basic bot
371
+ * const bot = nodemodCore.player.createBot('TestBot');
372
+ * if (bot) {
373
+ * console.log(`Created bot: ${bot.name}`);
374
+ * bot.teleport([0, 0, 0]);
375
+ * }
376
+ *
377
+ * // Create named bots
378
+ * const bots = ['Bot1', 'Bot2', 'Bot3'].map(name =>
379
+ * nodemodCore.player.createBot(name)
380
+ * ).filter(bot => bot !== null);
381
+ * ```
382
+ */
383
+ createBot(name = 'Bot') {
384
+ const entity = nodemod.eng.createFakeClient(name);
385
+ return entity ? this.getPlayerInfo(entity) : null;
386
+ }
387
+ }
388
+ exports.default = NodemodPlayer;
389
+ //# sourceMappingURL=player.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"player.js","sourceRoot":"","sources":["../../src/enhanced/player.ts"],"names":[],"mappings":";;AAEA,qCAAuC;AAsFvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAqB,aAAa;IAChC,4CAA4C;IACpC,IAAI,CAAc;IAC1B,+CAA+C;IACvC,GAAG,CAAa;IACxB,uCAAuC;IAC/B,KAAK,CAAe;IAE5B;;;;;;OAMG;IACH,YAAY,WAAwB,EAAE,UAAsB,EAAE,YAA0B;QACtF,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC;IAC5B,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM;QACJ,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAsB,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,C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