fix: missing JSON
This commit is contained in:
parent
81236e4a91
commit
a1c5220d22
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user