Hide Static zone for UCs, just like restricteds
This commit is contained in:
parent
e423affa6d
commit
56dd2bbdd7
1 changed files with 6 additions and 1 deletions
|
@ -119,10 +119,15 @@ export function getVisibleLayers(petAppearance, itemAppearances) {
|
||||||
const validItemAppearances = itemAppearances.filter((a) => a);
|
const validItemAppearances = itemAppearances.filter((a) => a);
|
||||||
|
|
||||||
const petLayers = petAppearance.layers.map((l) => ({ ...l, source: "pet" }));
|
const petLayers = petAppearance.layers.map((l) => ({ ...l, source: "pet" }));
|
||||||
|
const petOccupiedZoneIds = new Set(petLayers.map((l) => l.zone.id));
|
||||||
|
|
||||||
const itemLayers = validItemAppearances
|
const itemLayers = validItemAppearances
|
||||||
.map((a) => a.layers)
|
.map((a) => a.layers)
|
||||||
.flat()
|
.flat()
|
||||||
.map((l) => ({ ...l, source: "item" }));
|
.map((l) => ({ ...l, source: "item" }))
|
||||||
|
// Don't let items occupy the same zones as the pet, e.g. Static on UCs.
|
||||||
|
.filter((l) => !petOccupiedZoneIds.has(l.zone.id));
|
||||||
|
|
||||||
let allLayers = [...petLayers, ...itemLayers];
|
let allLayers = [...petLayers, ...itemLayers];
|
||||||
|
|
||||||
const itemRestrictedZoneIds = validItemAppearances
|
const itemRestrictedZoneIds = validItemAppearances
|
||||||
|
|
Loading…
Reference in a new issue