mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
Fixing Ticket#215
Unit's stats (attack, defense) is rounded so there is no decimal digits shown. This was SVN commit r6526.
This commit is contained in:
parent
2bfa84aef5
commit
2f5125e4d0
1 changed files with 6 additions and 1 deletions
|
|
@ -177,7 +177,12 @@ function updateStat (baseName, cellSheet, cell, statistic)
|
|||
textStat.sprite = "snIconSheet" + cellSheet;
|
||||
textStat.cell_id = cellGroup[cellSheet][cell].id;
|
||||
textStat.tooltip = cellGroup[cellSheet][cell].name;
|
||||
var iconStat = getGUIObjectByName (baseName + (statCurr + 1))
|
||||
var iconStat = getGUIObjectByName (baseName + (statCurr + 1));
|
||||
|
||||
if (!isNaN(statistic)) {
|
||||
statistic = Math.ceil(statistic);
|
||||
}
|
||||
|
||||
iconStat.caption = statistic;
|
||||
iconStat.tooltip = cellGroup[cellSheet][cell].name + ": " + statistic + ".";
|
||||
statCurr = (statCurr + 2);
|
||||
|
|
|
|||
Loading…
Reference in a new issue