graceful handling of items that don't fit the pet

This commit is contained in:
Matt Dunn-Rankin 2020-04-25 04:38:55 -07:00
parent 564cdef0ce
commit 77568c7a2f
3 changed files with 9 additions and 0 deletions

View file

@ -2,3 +2,4 @@
* Use react-virtualized instead of our own scroller, but we need total count known, and we need another solution for the CSS transitions in the outfit case
* Restore good download behavior: use crossOrigin for everything, and remove cache-buster in the URL we use for canvas
* Undo the local linking we did for @chakra-ui/core, react, and react-dom on Matchu's machine 😅
* Present invalidated items somewhere on the screen, instead of them just vanishing? :/

View file

@ -96,6 +96,10 @@ const resolvers = {
bodyId: petType.bodyId,
});
if (swfAssets.length === 0) {
return null;
}
const restrictedZones = [];
for (const [i, bit] of Array.from(item.zonesRestrict).entries()) {
if (bit === "1") {

View file

@ -210,6 +210,10 @@ function getZonesAndItems(itemsById, wornItemIds, closetedItemIds) {
const allItems = [...wornItems, ...closetedItems];
const itemsByZoneLabel = new Map();
for (const item of allItems) {
if (!item.appearanceOn) {
continue;
}
for (const layer of item.appearanceOn.layers) {
const zoneLabel = layer.zone.label;