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

basecamps: add a namespace and calculate workdays #31194

Merged

Conversation

mlangsdorf
Copy link
Contributor

Summary

SUMMARY: Infrastructure "basecamps: add a namespace and calculate workdays"

Purpose of change

As part of #31115, split out a reviewable chunk of the code for merging.

Give basecamps a namespace for functions that are basecamp related but do not need to be in teh basecamp class.

Revise camp construction times to be absolute times in the JSON files, and have NPCs work on a single task for up to 11 hours, but break longer tasks into 10 hour workdays for every 24 hours.

Describe the solution

This is pretty straightforward:

  • add a base_camps:: namespace
  • move miscellaneous static functions into it
  • add a new function that calculates workdays and use it in a lot of places.

Describe alternatives you've considered

I've written this code a couple of different ways and I will probably write it a few more.

Additional context

Part of #31115

reorganize the basecamp code slightly by adding a base_camps:: namespace
and moving various bits of code into it.
NPCs will work on a single task for up to 11 hours, but on longer
tasks, they'll only work 10 hours out of every 24.  Add functions to
calculate the workload from the raw task times, and update most of the
existing blueprints.
some basecamps were improperly saved without the blueprint_provides
for the initial blueprint for their expansions, and therefore can't
get any missions for that expansion.  dpwb implemented a fix for
the current existing expansions, but generalize that fix to handle
future expansions.
@mlangsdorf mlangsdorf added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Player Faction Base / Camp All about the player faction base/camp/site labels Jun 7, 2019
@ZhilkinSerg ZhilkinSerg self-assigned this Jun 7, 2019
@ZhilkinSerg ZhilkinSerg merged commit 35a691f into CleverRaven:master Jun 7, 2019
@ZhilkinSerg ZhilkinSerg removed their assignment Jun 7, 2019
@mlangsdorf mlangsdorf deleted the modular_basecamps_workdays branch June 7, 2019 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Player Faction Base / Camp All about the player faction base/camp/site
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants