UNPKG

@screeps/engine

Version:

This is a module for Screeps standalone server. See [main repository](https://github.com/screeps/screeps) for more info.

32 lines (24 loc) 836 B
'use strict'; var _ = require('lodash'), utils = require('../../../utils'), driver = utils.getDriver(), C = driver.constants, movement = require('../movement'); module.exports = function (object, roomObjects, roomTerrain, bulk, bulkUsers, roomController, stats) { if (!object || object.type != 'link') return; if (object.cooldown > 0) { object.cooldown--; if (object.cooldown < 0) object.cooldown = 0; bulk.update(object, { cooldown: object.cooldown, actionLog: object.actionLog }); } else { if (!_.isEqual(object._actionLog, object.actionLog)) { bulk.update(object, { actionLog: object.actionLog }); } } }; //# sourceMappingURL=../../../sourcemaps/processor/intents/links/tick.js.map