Closed SwissalpS closed 2 months ago
This was a premature PR on my part. Probably better to revert this one until we come up with a way to convert existing areas automatically. Some players are confused with the new paradigm.
@SwissalpS In this case it could be changed to a setting - preferably disabled for existing worlds and enabled by default for new ones.
the method getSmallestAreaAtPosition
could be kept whichever way we proceed.
I'll look into it, though probably not tonight or tomorrow, we have a planned blackout comming up...
suggested setting name: use_smallest_area_precedence any ideas for something shorter?
When checking for permission to interact, currently the smallest id takes precedence in a situation where areas enclose other areas. This makes it complicated to set up private areas within faction areas and vice versa. Same applies for open areas within a bigger private area.
When multiple areas have the same volume, players seem to agree that the most recently protected area should also take precedence. Since we can't guarantee that the largest id is the most recent, we still use that info as we have no other way to determine age.
In this PR the smallest area is determined and protection checks applied to that one.
Example usage: https://github.com/mt-mods/xp_redo/pull/74