fixed wrong vacancy generation bug.

This commit is contained in:
Douwe Ravers
2023-08-26 21:31:29 +02:00
parent e294ad29fe
commit 91448edc0a
3 changed files with 12 additions and 6 deletions

View File

@@ -9,7 +9,8 @@ class _StructureSpawn extends StructureSpawn {
}
tick(){
if(!this.memory.init) this.begin();
if(!this.memory.init) this.begin();
if(this.store.getUsedCapacity(RESOURCE_ENERGY) < 300) return;
const job = this.room.memory.vacancies.pop();
if(job){
const name = getJobName(job.role);