[0.11.22] [ondra] Bad market logic

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 410
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

[0.11.22] [ondra] Bad market logic

Post by y.petremann »

In the effort to update my creative mod, I tried to use the market as an infinite provider and found some bugs.
  • If I have more than required for any offer to fill my inventory and get a player inventory full message, then it is considered the player bought more than it can hold in his inventory.
  • Shift-clicking an offer when player have plenty of required elements (100 000 coins) would lead to a freeze during multiple seconds since it would try to buy until it no more requirement is available before verifying if inventory is full. Doing so it would verify the inventory would feel instantaneous (3 000 items)
  • Shift-clicking an offer that have an empty price would lead to a infinite loop since it would try to buy until it no more requirement is available (which is none) before verifying if inventory is full.
  • Offer that have an empty price doesn't show an infinite symbol like with recipes without ingredients.

Code: Select all

game.createentity({name = "market", position = game.player.position})
game.player.selected.addmarketitem{price={ {} }, offer={type="give-item", item="coin"}}
game.player.selected.addmarketitem{price={ {"coin", 1} }, offer={type="give-item", item="iron-ore"}}

Rseding91
Factorio Staff
Factorio Staff
Posts: 13347
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.11.22] Bad market logic

Post by Rseding91 »

The first 3 items listed have been fixed for 0.12.
If you want to get ahold of me I'm almost always on Discord.

Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [0.11.22] [ondra] Bad market logic

Post by Oxyd »

All should be fixed now. Thanks for the report.

Post Reply

Return to “Resolved Problems and Bugs”