@screeps/engine
Version:
This is a module for Screeps standalone server. See [main repository](https://github.com/screeps/screeps) for more info.
22 lines (19 loc) • 509 B
JavaScript
var _ = require('lodash'),
utils = require('../../../utils'),
driver = utils.getDriver(),
C = driver.constants;
module.exports = function(object, intent, roomObjects, roomTerrain, bulk) {
if(object.type != 'creep') {
return;
}
if(object.spawning) {
return;
}
if(!_.isString(intent.message)) {
return;
}
object.actionLog.say = {
message: intent.message.substring(0,10),
isPublic: intent.isPublic
};
};