var name = 'Creep'; function run(creep) { } function spawn(spawnPoint, newName){ var newBody = spawnPoint.room.memory.creepBodies[newName]; if(typeof newName === 'undefined') newName = name; spawnPoint.spawnCreep(newBody, newName + spawnPoint.room.name + "-" + Game.time, {memory : {role : newName} }); } module.exports = {name,run,spawn};