Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Future Tech/Civic is unselectable #548

Open
chaorace opened this issue Jun 3, 2017 · 8 comments
Open

Future Tech/Civic is unselectable #548

chaorace opened this issue Jun 3, 2017 · 8 comments
Labels

Comments

@chaorace
Copy link
Member

chaorace commented Jun 3, 2017

This is a secondhand report from the Steam comments, but I've seen it a few times now and I think it's an edge case worth investigating since we do have some heuristics which specifically don't account for repeating techs

@ricanuck
Copy link

ricanuck commented Jun 4, 2017

Yes, I have seen it, quick workaround was to select Futures from the World Tracker instead, which is in fact easier than going to the Tree to select them.

@JHCD
Copy link

JHCD commented Jun 4, 2017

Never seen that problem and I always open the Tree...
Occours that problem only for the repeatable entries?

@chaorace
Copy link
Member Author

chaorace commented Jun 4, 2017

@JHCD Yes, I believe it's only for repeat entries

@chaorace chaorace added bug and removed Investigating labels Jun 4, 2017
@ricanuck
Copy link

ricanuck commented Jun 6, 2017

Yes, IIRC, it triggers after the first Future was selected, and you try to select the second.

@SpaceOgre
Copy link

The problem is here:

function SetCurrentNode( hash )
  if hash ~= nil then
    local localPlayerCulture = Players[Game.GetLocalPlayer()]:GetCulture();
    -- Get the complete path to the tech
    local pathToCivic = localPlayerCulture:GetCivicPath( hash );
    local tParameters = {};
    tParameters[PlayerOperations.PARAM_CIVIC_TYPE]  = pathToCivic;
    if m_shiftDown then
      tParameters[PlayerOperations.PARAM_INSERT_MODE] = PlayerOperations.VALUE_APPEND;
    else
      tParameters[PlayerOperations.PARAM_INSERT_MODE] = PlayerOperations.VALUE_EXCLUSIVE;
    end
    UI.RequestPlayerOperation(Game.GetLocalPlayer(), PlayerOperations.PROGRESS_CIVIC, tParameters);
        UI.PlaySound("Confirm_Civic_CivicsTree");
  else
    UI.DataError("Attempt to change current tree item with NIL hash!");
  end

end

It seems like localPlayerCulture:GetCivicPath does not work so well when the tech is researched. I think this is a problem in vanilla to since I can't find anything different from our code that interferes with this. I tried to replace the pathToCivic with the hash instead and that works.

I think we might need to a special SetCurrentNode for the future civic and tech that checks if is done and then just adds the hash instead of the pathToCivic.

@ehmonny
Copy link

ehmonny commented Aug 1, 2017

@SpaceOgre

Hey man, just wondering if there are any resolutions to this issue yet. I just downloaded the CQUI mod and I've run into the issue listed above. I'm not able to select tech/civic and I can't set any policies either.

I'm really not familiar with programming so I'm not sure if that was a solution that you posted above.

Any help is greatly appreciated.

Thanks

@SpaceOgre
Copy link

@ehmonny Sorry nothing yet and will have to wait until the Summer Patch fixes are done.

@ehmonny
Copy link

ehmonny commented Aug 1, 2017

Thanks very much for the quick reply

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants