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 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 setReclaiming = value => ({ type: SET_RECLAIMING, value });
|
||||
|
||||
@ -44,27 +44,26 @@ function Info(args) {
|
||||
<div className="info-specs">
|
||||
{specs}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/*if (item) {
|
||||
if (SKILLS[item]) {
|
||||
itemDetails = SKILLS[item];
|
||||
} else if (SPECS[item]) {
|
||||
itemDetails = SPECS[item];
|
||||
} else if (COLOURS[item]) {
|
||||
itemDetails = COLOURS[item];
|
||||
if (type === 'item') {
|
||||
let itemDetails;
|
||||
if (SKILLS[value]) {
|
||||
itemDetails = SKILLS[value];
|
||||
} else if (SPECS[value]) {
|
||||
itemDetails = SPECS[value];
|
||||
} 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;
|
||||
|
||||
@ -45,7 +45,7 @@ const addState = connect(
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
function setInfo(info) {
|
||||
store.dispatch(actions.setInfo(info));
|
||||
function clearInfo(info) {
|
||||
store.dispatch(actions.setInfo([]));
|
||||
console.log('event clear item');
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ function registerEvents(store) {
|
||||
setCryps,
|
||||
setCrypList,
|
||||
setGame,
|
||||
setInfo,
|
||||
clearInfo,
|
||||
setMenu,
|
||||
setPlayer,
|
||||
setInstanceList,
|
||||
|
||||
@ -95,7 +95,7 @@ function createSocket(events) {
|
||||
|
||||
function sendVboxUnequip(instanceId, crypId, target) {
|
||||
send({ method: 'player_vbox_unequip', params: { instance_id: instanceId, cryp_id: crypId, target } });
|
||||
events.setInfo([]);
|
||||
events.clearInfo();
|
||||
}
|
||||
|
||||
function sendVboxDiscard(instanceId) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user