minor changes
This commit is contained in:
+5
-4
@@ -555,16 +555,17 @@ function private.prettified_query_string(components)
|
||||
prettified.append(aux.auction_listing.colors.YELLOW..component[2]..(component[2] ~= 'not' and tonumber(component[3]) or '')..FONT_COLOR_CODE_CLOSE)
|
||||
elseif component[1] == 'filter' then
|
||||
if component[2] ~= 'tooltip' then
|
||||
prettified.append(aux.auction_listing.colors.YELLOW..component[2]..FONT_COLOR_CODE_CLOSE)
|
||||
prettified.append(aux.gui.color.yellow(component[2]))
|
||||
end
|
||||
for parameter in aux.util.present(component[3]) do
|
||||
if component[2] == 'item' then
|
||||
prettified.append(aux.info.display_name(aux.cache.item_id(parameter)) or aux.auction_listing.colors.ORANGE..'['..parameter..']'..FONT_COLOR_CODE_CLOSE)
|
||||
prettified.append(aux.info.display_name(aux.cache.item_id(parameter)) or aux.gui.color.orange('['..parameter..']'))
|
||||
else
|
||||
if m.filters[component[2]].input_type == 'money' then
|
||||
parameter = aux.money.to_string(aux.money.from_string(parameter), nil, true, nil, nil, true)
|
||||
prettified.append(aux.money.to_string(aux.money.from_string(parameter), nil, true, nil, aux.auction_listing.colors.ORANGE))
|
||||
else
|
||||
prettified.append(aux.gui.color.orange(parameter))
|
||||
end
|
||||
prettified.append(aux.auction_listing.colors.ORANGE..parameter..FONT_COLOR_CODE_CLOSE)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+3
-2
@@ -102,7 +102,7 @@ function public.to_string(money, pad, trim, decimal_points, color, no_color)
|
||||
text = m.format_number(copper, false, decimal_points, color)..copper_text
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if is_negative then
|
||||
if color then
|
||||
text = color..'-'..FONT_COLOR_CODE_CLOSE..text
|
||||
@@ -115,7 +115,8 @@ function public.to_string(money, pad, trim, decimal_points, color, no_color)
|
||||
end
|
||||
|
||||
function public.from_string(value)
|
||||
for _, number in {tonumber(value)} do
|
||||
local number = tonumber(value)
|
||||
if number and number >= 0 then
|
||||
return number * COPPER_PER_GOLD
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user