1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Fix tslint errors

This commit is contained in:
Greg Considine 2021-03-10 21:38:00 -05:00
parent 59a9e06b91
commit aaa0e65de6
4 changed files with 11 additions and 11 deletions

View File

@ -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;

View File

@ -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()),
};

View File

@ -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(

View File

@ -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} */