mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Consider the unit's build time in the calculation.
This was SVN commit r12889.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user