forked from M-Labs/web2019
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:
parent
413ceb4fe7
commit
1d1c626127
|
@ -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};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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: [{
|
||||
|
|
Loading…
Reference in New Issue