Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future Tech/Civic is unselectable #115

Open
Azurency opened this issue Sep 23, 2017 · 8 comments
Open

Future Tech/Civic is unselectable #115

Azurency opened this issue Sep 23, 2017 · 8 comments
Labels

Comments

@Azurency
Copy link
Owner

Issue by chaorace
Saturday Jun 03, 2017 at 04:12 GMT
Originally opened as CQUI-Org/cqui#548


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

@Azurency Azurency added the bug label Sep 23, 2017
@Azurency
Copy link
Owner Author

Comment by ricanuck
Sunday Jun 04, 2017 at 03:27 GMT


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.

@Azurency
Copy link
Owner Author

Comment by JHCD
Sunday Jun 04, 2017 at 11:28 GMT


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

@Azurency
Copy link
Owner Author

Comment by chaorace
Sunday Jun 04, 2017 at 17:38 GMT


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

@Azurency
Copy link
Owner Author

Comment by ricanuck
Tuesday Jun 06, 2017 at 17:40 GMT


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

@Azurency
Copy link
Owner Author

Comment by SpaceOgre
Saturday Jul 08, 2017 at 11:13 GMT


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.

@Azurency
Copy link
Owner Author

Comment by ehmonny
Tuesday Aug 01, 2017 at 04:03 GMT


@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

@Azurency
Copy link
Owner Author

Comment by SpaceOgre
Tuesday Aug 01, 2017 at 08:24 GMT


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

@Azurency
Copy link
Owner Author

Comment by ehmonny
Tuesday Aug 01, 2017 at 20:49 GMT


Thanks very much for the quick reply

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

No branches or pull requests

1 participant