mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
adding & editing custom pack types now works.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1328 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -454,6 +454,13 @@ PackInstance& PackGenerator::get(const String& name) {
|
||||
if (instance) {
|
||||
return *instance;
|
||||
} else {
|
||||
FOR_EACH_CONST(type, set->pack_types) {
|
||||
if (type->name == name) {
|
||||
instance = PackInstanceP(new PackInstance(*type,*this));
|
||||
max_depth = max(max_depth, instance->get_depth());
|
||||
return *instance;
|
||||
}
|
||||
}
|
||||
FOR_EACH_CONST(type, set->game->pack_types) {
|
||||
if (type->name == name) {
|
||||
instance = PackInstanceP(new PackInstance(*type,*this));
|
||||
@@ -481,6 +488,13 @@ void PackGenerator::generate(vector<CardP>& out) {
|
||||
i.generate(&out);
|
||||
}
|
||||
}
|
||||
// ...and then set file order
|
||||
FOR_EACH_CONST(type, set->pack_types) {
|
||||
PackInstance& i = get(type);
|
||||
if (i.get_depth() == depth) {
|
||||
i.generate(&out);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user