Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure autosave before the onGameEnd event fires #5456

Merged
merged 2 commits into from
Dec 25, 2022

Conversation

Gliese852
Copy link
Contributor

Since the autosave at the end of the game was triggered by the onGameEnd event, it was randomly queued among other subscribers to this event. This resulted in (at least) an accidental loss of all TradeShips module data during autosave when exiting the game.

Among other options, I chose to create a separate onAutoSaveBeforeGameEnds event, as this seems to me the most straightforward and clear.

Fixes #5427

Since the autosave at the end of the game was triggered by the onGameEnd
event, it was randomly queued among other subscribers to this event.
This resulted in (at least) an accidental loss of all TradeShips module
data during autosave when exiting the game.

Among other options, I chose to create a separate
'onAutoSaveBeforeGameEnds' event, as this seems to me the most
straightforward and clear.

Fixes pioneerspacesim#5427
@impaktor
Copy link
Member

Among other options, I chose to create a separate onAutoSaveBeforeGameEnds event

Can you please also add documentation string for it in data/libs/Event.lua, where we have the other events documented

@zonkmachine
Copy link
Member

zonkmachine commented Dec 25, 2022

Tested, also fixes #5305 !

Copy link
Member

@Web-eWorks Web-eWorks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks @Gliese852 for tracking this one down!

@Web-eWorks Web-eWorks merged commit 24a9bdc into pioneerspacesim:master Dec 25, 2022
@Gliese852 Gliese852 deleted the full-docks branch December 26, 2022 20:02
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.

Space station docks full onCreateBB runs on already created bulletin boards
4 participants