Refugee center adds food you sell/give them to their camp storage #76105
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
Further work towards enabling the refugee center storyline.
Describe the solution
Talk function so that food you sell/transfer to Smokes is added to the larder. Right now it's just been added to Smokes, but it's generic and json so it can be added to anyone. Probably most shopkeepers should get this once NPC factions aren't magicking their food out of thin air.
Describe alternatives you've considered
It might be better to make an alternate route to add these items directly to the larder instead of still using zones. Still, using the existing infrastructure isn't a terrible idea, and I think I've guarded responsibly against any possible serious errors (i.e. infinite NPC zones which are never deleted)
While troubleshooting some errors I discovered distribute_items_to_npc_zones(). Maybe I should just hijack that, instead of reinventing the wheel (but that means placing the zones during mapgen, which means old saves are SOL once we turn the food lever on)
Testing
2024-09-01.07-59-25.mp4
Additional context