TownyProvinces
TownyProvinces copied to clipboard
Limit Scope of price recalculation
- Currently the price recalculation function starts after every regeneration, and recalculates ALL prices in the world
- This is going to overwrite any custom prices which a server has put on
- Solution: Limit the recalculation function only to affected provinces:
- Some provinces were deleted, we can ignore those
- Some provinces were added....yes we want to calculate those
- Some existing provinces may have expanded...yes we want to do those
- To do this, we need, for every regeneration job, to keep a list of changed provinces e.g.
- deletedProvinces
- newProvinces
- updatedProvinces
This work is less important now that the price limiter is in place