diff --git a/binaries/data/mods/public/gui/session/utility_functions.js b/binaries/data/mods/public/gui/session/utility_functions.js index 61ccd6030f..1d609f7975 100644 --- a/binaries/data/mods/public/gui/session/utility_functions.js +++ b/binaries/data/mods/public/gui/session/utility_functions.js @@ -269,7 +269,7 @@ function getEntityCostComponentsTooltipString(template, trainNum, entity) trainNum = 1; for (var r in template.cost) totalCosts[r] = Math.floor(template.cost[r] * trainNum); - totalCosts.time = entity ? Math.ceil(Engine.GuiInterfaceCall("GetBatchTime", {"entity": entity, "batchSize": trainNum})) : template.cost.time; + totalCosts.time = Math.ceil(template.cost.time * (entity ? Engine.GuiInterfaceCall("GetBatchTime", {"entity": entity, "batchSize": trainNum}) : 1)); var costs = []; if (totalCosts.food) costs.push(getCostComponentDisplayName("food") + " " + totalCosts.food);