mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Fix throughput goals and add layer preview to producer
This commit is contained in:
parent
8ec2a90ae3
commit
e96821b555
@ -14,6 +14,10 @@ export class MetaItemProducerBuilding extends MetaBuilding {
|
|||||||
return "#b37dcd";
|
return "#b37dcd";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getShowWiresLayerPreview() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the entity at the given location
|
* Creates the entity at the given location
|
||||||
* @param {Entity} entity
|
* @param {Entity} entity
|
||||||
|
@ -144,9 +144,11 @@ export class HubGoals extends BasicSerializableObject {
|
|||||||
*/
|
*/
|
||||||
getCurrentGoalDelivered() {
|
getCurrentGoalDelivered() {
|
||||||
if (this.currentGoal.throughputOnly) {
|
if (this.currentGoal.throughputOnly) {
|
||||||
return this.root.productionAnalytics.getCurrentShapeRate(
|
return (
|
||||||
|
this.root.productionAnalytics.getCurrentShapeRate(
|
||||||
enumAnalyticsDataSource.delivered,
|
enumAnalyticsDataSource.delivered,
|
||||||
this.currentGoal.definition
|
this.currentGoal.definition
|
||||||
|
) / globalConfig.analyticsSliceDurationSeconds
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import { blueprintShape, UPGRADES } from "../../upgrades";
|
|||||||
import { enumHubGoalRewards } from "../../tutorial_goals";
|
import { enumHubGoalRewards } from "../../tutorial_goals";
|
||||||
import { enumAnalyticsDataSource } from "../../production_analytics";
|
import { enumAnalyticsDataSource } from "../../production_analytics";
|
||||||
import { T } from "../../../translations";
|
import { T } from "../../../translations";
|
||||||
|
import { globalConfig } from "../../../core/config";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages the pinned shapes on the left side of the screen
|
* Manages the pinned shapes on the left side of the screen
|
||||||
@ -265,10 +266,11 @@ export class HUDPinnedShapes extends BaseHUDPart {
|
|||||||
let currentValueFormatted = formatBigNumber(currentValue);
|
let currentValueFormatted = formatBigNumber(currentValue);
|
||||||
|
|
||||||
if (handle.throughputOnly) {
|
if (handle.throughputOnly) {
|
||||||
currentValue = this.root.productionAnalytics.getCurrentShapeRate(
|
currentValue =
|
||||||
|
this.root.productionAnalytics.getCurrentShapeRate(
|
||||||
enumAnalyticsDataSource.delivered,
|
enumAnalyticsDataSource.delivered,
|
||||||
handle.definition
|
handle.definition
|
||||||
);
|
) / globalConfig.analyticsSliceDurationSeconds;
|
||||||
currentValueFormatted = T.ingame.statistics.shapesDisplayUnits.second.replace(
|
currentValueFormatted = T.ingame.statistics.shapesDisplayUnits.second.replace(
|
||||||
"<shapes>",
|
"<shapes>",
|
||||||
String(currentValue)
|
String(currentValue)
|
||||||
|
Loading…
Reference in New Issue
Block a user