Page 1 of 1

[1.1.30] market price bug with repeated element

Posted: Thu Apr 01, 2021 5:26 am
by Honktown
If a market offer is made and has two of the same items (perhaps more), the result is the second item amount is shown (and is the amount taken) but the "minimum" amount to purchase and quantity of purchases is based on the first item price. If the "minimum" is not met, the offer cannot be purchased, even when the gui is showing a different amount.
code to reproduce
result_with_50_ore.png
result_with_50_ore.png (89.37 KiB) Viewed 2775 times
The api pages don't say what is expected for an offer used in add_market_item, but if it is a list of ingredients, then there could be different expectations... 1) error on repeated items (as ingredients do in prototypes) or 2) collapse items into one quantity (if a fluid with temperature can be a market price, this would not work).

Re: [1.1.30] market price bug with repeated element

Posted: Tue Apr 13, 2021 10:05 pm
by boskid
Thanks for the report. It is a minor issue but i fixed it anyway for 1.1.32.