diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index 47c15f6c..7b43931e 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -248,15 +248,24 @@ function Vbox(args) { function onClick(e) { if (vboxSelecting) clearVboxSelected(); if (reclaiming) return sendVboxReclaim(i); + + // 4 things selected if (combiner.length > 2) return combinerChange([i]); + // removing const combinerIndex = combiner.indexOf(i); if (combinerIndex > -1) { return combinerChange(without(combiner, i)); } - combiner.push(i); + + // invalid combo + const combinerItems = combiner.map(j => vbox.bound[j]); + if (!itemInfo.combos.some(combo => combinerItems.every(c => combo.components.includes(c)))) { + return combinerChange([i]); + } + return combinerChange(combiner); }