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

Add provinces, dynasties, religions, holdings and expand alive data #19

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

clemux
Copy link

@clemux clemux commented May 26, 2023

I'll leave this a draft for now, because I haven't written any tests, and I'm not sure about what fields should be Option.

I've tested it on a single save with 0 playtime, with the 1.9 patch, and it works with this thing I patched together

#[derive(Debug, Deserialize)]
pub struct Holding {
pub r#type: Option<String>,
pub buildings: Vec<Building>,
Copy link
Contributor

Choose a reason for hiding this comment

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

There are some saves that omit buildings, and my guess is that paradox often excludes fields that are empty or their default values, so I tend to prefer to use #[serde(default)] and not use Option too much unless there is a difference between empty/0 and None in game.

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.

None yet

2 participants