Skip to content

Conversation

@wvpm
Copy link
Contributor

@wvpm wvpm commented Jan 31, 2024

TODO:

  • hiring & firing
  • maintenance/upkeep goods
  • optimisations
  • state code
  • country code

void FactoryProducer::produce(
const fixed_point_t input_modifier, const fixed_point_t throughput_modifier, const fixed_point_t output_modifier
) {
std::map<PopType const* const, fixed_point_t> employees_per_job {};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This could be cached as a private field.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah this definitely should be cached, we'll also need it for tooltips

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think tooltips should be calculated on demand. It saves a memory and ensures the tooltips are up to date.

}

void FactoryProducer::produce(
const fixed_point_t input_modifier, const fixed_point_t throughput_modifier, const fixed_point_t output_modifier
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I imagine the country calls some method on each state, which calls this method for each factory.
The country & state create the modifier values here.

Copy link
Contributor

@Hop311 Hop311 left a comment

Choose a reason for hiding this comment

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

Great work with the equations, nice to see that we already have all these components available.

void FactoryProducer::produce(
const fixed_point_t input_modifier, const fixed_point_t throughput_modifier, const fixed_point_t output_modifier
) {
std::map<PopType const* const, fixed_point_t> employees_per_job {};
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah this definitely should be cached, we'll also need it for tooltips

@wvpm wvpm force-pushed the factory_turn branch 3 times, most recently from f275652 to 57b7a64 Compare January 31, 2024 22:02
@wvpm wvpm force-pushed the producer_types branch 2 times, most recently from b004547 to 1c0505e Compare February 5, 2024 08:29
@Hop311 Hop311 mentioned this pull request Feb 5, 2024
Base automatically changed from producer_types to master February 6, 2024 16:44
Hop311 added a commit to Hop311/OpenVic-Simulation that referenced this pull request Oct 13, 2024
First pass at pops (test pops and density mapmode)
@Spartan322 Spartan322 added the enhancement New feature or request label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants