isle-evrima-rcon 1.0.0 → 1.0.2
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.
- package/README.md +26 -1
- package/package.json +1 -1
- package/src/client.ts +16 -3
- package/src/index.ts +3 -1
- package/src/types.ts +62 -0
package/README.md
CHANGED
|
@@ -209,11 +209,36 @@ When `autoReconnect` is enabled:
|
|
|
209
209
|
| Method | Description |
|
|
210
210
|
|--------|-------------|
|
|
211
211
|
| `setAI(enabled)` | Toggle AI spawning |
|
|
212
|
-
| `disableAIClasses(classes)` | Disable specific AI types |
|
|
212
|
+
| `disableAIClasses(classes)` | Disable specific AI dinosaur types |
|
|
213
213
|
| `setAIDensity(0.0-1.0)` | Set AI spawn density |
|
|
214
214
|
| `setAILearning(enabled)` | Toggle AI learning behavior |
|
|
215
215
|
| `getQueueStatus()` | Get server queue status |
|
|
216
216
|
|
|
217
|
+
### Game Constants
|
|
218
|
+
|
|
219
|
+
The library includes typed constants for dinosaurs and AI creatures:
|
|
220
|
+
|
|
221
|
+
```typescript
|
|
222
|
+
import {
|
|
223
|
+
PLAYABLE_DINOSAURS, // Playable dino classes
|
|
224
|
+
AI_CREATURE_CLASSES, // Ambient AI wildlife
|
|
225
|
+
type PlayableDinosaur,
|
|
226
|
+
type AICreatureClass
|
|
227
|
+
} from 'isle-evrima-rcon';
|
|
228
|
+
|
|
229
|
+
// Disable ambient AI creatures (wildlife NPCs)
|
|
230
|
+
await client.disableAIClasses(['Compsognathus', 'Deer', 'Boar']);
|
|
231
|
+
|
|
232
|
+
// AI_CREATURE_CLASSES includes:
|
|
233
|
+
// Compsognathus, Pterodactylus, Boar, Deer, Goat, Seaturtle, Rabbit, Crab
|
|
234
|
+
|
|
235
|
+
// PLAYABLE_DINOSAURS includes all 20 playable dinos:
|
|
236
|
+
// Dryosaurus, Hypsilophodon, Pachycephalosaurus, Stegosaurus, Tenontosaurus,
|
|
237
|
+
// Diabloceratops, Maiasaura, Triceratops, Carnotaurus, Ceratosaurus,
|
|
238
|
+
// Deinosuchus, Omniraptor, Pteranodon, Troodon, Beipiaosaurus, Gallimimus,
|
|
239
|
+
// Dilophosaurus, Herrerasaurus, Allosaurus, Tyrannosaurus
|
|
240
|
+
```
|
|
241
|
+
|
|
217
242
|
### Low-Level Commands
|
|
218
243
|
|
|
219
244
|
| Method | Description |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isle-evrima-rcon",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "High-performance, type-safe TypeScript RCON client for The Isle: Evrima game servers with auto-reconnect and connection pooling",
|
|
5
5
|
"author": "MENIX <https://github.com/menix1337>",
|
|
6
6
|
"license": "MIT",
|
package/src/client.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
type PlayerInfo,
|
|
13
13
|
type PlayerData,
|
|
14
14
|
type ServerDetails,
|
|
15
|
+
type AICreatureClass,
|
|
15
16
|
RCONError,
|
|
16
17
|
RCONErrorCode,
|
|
17
18
|
} from './types.js';
|
|
@@ -464,10 +465,22 @@ export class EvrimaRCON {
|
|
|
464
465
|
}
|
|
465
466
|
|
|
466
467
|
/**
|
|
467
|
-
* Disable specific AI classes.
|
|
468
|
-
*
|
|
468
|
+
* Disable specific ambient AI creature classes.
|
|
469
|
+
*
|
|
470
|
+
* These are NPC wildlife (not playable dinosaurs) like Compsognathus, Deer, Boar, etc.
|
|
471
|
+
*
|
|
472
|
+
* @param classes - Array of AI creature class names to disable
|
|
473
|
+
*
|
|
474
|
+
* @example
|
|
475
|
+
* ```typescript
|
|
476
|
+
* // Type-safe with autocomplete
|
|
477
|
+
* await client.disableAIClasses(['Compsognathus', 'Deer', 'Boar']);
|
|
478
|
+
*
|
|
479
|
+
* // Or use the AI_CREATURE_CLASSES constant
|
|
480
|
+
* import { AI_CREATURE_CLASSES } from 'isle-evrima-rcon';
|
|
481
|
+
* ```
|
|
469
482
|
*/
|
|
470
|
-
async disableAIClasses(classes: string[]): Promise<CommandResult> {
|
|
483
|
+
async disableAIClasses(classes: (AICreatureClass | string)[]): Promise<CommandResult> {
|
|
471
484
|
return this.sendCommand('ai:classes:disable', classes.join(','));
|
|
472
485
|
}
|
|
473
486
|
|
package/src/index.ts
CHANGED
|
@@ -47,9 +47,11 @@ export type {
|
|
|
47
47
|
ServerDetails,
|
|
48
48
|
CommandDefinition,
|
|
49
49
|
RCONErrorCode,
|
|
50
|
+
PlayableDinosaur,
|
|
51
|
+
AICreatureClass,
|
|
50
52
|
} from './types.js';
|
|
51
53
|
|
|
52
|
-
export { RCONError } from './types.js';
|
|
54
|
+
export { RCONError, PLAYABLE_DINOSAURS, AI_CREATURE_CLASSES } from './types.js';
|
|
53
55
|
|
|
54
56
|
// Command registry exports
|
|
55
57
|
export {
|
package/src/types.ts
CHANGED
|
@@ -257,3 +257,65 @@ export class RCONError extends Error {
|
|
|
257
257
|
Object.setPrototypeOf(this, RCONError.prototype);
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
+
|
|
261
|
+
// ============================================================================
|
|
262
|
+
// Game Constants
|
|
263
|
+
// ============================================================================
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* All playable dinosaur/creature classes in The Isle: Evrima.
|
|
267
|
+
*
|
|
268
|
+
* Used for commands like `updateplayables` and `getplayables`.
|
|
269
|
+
* List is current as of January 2026 and may expand with game updates.
|
|
270
|
+
*/
|
|
271
|
+
export const PLAYABLE_DINOSAURS = [
|
|
272
|
+
// Herbivores
|
|
273
|
+
'Dryosaurus',
|
|
274
|
+
'Hypsilophodon',
|
|
275
|
+
'Pachycephalosaurus',
|
|
276
|
+
'Stegosaurus',
|
|
277
|
+
'Tenontosaurus',
|
|
278
|
+
'Diabloceratops',
|
|
279
|
+
'Maiasaura',
|
|
280
|
+
'Triceratops',
|
|
281
|
+
// Carnivores
|
|
282
|
+
'Carnotaurus',
|
|
283
|
+
'Ceratosaurus',
|
|
284
|
+
'Deinosuchus',
|
|
285
|
+
'Omniraptor',
|
|
286
|
+
'Pteranodon',
|
|
287
|
+
'Troodon',
|
|
288
|
+
'Beipiaosaurus',
|
|
289
|
+
'Gallimimus',
|
|
290
|
+
'Dilophosaurus',
|
|
291
|
+
'Herrerasaurus',
|
|
292
|
+
'Allosaurus',
|
|
293
|
+
'Tyrannosaurus',
|
|
294
|
+
] as const;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Type representing valid playable dinosaur names.
|
|
298
|
+
*/
|
|
299
|
+
export type PlayableDinosaur = (typeof PLAYABLE_DINOSAURS)[number];
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Ambient AI creature classes that can be toggled/disabled.
|
|
303
|
+
*
|
|
304
|
+
* These are the NPC wildlife that spawn in the world, NOT playable dinosaurs.
|
|
305
|
+
* Used for the `disableAIClasses` command.
|
|
306
|
+
*/
|
|
307
|
+
export const AI_CREATURE_CLASSES = [
|
|
308
|
+
'Compsognathus',
|
|
309
|
+
'Pterodactylus',
|
|
310
|
+
'Boar',
|
|
311
|
+
'Deer',
|
|
312
|
+
'Goat',
|
|
313
|
+
'Seaturtle',
|
|
314
|
+
'Rabbit',
|
|
315
|
+
'Crab',
|
|
316
|
+
] as const;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Type representing valid AI creature class names.
|
|
320
|
+
*/
|
|
321
|
+
export type AICreatureClass = (typeof AI_CREATURE_CLASSES)[number];
|