mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Show double flag with items per second being 1
formatItemsPerSecond in utils.js does not indicate two items being processed in a building if speed is exactly one item per second. That is now fixed.
This commit is contained in:
parent
5f0a95ba11
commit
c6c3cb614d
@ -573,12 +573,12 @@ export function round1DigitLocalized(speed, separator = T.global.decimalSeparato
|
||||
* @param {string=} separator The decimal separator for numbers like 50.1 (separator='.')
|
||||
*/
|
||||
export function formatItemsPerSecond(speed, double = false, separator = T.global.decimalSeparator) {
|
||||
return speed === 1.0
|
||||
return (speed === 1.0
|
||||
? T.ingame.buildingPlacement.infoTexts.oneItemPerSecond
|
||||
: T.ingame.buildingPlacement.infoTexts.itemsPerSecond.replace(
|
||||
"<x>",
|
||||
round2Digits(speed).toString().replace(".", separator)
|
||||
) + (double ? " " + T.ingame.buildingPlacement.infoTexts.itemsPerSecondDouble : "");
|
||||
)) + (double ? " " + T.ingame.buildingPlacement.infoTexts.itemsPerSecondDouble : "");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user