-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Union decisions #1492
base: master
Are you sure you want to change the base?
Union decisions #1492
Conversation
Ignore CultureGroup leader, is_overseas & unit entries
@@ -39,6 +45,8 @@ class DecisionsInCategory: commonItems::parser | |||
private: | |||
std::string name = ""; | |||
std::vector<decision> theDecisions; | |||
std::map<std::string, std::string> localisation; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Localisations should probably include all languages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how languages are handled in Vic->Hoi, but I can look into it.
I could output each individually perhaps? Not sure if you have a predefined LocBlock like in CK->EU anywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I am lost decisionLocalisations(std::move(decisionLocalisations)), customLocalisations(std::move(customLocalisations)),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure anymore either. I know that some other objects (e.g. Dynasty names - House of...) have all the localisations set in the code. I won't be at the computer for couple of days to check how it works with decisions.
- Begins to add support for foreign languages for Union Decisions
Log(LogLevel::Debug) << "State: " << newState.getID(); | ||
for (const auto& popCulture: popCultureMap) | ||
{ | ||
Log(LogLevel::Debug) << "\t\t\t" << popCulture.first << " Pops: " << popCulture.second | ||
<< "\n\tPopulation: " << static_cast<double>(totalPopulation); | ||
if (popCulture.second / static_cast<double>(totalPopulation) >= 0.25 && | ||
!newState.getMajorCultures().count(popCulture.first)) | ||
newState.addMajorCulture(popCulture.first); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this conditional on debug being set to true in configuration. You can pass just the debug variable to this function instead of the whole config when doing so.
if (!cultures.count(pop.getCulture())) | ||
cultures.emplace(pop.getCulture()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!cultures.count(pop.getCulture())) | |
cultures.emplace(pop.getCulture()); | |
cultures.emplace(pop.getCulture()); |
std::set<std::string> oneCulture = {culture}; | ||
if (!popCultureMap.count(culture)) | ||
popCultureMap.emplace(culture, | ||
provincePopulation * vic2Province->second->getPercentageWithCultures(oneCulture)); | ||
else | ||
popCultureMap.find(culture)->second += | ||
provincePopulation * vic2Province->second->getPercentageWithCultures(oneCulture); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::set<std::string> oneCulture = {culture}; | |
if (!popCultureMap.count(culture)) | |
popCultureMap.emplace(culture, | |
provincePopulation * vic2Province->second->getPercentageWithCultures(oneCulture)); | |
else | |
popCultureMap.find(culture)->second += | |
provincePopulation * vic2Province->second->getPercentageWithCultures(oneCulture); | |
if (auto [iterator, success] = popCultureMap.emplace(culture, | |
provincePopulation * vic2Province->second->getPercentageWithCultures(oneCulture)); !success) | |
{ | |
iterator->second += | |
provincePopulation * vic2Province->second->getPercentageWithCultures(oneCulture); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix for my inevitable syntax and formatting errors.
Make sure to add yourself to the credits in data/ReadMe.txt |
No description provided.