Fix inconsistent event triggers on BH unlock

This commit is contained in:
SpectralFlame 2023-05-10 18:22:51 -05:00 committed by cyip92
parent c7ad30a581
commit 65c2b532f4
3 changed files with 5 additions and 5 deletions

View File

@ -347,8 +347,6 @@ export const BlackHoles = {
if (!this.canBeUnlocked) return;
player.blackHole[0].unlocked = true;
Currency.realityMachines.purchase(100);
SpeedrunMilestones(17).tryComplete();
Achievement(144).unlock();
player.records.timePlayedAtBHUnlock = player.records.totalTimePlayed;
EventHub.dispatch(GAME_EVENT.BLACK_HOLE_UNLOCKED);
},

View File

@ -1028,7 +1028,7 @@ GameDatabase.achievements.normal = [
description: "Unlock the automator.",
checkRequirement: () => Player.automatorUnlocked,
checkEvent: [GAME_EVENT.REALITY_RESET_AFTER, GAME_EVENT.REALITY_UPGRADE_BOUGHT, GAME_EVENT.PERK_BOUGHT,
GAME_EVENT.BLACK_HOLE_BOUGHT],
GAME_EVENT.BLACK_HOLE_UNLOCKED],
get reward() { return `Dimension Boosts are ${formatPercents(0.5)} stronger.`; },
effect: 1.5,
},
@ -1053,7 +1053,9 @@ GameDatabase.achievements.normal = [
{
id: 144,
name: "Is this an Interstellar reference?",
description: "Unlock the Black Hole."
description: "Unlock the Black Hole.",
checkRequirement: () => BlackHole(1).isUnlocked,
checkEvent: GAME_EVENT.BLACK_HOLE_UNLOCKED,
},
{
id: 145,

View File

@ -135,7 +135,7 @@ GameDatabase.speedrunMilestones = [
name: "Black Hole",
description: "Unlock the Black Hole",
checkRequirement: () => true,
// This is called directly within BlackHoles.unlock
checkEvent: GAME_EVENT.BLACK_HOLE_UNLOCKED,
},
{
id: 18,