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.
Summary
SUMMARY: Bugfixes "basecamps: Modular camp fixes"
Purpose of change
Fixes #31391
Fixes #31450
Fixes #31425
There may be some others.
modular basecamp recipes using blueprint_autocalc were accessing unallocated memory and stomping over everything. This caused all kinds of weird and subtle bugs.
Also, starting a faction camp did not correctly set the initial blueprint_provides, cutting off the development of the camp.
Also, digging a trench was supposed to provide huge amounts of soil, rocks, pebbles, and clay but was not.
Describe the solution
Rewrite get_changed_ids_from_update_mapgen() not attempt to get the actual regional settings and not to not really load the temporary tinymap. Instead, using a dummy regional settings variable and a new tinymap load_fake() function that does the minimal loading necessary for get_changed_ids_from_update_mapgen()'s purposes.
When defining a camp, pass the fully encoded base type, which is the name of the recipe, and not just the short type name, to update_provides().
Add some place_items() to the mapgen_update definitions for digging camp trenches.
Additional context
Whoops. Mea maxima culpa.