@@ -125,7 +125,7 @@ interface Creep extends RoomObject {
125125 * - ERR_NOT_IN_RANGE: The target is too far away.
126126 * - ERR_NO_BODYPART: There are no ATTACK body parts in this creep’s body.
127127 */
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 ;
129129 /**
130130 * Attack a controller.
131131 *
@@ -143,7 +143,7 @@ interface Creep extends RoomObject {
143143 * - ERR_TIRED: You have to wait until the next attack is possible.
144144 * - ERR_NO_BODYPART: There are not enough CLAIM body parts in this creep’s body.
145145 */
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 ;
147147 /**
148148 * Build a structure at the target construction site using carried energy.
149149 *
@@ -160,7 +160,7 @@ interface Creep extends RoomObject {
160160 * - ERR_NOT_IN_RANGE: The target is too far away.
161161 * - ERR_NO_BODYPART: There are no WORK body parts in this creep’s body.
162162 */
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 ;
164164 /**
165165 * Cancel the order given during the current game tick.
166166 * @param methodName The name of a creep's method to be cancelled.
@@ -188,7 +188,7 @@ interface Creep extends RoomObject {
188188 * - ERR_NO_BODYPART: There are no CLAIM body parts in this creep’s body.
189189 * - ERR_GCL_NOT_ENOUGH: Your Global Control Level is not enough.
190190 */
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 ;
192192 /**
193193 * Dismantles any structure that can be constructed (even hostile) returning 50% of the energy spent on its repair.
194194 *
@@ -204,7 +204,7 @@ interface Creep extends RoomObject {
204204 * - ERR_NOT_IN_RANGE: The target is too far away.
205205 * - ERR_NO_BODYPART: There are no WORK body parts in this creep’s body.
206206 */
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 ;
208208 /**
209209 * Drop this resource on the ground.
210210 *
@@ -217,7 +217,7 @@ interface Creep extends RoomObject {
217217 * - ERR_NOT_ENOUGH_RESOURCES: The creep does not have the given amount of resources.
218218 * - ERR_INVALID_ARGS: The resourceType is not a valid RESOURCE_* constants.
219219 */
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 ;
221221 /**
222222 * Add one more available safe mode activation to a room controller.
223223 *
@@ -231,7 +231,7 @@ interface Creep extends RoomObject {
231231 * - ERR_INVALID_TARGET: The target is not a valid controller object.
232232 * - ERR_NOT_IN_RANGE: The target is too far away.
233233 */
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 ;
235235 /**
236236 * Get the quantity of live body parts of the given type.
237237 *
@@ -259,7 +259,7 @@ interface Creep extends RoomObject {
259259 * - ERR_TIRED: The extractor or the deposit is still cooling down.
260260 * - ERR_NO_BODYPART: There are no WORK body parts in this creep’s body.
261261 */
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 ;
263263 /**
264264 * Heal self or another creep.
265265 *
@@ -277,7 +277,7 @@ interface Creep extends RoomObject {
277277 * - ERR_NOT_IN_RANGE: The target is too far away.
278278 * - ERR_NO_BODYPART: There are no HEAL body parts in this creep’s body.
279279 */
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 ;
281281 /**
282282 * Move the creep one square in the specified direction or towards a creep that is pulling it.
283283 *
@@ -293,7 +293,7 @@ interface Creep extends RoomObject {
293293 * - ERR_TIRED: The fatigue indicator of the creep is non-zero.
294294 * - ERR_NO_BODYPART: There are no MOVE body parts in this creep’s body.
295295 */
296- move ( direction : DirectionConstant ) : CreepMoveReturnCode ;
296+ move ( direction : DirectionConstant ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_INVALID_ARGS | ERR_TIRED | ERR_NO_BODYPART ;
297297 move ( target : Creep ) : OK | ERR_NOT_OWNER | ERR_BUSY | ERR_NOT_IN_RANGE | ERR_INVALID_ARGS ;
298298 /**
299299 * Move the creep using the specified predefined path.
@@ -353,7 +353,7 @@ interface Creep extends RoomObject {
353353 * - ERR_NOT_IN_RANGE: The target is too far away.
354354 * - ERR_NO_BODYPART: There are no CARRY body parts in this creep’s body.
355355 */
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 ;
357357 /**
358358 * Allow another creep to follow this creep.
359359 *
@@ -387,7 +387,7 @@ interface Creep extends RoomObject {
387387 * - ERR_NOT_IN_RANGE: The target is too far away.
388388 * - ERR_NO_BODYPART: There are no RANGED_ATTACK body parts in this creep’s body.
389389 */
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 ;
391391 /**
392392 * Heal another creep at a distance.
393393 *
@@ -403,7 +403,7 @@ interface Creep extends RoomObject {
403403 * - ERR_NOT_IN_RANGE: The target is too far away.
404404 * - ERR_NO_BODYPART: There are no HEAL body parts in this creep’s body.
405405 */
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 ;
407407 /**
408408 * A ranged attack against all hostile creeps or structures within 3 squares range.
409409 *
@@ -429,7 +429,9 @@ interface Creep extends RoomObject {
429429 * - ERR_NOT_IN_RANGE: The target is too far away.
430430 * - ERR_NO_BODYPART: There are no WORK body parts in this creep’s body.
431431 */
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 ;
433435 /**
434436 * Temporarily block a neutral controller from claiming by other players.
435437 *
@@ -447,7 +449,7 @@ interface Creep extends RoomObject {
447449 * - ERR_NOT_IN_RANGE: The target is too far away.
448450 * - ERR_NO_BODYPART: There are no CLAIM body parts in this creep’s body.
449451 */
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 ;
451453 /**
452454 * Display a visual speech balloon above the creep with the specified message.
453455 *
@@ -504,7 +506,11 @@ interface Creep extends RoomObject {
504506 * - ERR_NOT_IN_RANGE: The target is too far away.
505507 * - ERR_INVALID_ARGS: The resourceType is not one of the {@link ResourceConstant RESOURCE_*} constants, or the amount is incorrect.
506508 */
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 ;
508514 /**
509515 * Upgrade your controller to the next level using carried energy.
510516 *
@@ -526,7 +532,9 @@ interface Creep extends RoomObject {
526532 * - ERR_NOT_IN_RANGE: The target is too far away.
527533 * - ERR_NO_BODYPART: There are no WORK body parts in this creep’s body.
528534 */
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 ;
530538 /**
531539 * Withdraw resources from a structure, a tombstone or a ruin.
532540 *
@@ -549,7 +557,11 @@ interface Creep extends RoomObject {
549557 * - ERR_NOT_IN_RANGE: The target is too far away.
550558 * - ERR_INVALID_ARGS: The resourceType is not one of the {@link ResourceConstant RESOURCE_*} constants, or the amount is incorrect.
551559 */
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 ;
553565}
554566
555567interface CreepConstructor extends _Constructor < Creep > , _ConstructorById < Creep > { }
0 commit comments