From e5ba4be22c3e77d120c8aaf17d19e6b439ea180b Mon Sep 17 00:00:00 2001 From: sD Date: Sat, 21 Dec 2019 18:41:42 +0100 Subject: basic pairing --- webAO/client.css | 8 ++++++++ webAO/client.html | 2 +- webAO/client.js | 32 ++++++++++++++++++++++++++++---- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/webAO/client.css b/webAO/client.css index ce057c9..0899e48 100644 --- a/webAO/client.css +++ b/webAO/client.css @@ -164,6 +164,14 @@ img { left: 0; } +#client_pair_char { + position: absolute; + height: 100%; + width: 100%; + bottom: 0; + left: 0; +} + #client_bench { display: none; position: absolute; diff --git a/webAO/client.html b/webAO/client.html index 5c6a97e..9423341 100644 --- a/webAO/client.html +++ b/webAO/client.html @@ -27,8 +27,8 @@
Courtroom backdrop + Character - Paired character Various overlay Character Evidence this.tick(), UPDATE_INTERVAL); } @@ -1291,6 +1304,17 @@ class Viewport { charSprite.src = `${AO_HOST}characters/${charName}/${preanim}.gif`; } + if (extrafeatures.includes("cccc_ic_support")) { + if (this.chatmsg.other_name) { + const pairName = this.chatmsg.other_name.toLowerCase(); + const pairEmote = this.chatmsg.other_emote.toLowerCase(); + pairSprite.style.display = ""; + pairSprite.src = `${AO_HOST}characters/${pairName}/(a)${pairEmote}.gif`; + } else { + pairSprite.style.display = "none"; + } + } + this.chatmsg.startpreanim = false; this.chatmsg.startspeaking = true; } else if (this.textTimer >= this.shoutTimer + this.chatmsg.preanimdelay && !this.chatmsg.startpreanim) { -- cgit