aux auto bid and price heuristics

this commit does two things
1. it implements auto bid just like auto buy
2. it has some minimum pricing heuristics when posting items. this behavoiur actiaves when the post bid price is set to 0, the buyout price behaves like a minimum
This commit is contained in:
geojak
2022-02-20 23:51:19 +01:00
committed by GitHub
parent 9771521c78
commit 02cfc420dd
42 changed files with 8791 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
module 'aux.util.sort'
local T = require 'T'
M.EQ = 0
M.LT = 1
M.GT = 2
function M.compare(a, b, desc)
if a < b then
return desc and GT or LT
elseif a > b then
return desc and LT or GT
else
return EQ
end
end
M.multi_lt = T.vararg-function(arg)
for i = 1, getn(arg), 2 do
if arg[i] and arg[i + 1] and arg[i] ~= arg[i + 1] then
return arg[i] < arg[i + 1]
elseif not arg[i] and arg[i + 1] then
return true
elseif not arg[i + 1] then
return false
end
end
return false
end