District Defense Icon Repair

If you liked this item, please rate it up on Steam Workshop page.

Author: Sidoupiar

Last revision: 13 Jul, 2023 at 07:38 UTC

File size: 150.53 KB

On Steam Workshop

Description:

Use district default icon as defense icon when a district has no specific icon.
This is a common function, and it can be compatible with any districts (including districts added by other mods), even if districts do not have icons.
Does no affect with saves.

Compatibility:
This mod changed entire CityBannerManager file, maybe conflicts with other mods that change the same file.
Please report if you get any conflicts with this mod.

Technical guidance:
There are three step with the repairing work.
1. First, check if there are icons specifically for district defense, and if so, use them.
2. Second, if there no icons, determine if the district has its own standard icons, and if so, use them.
3. Finally, there are no icons any more, use default icons, which are used for encampment.

In addition, CityBannerManager_Suffix.lua in other mods can over write function CityBanner:UpdateEncampmentBannerTooltipExtra( pDistrict ) , and it will append text into district banner tooltips. (Needs NEWLINE to start a newline)