ScriptObject now looks for a default member for everything that it can not handle, meaning that scripts based on values now work.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@72 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-11-01 17:54:14 +00:00
parent f18bdafab1
commit ea5be88bdb
7 changed files with 63 additions and 24 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ ScriptImageP ScriptableImage::update(Context& ctx, Package& pkg, UInt width, UIn
bool ScriptableImage::upToDate(Context& ctx, Age age) const {
try {
WITH_DYNAMIC_ARG(last_update_age, age.get());
return (int)*script.invoke(ctx);
return script_image_up_to_date(script.invoke(ctx));
} catch (Error e) {
return true; // script gives errors, don't update
}