sobisonator / imp19c

Imperator 19th century mod
11 stars 15 forks source link

Splitting the trade good purchases out #379

Open sobisonator opened 1 year ago

sobisonator commented 1 year ago

Governorships used to buy when there wasn't stockpile available, causing everyone to fulfil their orders no matter what was available for sale.

The fix in https://github.com/sobisonator/imp19c/commit/9e3988404c014c87317176160c3e45a0c802b95a means that governorships won't order tradegoods if the total amount available is not bigger than the order size. Which isn't ideal, as they should at least try to make a partial purchase. Maybe demand should work like offering, where a demand pool is created for every tradezone in each tag, then the distributions of purchased goods handed to stockpiles are done proportionally based on what was fulfilled by purchases, at the split costs stage.

This would make it more similar to how money is handed out and subtractions are done, on the SELL side.