feat(issue23): Adds rule to Order Hardware

"The selected cards fit in a 42hp desktop crate,
consider switching to it for a more compact system"

Also update shop build
This commit is contained in:
sovanna 2020-01-27 16:09:29 +01:00
parent 413ceb4fe7
commit 1d1c626127
3 changed files with 10 additions and 0 deletions

View File

@ -1496,6 +1496,8 @@ class Shop extends React.PureComponent {
const nbrOccupied = nbrOccupiedSlotsInCrate(newItems);
if (nbrOccupied > crateModeSlots[currentMode]) {
rules[crateRules.maxSlot.type] = {...crateRules.maxSlot};
} else if (crateModeSlots[currentMode] === 21 && nbrOccupied <= 10) {
rules[crateRules.compactSlot.type] = {...crateRules.compactSlot};
}

View File

@ -1534,6 +1534,8 @@ function (_React$PureComponent12) {
if (nbrOccupied > crateModeSlots[currentMode]) {
rules[crateRules.maxSlot.type] = _objectSpread({}, crateRules.maxSlot);
} else if (crateModeSlots[currentMode] === 21 && nbrOccupied <= 10) {
rules[crateRules.compactSlot.type] = _objectSpread({}, crateRules.compactSlot);
} // check the number of EEM connectors available for all Kasli

View File

@ -18,6 +18,12 @@ const shop_data = {
name: 'Crate',
message: 'You have reach the maximum number of slots allowed for this crate. Consider removing cards.',
},
compactSlot: {
type: 'crate',
icon: '/shop/icon-reminder.svg',
name: 'Crate',
message: 'The selected cards fit in a 42hp desktop crate, consider switching to it for a more compact system',
},
},
crateModeItems: [{