kitchen-simulator 11.1.0 → 11.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/class/item.js
CHANGED
|
@@ -277,27 +277,13 @@ var Item = /*#__PURE__*/function () {
|
|
|
277
277
|
} else if (applyScope === DOORSTYLE_SCOPE_MULTIPLE) {
|
|
278
278
|
idSet = new Set(targetItemIDs);
|
|
279
279
|
}
|
|
280
|
-
|
|
281
|
-
// If host returns an empty ccdf_list, remove assets3d of persisted ccdf from affected instances.
|
|
282
|
-
// This keeps SYNC payload from sending stale `items[].ccdf`.
|
|
283
|
-
if (ccdf_list.length === 0) {
|
|
284
|
-
layer.items.forEach(function (it) {
|
|
285
|
-
var _idSet;
|
|
286
|
-
var should = applyScope === DOORSTYLE_SCOPE_ALL ? true : (_idSet = idSet) === null || _idSet === void 0 ? void 0 : _idSet.has(it.id);
|
|
287
|
-
if (!should) return;
|
|
288
|
-
state = state.deleteIn(['scene', 'layers', layerID, 'items', it.id, 'ccdf', 'assets3d']);
|
|
289
|
-
});
|
|
290
|
-
return {
|
|
291
|
-
updatedState: state
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
280
|
var desiredDoorFinishId = doorFinishId !== null && doorFinishId !== void 0 ? doorFinishId : this.__getDesiredDoorFinishId(layer);
|
|
295
281
|
if (!desiredDoorFinishId) return {
|
|
296
282
|
updatedState: state
|
|
297
283
|
};
|
|
298
284
|
layer.items.forEach(function (it) {
|
|
299
|
-
var
|
|
300
|
-
var should = applyScope === DOORSTYLE_SCOPE_ALL ? true : (
|
|
285
|
+
var _idSet, _picked$door_finish_i;
|
|
286
|
+
var should = applyScope === DOORSTYLE_SCOPE_ALL ? true : (_idSet = idSet) === null || _idSet === void 0 ? void 0 : _idSet.has(it.id);
|
|
301
287
|
if (!should) return;
|
|
302
288
|
|
|
303
289
|
// Join key: scene_cabinet_id (instance id).
|
|
@@ -9,7 +9,5 @@ export function isWarningCabinet(item) {
|
|
|
9
9
|
var _js$ccdf;
|
|
10
10
|
var js = toJSIfNeeded(item);
|
|
11
11
|
var isCabinet = (js === null || js === void 0 ? void 0 : js.category) === ITEM_TYPE.CABINET;
|
|
12
|
-
|
|
13
|
-
var hasAssets3d = !!assets3d && Array.isArray(assets3d) && assets3d.length > 0;
|
|
14
|
-
return isCabinet && !hasAssets3d;
|
|
12
|
+
return isCabinet && !(js !== null && js !== void 0 && (_js$ccdf = js.ccdf) !== null && _js$ccdf !== void 0 && _js$ccdf.is_available_in_current_door_finish);
|
|
15
13
|
}
|
package/lib/class/item.js
CHANGED
|
@@ -284,27 +284,13 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
284
284
|
} else if (applyScope === _constants.DOORSTYLE_SCOPE_MULTIPLE) {
|
|
285
285
|
idSet = new Set(targetItemIDs);
|
|
286
286
|
}
|
|
287
|
-
|
|
288
|
-
// If host returns an empty ccdf_list, remove assets3d of persisted ccdf from affected instances.
|
|
289
|
-
// This keeps SYNC payload from sending stale `items[].ccdf`.
|
|
290
|
-
if (ccdf_list.length === 0) {
|
|
291
|
-
layer.items.forEach(function (it) {
|
|
292
|
-
var _idSet;
|
|
293
|
-
var should = applyScope === _constants.DOORSTYLE_SCOPE_ALL ? true : (_idSet = idSet) === null || _idSet === void 0 ? void 0 : _idSet.has(it.id);
|
|
294
|
-
if (!should) return;
|
|
295
|
-
state = state.deleteIn(['scene', 'layers', layerID, 'items', it.id, 'ccdf', 'assets3d']);
|
|
296
|
-
});
|
|
297
|
-
return {
|
|
298
|
-
updatedState: state
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
287
|
var desiredDoorFinishId = doorFinishId !== null && doorFinishId !== void 0 ? doorFinishId : this.__getDesiredDoorFinishId(layer);
|
|
302
288
|
if (!desiredDoorFinishId) return {
|
|
303
289
|
updatedState: state
|
|
304
290
|
};
|
|
305
291
|
layer.items.forEach(function (it) {
|
|
306
|
-
var
|
|
307
|
-
var should = applyScope === _constants.DOORSTYLE_SCOPE_ALL ? true : (
|
|
292
|
+
var _idSet, _picked$door_finish_i;
|
|
293
|
+
var should = applyScope === _constants.DOORSTYLE_SCOPE_ALL ? true : (_idSet = idSet) === null || _idSet === void 0 ? void 0 : _idSet.has(it.id);
|
|
308
294
|
if (!should) return;
|
|
309
295
|
|
|
310
296
|
// Join key: scene_cabinet_id (instance id).
|
|
@@ -14,7 +14,5 @@ function isWarningCabinet(item) {
|
|
|
14
14
|
var _js$ccdf;
|
|
15
15
|
var js = (0, _immutable.toJSIfNeeded)(item);
|
|
16
16
|
var isCabinet = (js === null || js === void 0 ? void 0 : js.category) === _constants.ITEM_TYPE.CABINET;
|
|
17
|
-
|
|
18
|
-
var hasAssets3d = !!assets3d && Array.isArray(assets3d) && assets3d.length > 0;
|
|
19
|
-
return isCabinet && !hasAssets3d;
|
|
17
|
+
return isCabinet && !(js !== null && js !== void 0 && (_js$ccdf = js.ccdf) !== null && _js$ccdf !== void 0 && _js$ccdf.is_available_in_current_door_finish);
|
|
20
18
|
}
|