1
0
forked from 0ad/0ad

Ceil the resource costs for insufficient resources.

A controversial change (refs. #3818, #4099,
https://code.wildfiregames.com/D1438), but good to have in some form.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4332
This was SVN commit r26236.
This commit is contained in:
Freagarach 2022-01-23 07:41:45 +00:00
parent 8926f5a94c
commit f787089588

View File

@ -992,7 +992,7 @@ function getNeededResourcesTooltip(resources)
for (let resource in resources)
formatted.push(sprintf(translate("%(component)s %(cost)s"), {
"component": '[font="sans-12"]' + resourceIcon(resource) + '[/font]',
"cost": resources[resource]
"cost": Math.ceil(resources[resource])
}));
return coloredText(
'[font="sans-bold-13"]' + translate("Insufficient resources:") + '[/font]',