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

Method load_base_script

compat/fake_gdscript.cpp:67–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67Ref<Script> FakeGDScript::load_base_script() const {
68 Ref<Script> base_script;
69 size_t len = local_base_type.length();
70 auto data = local_base_type.get_data();
71 String path;
72 if (len > 3 && data[len - 3] == '.' && data[len - 2] == 'g' && data[len - 1] == 'd') {
73 path = local_base_type;
74 } else {
75 path = GDRESettings::get_singleton()->get_path_for_script_class(local_base_type);
76 }
77 if (path.is_empty()) {
78 return {};
79 }
80 base_script = ResourceCompatLoader::custom_load(path, "", load_type);
81 return base_script;
82}
83
84Ref<Script> FakeGDScript::get_base_script() const {
85 if (base.is_null()) {

Callers

nothing calls this directly

Calls 3

lengthMethod · 0.80
get_dataMethod · 0.45

Tested by

no test coverage detected