default general notes for vbox
This commit is contained in:
parent
6f5cf8bb39
commit
5e137af159
@ -189,12 +189,22 @@ class InfoComponent extends preact.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Combos() {
|
function Combos() {
|
||||||
if (!player) return false;
|
if (tutorial && instance.time_control === 'Practice' && instance.rounds.length === 1) return false;
|
||||||
if (!info) return false;
|
const generalNotes = (
|
||||||
if (tutorial) return false;
|
<div>
|
||||||
|
<h2> General </h2>
|
||||||
|
<p>
|
||||||
|
Create combos by clicking a white item together with two colours in the inventory. <br />
|
||||||
|
Reclaim can be used to sell items in the inventory. <br />
|
||||||
|
Click the <b>READY</b> button to start the <b>GAME PHASE</b>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
if (!player) return generalNotes;
|
||||||
|
if (!info) return generalNotes;
|
||||||
|
|
||||||
const vboxCombos = itemInfo.combos.filter(c => c.components.includes(info));
|
const vboxCombos = itemInfo.combos.filter(c => c.components.includes(info));
|
||||||
if (vboxCombos.length > 6) return false;
|
if (vboxCombos.length > 6 || vboxCombos.length === 0) return generalNotes;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<table class="combos">
|
<table class="combos">
|
||||||
|
|||||||
@ -163,7 +163,7 @@ class Vbox extends preact.Component {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (combiner.length !== 0) {
|
if (combiner.length !== 0) {
|
||||||
const base = combiner.find(c => !['Red', 'Blue', 'Green'].includes(vbox.bound[c]));
|
const base = combiner.find(c => !['Red', 'Blue', 'Green'].includes(vbox.bound[c]));
|
||||||
if (base) return setInfo(vbox.bound[base]);
|
if (base || base === 0) return setInfo(vbox.bound[base]);
|
||||||
}
|
}
|
||||||
if (info !== v) setInfo(v);
|
if (info !== v) setInfo(v);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user