Re: build costs 1.02 - updated 21 Sep
Posted: 24 Mar 2009, 19:19
I made a small change based on Lupus' version of build costs. It prevents the numbers in the build costs display from becoming too large as it was the case if for example the income would be greater than 1000. Now it displays 1k instead of 1000.
I simply changed (line 397 I think) to
btw: I really like this "addon", it could well be included in Spring :)
I simply changed (line 397 I think)
Code: Select all
str = str .. string.format("%d", n) .. "\255\255\255\255"Code: Select all
if n >= 10000 or n <= -10000 then
str = str .. string.format("%.0fk", n/1000) .. "\255\255\255\255"
elseif n >= 1000 or n <= -1000 then
str = str .. string.format("%.1fk", n/1000) .. "\255\255\255\255"
else
str = str .. string.format("%d", n) .. "\255\255\255\255"
end