mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Add update_cards_scripts
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <data/stylesheet.hpp>
|
||||
#include <data/game.hpp>
|
||||
#include <data/field.hpp>
|
||||
#include <data/update_cards_script.hpp>
|
||||
#include <util/io/package_manager.hpp>
|
||||
#include <gui/new_window.hpp> // for selecting stylesheets on load error
|
||||
|
||||
@@ -75,7 +76,11 @@ void StyleSheet::validate(Version ver) {
|
||||
throw Error(_ERROR_1_("no game specified",_TYPE_("stylesheet")));
|
||||
}
|
||||
// a stylesheet depends on the game it is made for
|
||||
requireDependency(game.get());
|
||||
requireDependency(game.get());
|
||||
// sort the update_cards_scripts from oldest to newest
|
||||
std::sort(update_cards_scripts.begin(), update_cards_scripts.end(), [](const auto& a, const auto& b) {
|
||||
return *a < *b;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -125,6 +130,7 @@ IMPLEMENT_REFLECTION(StyleSheet) {
|
||||
extra_card_style.init(extra_card_fields);
|
||||
}
|
||||
REFLECT(extra_card_style);
|
||||
REFLECT_NO_SCRIPT(update_cards_scripts);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user