lil fixes
This commit is contained in:
parent
bedd6814a7
commit
cc82c3811c
@ -78,6 +78,7 @@ function InfoCryp(args) {
|
||||
e.stopPropagation();
|
||||
setActiveCryp(cryp);
|
||||
setInfo('highlight', 'spec');
|
||||
setVboxHidden(true);
|
||||
}
|
||||
|
||||
if (!s) {
|
||||
|
||||
@ -21,6 +21,7 @@ function Vbox(args) {
|
||||
setCombiner,
|
||||
setInfo,
|
||||
setReclaiming,
|
||||
showTeam,
|
||||
vboxHidden,
|
||||
vboxInfo,
|
||||
} = args;
|
||||
@ -97,8 +98,10 @@ function Vbox(args) {
|
||||
//
|
||||
function boundClick(e, i, highlight) {
|
||||
if (reclaiming && vbox.bound[i]) sendVboxReclaim(i);
|
||||
else if (highlight && activeCryp) sendVboxApply(i);
|
||||
else if (vbox.bound[i]) {
|
||||
else if (highlight && activeCryp) {
|
||||
sendVboxApply(i);
|
||||
showTeam();
|
||||
} else if (vbox.bound[i]) {
|
||||
const insert = combiner.findIndex(j => j === null);
|
||||
if (insert === -1) return setCombiner([i, null, null]);
|
||||
combiner[insert] = i;
|
||||
|
||||
@ -70,15 +70,22 @@ const addState = connect(
|
||||
return dispatch(actions.setInfo([type, info]));
|
||||
}
|
||||
|
||||
function setActiveVar(v) {
|
||||
return dispatch(actions.setActiveVar(v));
|
||||
function setActiveCryp(v) {
|
||||
return dispatch(actions.setActiveCryp(v));
|
||||
}
|
||||
|
||||
function showTeam() {
|
||||
dispatch(actions.setInfo([null, null]));
|
||||
dispatch(actions.setVboxHidden(true));
|
||||
return true;
|
||||
}
|
||||
|
||||
return {
|
||||
setCombiner,
|
||||
setReclaiming,
|
||||
setInfo,
|
||||
setActiveVar,
|
||||
setActiveCryp,
|
||||
showTeam,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -133,6 +133,7 @@ function registerEvents(store) {
|
||||
const player = v.players.find(p => p.id === account.id);
|
||||
if (player) store.dispatch(actions.setPlayer(player));
|
||||
if (v) ws.startInstanceStateTimeout(v.id);
|
||||
if (v.phase === 'Lobby') store.dispatch(actions.setVboxHidden(true));
|
||||
return store.dispatch(actions.setInstance(v));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user