remove combiner, vboxSelected fields "shopSelect & stashSelect"
This commit is contained in:
parent
e35c688cff
commit
af99883ced
@ -16,7 +16,6 @@ export const setInstanceChat = value => ({ type: 'SET_INSTANCE_CHAT', value });
|
|||||||
|
|
||||||
export const setActiveItem = value => ({ type: 'SET_ACTIVE_VAR', value });
|
export const setActiveItem = value => ({ type: 'SET_ACTIVE_VAR', value });
|
||||||
export const setActiveSkill = (constructId, skill) => ({ type: 'SET_ACTIVE_SKILL', value: constructId ? { constructId, skill } : null });
|
export const setActiveSkill = (constructId, skill) => ({ type: 'SET_ACTIVE_SKILL', value: constructId ? { constructId, skill } : null });
|
||||||
export const setCombiner = value => ({ type: 'SET_COMBINER', value: Array.from(value) });
|
|
||||||
export const setConstructEditId = value => ({ type: 'SET_CONSTRUCT_EDIT_ID', value });
|
export const setConstructEditId = value => ({ type: 'SET_CONSTRUCT_EDIT_ID', value });
|
||||||
export const setConstructs = value => ({ type: 'SET_CONSTRUCTS', value });
|
export const setConstructs = value => ({ type: 'SET_CONSTRUCTS', value });
|
||||||
export const setConstructRename = value => ({ type: 'SET_CONSTRUCT_RENAME', value });
|
export const setConstructRename = value => ({ type: 'SET_CONSTRUCT_RENAME', value });
|
||||||
|
|||||||
@ -33,7 +33,6 @@ const addState = connect(
|
|||||||
function accountPage() {
|
function accountPage() {
|
||||||
dispatch(actions.setGame(null));
|
dispatch(actions.setGame(null));
|
||||||
dispatch(actions.setInstance(null));
|
dispatch(actions.setInstance(null));
|
||||||
dispatch(actions.setCombiner([]));
|
|
||||||
dispatch(actions.setReclaiming(false));
|
dispatch(actions.setReclaiming(false));
|
||||||
dispatch(actions.setActiveSkill(null));
|
dispatch(actions.setActiveSkill(null));
|
||||||
dispatch(actions.setInfo(null));
|
dispatch(actions.setInfo(null));
|
||||||
|
|||||||
@ -32,7 +32,6 @@ const addState = connect(
|
|||||||
function setNav(place) {
|
function setNav(place) {
|
||||||
dispatch(actions.setGame(null));
|
dispatch(actions.setGame(null));
|
||||||
dispatch(actions.setInstance(null));
|
dispatch(actions.setInstance(null));
|
||||||
dispatch(actions.setCombiner([]));
|
|
||||||
dispatch(actions.setReclaiming(false));
|
dispatch(actions.setReclaiming(false));
|
||||||
dispatch(actions.setActiveSkill(null));
|
dispatch(actions.setActiveSkill(null));
|
||||||
dispatch(actions.setInfo(null));
|
dispatch(actions.setInfo(null));
|
||||||
|
|||||||
@ -7,7 +7,6 @@ const addState = connect(
|
|||||||
function receiveState(state) {
|
function receiveState(state) {
|
||||||
const {
|
const {
|
||||||
ws,
|
ws,
|
||||||
combiner,
|
|
||||||
info,
|
info,
|
||||||
itemInfo,
|
itemInfo,
|
||||||
instance,
|
instance,
|
||||||
@ -18,7 +17,6 @@ const addState = connect(
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
ws,
|
ws,
|
||||||
combiner,
|
|
||||||
info,
|
info,
|
||||||
itemInfo,
|
itemInfo,
|
||||||
instance,
|
instance,
|
||||||
|
|||||||
@ -27,11 +27,10 @@ const addState = connect(
|
|||||||
|
|
||||||
|
|
||||||
function clearItems() {
|
function clearItems() {
|
||||||
dispatch(actions.setCombiner([]));
|
|
||||||
dispatch(actions.setReclaiming(false));
|
dispatch(actions.setReclaiming(false));
|
||||||
dispatch(actions.setItemUnequip([]));
|
dispatch(actions.setItemUnequip([]));
|
||||||
dispatch(actions.setVboxHighlight([]));
|
dispatch(actions.setVboxHighlight([]));
|
||||||
dispatch(actions.setVboxSelected({ vbox: [], combiner: [] }));
|
dispatch(actions.setVboxSelected({ shopSelect: [], stashSelect: [] }));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ const addState = connect(
|
|||||||
} = state;
|
} = state;
|
||||||
|
|
||||||
function sendVboxAcceptEquip(constructId) {
|
function sendVboxAcceptEquip(constructId) {
|
||||||
return ws.sendVboxAcceptEquip(instance.id, vboxSelected.vbox[0][0], vboxSelected.vbox[0][1], constructId);
|
return ws.sendVboxAcceptEquip(instance.id, vboxSelected.shopSelect[0][0], vboxSelected.shopSelect[0][1], constructId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendVboxApply(constructId, i) {
|
function sendVboxApply(constructId, i) {
|
||||||
@ -60,8 +60,7 @@ const addState = connect(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setItemUnequip(v) {
|
function setItemUnequip(v) {
|
||||||
dispatch(actions.setVboxSelected({ vbox: [], combiner: [] }));
|
dispatch(actions.setVboxSelected({ shopSelect: [], stashSelect: [] }));
|
||||||
dispatch(actions.setCombiner([]));
|
|
||||||
return dispatch(actions.setItemUnequip(v));
|
return dispatch(actions.setItemUnequip(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,8 +91,8 @@ function Construct(props) {
|
|||||||
|
|
||||||
const { vbox } = player;
|
const { vbox } = player;
|
||||||
|
|
||||||
const itemEquip = vboxSelected.vbox.length === 0 && vboxSelected.combiner.length === 1
|
const itemEquip = vboxSelected.shopSelect.length === 0 && vboxSelected.stashSelect.length === 1
|
||||||
? vboxSelected.combiner[0]
|
? vboxSelected.stashSelect[0]
|
||||||
: -1;
|
: -1;
|
||||||
|
|
||||||
const duplicateSkill = construct.skills.length !== 0 && construct.skills.every(sk => {
|
const duplicateSkill = construct.skills.length !== 0 && construct.skills.every(sk => {
|
||||||
@ -107,7 +106,7 @@ function Construct(props) {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (duplicateSkill || tutorialDisableEquip) return true;
|
if (duplicateSkill || tutorialDisableEquip) return true;
|
||||||
if (itemEquip !== -1) return sendVboxApply(construct.id, itemEquip);
|
if (itemEquip !== -1) return sendVboxApply(construct.id, itemEquip);
|
||||||
if (vboxSelected.vbox.length === 1) return sendVboxAcceptEquip(construct.id);
|
if (vboxSelected.shopSelect.length === 1) return sendVboxAcceptEquip(construct.id);
|
||||||
if (itemUnequip.length && itemUnequip[0] !== construct.id) return sendVboxUnequipApply(construct.id);
|
if (itemUnequip.length && itemUnequip[0] !== construct.id) return sendVboxUnequipApply(construct.id);
|
||||||
setItemUnequip([]);
|
setItemUnequip([]);
|
||||||
return true;
|
return true;
|
||||||
@ -115,7 +114,7 @@ function Construct(props) {
|
|||||||
function hoverInfo(e, info) {
|
function hoverInfo(e, info) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (!info) return false;
|
if (!info) return false;
|
||||||
if (vboxSelected.vbox.length || itemEquip > -1) return false;
|
if (vboxSelected.shopSelect.length || vboxSelected.stashSelect.length) return false;
|
||||||
return setInfo(info);
|
return setInfo(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,6 @@ const addState = connect(
|
|||||||
function setNav(place) {
|
function setNav(place) {
|
||||||
dispatch(actions.setGame(null));
|
dispatch(actions.setGame(null));
|
||||||
dispatch(actions.setInstance(null));
|
dispatch(actions.setInstance(null));
|
||||||
dispatch(actions.setCombiner([]));
|
|
||||||
dispatch(actions.setReclaiming(false));
|
dispatch(actions.setReclaiming(false));
|
||||||
dispatch(actions.setActiveSkill(null));
|
dispatch(actions.setActiveSkill(null));
|
||||||
dispatch(actions.setInfo(null));
|
dispatch(actions.setInfo(null));
|
||||||
|
|||||||
@ -15,7 +15,6 @@ const addState = connect(
|
|||||||
ws,
|
ws,
|
||||||
instance,
|
instance,
|
||||||
player,
|
player,
|
||||||
combiner,
|
|
||||||
reclaiming,
|
reclaiming,
|
||||||
vboxSelected,
|
vboxSelected,
|
||||||
itemInfo,
|
itemInfo,
|
||||||
@ -33,7 +32,7 @@ const addState = connect(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function sendVboxCombine() {
|
function sendVboxCombine() {
|
||||||
return ws.sendVboxCombine(instance.id, vboxSelected.combiner, vboxSelected.vbox);
|
return ws.sendVboxCombine(instance.id, vboxSelected.stashSelect, vboxSelected.shopSelect);
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendVboxReclaim(i) {
|
function sendVboxReclaim(i) {
|
||||||
@ -45,7 +44,6 @@ const addState = connect(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
combiner,
|
|
||||||
instance,
|
instance,
|
||||||
player,
|
player,
|
||||||
reclaiming,
|
reclaiming,
|
||||||
@ -62,15 +60,9 @@ const addState = connect(
|
|||||||
},
|
},
|
||||||
|
|
||||||
function receiveDispatch(dispatch) {
|
function receiveDispatch(dispatch) {
|
||||||
function setCombiner(c) {
|
|
||||||
dispatch(actions.setItemUnequip([]));
|
|
||||||
return dispatch(actions.setCombiner(c));
|
|
||||||
}
|
|
||||||
|
|
||||||
function setReclaiming(v) {
|
function setReclaiming(v) {
|
||||||
dispatch(actions.setItemUnequip([]));
|
dispatch(actions.setItemUnequip([]));
|
||||||
dispatch(actions.setCombiner([]));
|
dispatch(actions.setVboxSelected({ shopSelect: [], stashSelect: [] }));
|
||||||
dispatch(actions.setVboxSelected({ vbox: [], combiner: [] }));
|
|
||||||
return dispatch(actions.setReclaiming(v));
|
return dispatch(actions.setReclaiming(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +77,6 @@ const addState = connect(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
setCombiner,
|
|
||||||
setReclaiming,
|
setReclaiming,
|
||||||
setInfo,
|
setInfo,
|
||||||
setVboxSelected,
|
setVboxSelected,
|
||||||
@ -97,7 +88,6 @@ const addState = connect(
|
|||||||
class Vbox extends preact.Component {
|
class Vbox extends preact.Component {
|
||||||
shouldComponentUpdate(newProps) {
|
shouldComponentUpdate(newProps) {
|
||||||
// Single variable props
|
// Single variable props
|
||||||
if (newProps.combiner !== this.props.combiner) return true;
|
|
||||||
if (newProps.itemUnequip !== this.props.itemUnequip) return true;
|
if (newProps.itemUnequip !== this.props.itemUnequip) return true;
|
||||||
if (newProps.reclaiming !== this.props.reclaiming) return true;
|
if (newProps.reclaiming !== this.props.reclaiming) return true;
|
||||||
if (newProps.tutorial !== this.props.tutorial) return true;
|
if (newProps.tutorial !== this.props.tutorial) return true;
|
||||||
@ -132,11 +122,12 @@ class Vbox extends preact.Component {
|
|||||||
|
|
||||||
if (!player) return false;
|
if (!player) return false;
|
||||||
const { vbox } = player;
|
const { vbox } = player;
|
||||||
const { combiner } = vboxSelected;
|
const { shopSelect, stashSelect } = vboxSelected;
|
||||||
const vboxSelecting = vboxSelected.vbox.length;
|
console.log(vboxSelected);
|
||||||
|
const vboxSelecting = shopSelect.length;
|
||||||
|
|
||||||
function combinerChange(newCombiner) {
|
function combinerChange(newStashSelect) {
|
||||||
return setVboxSelected({ vbox: vboxSelected.vbox, combiner: newCombiner });
|
return setVboxSelected({ shopSelect, stashSelect: newStashSelect });
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -145,9 +136,9 @@ class Vbox extends preact.Component {
|
|||||||
function vboxHover(e, v) {
|
function vboxHover(e, v) {
|
||||||
if (v) {
|
if (v) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (vboxSelected.vbox[0]) return true; // There is a base skill or spec selected in the vbox
|
if (shopSelect[0]) return true; // There is a base skill or spec selected in the vbox
|
||||||
if (combiner.length !== 0) {
|
if (stashSelect.length !== 0) {
|
||||||
const base = combiner.find(c => !['Red', 'Blue', 'Green'].includes(vbox.bound[c]));
|
const base = stashSelect.find(c => !['Red', 'Blue', 'Green'].includes(vbox.bound[c]));
|
||||||
if (base || base === 0) return true;
|
if (base || base === 0) return true;
|
||||||
}
|
}
|
||||||
setInfo(v);
|
setInfo(v);
|
||||||
@ -156,28 +147,28 @@ class Vbox extends preact.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function clearVboxSelected() {
|
function clearVboxSelected() {
|
||||||
setVboxSelected({ vbox: [], combiner });
|
setVboxSelected({ shopSelect: [], stashSelect: [] });
|
||||||
}
|
}
|
||||||
|
|
||||||
function vboxBuySelected() {
|
function vboxBuySelected() {
|
||||||
if (!vboxSelecting) return false;
|
if (!vboxSelecting) return false;
|
||||||
document.activeElement.blur();
|
document.activeElement.blur();
|
||||||
clearVboxSelected();
|
sendVboxAccept(shopSelect[0][0], shopSelect[0][1]);
|
||||||
sendVboxAccept(vboxSelected.vbox[0][0], vboxSelected.vbox[0][1]);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function availableBtn(v, group, index) {
|
function availableBtn(v, group, index) {
|
||||||
if (!v) return <button disabled class='empty' key={(group * 10) + index} > </button>;
|
if (!v) return <button disabled class='empty' key={(group * 10) + index} > </button>;
|
||||||
const selected = vboxSelected.vbox.length && vboxSelected.vbox.some(vs => vs[0] === group && vs[1] === index);
|
const selected = shopSelect.length && shopSelect.some(vs => vs[0] === group && vs[1] === index);
|
||||||
// state not yet set in double click handler
|
// state not yet set in double click handler
|
||||||
/*function onDblClick(e) {
|
/*function onDblClick(e) {
|
||||||
clearVboxSelected();
|
clearVboxSelected();
|
||||||
sendVboxAccept(group, index);
|
sendVboxAccept(group, index);
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}*/
|
}*/
|
||||||
|
console.log(stashSelect);
|
||||||
const combinerItems = combiner.map(j => vbox.bound[j]);
|
console.log(vboxSelected);
|
||||||
|
const combinerItems = stashSelect.map(j => vbox.bound[j]);
|
||||||
const combinerCount = countBy(combinerItems, co => co);
|
const combinerCount = countBy(combinerItems, co => co);
|
||||||
|
|
||||||
const comboHighlight = combinerItems.length > 0 && itemInfo.combos.some(combo => {
|
const comboHighlight = combinerItems.length > 0 && itemInfo.combos.some(combo => {
|
||||||
@ -195,15 +186,15 @@ class Vbox extends preact.Component {
|
|||||||
function onClick(e) {
|
function onClick(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
setInfo(vbox.free[group][index]);
|
setInfo(vbox.free[group][index]);
|
||||||
if (vboxSelected.vbox.length && vboxSelected.vbox.some(vs => vs[0] === group && vs[1] === index)) {
|
if (shopSelect.length && shopSelect.some(vs => vs[0] === group && vs[1] === index)) {
|
||||||
return setVboxSelected({ vbox: vboxSelected.vbox.filter(vs => !(vs[0] === group && vs[1] === index)), combiner });
|
return setVboxSelected({ shopSelect: shopSelect.filter(vs => !(vs[0] === group && vs[1] === index)), stashSelect });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!vboxSelected.vbox.length && !combiner.length) return setVboxSelected({ vbox: [[group, index]], combiner });
|
if (!shopSelect.length && !stashSelect.length) return setVboxSelected({ shopSelect: [[group, index]], stashSelect });
|
||||||
if (comboHighlight !== 'combo-border') {
|
if (comboHighlight !== 'combo-border') {
|
||||||
return setVboxSelected({ vbox: [[group, index]], combiner: [] });
|
return setVboxSelected({ shopSelect: [[group, index]], stashSelect: [] });
|
||||||
}
|
}
|
||||||
return setVboxSelected({ vbox: [...vboxSelected.vbox, [group, index]], combiner });
|
return setVboxSelected({ shopSelect: [...shopSelect, [group, index]], stashSelect });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -280,7 +271,7 @@ class Vbox extends preact.Component {
|
|||||||
return <button key={i} onClick={emptyInvClick} disabled={!inventoryHighlight} class={inventoryHighlight ? 'receiving' : 'empty'} > </button>;
|
return <button key={i} onClick={emptyInvClick} disabled={!inventoryHighlight} class={inventoryHighlight ? 'receiving' : 'empty'} > </button>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const combinerItems = combiner.map(j => vbox.bound[j]);
|
const combinerItems = stashSelect.map(j => vbox.bound[j]);
|
||||||
const combinerCount = countBy(combinerItems, co => co);
|
const combinerCount = countBy(combinerItems, co => co);
|
||||||
|
|
||||||
const comboItem = itemInfo.combos.find(combo => {
|
const comboItem = itemInfo.combos.find(combo => {
|
||||||
@ -299,16 +290,16 @@ class Vbox extends preact.Component {
|
|||||||
function onClick(type) {
|
function onClick(type) {
|
||||||
if (reclaiming) return sendVboxReclaim(i);
|
if (reclaiming) return sendVboxReclaim(i);
|
||||||
|
|
||||||
const combinerContainsIndex = combiner.indexOf(i) > -1;
|
const combinerContainsIndex = stashSelect.indexOf(i) > -1;
|
||||||
// 4 things selected
|
// 4 things selected
|
||||||
if (combiner.length > 2 && !combinerContainsIndex) {
|
if (stashSelect.length > 2 && !combinerContainsIndex) {
|
||||||
setInfo(vbox.bound[i]);
|
setInfo(vbox.bound[i]);
|
||||||
return combinerChange([i]);
|
return combinerChange([i]);
|
||||||
}
|
}
|
||||||
// removing
|
// removing
|
||||||
if (combinerContainsIndex) {
|
if (combinerContainsIndex) {
|
||||||
if (type === 'click') {
|
if (type === 'click') {
|
||||||
return combinerChange(without(combiner, i));
|
return combinerChange(without(stashSelect, i));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -318,12 +309,12 @@ class Vbox extends preact.Component {
|
|||||||
return combinerChange([i]);
|
return combinerChange([i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
combiner.push(i);
|
stashSelect.push(i);
|
||||||
if (combiner.length === 3) setInfo(comboItem.item);
|
if (stashSelect.length === 3) setInfo(comboItem.item);
|
||||||
return combinerChange(combiner);
|
return combinerChange(stashSelect);
|
||||||
}
|
}
|
||||||
|
|
||||||
const highlighted = combiner.indexOf(i) > -1;
|
const highlighted = stashSelect.indexOf(i) > -1;
|
||||||
const border = buttons[removeTier(v)] ? buttons[removeTier(v)]() : '';
|
const border = buttons[removeTier(v)] ? buttons[removeTier(v)]() : '';
|
||||||
const classes = `${highlighted ? 'highlight' : border} ${comboHighlight}`;
|
const classes = `${highlighted ? 'highlight' : border} ${comboHighlight}`;
|
||||||
|
|
||||||
@ -351,9 +342,9 @@ class Vbox extends preact.Component {
|
|||||||
function combinerBtn() {
|
function combinerBtn() {
|
||||||
let text = '';
|
let text = '';
|
||||||
let comboItem = '';
|
let comboItem = '';
|
||||||
if (combiner.length < 3) {
|
if (stashSelect.length < 3) {
|
||||||
for (let i = 0; i < 3; i++) {
|
for (let i = 0; i < 3; i++) {
|
||||||
if (combiner.length > i) {
|
if (stashSelect.length > i) {
|
||||||
text += '■ ';
|
text += '■ ';
|
||||||
} else {
|
} else {
|
||||||
text += '▫ ';
|
text += '▫ ';
|
||||||
@ -361,7 +352,7 @@ class Vbox extends preact.Component {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Since theres 3 items in combiner and you can't have invalid combos we can preview it
|
// Since theres 3 items in combiner and you can't have invalid combos we can preview it
|
||||||
const combinerItems = combiner.map(j => vbox.bound[j]);
|
const combinerItems = stashSelect.map(j => vbox.bound[j]);
|
||||||
const combinerCount = countBy(combinerItems, co => co);
|
const combinerCount = countBy(combinerItems, co => co);
|
||||||
const comboItemObj = itemInfo.combos.find(combo => combinerItems.every(c => {
|
const comboItemObj = itemInfo.combos.find(combo => combinerItems.every(c => {
|
||||||
if (!combo.components.includes(c)) return false;
|
if (!combo.components.includes(c)) return false;
|
||||||
@ -429,9 +420,9 @@ class Vbox extends preact.Component {
|
|||||||
function hoverInfo(e, newInfo) {
|
function hoverInfo(e, newInfo) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
||||||
if (vboxSelected.vbox[0]) return true;
|
if (shopSelect[0]) return true;
|
||||||
if (combiner.length !== 0) {
|
if (stashSelect.length !== 0) {
|
||||||
const base = combiner.find(c => !['Red', 'Blue', 'Green'].includes(vbox.bound[c]));
|
const base = stashSelect.find(c => !['Red', 'Blue', 'Green'].includes(vbox.bound[c]));
|
||||||
if (base || base === 0) return true;
|
if (base || base === 0) return true;
|
||||||
}
|
}
|
||||||
return setInfo(newInfo);
|
return setInfo(newInfo);
|
||||||
|
|||||||
@ -157,11 +157,6 @@ function registerEvents(store) {
|
|||||||
store.dispatch(actions.setShop(v));
|
store.dispatch(actions.setShop(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearCombiner() {
|
|
||||||
store.dispatch(actions.setInfo([]));
|
|
||||||
store.dispatch(actions.setCombiner([]));
|
|
||||||
}
|
|
||||||
|
|
||||||
function clearConstructRename() {
|
function clearConstructRename() {
|
||||||
store.dispatch(actions.setConstructRename(null));
|
store.dispatch(actions.setConstructRename(null));
|
||||||
}
|
}
|
||||||
@ -184,13 +179,12 @@ function registerEvents(store) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function clearInstance() {
|
function clearInstance() {
|
||||||
store.dispatch(actions.setCombiner([]));
|
|
||||||
store.dispatch(actions.setReclaiming(false));
|
store.dispatch(actions.setReclaiming(false));
|
||||||
store.dispatch(actions.setActiveSkill(null));
|
store.dispatch(actions.setActiveSkill(null));
|
||||||
store.dispatch(actions.setInfo(null));
|
store.dispatch(actions.setInfo(null));
|
||||||
store.dispatch(actions.setItemUnequip([]));
|
store.dispatch(actions.setItemUnequip([]));
|
||||||
store.dispatch(actions.setVboxHighlight([]));
|
store.dispatch(actions.setVboxHighlight([]));
|
||||||
store.dispatch(actions.setVboxSelected({ vbox: [], combiner: [] }));
|
store.dispatch(actions.setVboxSelected({ shopSelect: [], stashSelect: [] }));
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAccountInstances(v) {
|
function setAccountInstances(v) {
|
||||||
@ -344,7 +338,6 @@ function registerEvents(store) {
|
|||||||
window.addEventListener('hashchange', urlHashChange, false);
|
window.addEventListener('hashchange', urlHashChange, false);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
clearCombiner,
|
|
||||||
clearConstructRename,
|
clearConstructRename,
|
||||||
clearInfo,
|
clearInfo,
|
||||||
clearInstance,
|
clearInstance,
|
||||||
|
|||||||
@ -6,13 +6,12 @@ function setupKeys(store) {
|
|||||||
key.unbind('esc');
|
key.unbind('esc');
|
||||||
|
|
||||||
key('esc', () => document.activeElement.blur());
|
key('esc', () => document.activeElement.blur());
|
||||||
key('esc', () => store.dispatch(actions.setCombiner([])));
|
|
||||||
key('esc', () => store.dispatch(actions.setReclaiming(false)));
|
key('esc', () => store.dispatch(actions.setReclaiming(false)));
|
||||||
key('esc', () => store.dispatch(actions.setActiveSkill(null)));
|
key('esc', () => store.dispatch(actions.setActiveSkill(null)));
|
||||||
key('esc', () => store.dispatch(actions.setInfo(null)));
|
key('esc', () => store.dispatch(actions.setInfo(null)));
|
||||||
key('esc', () => store.dispatch(actions.setItemUnequip([])));
|
key('esc', () => store.dispatch(actions.setItemUnequip([])));
|
||||||
key('esc', () => store.dispatch(actions.setVboxHighlight([])));
|
key('esc', () => store.dispatch(actions.setVboxHighlight([])));
|
||||||
key('esc', () => store.dispatch(actions.setVboxSelected({ vbox: [], combiner: [] })));
|
key('esc', () => store.dispatch(actions.setVboxSelected({ shopSelect: [], stashSelect: [] })));
|
||||||
key('esc', () => store.dispatch(actions.setMtxActive(null)));
|
key('esc', () => store.dispatch(actions.setMtxActive(null)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,6 @@ module.exports = {
|
|||||||
chatShow: createReducer(null, 'SET_CHAT_SHOW'),
|
chatShow: createReducer(null, 'SET_CHAT_SHOW'),
|
||||||
chatWheel: createReducer([], 'SET_CHAT_WHEEL'),
|
chatWheel: createReducer([], 'SET_CHAT_WHEEL'),
|
||||||
|
|
||||||
combiner: createReducer([], 'SET_COMBINER'),
|
|
||||||
constructs: createReducer([], 'SET_CONSTRUCTS'),
|
constructs: createReducer([], 'SET_CONSTRUCTS'),
|
||||||
constructEditId: createReducer(null, 'SET_CONSTRUCT_EDIT_ID'),
|
constructEditId: createReducer(null, 'SET_CONSTRUCT_EDIT_ID'),
|
||||||
constructRename: createReducer(null, 'SET_CONSTRUCT_RENAME'),
|
constructRename: createReducer(null, 'SET_CONSTRUCT_RENAME'),
|
||||||
@ -58,7 +57,7 @@ module.exports = {
|
|||||||
tutorial: createReducer(1, 'SET_TUTORIAL'),
|
tutorial: createReducer(1, 'SET_TUTORIAL'),
|
||||||
tutorialGame: createReducer(1, 'SET_TUTORIAL_GAME'),
|
tutorialGame: createReducer(1, 'SET_TUTORIAL_GAME'),
|
||||||
|
|
||||||
vboxSelected: createReducer({ vbox: [], combiner: [] }, 'SET_VBOX_SELECTED'),
|
vboxSelected: createReducer({ shopSelect: [], stashSelect: [] }, 'SET_VBOX_SELECTED'),
|
||||||
|
|
||||||
ws: createReducer(null, 'SET_WS'),
|
ws: createReducer(null, 'SET_WS'),
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user