dependencies of extra card fields are now also added and updated;

this fixes combined_editor in extra fields.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1036 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-02 19:16:30 +00:00
parent 7aef2948e2
commit 2f5666ac5b
6 changed files with 47 additions and 10 deletions
+7
View File
@@ -102,6 +102,13 @@ SCRIPT_FUNCTION(to_int) {
} else if (t == SCRIPT_COLOR) {
AColor c = (AColor)*input;
result = (c.Red() + c.Blue() + c.Green()) / 3;
} else if (t == SCRIPT_STRING) {
long l;
if (input->toString().ToLong(&l)) {
result = l;
} else {
return new_intrusive1<ScriptDelayedError>(_ERROR_3_("can't convert value", input->toString(), input->typeName(), _TYPE_("integer")));
}
} else {
result = (int)*input;
}