refactor: 0 === infinite
This commit is contained in:
parent
25479e40ac
commit
69971d420e
|
@ -125,7 +125,7 @@ export default (latus) => class Spawner extends decorate(Trait) {
|
|||
static defaultState() {
|
||||
return {
|
||||
isSpawning: true,
|
||||
maxSpawns: Infinity,
|
||||
maxSpawns: 0,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ export default (latus) => class Spawner extends decorate(Trait) {
|
|||
}
|
||||
|
||||
maySpawn() {
|
||||
if (this.maxSpawns <= this.#children.length) {
|
||||
if (this.maxSpawns > 0 && this.maxSpawns <= this.#children.length) {
|
||||
return false;
|
||||
}
|
||||
if (!this.destinationEntityList()) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user