fix: missing JSON

This commit is contained in:
cha0s 2021-01-19 19:06:09 -06:00
parent 81236e4a91
commit a1c5220d22

View File

@ -199,7 +199,7 @@ export default (latus) => class Spawner extends decorate(Trait) {
}
},
spawn: (key, json = {}) => {
spawn: (key, json = {}, latus) => {
if (!this.maySpawn()) {
return undefined;
}
@ -209,16 +209,16 @@ export default (latus) => class Spawner extends decorate(Trait) {
}
return this.entity.spawnRaw(merge(
spawnJSON,
json,
latus ? json : {},
{
arrayMerge: (l, r) => r,
},
));
},
spawnAt: (key, position, json = {}) => (
spawnAt: (key, position, json = {}, latus) => (
this.maySpawn()
? this.entity.spawn(key, this.augmentJSONWithPosition(json, position))
? this.entity.spawn(key, this.augmentJSONWithPosition(latus ? json : {}, position))
: undefined
),
@ -242,7 +242,7 @@ export default (latus) => class Spawner extends decorate(Trait) {
return child;
},
spawnRawAt: (json = {}, position) => (
spawnRawAt: (json, position) => (
this.maySpawn()
? this.entity.spawnRaw(this.augmentJSONWithPosition(json, position))
: undefined