Fix shop interact crash and cut NPC buy offers to 50%.
Talk/shop pending interact now returns after clear so shear never reads null; vendors pay half market instead of 80%.
@@ -766,7 +766,7 @@ export function initTileConfigModal ({
766
766
767
767
const hint = document.createElement("p");
768
768
hint.className = "hint";
769
hint.textContent = "Quantity 0 = infinite stock. Limited stock restocks daily at 00:00 server time. Any item can be listed for sale. Buys items: pays 80% market for transferable bag goods (not blank cheques); filled cheques sell as reserved goods with a 5% admin fee; extras resell at 120% until restock.";
769
hint.textContent = "Quantity 0 = infinite stock. Limited stock restocks daily at 00:00 server time. Any item can be listed for sale. Buys items: pays 50% market for transferable bag goods (not blank cheques); filled cheques sell as reserved goods with a 5% admin fee; extras resell at 120% until restock.";
770
770
wrap.append(hint);
771
771
772
772
sellsDraft = (config.sells ?? []).map((line) =>
@@ -766,7 +766,7 @@ export function initTileConfigModal ({766
766
767
const hint = document.createElement("p");767
const hint = document.createElement("p");768
hint.className = "hint";768
hint.className = "hint";769
hint.textContent = "Quantity 0 = infinite stock. Limited stock restocks daily at 00:00 server time. Any item can be listed for sale. Buys items: pays 80% market for transferable bag goods (not blank cheques); filled cheques sell as reserved goods with a 5% admin fee; extras resell at 120% until restock.";769
hint.textContent = "Quantity 0 = infinite stock. Limited stock restocks daily at 00:00 server time. Any item can be listed for sale. Buys items: pays 50% market for transferable bag goods (not blank cheques); filled cheques sell as reserved goods with a 5% admin fee; extras resell at 120% until restock.";770
wrap.append(hint);770
wrap.append(hint);771
771
772
sellsDraft = (config.sells ?? []).map((line) =>772
sellsDraft = (config.sells ?? []).map((line) =>@@ -927,6 +927,7 @@ function flushPendingInteract ()
927
927
entityId: pendingInteract.targetEntityId
928
928
});
929
929
clearPendingInteract();
930
return;
930
931
}
931
932
932
933
if (pendingInteract.kind === "shear")
@@ -927,6 +927,7 @@ function flushPendingInteract ()927
entityId: pendingInteract.targetEntityId927
entityId: pendingInteract.targetEntityId928
});928
});929
clearPendingInteract();929
clearPendingInteract();930
return;930
}931
}931
932
932
if (pendingInteract.kind === "shear")933
if (pendingInteract.kind === "shear")@@ -191,7 +191,7 @@ test("charge-worn tools scale merchant buy and resale prices by remaining uses",
191
191
const wornBuy = shopBuyFromPlayerPrice(CraftingItemId.tinderbox, { stack: worn });
192
192
assert.equal(fullBuy, shopBuyFromPlayerPrice(CraftingItemId.tinderbox));
193
193
assert.equal(wornBuy, marketValueAsCoins(
194
undiscountedMarketValue(CraftingItemId.tinderbox) * 0.8 * (1 / 6)
194
undiscountedMarketValue(CraftingItemId.tinderbox) * 0.5 * (1 / 6)
195
195
));
196
196
const fullResale = shopBoughtResalePrice(CraftingItemId.tinderbox, { stack: full });
197
197
const wornResale = shopBoughtResalePrice(CraftingItemId.tinderbox, { stack: worn });
@@ -191,7 +191,7 @@ test("charge-worn tools scale merchant buy and resale prices by remaining uses",191
const wornBuy = shopBuyFromPlayerPrice(CraftingItemId.tinderbox, { stack: worn });191
const wornBuy = shopBuyFromPlayerPrice(CraftingItemId.tinderbox, { stack: worn });192
assert.equal(fullBuy, shopBuyFromPlayerPrice(CraftingItemId.tinderbox));192
assert.equal(fullBuy, shopBuyFromPlayerPrice(CraftingItemId.tinderbox));193
assert.equal(wornBuy, marketValueAsCoins(193
assert.equal(wornBuy, marketValueAsCoins(194
undiscountedMarketValue(CraftingItemId.tinderbox) * 0.8 * (1 / 6)194
undiscountedMarketValue(CraftingItemId.tinderbox) * 0.5 * (1 / 6)195
));195
));196
const fullResale = shopBoughtResalePrice(CraftingItemId.tinderbox, { stack: full });196
const fullResale = shopBoughtResalePrice(CraftingItemId.tinderbox, { stack: full });197
const wornResale = shopBoughtResalePrice(CraftingItemId.tinderbox, { stack: worn });197
const wornResale = shopBoughtResalePrice(CraftingItemId.tinderbox, { stack: worn });