diff --git a/editor/app.js b/editor/app.js index 3188957096..bd4359df5c 100644 --- a/editor/app.js +++ b/editor/app.js @@ -2127,9 +2127,13 @@ function makeSelectHtml(id, value, options, extraAttrs = '') { return ``; } +function rawFileUrl(filePath) { + return `https://raw.githubusercontent.com/${REPO_OWNER}/${REPO_NAME}/${BRANCH}/${filePath}`; +} + function getSpriteUrl(graphicsId) { const name = (graphicsId || '').replace('OBJ_EVENT_GFX_', '').toLowerCase(); - return `../graphics/object_events/pics/people/${name}.png`; + return rawFileUrl(`graphics/object_events/pics/people/${name}.png`); } function getSpriteHtml(graphicsId, size = 32) { @@ -2148,7 +2152,7 @@ function getTrainerPicUrl(pic) { }; const lower = (pic || '').toLowerCase(); const name = picNameOverrides[lower] || lower.replace(/\s+/g, '_'); - return `../graphics/trainers/front_pics/${name}.png`; + return rawFileUrl(`graphics/trainers/front_pics/${name}.png`); } function getTrainerPicHtml(pic, size = 64) {