mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user