MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / OnProcessInclude

Method OnProcessInclude

Sources/Jazz2/Scripting/LevelScriptLoader.cpp:177–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175 }
176
177 String LevelScriptLoader::OnProcessInclude(StringView includePath, StringView scriptPath)
178 {
179 // Skip MLLE files, because it's handled natively
180 if (includePath.hasPrefix("MLLE-Include-"_s) && includePath.hasSuffix(".asc"_s)) {
181 return {};
182 }
183
184 // TODO: Allow multiple search paths
185 //return ConstructPath(includePath, path);
186
187 auto sourcePath = ContentResolver::Get().GetSourcePath();
188 return fs::FindPathCaseInsensitive(fs::CombinePath(sourcePath, includePath));
189 }
190
191 void LevelScriptLoader::OnProcessPragma(StringView content, ScriptContextType& contextType)
192 {

Callers

nothing calls this directly

Calls 3

GetSourcePathMethod · 0.80
hasPrefixMethod · 0.45
hasSuffixMethod · 0.45

Tested by

no test coverage detected