Rework functions in util.py
This commit is contained in:
@@ -21,7 +21,7 @@ from gui import builtinViewColumns
|
||||
from gui.viewColumn import ViewColumn
|
||||
from gui import bitmapLoader
|
||||
import controller
|
||||
from util import shorten
|
||||
from util import formatAmount
|
||||
|
||||
class MaxRange(ViewColumn):
|
||||
name = "Max range"
|
||||
@@ -55,10 +55,10 @@ class MaxRange(ViewColumn):
|
||||
if falloff is None:
|
||||
falloff = ""
|
||||
else:
|
||||
falloff = "+%sm" % shorten(falloff, 3, 0, 3)
|
||||
falloff = "+%sm" % formatAmount(falloff, 3, 0, 3)
|
||||
|
||||
if maxRange:
|
||||
return "%sm%s" % (shorten(maxRange, 3, 0, 3), falloff)
|
||||
return "%sm%s" % (formatAmount(maxRange, 3, 0, 3), falloff)
|
||||
else:
|
||||
return "" + falloff
|
||||
|
||||
|
||||
Reference in New Issue
Block a user