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
Features "(Currently player only) Factions can take over and loot camps they don't own"
Purpose of change
Further expansion of basecamp support. Now that NPCs have camps, I'd like the player to be able to interact with them (and eventually, but not yet, vice versa).
Also address some outstanding issues.
-Address #73372 (comment) (z-level doesn't prevent Luliya/etc from eating from food supply, was much easier than I thought).
-Remove isherwoods' 4th camp. I did not realize that the cabin ends up being a gift to the player. Kind of a jerk of a gift if their name is all over it, you know? But with this PR you can - peacefully(or not) - put your name on it even if it's already got theirs on it.
-Closed up a dialogue talk function which let you inappropriately access camp functions by speaking to a follower that was located at a camp you didn't own
Describe the solution
Add the function for handling camp takeovers. Is currently only accessed through a bulletin board at a camp you don't own, and requires there to be no nearby NPCs of the owning faction in the bubble.
For the player, it gives the option of looting the camp of anything of value. Doing so will of course make the previous owner hate you if they didn't already, but also transfer food supply in proportion to their total camp holdings (e.g. a single-camp faction has its entire stockpile plundered, a 10-camp faction has 10% stolen).
Add an event bus pulse that triggers when a camp is taken over
Make a little EOC which uses the event bus pulse, to light the way for other contributors.
Fix my bad math and misplaced cabin camp from the previous PR
Describe alternatives you've considered
Testing
2024-06-16.14-20-31.mp4
Additional context