aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2020-02-09 17:47:25 +0100
committersD <stoned@derpymail.org>2020-02-09 17:47:25 +0100
commitcdad75b865eef3a885297f7e6d69c2462710a904 (patch)
treebbe970eb7ad868718bf56d39d9dcf7225c37f1d7
parentc048c347c7b3438434f95612012676632d65923a (diff)
fix shouts
-rw-r--r--webAO/client.css1
-rw-r--r--webAO/client.js16
2 files changed, 10 insertions, 7 deletions
diff --git a/webAO/client.css b/webAO/client.css
index baab8c2..6a8a62a 100644
--- a/webAO/client.css
+++ b/webAO/client.css
@@ -212,6 +212,7 @@ img {
}
#client_shout {
+ display: block;
position: absolute;
height: 100%;
width: 100%;
diff --git a/webAO/client.js b/webAO/client.js
index 0b9c1b2..4747406 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -28,6 +28,7 @@ let mode = queryDict.mode;
// Unless there is an asset URL specified, use the wasabi one
const AO_HOST = queryDict.asset || "http://s3.wasabisys.com/webao/base/";
+const THEME = queryDict.theme || "default";
const MUSIC_HOST = AO_HOST + "sounds/music/";
const CHAR_SELECT_WIDTH = 8;
const UPDATE_INTERVAL = 60;
@@ -116,24 +117,24 @@ class Client extends EventEmitter {
this.resources = {
"holdit": {
- "src": AO_HOST + "misc/holdit.gif",
+ "src": AO_HOST + "themes/" + THEME + "/holdit.gif",
"duration": 720
},
"objection": {
- "src": AO_HOST + "misc/objection.gif",
+ "src": AO_HOST + "themes/" + THEME + "/objection.gif",
"duration": 720
},
"takethat": {
- "src": AO_HOST + "misc/takethat.gif",
+ "src": AO_HOST + "themes/" + THEME + "/takethat.gif",
"duration": 840
},
"witnesstestimony": {
- "src": AO_HOST + "misc/witnesstestimony.gif",
+ "src": AO_HOST + "themes/" + THEME + "/witnesstestimony.gif",
"duration": 1560,
"sfx": AO_HOST + "sounds/general/sfx-testimony.wav"
},
"crossexamination": {
- "src": AO_HOST + "misc/crossexamination.gif",
+ "src": AO_HOST + "themes/" + THEME + "/crossexamination.gif",
"duration": 1600,
"sfx": AO_HOST + "sounds/general/sfx-testimony2.wav"
}
@@ -1247,6 +1248,7 @@ class Viewport {
nameBox.style.display = "none";
chatBox.style.display = "none";
shoutSprite.src = client.resources[shout]["src"];
+ shoutSprite.style.display = "block";
this.shoutaudio.src=`${AO_HOST}characters/${encodeURI(this.chatmsg.name.toLowerCase())}/${shout}.wav`;
this.shoutaudio.play();
this.shoutTimer = 850;
@@ -1478,7 +1480,7 @@ class Viewport {
// Pre-animation stuff
if (this.chatmsg.preanimdelay > 0) {
- shoutSprite.src = AO_HOST + "misc/placeholder.gif";
+ shoutSprite.style.display = "none";
const charName = this.chatmsg.name.toLowerCase();
const preanim = this.chatmsg.preanim.toLowerCase();
charSprite.src = `${AO_HOST}characters/${encodeURI(charName)}/${encodeURI(preanim)}.gif`;
@@ -1538,7 +1540,7 @@ class Viewport {
this.chatmsg.startspeaking = false;
if (this.chatmsg.preanimdelay === 0) {
- shoutSprite.src = AO_HOST + "misc/placeholder.gif";
+ shoutSprite.style.display = "none";
changeBackground(this.chatmsg.side);
}