From d5469041633d1e7c29a043a77852e3eed7246eec Mon Sep 17 00:00:00 2001 From: twanvl Date: Wed, 4 Aug 2010 15:07:07 +0000 Subject: [PATCH] A simple default "any card" pack if there are no packs specified in the game file git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1480 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/data/game.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/data/game.cpp b/src/data/game.cpp index 522683c7..2861626d 100644 --- a/src/data/game.cpp +++ b/src/data/game.cpp @@ -90,6 +90,16 @@ void Game::validate(Version v) { } statistics_categories.insert(statistics_categories.begin(), cats.begin(), cats.end()); // push front } + // automatic pack if there are none + if (pack_types.empty()) { + PackTypeP pack(new PackType); + pack->name = _("Any card"); + pack->enabled = true; + pack->selectable = true; + pack->summary = true; + pack->filter = OptionalScript(_("true")); + pack_types.push_back(pack); + } } void Game::initCardListColorScript() {