@@ -125,7 +125,7 @@ interface Creep extends RoomObject {
125
125
* - ERR_NOT_IN_RANGE: The target is too far away.
126
126
* - ERR_NO_BODYPART: There are no ATTACK body parts in this creep’s body.
127
127
*/
128
- attack ( target : AnyCreep | Structure ) : CreepActionReturnCode ;
128
+ attack ( target : AnyCreep | Structure ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_INVALID_TARGET | ERR_NOT_IN_RANGE | ERR_NO_BODYPART ;
129
129
/**
130
130
* Attack a controller.
131
131
*
@@ -143,7 +143,7 @@ interface Creep extends RoomObject {
143
143
* - ERR_TIRED: You have to wait until the next attack is possible.
144
144
* - ERR_NO_BODYPART: There are not enough CLAIM body parts in this creep’s body.
145
145
*/
146
- attackController ( target : StructureController ) : CreepActionReturnCode ;
146
+ attackController ( target : StructureController ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_INVALID_TARGET | ERR_NOT_IN_RANGE | ERR_TIRED | ERR_NO_BODYPART ;
147
147
/**
148
148
* Build a structure at the target construction site using carried energy.
149
149
*
@@ -160,7 +160,7 @@ interface Creep extends RoomObject {
160
160
* - ERR_NOT_IN_RANGE: The target is too far away.
161
161
* - ERR_NO_BODYPART: There are no WORK body parts in this creep’s body.
162
162
*/
163
- build ( target : ConstructionSite ) : CreepActionReturnCode | ERR_NOT_ENOUGH_RESOURCES | ERR_RCL_NOT_ENOUGH ;
163
+ build ( target : ConstructionSite ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_NOT_ENOUGH_RESOURCES | ERR_INVALID_TARGET | ERR_NOT_IN_RANGE | ERR_NO_BODYPART ;
164
164
/**
165
165
* Cancel the order given during the current game tick.
166
166
* @param methodName The name of a creep's method to be cancelled.
@@ -188,7 +188,7 @@ interface Creep extends RoomObject {
188
188
* - ERR_NO_BODYPART: There are no CLAIM body parts in this creep’s body.
189
189
* - ERR_GCL_NOT_ENOUGH: Your Global Control Level is not enough.
190
190
*/
191
- claimController ( target : StructureController ) : CreepActionReturnCode | ERR_FULL | ERR_GCL_NOT_ENOUGH ;
191
+ claimController ( target : StructureController ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_INVALID_TARGET | ERR_FULL | ERR_NOT_IN_RANGE | ERR_NO_BODYPART | ERR_GCL_NOT_ENOUGH ;
192
192
/**
193
193
* Dismantles any structure that can be constructed (even hostile) returning 50% of the energy spent on its repair.
194
194
*
@@ -204,7 +204,7 @@ interface Creep extends RoomObject {
204
204
* - ERR_NOT_IN_RANGE: The target is too far away.
205
205
* - ERR_NO_BODYPART: There are no WORK body parts in this creep’s body.
206
206
*/
207
- dismantle ( target : Structure ) : CreepActionReturnCode ;
207
+ dismantle ( target : Structure ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_INVALID_TARGET | ERR_NOT_IN_RANGE | ERR_NO_BODYPART ;
208
208
/**
209
209
* Drop this resource on the ground.
210
210
*
@@ -217,7 +217,7 @@ interface Creep extends RoomObject {
217
217
* - ERR_NOT_ENOUGH_RESOURCES: The creep does not have the given amount of resources.
218
218
* - ERR_INVALID_ARGS: The resourceType is not a valid RESOURCE_* constants.
219
219
*/
220
- drop ( resourceType : ResourceConstant , amount ?: number ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_NOT_ENOUGH_RESOURCES ;
220
+ drop ( resourceType : ResourceConstant , amount ?: number ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_NOT_ENOUGH_RESOURCES | ERR_INVALID_ARGS ;
221
221
/**
222
222
* Add one more available safe mode activation to a room controller.
223
223
*
@@ -231,7 +231,7 @@ interface Creep extends RoomObject {
231
231
* - ERR_INVALID_TARGET: The target is not a valid controller object.
232
232
* - ERR_NOT_IN_RANGE: The target is too far away.
233
233
*/
234
- generateSafeMode ( target : StructureController ) : CreepActionReturnCode ;
234
+ generateSafeMode ( target : StructureController ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_NOT_ENOUGH_RESOURCES | ERR_INVALID_TARGET | ERR_NOT_IN_RANGE ;
235
235
/**
236
236
* Get the quantity of live body parts of the given type.
237
237
*
@@ -259,7 +259,7 @@ interface Creep extends RoomObject {
259
259
* - ERR_TIRED: The extractor or the deposit is still cooling down.
260
260
* - ERR_NO_BODYPART: There are no WORK body parts in this creep’s body.
261
261
*/
262
- harvest ( target : Source | Mineral | Deposit ) : CreepActionReturnCode | ERR_NOT_FOUND | ERR_NOT_ENOUGH_RESOURCES ;
262
+ harvest ( target : Source | Mineral | Deposit ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_NOT_FOUND | ERR_NOT_ENOUGH_RESOURCES | ERR_INVALID_TARGET | ERR_NOT_IN_RANGE | ERR_TIRED | ERR_NO_BODYPART ;
263
263
/**
264
264
* Heal self or another creep.
265
265
*
@@ -277,7 +277,7 @@ interface Creep extends RoomObject {
277
277
* - ERR_NOT_IN_RANGE: The target is too far away.
278
278
* - ERR_NO_BODYPART: There are no HEAL body parts in this creep’s body.
279
279
*/
280
- heal ( target : AnyCreep ) : CreepActionReturnCode ;
280
+ heal ( target : AnyCreep ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_INVALID_TARGET | ERR_NOT_IN_RANGE | ERR_NO_BODYPART ;
281
281
/**
282
282
* Move the creep one square in the specified direction or towards a creep that is pulling it.
283
283
*
@@ -293,7 +293,7 @@ interface Creep extends RoomObject {
293
293
* - ERR_TIRED: The fatigue indicator of the creep is non-zero.
294
294
* - ERR_NO_BODYPART: There are no MOVE body parts in this creep’s body.
295
295
*/
296
- move ( direction : DirectionConstant ) : CreepMoveReturnCode ;
296
+ move ( direction : DirectionConstant ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_INVALID_ARGS | ERR_TIRED | ERR_NO_BODYPART ;
297
297
move ( target : Creep ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_NOT_IN_RANGE | ERR_INVALID_ARGS ;
298
298
/**
299
299
* Move the creep using the specified predefined path.
@@ -353,7 +353,7 @@ interface Creep extends RoomObject {
353
353
* - ERR_NOT_IN_RANGE: The target is too far away.
354
354
* - ERR_NO_BODYPART: There are no CARRY body parts in this creep’s body.
355
355
*/
356
- pickup ( target : Resource ) : CreepActionReturnCode | ERR_FULL ;
356
+ pickup ( target : Resource ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_INVALID_TARGET | ERR_FULL | ERR_NOT_IN_RANGE | ERR_NO_BODYPART ;
357
357
/**
358
358
* Allow another creep to follow this creep.
359
359
*
@@ -387,7 +387,7 @@ interface Creep extends RoomObject {
387
387
* - ERR_NOT_IN_RANGE: The target is too far away.
388
388
* - ERR_NO_BODYPART: There are no RANGED_ATTACK body parts in this creep’s body.
389
389
*/
390
- rangedAttack ( target : AnyCreep | Structure ) : CreepActionReturnCode ;
390
+ rangedAttack ( target : AnyCreep | Structure ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_INVALID_TARGET | ERR_NOT_IN_RANGE | ERR_NO_BODYPART ;
391
391
/**
392
392
* Heal another creep at a distance.
393
393
*
@@ -403,7 +403,7 @@ interface Creep extends RoomObject {
403
403
* - ERR_NOT_IN_RANGE: The target is too far away.
404
404
* - ERR_NO_BODYPART: There are no HEAL body parts in this creep’s body.
405
405
*/
406
- rangedHeal ( target : AnyCreep ) : CreepActionReturnCode ;
406
+ rangedHeal ( target : AnyCreep ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_INVALID_TARGET | ERR_NOT_IN_RANGE | ERR_NO_BODYPART ;
407
407
/**
408
408
* A ranged attack against all hostile creeps or structures within 3 squares range.
409
409
*
@@ -429,7 +429,9 @@ interface Creep extends RoomObject {
429
429
* - ERR_NOT_IN_RANGE: The target is too far away.
430
430
* - ERR_NO_BODYPART: There are no WORK body parts in this creep’s body.
431
431
*/
432
- repair ( target : Structure ) : CreepActionReturnCode | ERR_NOT_ENOUGH_RESOURCES ;
432
+ repair (
433
+ target : Structure ,
434
+ ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_NOT_ENOUGH_RESOURCES | ERR_INVALID_TARGET | ERR_NOT_IN_RANGE | ERR_NO_BODYPART ;
433
435
/**
434
436
* Temporarily block a neutral controller from claiming by other players.
435
437
*
@@ -447,7 +449,7 @@ interface Creep extends RoomObject {
447
449
* - ERR_NOT_IN_RANGE: The target is too far away.
448
450
* - ERR_NO_BODYPART: There are no CLAIM body parts in this creep’s body.
449
451
*/
450
- reserveController ( target : StructureController ) : CreepActionReturnCode ;
452
+ reserveController ( target : StructureController ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_INVALID_TARGET | ERR_NOT_IN_RANGE | ERR_NO_BODYPART ;
451
453
/**
452
454
* Display a visual speech balloon above the creep with the specified message.
453
455
*
@@ -504,7 +506,11 @@ interface Creep extends RoomObject {
504
506
* - ERR_NOT_IN_RANGE: The target is too far away.
505
507
* - ERR_INVALID_ARGS: The resourceType is not one of the {@link ResourceConstant RESOURCE_*} constants, or the amount is incorrect.
506
508
*/
507
- transfer ( target : AnyCreep | Structure , resourceType : ResourceConstant , amount ?: number ) : ScreepsReturnCode ;
509
+ transfer (
510
+ target : AnyCreep | Structure ,
511
+ resourceType : ResourceConstant ,
512
+ amount ?: number ,
513
+ ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_NOT_ENOUGH_RESOURCES | ERR_INVALID_TARGET | ERR_FULL | ERR_NOT_IN_RANGE | ERR_INVALID_ARGS ;
508
514
/**
509
515
* Upgrade your controller to the next level using carried energy.
510
516
*
@@ -526,7 +532,9 @@ interface Creep extends RoomObject {
526
532
* - ERR_NOT_IN_RANGE: The target is too far away.
527
533
* - ERR_NO_BODYPART: There are no WORK body parts in this creep’s body.
528
534
*/
529
- upgradeController ( target : StructureController ) : ScreepsReturnCode ;
535
+ upgradeController (
536
+ target : StructureController ,
537
+ ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_NOT_ENOUGH_RESOURCES | ERR_INVALID_TARGET | ERR_NOT_IN_RANGE | ERR_NO_BODYPART ;
530
538
/**
531
539
* Withdraw resources from a structure, a tombstone or a ruin.
532
540
*
@@ -549,7 +557,11 @@ interface Creep extends RoomObject {
549
557
* - ERR_NOT_IN_RANGE: The target is too far away.
550
558
* - ERR_INVALID_ARGS: The resourceType is not one of the {@link ResourceConstant RESOURCE_*} constants, or the amount is incorrect.
551
559
*/
552
- withdraw ( target : Structure | Tombstone | Ruin , resourceType : ResourceConstant , amount ?: number ) : ScreepsReturnCode ;
560
+ withdraw (
561
+ target : Structure | Tombstone | Ruin ,
562
+ resourceType : ResourceConstant ,
563
+ amount ?: number ,
564
+ ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_NOT_ENOUGH_RESOURCES | ERR_INVALID_TARGET | ERR_FULL | ERR_NOT_IN_RANGE | ERR_INVALID_ARGS ;
553
565
}
554
566
555
567
interface CreepConstructor extends _Constructor < Creep > , _ConstructorById < Creep > { }
0 commit comments