fix highlighting issues
This commit is contained in:
@@ -21,7 +21,7 @@ function setVboxState(dispatch, vboxSelected, state) {
|
||||
let vboxCombiner = false;
|
||||
let vboxHighlight = false;
|
||||
|
||||
if (!(storeSelect.length === 0 && stashSelect.length === 0)) {
|
||||
if (storeSelect.length || stashSelect.length) {
|
||||
vboxHighlight = [];
|
||||
const stashItems = stashSelect.map(j => vbox.stash[j]);
|
||||
const shopItems = storeSelect.map(j => vbox.store[j[0]][j[1]]);
|
||||
@@ -66,7 +66,7 @@ function setVboxState(dispatch, vboxSelected, state) {
|
||||
|
||||
dispatch(actions.setVboxInfo(vboxInfo()));
|
||||
dispatch(actions.setVboxCombiner(vboxCombiner));
|
||||
dispatch(actions.setVboxHighlight(vboxHighlight));
|
||||
dispatch(actions.setVboxHighlight(vboxHighlight.length ? vboxHighlight : null));
|
||||
}
|
||||
|
||||
function genItemInfo(item, itemInfo, player) {
|
||||
@@ -124,5 +124,10 @@ function genItemInfo(item, itemInfo, player) {
|
||||
);
|
||||
}
|
||||
|
||||
function cost(group) {
|
||||
if (group === 'Colours') return 1;
|
||||
if (group === 'Skills') return 2;
|
||||
if (group === 'Specs') return 3;
|
||||
};
|
||||
|
||||
module.exports = { setVboxState, genItemInfo };
|
||||
module.exports = { setVboxState, genItemInfo, cost };
|
||||
|
||||
Reference in New Issue
Block a user