Complete overhaul of code structure and relevant files (#639)

This commit is contained in:
Daniël van Noord
2021-03-14 00:41:14 +01:00
committed by GitHub
parent bb34bce9a5
commit 1bffb58782
163 changed files with 7369 additions and 10882 deletions

View File

@@ -0,0 +1,20 @@
import { CreateTooltip } from '../../Disp/Tooltips/Tooltip';
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();
};
}
}
}
}