| 527 | } |
| 528 | |
| 529 | void ScriptServer::save_global_classes() { |
| 530 | Dictionary class_icons; |
| 531 | |
| 532 | Array script_classes = ProjectSettings::get_singleton()->get_global_class_list(); |
| 533 | for (const Variant &script_class : script_classes) { |
| 534 | Dictionary d = script_class; |
| 535 | if (!d.has("name") || !d.has("icon")) { |
| 536 | continue; |
| 537 | } |
| 538 | class_icons[d["name"]] = d["icon"]; |
| 539 | } |
| 540 | |
| 541 | List<StringName> gc; |
| 542 | get_global_class_list(&gc); |
| 543 | Array gcarr; |
| 544 | for (const StringName &E : gc) { |
| 545 | const GlobalScriptClass &global_class = global_classes[E]; |
| 546 | Dictionary d; |
| 547 | d["class"] = E; |
| 548 | d["language"] = global_class.language; |
| 549 | d["path"] = global_class.path; |
| 550 | d["base"] = global_class.base; |
| 551 | d["icon"] = class_icons.get(E, ""); |
| 552 | d["is_abstract"] = global_class.is_abstract; |
| 553 | d["is_tool"] = global_class.is_tool; |
| 554 | gcarr.push_back(d); |
| 555 | } |
| 556 | ProjectSettings::get_singleton()->store_global_class_list(gcarr); |
| 557 | } |
| 558 | |
| 559 | Vector<Ref<ScriptBacktrace>> ScriptServer::capture_script_backtraces(bool p_include_variables) { |
| 560 | if (is_program_exiting) { |
nothing calls this directly
no test coverage detected