fixt tutorial

This commit is contained in:
Mashy
2019-11-28 23:46:07 +10:00
parent 500584ab10
commit 84e3e776ca
2 changed files with 51 additions and 33 deletions
+14 -5
View File
@@ -23,8 +23,8 @@ const addState = connect(
itemInfo,
} = state;
function clearTutorial() {
return ws.clearTutorial(instance.id);
function sendInstance() {
return ws.sendInstanceState(instance.id);
}
function sendVboxRefill() {
@@ -58,7 +58,7 @@ const addState = connect(
itemInfo,
clearTutorial,
sendInstance,
sendItemUnequip,
sendVboxBuy,
sendVboxCombine,
@@ -72,6 +72,10 @@ const addState = connect(
return dispatch(actions.setInfo(item));
}
function setTutorial(stage) {
return dispatch(actions.setTutorial(stage));
}
function dispatchVboxSelect(v, state) {
setVboxState(dispatch, v, state);
dispatch(actions.setItemUnequip([]));
@@ -81,6 +85,7 @@ const addState = connect(
return {
dispatchVboxSelect,
setInfo,
setTutorial,
};
}
);
@@ -106,14 +111,15 @@ class Vbox extends preact.Component {
// Static
itemInfo,
// Function Calls
clearTutorial,
dispatchVboxSelect,
sendItemUnequip,
sendInstance,
sendVboxBuy,
sendVboxCombine,
sendVboxRefill,
sendVboxRefund,
setInfo,
setTutorial,
} = args;
if (!player) return false;
@@ -123,7 +129,10 @@ class Vbox extends preact.Component {
const setVboxSelected = v => dispatchVboxSelect(v, { itemInfo, itemUnequip, vbox });
const clearVboxSelected = () => setVboxSelected({ storeSelect: [], stashSelect: [] });
const vboxBuySelected = () => sendVboxBuy(storeSelect[0][0], storeSelect[0][1]);
const clearTutorial = () => {
setTutorial(null);
sendInstance();
};
function vboxHover(e, v) {
if (v) {
e.stopPropagation();