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:
parent
6d17291f1e
commit
17059f600e
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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) *
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user