mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
make to_json work on StyleP and IndexMap
This commit is contained in:
@@ -271,10 +271,9 @@ SCRIPT_FUNCTION(to_json) {
|
||||
SCRIPT_PARAM_C(ScriptValueP, input);
|
||||
SCRIPT_PARAM_C(Set*, set);
|
||||
SCRIPT_PARAM_DEFAULT(bool, pretty_print, true);
|
||||
SCRIPT_PARAM_DEFAULT(bool, console_print, false);
|
||||
boost::json::value jv = mse_to_json(input, set);
|
||||
|
||||
queue_message(MESSAGE_ERROR, json_pretty_print(jv));
|
||||
|
||||
if (console_print) queue_message(MESSAGE_INFO, json_pretty_print(jv));
|
||||
if (pretty_print) return to_script(json_pretty_print(jv));
|
||||
else return to_script(json_ugly_print(jv));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user