Prototyping

This commit is contained in:
artisticMink
2023-10-21 15:12:09 +02:00
parent a5b5dfdcb6
commit 6eb6527d11
10 changed files with 664 additions and 19 deletions

View File

@ -42,16 +42,18 @@ async function createDummyPersona() {
await uploadUserAvatar(default_avatar);
}
async function convertCharacterToPersona() {
const avatarUrl = characters[this_chid]?.avatar;
export async function convertCharacterToPersona(characterId = null) {
if (null === characterId) characterId = this_chid;
const avatarUrl = characters[characterId]?.avatar;
if (!avatarUrl) {
console.log("No avatar found for this character");
return;
}
const name = characters[this_chid]?.name;
let description = characters[this_chid]?.description;
const name = characters[characterId]?.name;
let description = characters[characterId]?.description;
const overwriteName = `${name} (Persona).png`;
if (overwriteName in power_user.personas) {