Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions scripts/generate-database.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,35 +109,6 @@ const getAllExampleFiles = (allFiles) => {
});
};

/**
*
* @param {libGDevelop} gd
* @param {gdProject} project
* @param {string} baseUrl
*/
const updateResources = (gd, project, baseUrl) => {
const worker = new gd.ArbitraryResourceWorkerJS(
project.getResourcesManager()
);
/** @param {string} file */
worker.exposeImage = (file) => {
// Don't do anything
return file;
};
/** @param {string} shader */
worker.exposeShader = (shader) => {
// Don't do anything
return shader;
};
/** @param {string} file */
worker.exposeFile = (file) => {
if (file.length === 0) return '';
return baseUrl + '/' + file;
};

gd.ResourceExposer.exposeWholeProjectResources(project, worker);
};

/**
* Check that the resources in the project all have an existing file
* in the project folder.
Expand Down Expand Up @@ -599,8 +570,6 @@ const updateExampleFiles = async (gd, allExampleFiles) => {
}

const project = loadSerializedProject(gd, projectObject);
const gameFolderPath = path.dirname(fileWithMetadata.path);
updateResources(gd, project, getResourceUrl(gameFolderPath));

try {
await writeProjectJSONFile(gd, project, fileWithMetadata.path);
Expand Down
Loading