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

Add Stored in Storage Tab to Statistics

This commit is contained in:
isaisstillalive 2020-06-28 07:14:14 +09:00
parent 6d17291f1e
commit 17059f600e
4 changed files with 12 additions and 4 deletions

View File

@ -111,7 +111,8 @@
&[data-displaymode="icons"] .displayIcons,
&[data-datasource="produced"] .modeProduced,
&[data-datasource="delivered"] .modeDelivered,
&[data-datasource="stored"] .modeStored {
&[data-datasource="stored"] .modeStored,
&[data-datasource="deliveredToStorage"] .modeDeliveredtostorage {
opacity: 1;
}

View File

@ -27,6 +27,7 @@ export class HUDStatistics extends BaseHUDPart {
enumAnalyticsDataSource.produced,
enumAnalyticsDataSource.delivered,
enumAnalyticsDataSource.stored,
enumAnalyticsDataSource.deliveredToStorage,
];
for (let i = 0; i < dataSources.length; ++i) {
@ -168,7 +169,8 @@ export class HUDStatistics extends BaseHUDPart {
break;
}
case enumAnalyticsDataSource.produced:
case enumAnalyticsDataSource.delivered: {
case enumAnalyticsDataSource.delivered:
case enumAnalyticsDataSource.deliveredToStorage: {
entries = Object.entries(this.root.productionAnalytics.getCurrentShapeRates(this.dataSource));
break;
}
@ -181,10 +183,11 @@ export class HUDStatistics extends BaseHUDPart {
for (let i = 0; i < Math.min(entries.length, 200); ++i) {
const entry = entries[i];
const shapeKey = entry[0];
const shape = shapeKey.split(",")[1] || shapeKey;
let handle = this.activeHandles[shapeKey];
if (!handle) {
const definition = this.root.shapeDefinitionMgr.getShapeFromShortKey(shapeKey);
const definition = this.root.shapeDefinitionMgr.getShapeFromShortKey(shape);
handle = this.activeHandles[shapeKey] = new HUDShapeStatisticsHandle(
this.root,
definition,

View File

@ -82,7 +82,8 @@ export class HUDShapeStatisticsHandle {
break;
}
case enumAnalyticsDataSource.delivered:
case enumAnalyticsDataSource.produced: {
case enumAnalyticsDataSource.produced:
case enumAnalyticsDataSource.deliveredToStorage: {
let rate =
(this.root.productionAnalytics.getCurrentShapeRate(dataSource, this.definition) /
globalConfig.analyticsSliceDurationSeconds) *

View File

@ -363,6 +363,9 @@ ingame:
delivered:
title: Delivered
description: Displaying shapes which are delivered to your central building.
deliveredToStorage:
title: Storage
description: Displaying shapes which are delivered to your storages.
noShapesProduced: No shapes have been produced so far.
# Displays the shapes per minute, e.g. '523 / m'