X Tutup
Skip to content

Fix for commodity market in stock and demand reset#5633

Merged
sturnclaw merged 1 commit intopioneerspacesim:masterfrom
Max5377:CommodityMarketReset-fix
Oct 6, 2023
Merged

Fix for commodity market in stock and demand reset#5633
sturnclaw merged 1 commit intopioneerspacesim:masterfrom
Max5377:CommodityMarketReset-fix

Conversation

@Max5377
Copy link
Contributor

@Max5377 Max5377 commented Sep 18, 2023

Fixes #5582

This happened, because transientMarket in SpaceStation.lua was never linked to stationMarket in Economy.lua after loading the save. Adding createCommodityStock(station) in loop for station,list in pairs(loaded_data.shipsOnSale) do in the onGameStart event will make sure to do that for every station player has visited in the system.

Update
Changed to a more clean-looking solution.

Fixes commodity market in stock and demand reseting on save load
@Max5377 Max5377 force-pushed the CommodityMarketReset-fix branch from 2c4c85f to 33b406c Compare September 19, 2023 21:25
@sturnclaw
Copy link
Member

I may not have a chance to properly test this for a few days, but the code looks correct. If someone is able to test and report back here, that'd be excellent - otherwise I'll merge once I've gotten a chance to ensure the solution functions correctly.

@sturnclaw sturnclaw merged commit 13a5e55 into pioneerspacesim:master Oct 6, 2023
@Max5377 Max5377 deleted the CommodityMarketReset-fix branch October 8, 2023 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Commodity market in stock reset on save load

2 participants

X Tutup