Module Province Production Utils¶
A utility class responsible for providing info about unit production and building construction of a province(s). This package is especially useful when the UI needs to display info about certain productions when multiple provinces are selected. In addition, it also provides info about construction or unit production item groups (level based) which is mostly necessary when the UI needs to display previous + next level of the targeted item type with its current status.
It uses burst whenever it's necessary as calculating production info becomes expensive when the user has thousands of provinces.
Remarks: - currently, doesn't support research and factions for unit production. - it assumes that an upgrade content item cannot be used to represent multiple levels (buildCondition = maxCondition). - it assumes that the "replaced" or "replacing" upgrade will always be the previous/next level of the current upgrade. - it can be further improved as some places in the code are calculating the same thing through different method calls.