From 9e40864949dfc7aa65653eccb957a0acd7f287ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Thu, 11 Jun 2026 14:43:52 +0200 Subject: [PATCH] No longer handle resource as path --- scripts/generate-database.js | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/scripts/generate-database.js b/scripts/generate-database.js index 617a4dee8..ceb781ea1 100644 --- a/scripts/generate-database.js +++ b/scripts/generate-database.js @@ -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. @@ -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);