diff options
| author | stonedDiscord <Tukz@gmx.de> | 2025-09-03 10:27:49 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2025-09-03 10:27:49 +0200 |
| commit | e58dcb7186bb3c80ba87279a6643fcb4b8b3b2be (patch) | |
| tree | 8de01c198902b2341fc53029025681735225c807 | |
| parent | 14b569e05ab43baf76fd6404ca50a2b05a843134 (diff) | |
emotions
| -rw-r--r-- | webAO/client.ts | 2 | ||||
| -rw-r--r-- | webAO/client/fetchLists.ts | 2 | ||||
| -rw-r--r-- | webAO/packets/handlers/handlePV.ts | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/webAO/client.ts b/webAO/client.ts index 46f4ba9..27861de 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -154,6 +154,7 @@ class Client extends EventEmitter { isLowMemory: () => void; charicon_extensions: string[]; emote_extensions: string[]; + emotions_extensions: string[]; constructor(connectionString: string) { super(); @@ -214,6 +215,7 @@ class Client extends EventEmitter { isLowMemory; this.charicon_extensions = [".png", ".webp"]; this.emote_extensions = [".gif", ".png", ".apng", ".webp", ".webp.static"]; + this.emotions_extensions = [".png", ".webp"]; } /** diff --git a/webAO/client/fetchLists.ts b/webAO/client/fetchLists.ts index 68b1a43..7940eea 100644 --- a/webAO/client/fetchLists.ts +++ b/webAO/client/fetchLists.ts @@ -73,8 +73,10 @@ export const fetchExtensions = async () => { const allextensions = JSON.parse(extensiondata); client.charicon_extensions = allextensions.charicon_extensions || [".png", ".webp"]; client.emote_extensions = allextensions.emote_extensions || [".gif", ".png", ".apng", ".webp", ".webp.static"]; + client.emotions_extensions = allextensions.emotions_extensions || [".png", ".webp"]; console.log("charicons "+client.charicon_extensions) console.log("emotes "+client.emote_extensions) + console.log("emotions "+client.emotions_extensions) } catch (err) { console.warn("there was no extensions.json file"); } diff --git a/webAO/packets/handlers/handlePV.ts b/webAO/packets/handlers/handlePV.ts index 900ea89..4ac747f 100644 --- a/webAO/packets/handlers/handlePV.ts +++ b/webAO/packets/handlers/handlePV.ts @@ -58,9 +58,8 @@ export const handlePV = async (args: string[]) => { } // Make sure the asset server is case insensitive, or that everything on it is lowercase - const extensionsMap = [".png", ".webp"]; let url; - for (const extension of extensionsMap) { + for (const extension of client.emotions_extensions) { url = `${AO_HOST}characters/${encodeURI( me.name.toLowerCase(), )}/emotions/button${i}_off${extension}`; |
