construct name and avatar and $$$ jebaited
This commit is contained in:
parent
6da01f879d
commit
50f1c6fa1b
@ -29,12 +29,13 @@ class ConstructAvatar extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { construct } = this.props;
|
const { construct, mouseOver } = this.props;
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
class="avatar"
|
class="avatar"
|
||||||
id={construct.id}
|
id={construct.id}
|
||||||
onMouseDown={this.onClick.bind(this)}
|
onMouseDown={this.onClick.bind(this)}
|
||||||
|
onMouseOver={mouseOver ? mouseOver : null}
|
||||||
style={{ 'background-image': `url(/imgs/${construct.img}.svg)` }}>
|
style={{ 'background-image': `url(/imgs/${construct.img}.svg)` }}>
|
||||||
<ConstructAnimation construct={construct} />
|
<ConstructAnimation construct={construct} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -40,7 +40,29 @@ class InfoComponent extends preact.Component {
|
|||||||
if (tutorialStageInfo) return tutorialStageInfo;
|
if (tutorialStageInfo) return tutorialStageInfo;
|
||||||
}
|
}
|
||||||
if (!info) return false;
|
if (!info) return false;
|
||||||
|
if (info.includes('constructName')) {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h2> {info.replace('constructName ', '')} </h2>
|
||||||
|
<p> This is the name of your construct. <br />
|
||||||
|
Names are randomly generated and are purely cosmetic. <br />
|
||||||
|
You can change change your construct name in the reshape tab outside of games.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (info.includes('constructAvatar')) {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h2> {info.replace('constructAvatar ', '')} </h2>
|
||||||
|
<p> This is your construct avatar. <br />
|
||||||
|
Avatars are randomly generated and are purely cosmetic. <br />
|
||||||
|
You can change your construct avatar in the reshape tab outside of games.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
const fullInfo = itemInfo.items.find(i => i.item === info) || INFO[info];
|
const fullInfo = itemInfo.items.find(i => i.item === info) || INFO[info];
|
||||||
if (!fullInfo) return false;
|
if (!fullInfo) return false;
|
||||||
const isSkill = fullInfo.skill;
|
const isSkill = fullInfo.skill;
|
||||||
|
|||||||
@ -221,11 +221,11 @@ function Construct(props) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const classes = `instance-construct ${mobileVisible ? 'visible' : ''}`;
|
const classes = `instance-construct ${mobileVisible ? 'visible' : ''}`;
|
||||||
|
const avatarMouseOver = e => hoverInfo(e, `constructAvatar ${construct.name}`);
|
||||||
return (
|
return (
|
||||||
<div key={construct.id} class={classes} onClick={onClick} >
|
<div key={construct.id} class={classes} onClick={onClick}>
|
||||||
<ConstructAvatar construct={construct} />
|
<ConstructAvatar construct={construct} mouseOver={avatarMouseOver}/>
|
||||||
<h2 class="name" >{construct.name}</h2>
|
<h2 class="name" onMouseOver={e => hoverInfo(e, `constructName ${construct.name}`)}>{construct.name}</h2>
|
||||||
<div class="skills" onMouseOver={e => hoverInfo(e, 'constructSkills')} >
|
<div class="skills" onMouseOver={e => hoverInfo(e, 'constructSkills')} >
|
||||||
{skills}
|
{skills}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user