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

Storage also records colors for analysis

This commit is contained in:
isaisstillalive 2020-07-01 22:12:27 +09:00
parent 26f7ccbe41
commit fc0fd2eb49

View File

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