fix: spawn list wasn't propagating to wielder

This commit is contained in:
cha0s 2019-09-08 03:20:15 -05:00
parent a062a3fe51
commit 1f7763e715

View File

@ -41,10 +41,17 @@ export class Spawner extends decorate(Trait) {
}
destinationEntityList() {
if (this.entity.is('listed')) {
if (
this.entity.is('listed')
&& this.entity.list
) {
return this.entity.list;
}
if (this.entity.wielder && this.entity.wielder.is('listed')) {
if (
this.entity.wielder
&& this.entity.wielder.is('listed')
&& this.entity.wielder.list
) {
return this.entity.wielder.list;
}
}