Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/crnormand/gurps
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeffw committed Jan 12, 2025
2 parents 75695af + e593cc5 commit 426bf00
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions module/actor/actor-importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1648,16 +1648,17 @@ export class ActorImporter {
'system.traits': ts,
}

if (p.portrait) {
if (game.user.hasPermission('FILES_UPLOAD')) {
r.img = `data:image/png;base64,${p.portrait}.png`
} else {
await ui.notifications.error(
'You do not have "FILES_UPLOAD" permission, portrait upload has failed. Please ask your GM to import your character, or acquire the correct permissions.'
)
if (!!game.settings.get(Settings.SYSTEM_NAME, Settings.SETTING_OVERWRITE_PORTRAITS)) {
if (p.portrait) {
if (game.user.hasPermission('FILES_UPLOAD')) {
r.img = `data:image/png;base64,${p.portrait}.png`
} else {
await ui.notifications.error(
'You do not have "FILES_UPLOAD" permission, portrait upload has failed. Please ask your GM to import your character, or acquire the correct permissions.'
)
}
}
}

return r
}

Expand Down

0 comments on commit 426bf00

Please sign in to comment.