MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / create_derived_version_from_custom_def

Method create_derived_version_from_custom_def

bytecode/bytecode_versions.cpp:353–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351}
352
353GDScriptDecompVersion GDScriptDecompVersion::create_derived_version_from_custom_def(int revision, Dictionary p_custom_def){
354 Ref<GDScriptDecomp> decomp = create_decomp_for_commit(revision);
355 ERR_FAIL_COND_V(decomp.is_null(), GDScriptDecompVersion());
356 Dictionary ref_def = decomp->to_json();
357 ERR_FAIL_COND_V(ref_def.is_empty(), GDScriptDecompVersion());
358 int parent = decomp->get_bytecode_rev();
359 for (auto &E : p_custom_def) {
360 ref_def.set(E.key, E.value);
361 }
362 ref_def["parent"] = String::num_int64(parent, 16).to_lower();
363 return create_version_from_custom_def(ref_def);
364}
365
366
367int GDScriptDecompVersion::register_decomp_version_custom(Dictionary p_custom_def) {

Callers

nothing calls this directly

Calls 4

setMethod · 0.80
to_jsonMethod · 0.45
get_bytecode_revMethod · 0.45

Tested by

no test coverage detected