Skip to content
Permalink
Browse files

feat(runtime): show a console message when trying to renew a creep wi…

…th boosts
  • Loading branch information...
artch committed Sep 12, 2018
1 parent 982a565 commit c2d73df5cdfb8bdb7ada4e8e379446996a320bdc
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/game/structures.js
@@ -1348,6 +1348,9 @@ exports.make = function(_runtimeData, _intents, _register, _globals) {
if(target.ticksToLive + Math.floor(C.SPAWN_RENEW_RATIO * C.CREEP_LIFE_TIME / C.CREEP_SPAWN_TIME / target.body.length) > C.CREEP_LIFE_TIME) {
return C.ERR_FULL;
}
if(_.any(target.body, i => !!i.boost)) {
register.deprecated('Using `StructureSpawn.renewCreep` on a boosted creep is deprecated and will throw an error soon. Please remove boosts using `StructureLab.unboostCreep` before renewing.');
}

intents.set(this.id, 'renewCreep', {id: target.id});
return C.OK;

0 comments on commit c2d73df

Please sign in to comment.
You can’t perform that action at this time.