mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
add is_default script function
This commit is contained in:
@@ -187,6 +187,13 @@ SCRIPT_FUNCTION_DEPENDENCIES(combined_editor) {
|
||||
}
|
||||
}
|
||||
return dependency_dummy;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Values
|
||||
|
||||
SCRIPT_FUNCTION(is_default) {
|
||||
SCRIPT_PARAM_C(ValueP,input);
|
||||
SCRIPT_RETURN(input->isDefault());
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Choice values
|
||||
@@ -389,6 +396,7 @@ SCRIPT_FUNCTION(count_chosen) {
|
||||
void init_script_editor_functions(Context& ctx) {
|
||||
ctx.setVariable(_("forward_editor"), script_combined_editor); // compatability
|
||||
ctx.setVariable(_("combined_editor"), script_combined_editor);
|
||||
ctx.setVariable(_("is_default"), script_is_default);
|
||||
ctx.setVariable(_("primary_choice"), script_primary_choice);
|
||||
ctx.setVariable(_("chosen"), script_chosen);
|
||||
ctx.setVariable(_("count_chosen"), script_count_chosen);
|
||||
|
||||
Reference in New Issue
Block a user