Basecamp recipes can specify parameters and om_terrain_match_type #72642
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
None
Purpose of change
Needed for #72561, parameters can affects layouts of maps changing which basecamp recipes should be offered
om_match_type matching > just type matching
Describe the solution
Allows for parameter matching like
"om_terrains": [ { "om_terrain": "omt1", "parameters": { "param_key1": [ "allowed_value1", "allowed_value2" ] } } ]
to match omt1 if param_key1 is set to either allowed_value1 or allowed_value2Allows for om_match_type matching like
"om_terrains": [ { "om_terrain": "omt1", "om_terrain_match_type": "PREFIX" } ]
tp match "omt1", "omt1_roof", "omt1_3_8" etc and applies it to existing recipesUses an overload instead of the defaulted "ANY" C++ argument in the function call so things don't get too hairy ("ANY" is still fine as a JSON om_terrain to match all omts)
Adds documentation for the new fields
Describe alternatives you've considered
Testing
Tested parameter specification using #72561:
The evac shelter we're at has layout 24x24_shelter_1:
Asking my good friend Gordon to start a camp offers the faction_base_shelter_1_0 camp and the bare bones camp but not faction_base_shelter_0 or faction_base_shelter_2_0 as expected
Tested om_match_terrain_type by verifying the same basecamp recipes were offered before and after 9595812 while on
farmland_turn_inside
Additional context