TownyProvinces icon indicating copy to clipboard operation
TownyProvinces copied to clipboard

Limit Scope of price recalculation

Open Goosius1 opened this issue 2 years ago • 1 comments

  • 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

Goosius1 avatar Jul 07 '23 15:07 Goosius1

This work is less important now that the price limiter is in place

Goosius1 avatar Jul 13 '23 09:07 Goosius1