Skip to content

Commit

Permalink
libdoomsday|GameProfiles: Querying all the packages of a game profile
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Mar 30, 2016
1 parent f0185ee commit 6fe50b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doomsday/apps/libdoomsday/include/doomsday/gameprofiles.h
Expand Up @@ -48,6 +48,12 @@ class LIBDOOMSDAY_PUBLIC GameProfiles : public de::Profiles
de::StringList packages() const;
bool isUserCreated() const;

/**
* Returns a list of the game's packages in addition to the profile's
* configured packages.
*/
de::StringList allRequiredPackages() const;

virtual bool resetToDefaults();
virtual de::String toInfoSource() const;

Expand Down
6 changes: 6 additions & 0 deletions doomsday/apps/libdoomsday/src/gameprofiles.cpp
Expand Up @@ -150,6 +150,12 @@ bool GameProfiles::Profile::isUserCreated() const
return d->userCreated;
}

StringList GameProfiles::Profile::allRequiredPackages() const
{
return DoomsdayApp::games()[d->gameId].requiredPackages() +
d->packages;
}

bool GameProfiles::Profile::resetToDefaults()
{
if(isReadOnly()) return false;
Expand Down

0 comments on commit 6fe50b1

Please sign in to comment.