From aaa0e65de688e84bf0977f99bd1a7242a8015247 Mon Sep 17 00:00:00 2001 From: Greg Considine Date: Wed, 10 Mar 2021 21:38:00 -0500 Subject: [PATCH] Fix tslint errors --- src/js/game/achievement_proxy.js | 4 ++-- src/js/game/root.js | 2 +- src/js/game/shape_definition_manager.js | 8 ++++---- src/js/platform/achievement_provider.js | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/js/game/achievement_proxy.js b/src/js/game/achievement_proxy.js index 2ae9ee52..ed05b700 100644 --- a/src/js/game/achievement_proxy.js +++ b/src/js/game/achievement_proxy.js @@ -46,7 +46,7 @@ export class AchievementProxy { } initialize() { - this.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.darkMode); + this.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.darkMode, null); if (this.has(ACHIEVEMENTS.mam)) { this.root.signals.entityAdded.add(this.onMamFailure, this); @@ -136,7 +136,7 @@ export class AchievementProxy { this.root.signals.entityDestroyed.add(this.onMamFailure, this); } - this.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.mam); + this.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.mam, null); // reset on every level this.root.savegame.currentData.stats.failedMam = false; diff --git a/src/js/game/root.js b/src/js/game/root.js index 15985fe2..82d1e49f 100644 --- a/src/js/game/root.js +++ b/src/js/game/root.js @@ -181,7 +181,7 @@ export class GameRoot { freeEntityAreaBeforeBuild: /** @type {TypedSignal<[Entity]>} */ (new Signal()), // Called with an achievement key and necessary args to validate it can be unlocked. - achievementCheck: /** @type {TypedSignal<[string, *]>} */ (new Signal()), + achievementCheck: /** @type {TypedSignal<[string, any]>} */ (new Signal()), bulkAchievementCheck: /** @type {TypedSignal<(string|any)[]>} */ (new Signal()), }; diff --git a/src/js/game/shape_definition_manager.js b/src/js/game/shape_definition_manager.js index 92fc9538..89203f1e 100644 --- a/src/js/game/shape_definition_manager.js +++ b/src/js/game/shape_definition_manager.js @@ -97,7 +97,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject { const rightSide = definition.cloneFilteredByQuadrants([2, 3]); const leftSide = definition.cloneFilteredByQuadrants([0, 1]); - this.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.cutShape); + this.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.cutShape, null); return /** @type {[ShapeDefinition, ShapeDefinition]} */ (this.operationCache[key] = [ this.registerOrReturnHandle(rightSide), @@ -140,7 +140,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject { const rotated = definition.cloneRotateCW(); - this.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.rotateShape); + this.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.rotateShape, null); return /** @type {ShapeDefinition} */ (this.operationCache[key] = this.registerOrReturnHandle( rotated @@ -195,7 +195,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject { return /** @type {ShapeDefinition} */ (this.operationCache[key]); } - this.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.stackShape); + this.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.stackShape, null); const stacked = lowerDefinition.cloneAndStackWith(upperDefinition); return /** @type {ShapeDefinition} */ (this.operationCache[key] = this.registerOrReturnHandle( @@ -215,7 +215,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject { return /** @type {ShapeDefinition} */ (this.operationCache[key]); } - this.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.paintShape); + this.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.paintShape, null); const colorized = definition.cloneAndPaintWith(color); return /** @type {ShapeDefinition} */ (this.operationCache[key] = this.registerOrReturnHandle( diff --git a/src/js/platform/achievement_provider.js b/src/js/platform/achievement_provider.js index 9bf95b3f..31973880 100644 --- a/src/js/platform/achievement_provider.js +++ b/src/js/platform/achievement_provider.js @@ -322,7 +322,7 @@ export class AchievementCollection { /** * @param {string} key - Maps to an Achievement - * @param {?*} data - Data received from signal dispatches for validation + * @param {any} data - Data received from signal dispatches for validation */ unlock(key, data) { if (!this.map.has(key)) { @@ -469,7 +469,7 @@ export class AchievementCollection { createUpgradeOptions(tier) { return { - init: ({ key }) => this.unlock(key), + init: ({ key }) => this.unlock(key, null), isValid: () => this.hasAllUpgradesAtLeastAtTier(tier), signal: "upgradePurchased", }; @@ -594,7 +594,7 @@ export class AchievementCollection { /** @param {Achievement} achievement */ initStore100Unique({ key }) { - this.unlock(key); + this.unlock(key, null); } /** @returns {boolean} */ @@ -604,7 +604,7 @@ export class AchievementCollection { /** @param {Achievement} achievement */ initStoreShape({ key }) { - this.unlock(key); + this.unlock(key, null); } /** @returns {boolean} */