moar
This commit is contained in:
parent
7dc350159b
commit
9ef8de59f3
@ -41,6 +41,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.instance .cryps {
|
.instance .cryps {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
const preact = require('preact');
|
const preact = require('preact');
|
||||||
const range = require('lodash/range');
|
const range = require('lodash/range');
|
||||||
|
|
||||||
const { ITEMS: { SPECS: SPEC_CONSTANT } } = require('./../constants');
|
const { ITEMS: { SPECS: SPEC_CONSTANT }, INFO } = require('./../constants');
|
||||||
const { COLOUR_ICONS, convertItem } = require('../utils');
|
const { COLOUR_ICONS, convertItem } = require('../utils');
|
||||||
|
|
||||||
function Info(args) {
|
function Info(args) {
|
||||||
@ -16,7 +16,8 @@ function Info(args) {
|
|||||||
|
|
||||||
function Info() {
|
function Info() {
|
||||||
if (!info) return false;
|
if (!info) return false;
|
||||||
const fullInfo = itemInfo.items.find(i => i.item === info);
|
const fullInfo = itemInfo.items.find(i => i.item === info) || INFO[info];
|
||||||
|
console.log(INFO);
|
||||||
if (!fullInfo) return false;
|
if (!fullInfo) return false;
|
||||||
const isSkill = fullInfo.skill;
|
const isSkill = fullInfo.skill;
|
||||||
const isSpec = fullInfo.spec;
|
const isSpec = fullInfo.spec;
|
||||||
@ -34,7 +35,7 @@ function Info(args) {
|
|||||||
if (isSkill) {
|
if (isSkill) {
|
||||||
return (
|
return (
|
||||||
<div className="info-skill">
|
<div className="info-skill">
|
||||||
<div>{fullInfo.item}</div>
|
<h2>{fullInfo.item}</h2>
|
||||||
<div>{fullInfo.description}</div>
|
<div>{fullInfo.description}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@ -84,7 +85,8 @@ function Info(args) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="info-item">
|
<div className="info-item">
|
||||||
{fullInfo.item} - {fullInfo.description}
|
<h2>{fullInfo.item}</h2>
|
||||||
|
<div>{fullInfo.description}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,29 +0,0 @@
|
|||||||
const { connect } = require('preact-redux');
|
|
||||||
|
|
||||||
const actions = require('../actions');
|
|
||||||
|
|
||||||
const Instance = require('./instance.component');
|
|
||||||
|
|
||||||
const addState = connect(
|
|
||||||
function receiveState(state) {
|
|
||||||
const { ws, instance, player } = state;
|
|
||||||
|
|
||||||
function sendInstanceReady() {
|
|
||||||
return ws.sendInstanceReady(instance.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
return { instance, player, sendInstanceReady };
|
|
||||||
},
|
|
||||||
|
|
||||||
function receiveDispatch(dispatch) {
|
|
||||||
function setInfo(c) {
|
|
||||||
return dispatch(actions.setInfo(c));
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
setInfo,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
module.exports = addState(Instance);
|
|
||||||
@ -49,6 +49,8 @@ function Equipment(props) {
|
|||||||
|
|
||||||
itemInfo,
|
itemInfo,
|
||||||
sendUnequip,
|
sendUnequip,
|
||||||
|
|
||||||
|
setInfo,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const { vbox } = player;
|
const { vbox } = player;
|
||||||
@ -101,15 +103,20 @@ function Equipment(props) {
|
|||||||
} return false;
|
} return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function hoverInfo(e, info) {
|
||||||
|
e.stopPropagation();
|
||||||
|
return setInfo(info);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="equip" >
|
<div className="equip" >
|
||||||
<div className={skillClass} onClick={e => unequipClick(e)}>
|
<div className={skillClass} onClick={e => unequipClick(e)} onMouseOver={e => hoverInfo(e, 'equipSkills')} >
|
||||||
<h3>Skills</h3>
|
<h3>Skills</h3>
|
||||||
<div className ="items">
|
<div className ="items">
|
||||||
{skills}
|
{skills}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={specClass} onClick={e => unequipClick(e)}>
|
<div className={specClass} onClick={e => unequipClick(e)} onMouseOver={e => hoverInfo(e, 'equipSpecs')} >
|
||||||
<h3>Specs</h3>
|
<h3>Specs</h3>
|
||||||
<div className ="items">
|
<div className ="items">
|
||||||
{specs}
|
{specs}
|
||||||
|
|||||||
@ -63,7 +63,7 @@ function Nav(args) {
|
|||||||
setTestInstance,
|
setTestInstance,
|
||||||
} = args;
|
} = args;
|
||||||
|
|
||||||
const joined = instances.map((i, j) => (
|
const joined = instances.map(i => (
|
||||||
<button key={i.id} onClick={() => sendInstanceState(i)} >{i.name}</button>
|
<button key={i.id} onClick={() => sendInstanceState(i)} >{i.name}</button>
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|||||||
@ -169,7 +169,7 @@ function Vbox(args) {
|
|||||||
|
|
||||||
// onClick={freeClick}
|
// onClick={freeClick}
|
||||||
onDblClick={() => sendVboxAccept(j, i) }
|
onDblClick={() => sendVboxAccept(j, i) }
|
||||||
onMouseOver={(e) => vboxHover(e, c)}
|
onMouseOver={e => vboxHover(e, c)}
|
||||||
>
|
>
|
||||||
{convertItem(c)}
|
{convertItem(c)}
|
||||||
</td>;
|
</td>;
|
||||||
@ -273,18 +273,24 @@ function Vbox(args) {
|
|||||||
return setReclaiming(!reclaiming);
|
return setReclaiming(!reclaiming);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hoverInfo(e, info) {
|
||||||
|
e.stopPropagation();
|
||||||
|
return setInfo(info);
|
||||||
|
}
|
||||||
|
|
||||||
const classes = `vbox`;
|
const classes = `vbox`;
|
||||||
const reclaimClass = `instance-btn instance-ui-btn vbox-btn reclaim ${reclaiming ? 'reclaiming' : ''}`;
|
const reclaimClass = `instance-btn instance-ui-btn vbox-btn reclaim ${reclaiming ? 'reclaiming' : ''}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes}>
|
<div className={classes}>
|
||||||
<div className='vbox-box' onClick={() => setReclaiming(false)} >
|
<div className='vbox-box' onClick={() => setReclaiming(false)} onMouseOver={e => hoverInfo(e, 'vbox')} >
|
||||||
<div className="vbox-hdr">
|
<div className="vbox-hdr">
|
||||||
<h3 onTouchStart={e => e.target.scrollIntoView(true)}>VBOX</h3>
|
<h3 onTouchStart={e => e.target.scrollIntoView(true)}>VBOX</h3>
|
||||||
<div className="bits" >{vbox.bits}b</div>
|
<div className="bits" >{vbox.bits}b</div>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
className="instance-btn instance-ui-btn vbox-btn"
|
className="instance-btn instance-ui-btn vbox-btn"
|
||||||
|
onMouseOver={e => hoverInfo(e, 'reroll')}
|
||||||
onClick={() => sendVboxDiscard()}>
|
onClick={() => sendVboxDiscard()}>
|
||||||
Reroll
|
Reroll
|
||||||
</button>
|
</button>
|
||||||
@ -294,10 +300,11 @@ function Vbox(args) {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div className='vbox-inventory' onClick={() => setReclaiming(false)} >
|
<div className='vbox-inventory' onClick={() => setReclaiming(false)} onMouseOver={e => hoverInfo(e, 'inventory')} >
|
||||||
<h3 onTouchStart={e => e.target.scrollIntoView(true)}>INVENTORY</h3>
|
<h3 onTouchStart={e => e.target.scrollIntoView(true)}>INVENTORY</h3>
|
||||||
<button
|
<button
|
||||||
className={reclaimClass}
|
className={reclaimClass}
|
||||||
|
onMouseOver={e => hoverInfo(e, 'reclaim')}
|
||||||
onClick={reclaimClick}>
|
onClick={reclaimClick}>
|
||||||
reclaim
|
reclaim
|
||||||
</button>
|
</button>
|
||||||
@ -307,10 +314,11 @@ function Vbox(args) {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div className="vbox-combiner">
|
<div className="vbox-combiner" onMouseOver={e => hoverInfo(e, 'combiner')} >
|
||||||
<h3 onTouchStart={e => e.target.scrollIntoView(true)}>I-COMBINATOR</h3>
|
<h3 onTouchStart={e => e.target.scrollIntoView(true)}>I-COMBINATOR</h3>
|
||||||
<button
|
<button
|
||||||
className="instance-btn instance-ui-btn vbox-btn"
|
className="instance-btn instance-ui-btn vbox-btn"
|
||||||
|
onMouseOver={e => hoverInfo(e, 'refine')}
|
||||||
onClick={() => sendVboxCombine()}>
|
onClick={() => sendVboxCombine()}>
|
||||||
refine
|
refine
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -6,6 +6,41 @@ module.exports = {
|
|||||||
POST_SKILL: 500,
|
POST_SKILL: 500,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
INFO: {
|
||||||
|
vbox: {
|
||||||
|
item: 'VBOX',
|
||||||
|
description: 'Contains items that are available for you to buy.\nDouble-click to purchase.',
|
||||||
|
},
|
||||||
|
inventory: {
|
||||||
|
item: 'INVENTORY',
|
||||||
|
description: 'Holds purchased items.',
|
||||||
|
},
|
||||||
|
combiner: {
|
||||||
|
item: 'I-COMBINATOR',
|
||||||
|
description: 'Combines purchased items into more powerful variants. Hover over an item to see recipes.',
|
||||||
|
},
|
||||||
|
reclaim: {
|
||||||
|
item: 'RECLAIM',
|
||||||
|
description: 'Reclaim items for half the purchase cost of their combined items.\nClick to enable and click item to reclaim.',
|
||||||
|
},
|
||||||
|
refine: {
|
||||||
|
item: 'REFINE',
|
||||||
|
description: 'Refine items currently in I-COMBINATOR into more powerful variants',
|
||||||
|
},
|
||||||
|
reroll: {
|
||||||
|
item: 'REROLL',
|
||||||
|
description: 'Refill the VBOX with new items.\nCosts 5b.',
|
||||||
|
},
|
||||||
|
equipSkills: {
|
||||||
|
item: 'QUICK ACCESS - SKILLS',
|
||||||
|
description: 'Click to select \nClick target Cryp to equip',
|
||||||
|
},
|
||||||
|
equipSpecs: {
|
||||||
|
item: 'QUICK ACCESS - SPECS',
|
||||||
|
description: 'Click to select \nClick target Cryp to equip',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
ITEMS: {
|
ITEMS: {
|
||||||
SKILLS: {
|
SKILLS: {
|
||||||
Amplify: {
|
Amplify: {
|
||||||
@ -21,7 +56,6 @@ module.exports = {
|
|||||||
Banish: {
|
Banish: {
|
||||||
description: 'target cryp is prevented from casting any skills and taking any damage',
|
description: 'target cryp is prevented from casting any skills and taking any damage',
|
||||||
colours: '1 Red 1 Green',
|
colours: '1 Red 1 Green',
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
Blast: {
|
Blast: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user