This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The function below was developed late last year by @stybbe, published in | |
// Screeps Slack's #share-thy-code channel. No license was applied; all | |
// rights remain with the author. Minor fixes were made by @SemperRabbit | |
// to get it working again. | |
// NOTE: that this code works in chrome and firefox (albiet quietly | |
// in firefox) but not the steam client. | |
global.defaultVoice = "Deutsch Female"; // can be changed | |
// see https://responsivevoice.org/text-to-speech-languages/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function () { | |
Room.prototype.findCreeps = function (role) { | |
var creeps = room.find(FIND_MY_CREEPS); | |
if (role && role != "") { | |
creeps = _.filter(creeps, function (c) { | |
return (c.memory.role == role); | |
}); | |
} |