diff options
| author | stonedDiscord <stoned@derpymail.org> | 2020-11-09 19:31:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-09 19:31:11 +0100 |
| commit | bce5de06aae3fe61fe68f008ff0ff2fa3db22f80 (patch) | |
| tree | dea36d263b1f6ce3651bf853febdd364ec2dcb55 | |
| parent | 6d244f6c1f2146a180f0a5ab6bbf576890b63399 (diff) | |
| parent | 35325a09a9a7ded9786dd09d91f30088b9f5a9f1 (diff) | |
Merge pull request #70 from AttorneyOnline/custom_shout
Custom shout
| -rw-r--r-- | webAO/client.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/webAO/client.js b/webAO/client.js index d80141e..7d06960 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -143,6 +143,10 @@ class Client extends EventEmitter { "src": AO_HOST + "misc/default/takethat_bubble.png", "duration": 840 }, + "custom": { + "src": "", + "duration": 840 + }, "witnesstestimony": { "src": AO_HOST + "themes/" + THEME + "/witnesstestimony.gif", "duration": 1560, @@ -1499,7 +1503,8 @@ class Viewport { undefined, "holdit", "objection", - "takethat" + "takethat", + "custom" ]; this.colors = [ @@ -1895,9 +1900,14 @@ async changeBackground(position) { if (shout) { // Hide message box chatContainerBox.style.opacity = 0; - shoutSprite.src = client.resources[shout]["src"]; + if (this.chatmsg.objection === 4) { + shoutSprite.src = `${AO_HOST}characters/${encodeURI(this.chatmsg.name.toLowerCase())}/custom.gif`; + } else { + shoutSprite.src = client.resources[shout]["src"]; + shoutSprite.style.animation = "bubble 700ms steps(10, jump-both)"; + } shoutSprite.style.opacity = 1; - shoutSprite.style.animation = "bubble 700ms steps(10, jump-both)"; + let shoutUrl; |
