info stuff
This commit is contained in:
parent
13cd21c925
commit
6ca0ed86f4
@ -29,7 +29,7 @@ export const SET_ACTIVE_SKILL = 'SET_ACTIVE_SKILL';
|
|||||||
export const setActiveSkill = (crypId, skill) => ({ type: SET_ACTIVE_SKILL, value: crypId ? { crypId, skill } : null });
|
export const setActiveSkill = (crypId, skill) => ({ type: SET_ACTIVE_SKILL, value: crypId ? { crypId, skill } : null });
|
||||||
|
|
||||||
export const SET_INFO = 'SET_INFO';
|
export const SET_INFO = 'SET_INFO';
|
||||||
export const setInfo = value => ({ type: SET_INFO, value: Array.from(value) });
|
export const setInfo = value => ({ type: SET_INFO, value });
|
||||||
|
|
||||||
export const SET_RECLAIMING = 'SET_RECLAIMING';
|
export const SET_RECLAIMING = 'SET_RECLAIMING';
|
||||||
export const setReclaiming = value => ({ type: SET_RECLAIMING, value });
|
export const setReclaiming = value => ({ type: SET_RECLAIMING, value });
|
||||||
|
|||||||
@ -44,27 +44,26 @@ function Info(args) {
|
|||||||
<div className="info-specs">
|
<div className="info-specs">
|
||||||
{specs}
|
{specs}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (item) {
|
if (type === 'item') {
|
||||||
if (SKILLS[item]) {
|
let itemDetails;
|
||||||
itemDetails = SKILLS[item];
|
if (SKILLS[value]) {
|
||||||
} else if (SPECS[item]) {
|
itemDetails = SKILLS[value];
|
||||||
itemDetails = SPECS[item];
|
} else if (SPECS[value]) {
|
||||||
} else if (COLOURS[item]) {
|
itemDetails = SPECS[value];
|
||||||
itemDetails = COLOURS[item];
|
} else if (COLOURS[value]) {
|
||||||
|
itemDetails = COLOURS[value];
|
||||||
}
|
}
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
/* const unequip = (itemDetails && cryp)
|
|
||||||
? <button onClick={() => sendUnequip(cryp.id, item)}> unequip </button>
|
|
||||||
: null;
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="instance-info">
|
||||||
|
{itemDetails}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Info;
|
module.exports = Info;
|
||||||
|
|||||||
@ -45,7 +45,7 @@ const addState = connect(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setInfo(type, info) {
|
function setInfo(type, info) {
|
||||||
return dispatch(actions.setInfo(type, info));
|
return dispatch(actions.setInfo([type, info]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -32,8 +32,8 @@ function registerEvents(store) {
|
|||||||
store.dispatch(actions.setActiveSkill(skill));
|
store.dispatch(actions.setActiveSkill(skill));
|
||||||
}
|
}
|
||||||
|
|
||||||
function setInfo(info) {
|
function clearInfo(info) {
|
||||||
store.dispatch(actions.setInfo(info));
|
store.dispatch(actions.setInfo([]));
|
||||||
console.log('event clear item');
|
console.log('event clear item');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ function registerEvents(store) {
|
|||||||
setCryps,
|
setCryps,
|
||||||
setCrypList,
|
setCrypList,
|
||||||
setGame,
|
setGame,
|
||||||
setInfo,
|
clearInfo,
|
||||||
setMenu,
|
setMenu,
|
||||||
setPlayer,
|
setPlayer,
|
||||||
setInstanceList,
|
setInstanceList,
|
||||||
|
|||||||
@ -95,7 +95,7 @@ function createSocket(events) {
|
|||||||
|
|
||||||
function sendVboxUnequip(instanceId, crypId, target) {
|
function sendVboxUnequip(instanceId, crypId, target) {
|
||||||
send({ method: 'player_vbox_unequip', params: { instance_id: instanceId, cryp_id: crypId, target } });
|
send({ method: 'player_vbox_unequip', params: { instance_id: instanceId, cryp_id: crypId, target } });
|
||||||
events.setInfo([]);
|
events.clearInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendVboxDiscard(instanceId) {
|
function sendVboxDiscard(instanceId) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user