mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
- Optimization: common parameters to built in functions are no longer looked up as a string at each call, instead their integer ids are global constants
- Optimization: some other minor tweaks. - Nicer --help message git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@783 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -59,7 +59,7 @@ class OptionalScript {
|
||||
bool invokeOn(Context& ctx, T& value) const {
|
||||
if (script) {
|
||||
T new_value;
|
||||
ctx.setVariable(_("value"), to_script(value));
|
||||
ctx.setVariable(SCRIPT_VAR_value, to_script(value));
|
||||
store(ctx.eval(*script), new_value);
|
||||
if (value != new_value) {
|
||||
change(value, new_value);
|
||||
|
||||
Reference in New Issue
Block a user