wht
This commit is contained in:
@@ -81,15 +81,10 @@ function Construct(props) {
|
||||
sendUnequip,
|
||||
} = props;
|
||||
|
||||
const fullInfo = itemInfo.items.find(i => i.item === itemEquip);
|
||||
const isSkill = fullInfo && fullInfo.skill;
|
||||
const isSpec = fullInfo && fullInfo.spec;
|
||||
const equipping = itemEquip && (isSkill || isSpec);
|
||||
|
||||
function onClick(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
if (equipping) sendVboxApply(construct.id, itemEquip);
|
||||
if (itemEquip !== null) sendVboxApply(construct.id, itemEquip);
|
||||
setItemEquip(null);
|
||||
return setActiveConstruct(construct);
|
||||
}
|
||||
@@ -128,11 +123,13 @@ function Construct(props) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const classes = `${equipping ? 'equipping' : ''}`;
|
||||
// const action = skill ? '' : 'action';
|
||||
const equip = skillList.includes(vbox.bound[itemEquip]) && !skill ? 'equipping' : '';
|
||||
const classes = `${equip}`;
|
||||
return (
|
||||
<button
|
||||
key={i}
|
||||
disabled={!skill && !equipping}
|
||||
disabled={!skill && itemEquip === null}
|
||||
class={classes}
|
||||
onClick={skillClick}
|
||||
onDblClick={skillDblClick}
|
||||
@@ -142,7 +139,7 @@ function Construct(props) {
|
||||
);
|
||||
});
|
||||
|
||||
const specs = range(0, 3).map(i => {
|
||||
const specs = range(0, 6).map(i => {
|
||||
const s = construct.specs[i];
|
||||
|
||||
if (!s) {
|
||||
@@ -155,6 +152,8 @@ function Construct(props) {
|
||||
);
|
||||
}
|
||||
|
||||
const specInfo = itemInfo.items.find(i => i.item === s);
|
||||
|
||||
function specClick(e) {
|
||||
e.stopPropagation();
|
||||
setItemUnequip(s);
|
||||
|
||||
@@ -4,6 +4,8 @@ const actions = require('./actions');
|
||||
function setupKeys(store) {
|
||||
console.log('binding keys');
|
||||
key.unbind('esc');
|
||||
|
||||
key('esc', () => document.activeElement.blur());
|
||||
key('esc', () => store.dispatch(actions.setCombiner([])));
|
||||
key('esc', () => store.dispatch(actions.setReclaiming(false)));
|
||||
key('esc', () => store.dispatch(actions.setActiveSkill(null)));
|
||||
|
||||
Reference in New Issue
Block a user