civfanatics / CQUI_Community-Edition

Civilization 6 mod - UI enhancements, reduce clicks and manage your empire faster!
MIT License
149 stars 28 forks source link

Show indicator for assignable governor #359

Closed JamieNyanchi closed 1 year ago

JamieNyanchi commented 1 year ago

Shows an alert indicator on the governor button in the launch bar when a governor can be assigned to a city, but currently isn't. Resolves #332.

Currently, the alert indicator is only shown when a governor can be appointed or promoted. However, if a governor is appointed, but not assigned to a city, there is no indicator shown. With this change, an indicator is shown.

Checks are done to make sure to not show the indicator if a governor is currently neutralized or if there are governors that cannot be assigned, such as the Secret Society governors.

This change does include the GovernorSupport file into launchbar_CQUI.lua. This is for the IsCannotAssign function. In addition, instead of rebuilding the governor button instance in the launch bar, the code searches for the alert indicator instead. This prevents having to extend/overwrite other functions.

As always, I am happy to make any changes or provide any more info if requested.