mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Added clone() function to Value.
Added support for per-card styling git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@430 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -72,11 +72,14 @@ Context& SetScriptContext::getContext(const StyleSheetP& stylesheet) {
|
||||
}
|
||||
}
|
||||
Context& SetScriptContext::getContext(const CardP& card) {
|
||||
Context& ctx = getContext(set.stylesheetForP(card));
|
||||
StyleSheetP stylesheet = set.stylesheetForP(card);
|
||||
Context& ctx = getContext(stylesheet);
|
||||
if (card) {
|
||||
ctx.setVariable(_("card"), to_script(card));
|
||||
ctx.setVariable(_("styling"), to_script(&set.stylingDataFor(card)));
|
||||
} else {
|
||||
ctx.setVariable(_("card"), ScriptValueP());
|
||||
ctx.setVariable(_("styling"), to_script(&set.stylingDataFor(*stylesheet)));
|
||||
}
|
||||
return ctx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user