tripple auction duration values (6 hours wont stick, so does the og 2)

This commit is contained in:
gretchen
2024-03-06 18:37:24 +01:00
parent f405779b3e
commit 26b0c655f0
2 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -27,8 +27,8 @@ function SlashCmdList.AUX(command)
elseif arguments[1] == 'post' and arguments[2] == 'bid' then
aux.account_data.post_bid = not aux.account_data.post_bid
aux.print('post bid ' .. status(aux.account_data.post_bid))
elseif arguments[1] == 'post' and arguments[2] == 'duration' and T.map('2', post.DURATION_2, '8', post.DURATION_8, '24', post.DURATION_24)[arguments[3]] then
aux.account_data.post_duration = T.map('2', post.DURATION_2, '8', post.DURATION_8, '24', post.DURATION_24)[arguments[3]]
elseif arguments[1] == 'post' and arguments[2] == 'duration' and T.map('6', post.DURATION_6, '24', post.DURATION_24, '72', post.DURATION_72)[arguments[3]] then
aux.account_data.post_duration = T.map('6', post.DURATION_6, '24', post.DURATION_24, '72', post.DURATION_72)[arguments[3]]
aux.print('post duration ' .. aux.color.blue(aux.account_data.post_duration / 60 .. 'h'))
elseif arguments[1] == 'crafting' and arguments[2] == 'cost' then
aux.account_data.crafting_cost = not aux.account_data.crafting_cost
+14 -14
View File
@@ -20,7 +20,7 @@ local settings_schema = {'tuple', '#', {duration='number'}, {start_price='number
local scan_id, inventory_records, bid_records, buyout_records = 0, {}, {}, {}
M.DURATION_2, M.DURATION_8, M.DURATION_24 = 120, 480, 1440
M.DURATION_6, M.DURATION_24, M.DURATION_72 = 360, 1440, 4320
refresh = true
@@ -207,11 +207,11 @@ function post_auctions()
local key = selected_item.key
local duration_code
if duration == DURATION_2 then
if duration == DURATION_6 then
duration_code = 2
elseif duration == DURATION_8 then
duration_code = 3
elseif duration == DURATION_24 then
duration_code = 3
elseif duration == DURATION_72 then
duration_code = 4
end
@@ -259,11 +259,11 @@ function M.post_auctions_bind()
local key = selected_item.key
local duration_code
if duration == DURATION_2 then
if duration == DURATION_6 then
duration_code = 2
elseif duration == DURATION_8 then
duration_code = 3
elseif duration == DURATION_24 then
duration_code = 3
elseif duration == DURATION_72 then
duration_code = 4
end
@@ -605,13 +605,8 @@ function initialize_duration_dropdown()
refresh = true
end
UIDropDownMenu_AddButton{
text = '2 Hours',
value = DURATION_2,
func = on_click,
}
UIDropDownMenu_AddButton{
text = '8 Hours',
value = DURATION_8,
text = '6 Hours',
value = DURATION_6,
func = on_click,
}
UIDropDownMenu_AddButton{
@@ -619,4 +614,9 @@ function initialize_duration_dropdown()
value = DURATION_24,
func = on_click,
}
UIDropDownMenu_AddButton{
text = '72 Hours',
value = DURATION_72,
func = on_click,
}
end