Skip to content

Various fixes#2272

Merged
schombert merged 5 commits into
schombert:mainfrom
ineveraskedforthis:main
May 25, 2026
Merged

Various fixes#2272
schombert merged 5 commits into
schombert:mainfrom
ineveraskedforthis:main

Conversation

@ineveraskedforthis
Copy link
Copy Markdown
Contributor

  • 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

Comment thread src/economy/economy.cpp Outdated
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));
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.

@schombert schombert merged commit 1f2c9ae into schombert:main May 25, 2026
5 checks passed
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.

2 participants