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

Add displayGameName() and lootGameName() to plugin-base #141

Merged
merged 2 commits into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/iplugingame.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ class IPluginGame : public QObject, public IPlugin
*/
virtual QString gameName() const = 0;

/**
* used to override display-specific text in place of the gameName
* for example the text for the main window or the initial instance creation game
* plugin selection/list
*
* added for future translation purposes or to make plugins visually more accurate in
* the ui
*
* @return display-specific name of the game
*/
virtual QString displayGameName() const { return gameName(); }

template <typename T>
T* feature() const
{
Expand Down Expand Up @@ -257,6 +269,14 @@ class IPluginGame : public QObject, public IPlugin
*/
virtual QString gameShortName() const = 0;

/**
* @brief game name that's passed to the LOOT cli --game argument
*
* only applicable for games using LOOT based sorting
* defaults to gameShortName()
*/
virtual QString lootGameName() const { return gameShortName(); }

/**
* @brief Get any primary alternative 'short' name for the game
*
Expand Down
Loading