mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
stylesheet and export template have a dependency on the game
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@774 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -63,6 +63,15 @@ String StyleSheet::stylesheetName() const {
|
||||
String StyleSheet::typeNameStatic() { return _("style"); }
|
||||
String StyleSheet::typeName() const { return _("style"); }
|
||||
|
||||
void StyleSheet::validate(Version) {
|
||||
if (!game) {
|
||||
throw Error(_ERROR_("no game specified for stylesheet"));
|
||||
}
|
||||
// a stylsheet depends on the game it is made for
|
||||
requireDependency(game.get());
|
||||
}
|
||||
|
||||
|
||||
StyleP StyleSheet::styleFor(const FieldP& field) {
|
||||
if (card_style.containsKey(field)) {
|
||||
return card_style[field];
|
||||
|
||||
Reference in New Issue
Block a user