Various fixes#2272
Merged
Merged
Conversation
Contributor
ineveraskedforthis
commented
May 24, 2026
- Store updates to total satisfaction in an additional field due to lack of precision in 1 byte fields
- Fix issue when trade route was attempting to move around the continent due to state being at coast of two oceans by allowing sea routes to move around the original and target state instance
- Unify advanced buildings employment changes with production employment changes
- Allow land trade to path through 1 province lakes or seas and connect regions around them
- Improve handling of public and private education spending
- A few minor balance changes
schombert
reviewed
May 24, 2026
| satisfaction = satisfaction - 1.f; | ||
| auto en = ve::max(0.f, ve::min(1.f, satisfaction)); | ||
| satisfaction = satisfaction - 1.f; | ||
| auto lx = ve::max(0.f, ve::min(1.f, satisfaction)); |
Owner
There was a problem hiding this comment.
Since the three values are derived in such a direct way, the properties can be removed from the pop object completely and instead the
float get_life_needs(sys::state const& state, dcon::pop_id p);
float get_everyday_needs(sys::state const& state, dcon::pop_id p);
float get_luxury_needs(sys::state const& state, dcon::pop_id p);
functions (from the demographics files) can have their implementation changed to load the single satisfaction value and compute the derived need directly. All references to those values should be going through those functions already, so dropping the dcon properties should thus be pretty painless.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.