<commit_before>var mod = new SetupObj('Worker');
module.exports = mod;

mod.setupConfig = {
    Normal: {
        essBody: [WORK, CARRY, MOVE],
        extraBody: [WORK, CARRY, MOVE],
        prefix: '[Worker]',
        memory: {role: 'worker'},
    },
};

mod.shouldSpawn = function(room, cnt) {
    return true;
};<commit_msg>only spawn worker when source can afford more<commit_after>var mod = new SetupObj('Worker');
module.exports = mod;

mod.setupConfig = {
    Normal: {
        essBody: [WORK, CARRY, MOVE],
        extraBody: [WORK, CARRY, MOVE],
        prefix: '[Worker]',
        memory: {role: 'worker'},
    },
};

mod.shouldSpawn = function(room, cnt) {
    return cnt > 0;
};
{'fraction_non_alphanumeric': 0.16063675832127353, 'fraction_numerical': 0.001447178002894356, 'mean_word_length': 2.8876404494382024, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2929085', 'n_tokens_mistral': 239, 'n_tokens_neox': 238, 'n_words': 60}