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-displaymode="icons"] .displayIcons,
|
||||||
&[data-datasource="produced"] .modeProduced,
|
&[data-datasource="produced"] .modeProduced,
|
||||||
&[data-datasource="delivered"] .modeDelivered,
|
&[data-datasource="delivered"] .modeDelivered,
|
||||||
&[data-datasource="stored"] .modeStored {
|
&[data-datasource="stored"] .modeStored,
|
||||||
|
&[data-datasource="deliveredToStorage"] .modeDeliveredtostorage {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -27,6 +27,7 @@ export class HUDStatistics extends BaseHUDPart {
|
|||||||
enumAnalyticsDataSource.produced,
|
enumAnalyticsDataSource.produced,
|
||||||
enumAnalyticsDataSource.delivered,
|
enumAnalyticsDataSource.delivered,
|
||||||
enumAnalyticsDataSource.stored,
|
enumAnalyticsDataSource.stored,
|
||||||
|
enumAnalyticsDataSource.deliveredToStorage,
|
||||||
];
|
];
|
||||||
|
|
||||||
for (let i = 0; i < dataSources.length; ++i) {
|
for (let i = 0; i < dataSources.length; ++i) {
|
||||||
@ -168,7 +169,8 @@ export class HUDStatistics extends BaseHUDPart {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case enumAnalyticsDataSource.produced:
|
case enumAnalyticsDataSource.produced:
|
||||||
case enumAnalyticsDataSource.delivered: {
|
case enumAnalyticsDataSource.delivered:
|
||||||
|
case enumAnalyticsDataSource.deliveredToStorage: {
|
||||||
entries = Object.entries(this.root.productionAnalytics.getCurrentShapeRates(this.dataSource));
|
entries = Object.entries(this.root.productionAnalytics.getCurrentShapeRates(this.dataSource));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -181,10 +183,11 @@ export class HUDStatistics extends BaseHUDPart {
|
|||||||
for (let i = 0; i < Math.min(entries.length, 200); ++i) {
|
for (let i = 0; i < Math.min(entries.length, 200); ++i) {
|
||||||
const entry = entries[i];
|
const entry = entries[i];
|
||||||
const shapeKey = entry[0];
|
const shapeKey = entry[0];
|
||||||
|
const shape = shapeKey.split(",")[1] || shapeKey;
|
||||||
|
|
||||||
let handle = this.activeHandles[shapeKey];
|
let handle = this.activeHandles[shapeKey];
|
||||||
if (!handle) {
|
if (!handle) {
|
||||||
const definition = this.root.shapeDefinitionMgr.getShapeFromShortKey(shapeKey);
|
const definition = this.root.shapeDefinitionMgr.getShapeFromShortKey(shape);
|
||||||
handle = this.activeHandles[shapeKey] = new HUDShapeStatisticsHandle(
|
handle = this.activeHandles[shapeKey] = new HUDShapeStatisticsHandle(
|
||||||
this.root,
|
this.root,
|
||||||
definition,
|
definition,
|
||||||
|
|||||||
@ -82,7 +82,8 @@ export class HUDShapeStatisticsHandle {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case enumAnalyticsDataSource.delivered:
|
case enumAnalyticsDataSource.delivered:
|
||||||
case enumAnalyticsDataSource.produced: {
|
case enumAnalyticsDataSource.produced:
|
||||||
|
case enumAnalyticsDataSource.deliveredToStorage: {
|
||||||
let rate =
|
let rate =
|
||||||
(this.root.productionAnalytics.getCurrentShapeRate(dataSource, this.definition) /
|
(this.root.productionAnalytics.getCurrentShapeRate(dataSource, this.definition) /
|
||||||
globalConfig.analyticsSliceDurationSeconds) *
|
globalConfig.analyticsSliceDurationSeconds) *
|
||||||
|
|||||||
@ -363,6 +363,9 @@ ingame:
|
|||||||
delivered:
|
delivered:
|
||||||
title: Delivered
|
title: Delivered
|
||||||
description: Displaying shapes which are delivered to your central building.
|
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.
|
noShapesProduced: No shapes have been produced so far.
|
||||||
|
|
||||||
# Displays the shapes per minute, e.g. '523 / m'
|
# Displays the shapes per minute, e.g. '523 / m'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user