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

Unit automation uses defunct UnitActionType.StartGoldenAge #11576

Open
SomeTroglodyte opened this issue May 9, 2024 · 2 comments
Open

Unit automation uses defunct UnitActionType.StartGoldenAge #11576

SomeTroglodyte opened this issue May 9, 2024 · 2 comments

Comments

@SomeTroglodyte
Copy link
Collaborator

SomeTroglodyte commented May 9, 2024

Game Version

current master from source

Describe the bug

This line - the actual UnitActionType used for starting golden ages is now TriggerUnique for the OneTimeEnterGoldenAgeTurns UniqueType.

Actually, all three objects named StartGoldenAge are dead - UnitAction, KeyboardBinding and UniqueType - and have no implementation.

Steps to Reproduce

Read source and use Ctrl-Shift-F and Alt-F7 extensively?

I have no idea hot to coax the AI to run into that line - but it's definitely not clean.

Additional Information

Replacing that if with

            if (!improvementCanBePlacedEventually) {
                val unique = unit.getMatchingUniques(UniqueType.OneTimeEnterGoldenAgeTurns).firstOrNull()
                if (unique != null) UniqueTriggerActivation.triggerUnique(unique, unit)
            }

is obviously bull - that's a fallback within specialized UniqueType.ConstructImprovementInstantly AI code. But civilian AI has absolutely nothing elsewhere I can find for the ubiquitous starting golden ages capability of those Great People... sounds like this should be included in some higher-level AI overhaul. @tuvus - specialist to the rescue?? Consider - why is there no fuzzy logic for automateCivilianUnit that compares estimated values? It's all if I can do - done - return. Sounds less than optimally clever.

@yairm210
Copy link
Owner

The unique is already deprecated
Agree that the unit action should be killed since it should have 0 use

@SomeTroglodyte
Copy link
Collaborator Author

19be963

Still leaves the question open how the AI now is supposed to ever use a GP to start a GA. Let's think about that... A little... While not otherwise distracted...

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

No branches or pull requests

2 participants