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

Use lootGameName() and displayGameName() in initial places #2030

Closed

Conversation

Twinki14
Copy link
Contributor

@Twinki14 Twinki14 commented May 20, 2024

Motivations

Modifications

  • Use displayGameName() in create instance dialogs & the main window, this doesn't cover all places gameName() was being used for purely display reasons, but it covers the bulk
  • Use lootGameName() instead of gameShortName() for LOOT cli initiation

# Motivations
- ModOrganizer2/modorganizer-game_ttw#36 (comment) Surfaced desires to change the Fallout TTW plugin's gameName to something more obvious, from TTW to Tale of Two Wastelands, but that would cause existing profiles to break, `displayGameName()` added in ModOrganizer2/modorganizer-uibase#141 gives us the option to change the way the game plugin is displayed, but leaves the existing integral `gameName()` alone
- Similarly ModOrganizer2/modorganizer-game_ttw#36 attempted to fix the sort button LOOT cli argument by changing the `gameShortName()`, as 'TTW' isn't a valid option for LOOT, but that comes with some pretty concerning possible issues

# Modifications
- Use `displayGameName()` in create instance dialogs & the main window, this doesn't cover all places `gameName()` was being used for purely display reasons, but it covers the bulk
- Use `lootGameName()` instead of `gameShortName()` for LOOT cli initiation
@Twinki14
Copy link
Contributor Author

Note, it's expected the build will fail until ModOrganizer2/modorganizer-uibase#141 is merged

@@ -570,7 +571,8 @@ void GamePage::fillList()
continue;
}

if (!m_filter.matches(g->game->gameName())) {
if (!m_filter.matches(g->game->gameName()) &&
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this should be kept - The gameName() is now internal only, so using it to filter for users could lead to unexpected behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This area is just the filter search when creating a profile, I don't think it'd hurt anything to continue using the gameName alongside the displayName

For tale of two wastelands for example I can search "TTW" or "Tale of Two wastelands"

@Twinki14 Twinki14 requested a review from Holt59 May 24, 2024 18:35
Holt59 added a commit that referenced this pull request May 26, 2024
* Use `displayGameName()` in create instance dialogs & the main window, this doesn't cover all places `gameName()` was being used for purely display reasons, but it covers the bulk.
* Use `lootGameName()` instead of `gameShortName()` for LOOT cli initiation.
* Use game display name in status bar.
Holt59 added a commit that referenced this pull request May 26, 2024
* Use `displayGameName()` in create instance dialogs & the main window, this doesn't cover all places `gameName()` was being used for purely display reasons, but it covers the bulk.
* Use `lootGameName()` instead of `gameShortName()` for LOOT cli initiation.
* Use game display name in status bar.

---------

Co-authored-by: Twinki <[email protected]>
@Holt59
Copy link
Member

Holt59 commented May 26, 2024

Merged manually due to conflict on translation file (+ added change to status bar), 1871f32

@Holt59 Holt59 closed this May 26, 2024
@Twinki14 Twinki14 deleted the use-new-plugin-base-additions branch May 26, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants