MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / add_patch

Method add_patch

editor/export/editor_export_preset.cpp:423–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423void EditorExportPreset::add_patch(const String &p_path, int p_at_pos) {
424 ERR_FAIL_COND_EDMSG(patches.has(p_path), vformat("Failed to add patch \"%s\". Patches must be unique.", p_path));
425
426 if (p_at_pos < 0) {
427 patches.push_back(p_path);
428 } else {
429 patches.insert(p_at_pos, p_path);
430 }
431
432 EditorExport::singleton->save_presets();
433}
434
435void EditorExportPreset::set_patch(int p_index, const String &p_path) {
436 remove_patch(p_index);

Callers 2

drop_data_fwMethod · 0.80
_patch_file_selectedMethod · 0.80

Calls 5

vformatFunction · 0.85
save_presetsMethod · 0.80
hasMethod · 0.45
push_backMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected