remove tutorialGame from game.construct

This commit is contained in:
Mashy
2019-12-05 15:55:14 +10:00
parent eb12a0a96e
commit 8e90e6e0e3
3 changed files with 8 additions and 11 deletions
+1 -11
View File
@@ -89,7 +89,6 @@ const addState = connect(
animText,
gameSkillInfo,
itemInfo,
tutorialGame,
} = state;
function selectSkillTarget(targetConstructId) {
@@ -109,7 +108,6 @@ const addState = connect(
selectSkillTarget,
gameSkillInfo,
itemInfo,
tutorialGame,
};
},
@@ -118,11 +116,7 @@ const addState = connect(
dispatch(actions.setGameEffectInfo(info));
}
function setTutorialGameClear(activeSkill, tutorialGame) {
if (activeSkill && tutorialGame) dispatch(actions.setTutorialGame(null));
}
return { setGameEffectInfo, setTutorialGameClear };
return { setGameEffectInfo };
}
);
@@ -157,7 +151,6 @@ class GameConstruct extends preact.Component {
if (newProps.animating !== this.props.animating) return true;
if (newProps.construct !== this.props.construct) return true;
if (newProps.player !== this.props.player) return true;
if (newProps.tutorialGame !== this.props.tutorialGame) return true;
if (newProps.gameSkillInfo !== this.props.gameSkillInfo) return true;
return false;
}
@@ -171,14 +164,12 @@ class GameConstruct extends preact.Component {
animating,
construct,
player,
tutorialGame,
gameSkillInfo,
// Constants
i,
itemInfo,
// Functions
selectSkillTarget,
setTutorialGameClear,
setGameEffectInfo,
} = this.props;
@@ -233,7 +224,6 @@ class GameConstruct extends preact.Component {
<div
onClick={() => {
selectSkillTarget(construct.id);
setTutorialGameClear(activeSkill, tutorialGame);
}}
style={ activeSkill ? { cursor: 'pointer' } : {}}
class={`game-construct ${ko} ${cssClass}`}>