Added a fix to prevent outpost exploit. Added a new flag war setting to only conquer outposts. Fixed negative upkeep #110
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.
Current towny behaviour allows users to claim an outpost, and then claim townblocks adjacent to it as non-outpost townblocks. This makes them exploit the outpost limit, because they can simply disband the outpost, claim it as standard town block, and do it again and again with as many areas as they want. I simply changed the isEdgeBlock method to not count adjacent outpost townblocks as town borders.
The second change adds a new mechanic I enabled on my server, and I thought others could enjoy it: that's a simple config option to only enable players to place flags on outpost blocks.
The third fix is about negative nation upkeeps: the economy handler tried to withdraw a negative amount (not supported by vault - not tested on other economy providers) instead of depositing a positive one, and I fixed it