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

Fix game version warning #1310

Merged
merged 3 commits into from
Jan 25, 2022
Merged

Fix game version warning #1310

merged 3 commits into from
Jan 25, 2022

Conversation

originalfoo
Copy link
Member

@originalfoo originalfoo commented Jan 25, 2022

Fixes #1309
Fixes #697

Game version warning message was "inverted" (eg. if game too old it was saying TM:PE too old, and vice versa).

New message looks like this - title changes depending on what is too old, but message stays same.

image

Additionally the auto-resume feature added by Paradox Launcher will be cancelled if compatibility issues (either game version or mod compatibility checker) are found.

@originalfoo originalfoo added UI User interface updates DO NOT MERGE YET Don't merge this PR, even if approved, until further notice labels Jan 25, 2022
@originalfoo originalfoo added this to the 11.6.4 milestone Jan 25, 2022
@originalfoo originalfoo self-assigned this Jan 25, 2022
@originalfoo originalfoo marked this pull request as draft January 25, 2022 01:45
Copy link
Member

@krzychu124 krzychu124 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

TLM/TLM/Util/VersionUtil.cs Show resolved Hide resolved
@originalfoo
Copy link
Member Author

originalfoo commented Jan 25, 2022

659e59d : The launcher "Resume" feature will now be halted if there is a game version or mod compatibility issue, ensuring the user stays at main menu where the dialog/panel is shown.

Log contains this if the 'resume halt' is used:

Halting game 'Resume' feature due to incompatibility issue.

@originalfoo originalfoo marked this pull request as ready for review January 25, 2022 02:22
@originalfoo originalfoo removed the DO NOT MERGE YET Don't merge this PR, even if approved, until further notice label Jan 25, 2022
originalfoo added a commit that referenced this pull request Jan 25, 2022
@originalfoo
Copy link
Member Author

ready for review/merge :)

@originalfoo originalfoo requested a review from a team January 25, 2022 02:35
@originalfoo originalfoo added the COMPATIBILITY Mod (in)compatibility / checker label Jan 25, 2022
@krzychu124
Copy link
Member

Hmmm it looks like it does not work for me 🤔 I saw dialog for half second and loading started...

@originalfoo
Copy link
Member Author

Urg, maybe they changed something - or the checks are kicking in too late in the lifecycle?

@krzychu124
Copy link
Member

It's triggered in LoadIntroComplete (m_introLoaded event) so a bit too late

Error 14.9722435: TM:PE 11.6.3 TEST is designed for Cities: Skylines 1.14.0-f4. However you are using Cities: Skylines 1.13.3-f9 - this is likely to cause severe problems or crashes.

Please ensure you're using the right version of TM:PE for this version of Cities: Skylines before proceeding, or disable TM:PE until the problem is resolved. If you need help, contact us via Steam Workshop page or Discord chat.
   at CSUtil.Commons.Log.LogToFile(System.String log, LogLevel level)
   at CSUtil.Commons.Log.Error(System.String s)
   at TrafficManager.Util.VersionUtil.CheckGameVersion()
   at TrafficManager.Lifecycle.TMPELifecycle.CompatibilityCheck()
   at LoadingManager+<LoadIntroComplete>c__Iterator8.MoveNext()
   at LoadingManager.FpsBoosterUpdate()
   at BehaviourUpdater.Updater.Update()

@originalfoo
Copy link
Member Author

Here, specifically:

image

@originalfoo
Copy link
Member Author

Oh, wait, I know what I did wrong...

I need to grab tbe value early, set it false, then if checks pass with no problems set it true and continue.

1 sec, will update code...

@krzychu124
Copy link
Member

Oh, wait, I know what I did wrong...

I need to grab tbe value early, set it false, then if checks pass with no problems set it true and continue.

1 sec, will update code...

I was about to say that, since user can't make any decision if continue or not...

@originalfoo
Copy link
Member Author

Stopping it in TMPELifecycle.StartMod(); should be early enough, yes?

@krzychu124
Copy link
Member

Stopping it in TMPELifecycle.StartMod(); should be early enough, yes?

Hehe, you can't do that earlier (that method is called in OnEnabled)

@originalfoo
Copy link
Member Author

Constructor of TrafficManagerMod or is that still too late?

@krzychu124
Copy link
Member

Constructor of TrafficManagerMod or is that still too late?

.ctor is called right before OnEnabled so either this or that. In any means looking at detailed log of initialization of game components both are good enough spots

@originalfoo
Copy link
Member Author

ok, try that :)

@krzychu124
Copy link
Member

Hehe, I thought you will check for incompatibilities and disable if necessary then wait to show dialog with warning 😄

Anyways, feature is working as it should. Merging...

@krzychu124 krzychu124 merged commit 649afe9 into master Jan 25, 2022
@originalfoo
Copy link
Member Author

I can't check incompatibilities of mods reliably at that stage (tried that back in #699 )

@originalfoo originalfoo deleted the game-ver-warning-typo branch January 25, 2022 03:34
@originalfoo originalfoo mentioned this pull request Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMPATIBILITY Mod (in)compatibility / checker UI User interface updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typo in game version warning panel The --continuelastsave launch option skips mod checker panel
2 participants