chore: skip 0 lock
This commit is contained in:
parent
989e34e68e
commit
0a86dda8d3
|
@ -123,7 +123,9 @@ export class Harmful extends decorate(Trait) {
|
||||||
if (this.locks.has(entity)) {
|
if (this.locks.has(entity)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.locks.set(entity, this.params.harmLock);
|
if (this.params.harmLock > 0) {
|
||||||
|
this.locks.set(entity, this.params.harmLock);
|
||||||
|
}
|
||||||
for (let i = 0; i < this._harmSpecs.length; ++i) {
|
for (let i = 0; i < this._harmSpecs.length; ++i) {
|
||||||
const {power, type, variance} = this._harmSpecs[i];
|
const {power, type, variance} = this._harmSpecs[i];
|
||||||
// Give or take.
|
// Give or take.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user