From fc0fd2eb49ee5638dec42775f76548a07a5602a9 Mon Sep 17 00:00:00 2001 From: isaisstillalive Date: Wed, 1 Jul 2020 22:12:27 +0900 Subject: [PATCH] Storage also records colors for analysis --- src/js/game/production_analytics.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/js/game/production_analytics.js b/src/js/game/production_analytics.js index 5c05d85f..d894cbd5 100644 --- a/src/js/game/production_analytics.js +++ b/src/js/game/production_analytics.js @@ -70,12 +70,9 @@ export class ProductionAnalytics extends BasicSerializableObject { * @param {number} count */ onItemDeliveredToStorage(uid, item, count) { - if (item.getItemType() === enumItemType.shape) { - const definition = /** @type {ShapeItem} */ (item).definition; - const key = uid + "," + definition.getHash(); - const entry = this.history[enumAnalyticsDataSource.deliveredToStorage]; - entry[entry.length - 1][key] = (entry[entry.length - 1][key] || 0) + count; - } + const key = uid + "," + item.serialize(); + const entry = this.history[enumAnalyticsDataSource.deliveredToStorage]; + entry[entry.length - 1][key] = (entry[entry.length - 1][key] || 0) + count; } /**