Azurency / CQUI_Community-Edition

Civilization 6 mod - UI enhancements, reduce clicks and manage your empire faster!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing "else" - resulting in duplicated Gov icons

Infixo opened this issue · comments

Describe the bug
In the Civics tree, the government icons are duplicated when using Better Tech Tree mod. It is the result of a missing "else" in the file. See later for details.

To Reproduce
Load any game with BTT active and open CivicsTree.

Expected behavior
One gov icon.

General informations

  • OS: Win7
  • Version: 1.0.0.262
  • Expansion: Rise and Fall
  • Other mods: Better Tech Tree

You need to add word "else" to the file civicstree.lua. It is present in the standard file, so it is clearly a mistake.

Around line 506 there is:

    if node["unlockGOV"] == nil then
      node["unlockGOV"] = InstanceManager:new( "GovernmentIcon", "GovernmentInstanceGrid", node.UnlockStack );
      node["unlockGOV"]:DestroyInstances()
    end

The word "else" should be added in-between, so it will look like this:

    if node["unlockGOV"] == nil then
      node["unlockGOV"] = InstanceManager:new( "GovernmentIcon", "GovernmentInstanceGrid", node.UnlockStack );
   else
      node["unlockGOV"]:DestroyInstances()
    end