diff --git a/src/js/game/production_analytics.js b/src/js/game/production_analytics.js index d894cbd5..e2f8e3d8 100644 --- a/src/js/game/production_analytics.js +++ b/src/js/game/production_analytics.js @@ -66,11 +66,10 @@ export class ProductionAnalytics extends BasicSerializableObject { /** * @param {number} uid - * @param {BaseItem} item * @param {number} count */ - onItemDeliveredToStorage(uid, item, count) { - const key = uid + "," + item.serialize(); + onItemDeliveredToStorage(uid, count) { + const key = uid.toString(); const entry = this.history[enumAnalyticsDataSource.deliveredToStorage]; entry[entry.length - 1][key] = (entry[entry.length - 1][key] || 0) + count; } diff --git a/src/js/game/root.js b/src/js/game/root.js index 9e196f48..798efd25 100644 --- a/src/js/game/root.js +++ b/src/js/game/root.js @@ -165,7 +165,7 @@ export class GameRoot { shapeDelivered: /** @type {TypedSignal<[ShapeDefinition]>} */ (new Signal()), itemProduced: /** @type {TypedSignal<[BaseItem]>} */ (new Signal()), - itemDeliveredToStorage: /** @type {TypedSignal<[number, BaseItem, number]>} */ (new Signal()), + itemDeliveredToStorage: /** @type {TypedSignal<[number, number]>} */ (new Signal()), bulkOperationFinished: /** @type {TypedSignal<[]>} */ (new Signal()), diff --git a/src/js/game/systems/storage.js b/src/js/game/systems/storage.js index 8e85a1e5..49c68a61 100644 --- a/src/js/game/systems/storage.js +++ b/src/js/game/systems/storage.js @@ -24,11 +24,7 @@ export class StorageSystem extends GameSystemWithFilter { // Analytics hook if (storageComp.itemsToAnalyze > 0) { - this.root.signals.itemDeliveredToStorage.dispatch( - entity.uid, - storageComp.storedItem, - storageComp.itemsToAnalyze - ); + this.root.signals.itemDeliveredToStorage.dispatch(entity.uid, storageComp.itemsToAnalyze); storageComp.itemsToAnalyze = 0; } @@ -86,11 +82,10 @@ export class StorageSystem extends GameSystemWithFilter { context.fillStyle = "#64666e"; context.fillText(formatBigNumber(storageComp.storedCount), center.x, center.y + 25.5); } else if (storageComp.displayType === enumStorageDisplayType.rate) { - const shapeKey = entity.uid.toString() + "," + storageComp.storedItem.serialize(); let rate = (this.root.productionAnalytics.getCurrentShapeRate( enumAnalyticsDataSource.deliveredToStorage, - shapeKey + entity.uid.toString() ) / globalConfig.analyticsSliceDurationSeconds) * 60;