Commit 6064d493 authored by Matthew Odle's avatar Matthew Odle Committed by Matthew Odle

only modify villager conditions if villager is not dead

parent 5171d81e
......@@ -312,11 +312,13 @@ export class Village extends React.Component {
const villagers = this.state.villagers.slice();
// eslint-disable-next-line
villagers.map( villager => {
this.checkVillagerTool(villager);
this.checkVillagerWarmth(villager);
this.manageVillagerClothing(villager);
this.checkVillagerEnergy(villager);
this.bringOutYourDead(villager);
if (villager.assignment !== 'DEAD') {
this.checkVillagerTool(villager);
this.checkVillagerWarmth(villager);
this.manageVillagerClothing(villager);
this.checkVillagerEnergy(villager);
this.bringOutYourDead(villager);
};
});
this.updateAllVillagers(villagers);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment