Yet Another World Protector

Yet Another World Protector

247k Downloads

Automatic Priority consistency for overlaping regions

Z0rdak opened this issue ยท 1 comments

commented

Description

When checking flag permission in a local region, only one region should be responsible for the check.

This means that there should be no two regions with the same priority with the same flag in the same location.

Right now this has to be managed manually by admins. A system that adjusts priorities accordingly to ensure consistency of priorities for overlapping regions as well as the region hierarchy would relieve the admin from this management

TODO

  • Implement check to prevent two region with the same priority at the same position
  • Increment priority of region in this case
commented

Scenarios in which the region priority needs to be checked/adjusted:

  • changing the priority by hand (obviously; prevent the same priority for overlapping regions)
  • creating a new region (increase priority)
  • updating the area of a region (prevent if new overlapping regions with the same priority exist)
  • adding a child to a region (increase priority)
  • removing a child from a region (reduce priority and maybe deactivate region)