chore: skip 0 lock

This commit is contained in:
cha0s 2020-04-19 23:23:24 -05:00
parent 989e34e68e
commit 0a86dda8d3

View File

@ -123,7 +123,9 @@ export class Harmful extends decorate(Trait) {
if (this.locks.has(entity)) {
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) {
const {power, type, variance} = this._harmSpecs[i];
// Give or take.