Added prettier (#661)

* Added prettier

* Added prettier

* Added prettier
This commit is contained in:
Daniël van Noord
2021-03-14 18:57:07 +01:00
committed by GitHub
parent f3e7964262
commit 932509a877
132 changed files with 7143 additions and 4894 deletions

View File

@@ -5,16 +5,22 @@ import { TooltipGrimoireBackup } from '../VariablesAndData';
* This function replaces the original .onmouseover functions of the Grimoire minigame
*/
export default function ReplaceTooltipGrimoire() {
if (Game.Objects['Wizard tower'].minigameLoaded) {
for (const i in Game.Objects['Wizard tower'].minigame.spellsById) {
if (l(`grimoireSpell${i}`).onmouseover !== null) {
TooltipGrimoireBackup[i] = l(`grimoireSpell${i}`).onmouseover;
l(`grimoireSpell${i}`).onmouseover = function () {
Game.tooltip.dynamic = 1;
Game.tooltip.draw(this, function () { return CreateTooltip('g', `${i}`); }, 'this');
Game.tooltip.wobble();
};
}
}
}
if (Game.Objects['Wizard tower'].minigameLoaded) {
for (const i in Game.Objects['Wizard tower'].minigame.spellsById) {
if (l(`grimoireSpell${i}`).onmouseover !== null) {
TooltipGrimoireBackup[i] = l(`grimoireSpell${i}`).onmouseover;
l(`grimoireSpell${i}`).onmouseover = function () {
Game.tooltip.dynamic = 1;
Game.tooltip.draw(
this,
function () {
return CreateTooltip('g', `${i}`);
},
'this',
);
Game.tooltip.wobble();
};
}
}
}
}