From 48975f06c50f4978dad7075168c3081f4825d7d9 Mon Sep 17 00:00:00 2001 From: Index Date: Sat, 20 Jul 2024 13:10:34 -0500 Subject: [PATCH] feat: off-sale price items in avatar sandbox thanks Alyx for fixing the store API --- js/account/avatar-sandbox.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/js/account/avatar-sandbox.js b/js/account/avatar-sandbox.js index b8b00d6..1f711e0 100644 --- a/js/account/avatar-sandbox.js +++ b/js/account/avatar-sandbox.js @@ -602,6 +602,10 @@ async function LoadItems() { document.getElementById('inventory').classList.add('itemgrid') if (TabSelected !== 'outfit') { Items.assets.forEach(item => { + if (item.price === null) { + item.price = false + } + const ItemColumn = document.createElement('div') ItemColumn.classList = 'col-auto' ItemColumn.innerHTML = ` @@ -643,14 +647,6 @@ async function LoadItems() { asset: undefined } - if (item.price === 0) { - if (item.sales === 0) { - ItemCache[item.id].price = null - } else { - ItemCache[item.id].price = 0 - } - } - if (item.type === 'hat') { ItemCache[item.id].accessoryType = item.accessoryType }