Fix RS Brendan/May trainer sprites not displaying in editor

The getTrainerPicUrl() conversion produced rs_brendan.png and rs_may.png,
but the actual files are brendan_rs.png and may_rs.png. Added a name
override map for these two special cases.

https://claude.ai/code/session_01PnpVQ3UkymCVghfdigCJV9
This commit is contained in:
Claude 2026-03-21 10:52:40 +00:00
parent 62e05588e9
commit 4a39d0acd8
No known key found for this signature in database

View File

@ -2142,7 +2142,12 @@ function getSpriteHtml(graphicsId, size = 32) {
}
function getTrainerPicUrl(pic) {
const name = (pic || '').toLowerCase().replace(/\s+/g, '_');
const picNameOverrides = {
'rs brendan': 'brendan_rs',
'rs may': 'may_rs',
};
const lower = (pic || '').toLowerCase();
const name = picNameOverrides[lower] || lower.replace(/\s+/g, '_');
return `../graphics/trainers/front_pics/${name}.png`;
}