Page 2 of 2
Re: build costs 1.02 - updated 21 Sep
Posted: 24 Mar 2009, 19:19
by AndiNo
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)
Code: Select all
str = str .. string.format("%d", n) .. "\255\255\255\255"
to
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
btw: I really like this "addon", it could well be included in Spring :)
Re: build costs 1.02 - updated 21 Sep
Posted: 25 Mar 2009, 08:16
by manolo_
why include? upload it to jobjol/spring downloader and all player who wants to use have a chance to use it
Re: build costs 1.02 - updated 21 Sep
Posted: 25 Mar 2009, 14:34
by AndiNo
OK, to put it another way: it really fits into the game :) It could have been in the original TA.
Re: build costs 1.02 - updated 21 Sep
Posted: 25 Mar 2009, 17:17
by manolo_
AndiNo wrote:OK, to put it another way: it really fits into the game :) It could have been in the original TA.
:)
Re: build costs 1.02 - updated 21 Sep
Posted: 25 Mar 2009, 17:48
by smoth
AndiNo wrote:
btw: I really like this "addon", it could well be included in Spring :)
This will not work with many of the new games. It is fine as a widget.
Re: build costs 1.02 - updated 21 Sep
Posted: 26 Mar 2009, 19:07
by Forboding Angel
btw this widget breaks unit guarding.