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

Fix data cleanup #40047

Merged
merged 1 commit into from
May 1, 2020
Merged

Fix data cleanup #40047

merged 1 commit into from
May 1, 2020

Conversation

ZhilkinSerg
Copy link
Contributor

Summary

SUMMARY: None

Purpose of change

Some data were not reset when new world was loaded in a session where a world with different mods was previously loaded. Current PR calls reset functions for some object types.

Helps with things like #40038.

Describe the solution

  • additionally reset skill_boost, clothing_mods and morale_type data;
  • sorted lines alphabetically;
  • removed redundant comments.

Describe alternatives you've considered

Rewrite DynamicDataLoader, so all types of functions (load, reset, finalize) would be stored in a single collection and can be easily audited.

Testing

Make sure it compiles and game starts/loads without errors.

- additionally reset  `skill_boost`, `clothing_mods` and `morale_type` data;
- sorted lines alphabetically;
- removed redundant comments.
@ZhilkinSerg ZhilkinSerg added [JSON] Changes (can be) made in JSON Mods Issues related to mods or modding [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) labels May 1, 2020
Copy link
Contributor

@ifreund ifreund left a comment

Choose a reason for hiding this comment

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

Thanks!

@ifreund ifreund merged commit c734f8a into CleverRaven:master May 1, 2020
@ZhilkinSerg ZhilkinSerg deleted the fix-data-cleanup branch May 1, 2020 21:11
@DarkendTheMighty
Copy link

Thanks for making this.
However, I would like to make it clear that I never loaded that mod into any of my worlds. I hope this doesn't complicate things to much. Hopefully my issue #40038 doesn't happen again. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Mods Issues related to mods or modding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants