aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
Diffstat (limited to 'webAO')
-rw-r--r--webAO/characters.js72
-rw-r--r--webAO/client.html6
-rw-r--r--webAO/client.js56
-rw-r--r--webAO/encoding.js9
4 files changed, 104 insertions, 39 deletions
diff --git a/webAO/characters.js b/webAO/characters.js
index f9b2221..390d761 100644
--- a/webAO/characters.js
+++ b/webAO/characters.js
@@ -168,6 +168,7 @@
"Alice Sparkle",
"Alice Yabusame_Hd",
"Aliceyttd",
+ "Alice_Hd",
"Alicorn Twilight",
"Alisa",
"Alisa Illinichina Amiella (Sb)",
@@ -203,6 +204,7 @@
"Angie Yonaga_Rs",
"Angramainyufgo",
"Aniu",
+ "Ann Takamaki",
"Anna",
"Anna (Fe)",
"Anna Mittlemont",
@@ -211,6 +213,7 @@
"Anonymous",
"Anton",
"Anzuyttd",
+ "Anzu_Hd",
"Aoi Asahina",
"Aoto",
"Apollo",
@@ -257,6 +260,7 @@
"Armor",
"Armstrong",
"Artemis Injustice",
+ "Arthur And Percy",
"Arthur_Rs",
"Artorialilyfgo",
"Artoriapendragonfgo",
@@ -326,8 +330,10 @@
"Barok Z",
"Barrows",
"Barton",
+ "Basilio",
"Battler",
"Battler Ushiromiya",
+ "Bb",
"Beat",
"Beat Frx",
"Beatrice",
@@ -340,6 +346,7 @@
"Bernkastel",
"Berry Judge",
"Berry Punch",
+ "Beruka",
"Beta Monaca",
"Betty De Famme",
"Big Band",
@@ -452,7 +459,9 @@
"Charmeleon Oc Vn Casual (Pokemon)",
"Charun Krojib",
"Chelmey",
+ "Cherche",
"Cheria",
+ "Chesed",
"Chesedlc",
"Chiaki",
"Chiaki Nanami",
@@ -526,6 +535,7 @@
"Courtney",
"Courtney Sithe",
"Cowboy",
+ "Cowman",
"Crab",
"Credidus",
"Crogrey",
@@ -660,6 +670,7 @@
"Edna",
"Edward Elric",
"Eevee",
+ "Effie (Fe)",
"Eiki Shiki",
"Eilie",
"Eirin",
@@ -705,6 +716,7 @@
"Espurr Vn (Pokemon)",
"Ess",
"Etna",
+ "Eva",
"Eve Belduke",
"Everyday",
"Evilmanfred Proc",
@@ -733,13 +745,16 @@
"Fiscal",
"Flandre",
"Flareon",
+ "Flavia (Fe)",
"Flonne",
"Flora",
+ "Flora (Fe)",
"Floren",
"Florent",
"Fluffle Puff",
"Fluttershy",
"Flynch",
+ "Forrest (Fe)",
"Fox Mccloud",
"Frank Sahwit",
"Franken Stein",
@@ -764,8 +779,10 @@
"Fullbright",
"Furio",
"Furio Tigre",
+ "Futaba Sakura",
"Futo No Mononobe",
"Future Twilight",
+ "Fuuka Yamagishi",
"Fuyuhiko",
"Fuyuhiko Kuzuryuu",
"Fuyuhikokuzuryuu",
@@ -780,6 +797,7 @@
"Gardevoir",
"Gashu",
"Gashu Satou",
+ "Gashu_Hd",
"Gaspen",
"Gaspensoj",
"Gavin",
@@ -788,8 +806,11 @@
"Geburalc",
"Geiru",
"Gengar",
+ "Genny",
"Genocider Sho_Udg_Hd",
"Gensho",
+ "Gerome",
+ "Gerry Scotti",
"Giffany",
"Gilda",
"Gilgamesh",
@@ -804,6 +825,7 @@
"Gina Lestrade",
"Gina Lestrade Coat",
"Gina Lestrade Dgs2",
+ "Gin_Hd",
"Giorno Giovanna",
"Glaceon",
"Godfrey",
@@ -895,6 +917,7 @@
"Hawk",
"Haxorus",
"Hayasakayttd",
+ "Hayasaka_Hd",
"Hazama",
"Hazama Honaka",
"Hazama Honoka",
@@ -923,6 +946,7 @@
"Himiko Yumeno",
"Himiko Yumeno_Hd",
"Hinakoyttd",
+ "Hinako_Hd",
"Hinoka",
"Hiroko",
"Hiroko Hagakure",
@@ -1024,6 +1048,8 @@
"Jacques Portsman",
"Jadecurtiss",
"Jake Marshall",
+ "Jakob",
+ "James Moriarty",
"Jataro",
"Jataro Kemuri",
"Jataro Kemuri_Hd",
@@ -1052,10 +1078,12 @@
"Joe",
"Joe Tazuna",
"Joe Tazuna_Hd",
+ "Joe_Hd",
"John",
"John Egbert",
"John Garrideb",
"John Marsh",
+ "Johnegbertpq",
"Joka",
"Joker",
"Jokerp5",
@@ -1153,6 +1181,7 @@
"Kaito",
"Kaito Momota",
"Kaito_Hd",
+ "Kai_Hd",
"Kakeru Yamaguchi_Hd",
"Kana (Female)",
"Kana (Male)",
@@ -1164,6 +1193,7 @@
"Kanjiro_Hd",
"Kanna",
"Kanna Kizuchi",
+ "Kanna_Hd",
"Kanon Nakajima_Hd",
"Karako Pierot",
"Kariya",
@@ -1193,6 +1223,7 @@
"Kcalb",
"Keiji",
"Keiji Shinogi",
+ "Keiji_Hd",
"Ken",
"Ken Amada",
"Kensfpxz",
@@ -1207,6 +1238,7 @@
"King Sombra",
"Kinji Uehara_Hd",
"Kira",
+ "Kiragi",
"Kiraj",
"Kirby",
"Kirigiri",
@@ -1270,6 +1302,7 @@
"Komaru Naegi_Hd",
"Komarunaegi",
"Kongou",
+ "Koopatrol",
"Korekiyo",
"Korekiyo Shinguji",
"Korekiyo Shinguji_Hd",
@@ -1291,6 +1324,7 @@
"Kurokuma",
"Kurokuma_Hd",
"Kurumadayttd",
+ "Kurumada_Hd",
"Kutaka Niwatari",
"Ky Kiske",
"Kyoko Kirigiri",
@@ -1352,6 +1386,7 @@
"Letouse",
"Lewdton",
"Libra",
+ "Lilia Bradley",
"Lilith_Rs",
"Lilly Satou",
"Lillysatou",
@@ -1424,6 +1459,7 @@
"Maiday",
"Maiyttd",
"Maizono",
+ "Mai_Hd",
"Majima",
"Maka",
"Makepeace",
@@ -1484,6 +1520,7 @@
"Maximillion Galactica",
"Maya",
"Maya Fey",
+ "Maya Fey (Mushin)",
"Maya Mushin",
"Maya Pxz",
"Mayaaai",
@@ -1543,6 +1580,7 @@
"Megumi",
"Megumi Frx",
"Megumiyttd",
+ "Megumi_Hd",
"Megundal",
"Meiling",
"Meira",
@@ -1556,6 +1594,7 @@
"Meulin Leijon",
"Mia",
"Mia Fey",
+ "Mia Fey (Mushin)",
"Mia Leg",
"Mia Young",
"Miaya_Gekkogahara_Hd",
@@ -1563,6 +1602,7 @@
"Michael Eaglesworth",
"Michibatakashi",
"Midoriyttd",
+ "Midori_Hd",
"Mika Returna",
"Mikado Sannoji",
"Mikado Sannoji_Hd",
@@ -1598,15 +1638,18 @@
"Mileskid",
"Milessoj",
"Miley",
+ "Miley_Hd",
"Mima",
"Minato P3",
"Minecraft Steve",
+ "Minerva (Fe)",
"Misaki Asano_Hd",
"Misaki Nakano_Hd",
"Misakorcg",
"Misako_Hd",
"Mishima",
"Mishima_Ex",
+ "Mishima_Hd",
"Missile",
"Mitsuhiro Higa_Hd",
"Mitsuki Frx",
@@ -1710,12 +1753,14 @@
"Naoto Kurogane(Mha)",
"Naoto Shirogane",
"Nao_Ex",
+ "Nao_Hd",
"Narcissus",
"Narrator",
"Narratora",
"Narrorator",
"Naruwit",
"Natsuki",
+ "Natsuki_Hd",
"Natsume",
"Natsumi_Hd",
"Near",
@@ -1742,6 +1787,7 @@
"Nero Claudius",
"Netzach",
"Netzachlc",
+ "New Folder",
"Newman",
"Newman Pro",
"Newmanpro",
@@ -1756,6 +1802,7 @@
"Nikomina",
"Nikomina Hatless",
"Niles",
+ "Nina (Fe)",
"Nine",
"Nine The Phantom",
"Ninja (Ff)",
@@ -1948,6 +1995,7 @@
"Poppi",
"Popplio3d",
"Portsman",
+ "Priam",
"Prinplup",
"Professor Layton",
"Prosecutor Justice",
@@ -1959,6 +2007,7 @@
"Q Sfiii",
"Q-Taro",
"Q-Taro Burgerberg_Hd",
+ "Q-Taro_Hd",
"Quagmire Toilet",
"Quark",
"Querceus Alba",
@@ -1976,7 +2025,9 @@
"Ramona Flowers",
"Ranger",
"Ranger Justice",
+ "Ranger_Hd",
"Ranmaruyttd",
+ "Ranmaru_Hd",
"Rantaro",
"Rantaro Amami",
"Rantaroamami",
@@ -2004,11 +2055,13 @@
"Rei_Hd",
"Reko",
"Reko Yabusame_Hd",
+ "Reko_Hd",
"Relius",
"Relius Clover",
"Relius-Clover",
"Remele Namaqq",
"Remilia Scarlet",
+ "Rentaro Satomi",
"Renwick",
"Retinz",
"Rex",
@@ -2065,6 +2118,7 @@
"Ryoko",
"Ryoko Otonashi_Hd",
"Ryoma",
+ "Ryoma (Fe)",
"Ryoma Hoshi",
"Ryoma Hoshi_Hd",
"Ryota Mitarai",
@@ -2090,6 +2144,7 @@
"Sabukorcg",
"Saeran",
"Safalin",
+ "Safalin_Hd",
"Sagisureiko",
"Sahwit",
"Sahwit Aai",
@@ -2099,6 +2154,7 @@
"Saitama",
"Sakura",
"Sakura (Fe)",
+ "Sakura Futaba",
"Sakura Oogami",
"Sakura Ryoko",
"Sakura_Hd",
@@ -2119,6 +2175,8 @@
"Santa Shikiba_Hd",
"Sara",
"Sara Chidouin",
+ "Sara_Ex",
+ "Sara_Hd",
"Sarge",
"Sasha",
"Sasha Buckler",
@@ -2133,6 +2191,7 @@
"Sayaka Maizono",
"Sayaka_Hd",
"Sayori",
+ "Sayori_Hd",
"Scar",
"Schezo",
"Schezo Wegey",
@@ -2168,6 +2227,7 @@
"Sherlock",
"Sherlock Casual",
"Sherlock Goggled",
+ "Sherlock Holmes",
"Sherlock Undercover",
"Sherlockwatson",
"Shi Long Lang",
@@ -2185,6 +2245,7 @@
"Shinji_Hd",
"Shinmyoumaru Sukuna",
"Shion",
+ "Shiro (Fe)",
"Shirokuma",
"Shirokuma_Hd",
"Shirou Emiya",
@@ -2208,8 +2269,11 @@
"Shuji Ikutsuki",
"Shulk",
"Shuuichi Saihara",
+ "Siegbert",
"Sig",
"Sig25th",
+ "Silas",
+ "Silque",
"Silver Shield",
"Simeon",
"Simon",
@@ -2240,6 +2304,7 @@
"Sonic",
"Sonohigurashi",
"Sonosuke Izayoi_Hd",
+ "Sophie (Fe)",
"Sora",
"Sora_Hd",
"Sorey",
@@ -2252,6 +2317,7 @@
"Souda_Rs",
"Soul",
"Souseki",
+ "Sou_Hd",
"Spark",
"Spark Brushel",
"Sparkling Justice_Hd",
@@ -2283,6 +2349,7 @@
"Susatoco",
"Susatodef",
"Suwako Moriya",
+ "Suzaku",
"Suzuha",
"Suzumiya Haruhi",
"Suzzanne",
@@ -2323,6 +2390,7 @@
"Teppo",
"Terezi Pyrope",
"Terezi Pyrope_Rs",
+ "Terry Bogard",
"Terry Fawles",
"Teruaki Kubota (999)",
"Terumi",
@@ -2448,6 +2516,7 @@
"Viridi",
"Viridian",
"Virion",
+ "Vittorio Sgarbi",
"Vixey",
"Vortex",
"Vulper",
@@ -2572,7 +2641,8 @@
"Zero Iii",
"Zeropxz",
"Zettaslow",
+ "Zhuge Liang",
"Zinc",
"Zinc Lablanc",
- "Zonetan"
+ "Zonetan",
];
diff --git a/webAO/client.html b/webAO/client.html
index ad42946..197d77e 100644
--- a/webAO/client.html
+++ b/webAO/client.html
@@ -335,11 +335,11 @@
<option value="soj">DD / SoJ</option>
<option value="cyber">Cyber (WIP)</option>
</select>
+ <!--
<br>
<br>
- <label for="client_modcall">Modcall sound:</label>
- <select id="client_modcall" name="client_modcall" onchange="changeModcall()">
- </select>
+ <button id="client_modcall" onclick="modcall_test()">Test modcall</button>
+ -->
<br>
<br>
<p>Ini editing (experimental)</p>
diff --git a/webAO/client.js b/webAO/client.js
index 483468c..77b61bb 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -6,7 +6,7 @@
import Fingerprint2 from 'fingerprintjs2';
-import { unescapeChat, escapeChat, encodeChat, decodeChat, safe_tags } from './encoding.js';
+import { escapeChat, encodeChat, prepChat, safe_tags } from './encoding.js';
// Load some defaults for the background and evidence dropdowns
import character_arr from "./characters.js";
@@ -144,14 +144,16 @@ class Client extends EventEmitter {
"duration": 1600,
"sfx": AO_HOST + "sounds/general/sfx-testimony2.wav"
},
+ "guilty": {
+ "src": AO_HOST + "themes/" + THEME + "/guilty.gif",
+ "duration": 2870,
+ "sfx": AO_HOST + "sounds/general/sfx-guilty.wav"
+ },
"notguilty": {
"src": AO_HOST + "themes/" + THEME + "/notguilty.gif",
- "duration": 2440
+ "duration": 2440,
+ "sfx": AO_HOST + "sounds/general/sfx-notguilty.wav"
},
- "guilty": {
- "src": AO_HOST + "themes/" + THEME + "/guilty.gif",
- "duration": 2870
- }
};
this.selectedEmote = -1;
@@ -383,13 +385,6 @@ class Client extends EventEmitter {
evidence_select.add(new Option(evidence));
});
- // Load sfx for modcalls
- const modcall_select = document.getElementById("client_modcall");
- sfx_arr.forEach(evidence => {
- modcall_select.add(new Option(evidence));
- });
- document.getElementById("client_modcall").value = getCookie("modcall_sfx") || "sfx-gallery.wav";
-
// Read cookies and set the UI to its values
document.getElementById("OOC_name").value = getCookie("OOC_name") || "web"+parseInt(Math.random()*100+10);
@@ -496,15 +491,6 @@ class Client extends EventEmitter {
}
/**
- * XXX: a nasty hack made by gameboyprinter.
- * @param {string} msg chat message to prepare for display
- */
- prepChat(msg) {
- // TODO: make this less awful
- return unescapeChat(decodeChat(msg));
- }
-
- /**
* Handles an in-character chat message.
* @param {*} args packet arguments
*/
@@ -545,7 +531,7 @@ class Client extends EventEmitter {
nameplate: msg_nameplate, // TODO: there's a new feature that let's people choose the name that's displayed
name: char_name,
sprite: safe_tags(args[4]).toLowerCase(),
- content: this.prepChat(args[5]), // Escape HTML tags
+ content: prepChat(args[5]), // Escape HTML tags
side: args[6].toLowerCase(),
sound: safe_tags(args[7]).toLowerCase(),
blips: safe_tags(msg_blips),
@@ -592,7 +578,7 @@ class Client extends EventEmitter {
*/
handleCT(args) {
const oocLog = document.getElementById("client_ooclog");
- oocLog.innerHTML += `${decodeChat(unescapeChat(args[1]))}: ${decodeChat(unescapeChat(args[2]))}\r\n`;
+ oocLog.innerHTML += `${prepChat(args[1])}: ${prepChat(args[2])}\r\n`;
if (oocLog.scrollTop > oocLog.scrollHeight - 600) {
oocLog.scrollTop = oocLog.scrollHeight;
}
@@ -603,15 +589,16 @@ class Client extends EventEmitter {
* @param {Array} args packet arguments
*/
handleMC(args) {
- const track = args[1];
+ const track = prepChat(args[1]);
let charID = Number(args[2]);
+
const music = viewport.music;
let musicname;
music.pause();
if(track.startsWith("http")) {
music.src = track;
} else {
- music.src = MUSIC_HOST + track.toLowerCase();
+ music.src = MUSIC_HOST + encodeURI(track.toLowerCase());
}
music.play();
@@ -767,8 +754,8 @@ class Client extends EventEmitter {
for (let i = 1; i < args.length - 1; i++) {
const arg = args[i].split("&");
this.evidences[i - 1] = {
- name: decodeChat(unescapeChat(arg[0])),
- desc: decodeChat(unescapeChat(arg[1])),
+ name: prepChat(arg[0]),
+ desc: prepChat(arg[1]),
filename: safe_tags(arg[2]),
icon: AO_HOST + "evidence/" + encodeURI(arg[2].toLowerCase())
};
@@ -1005,20 +992,19 @@ class Client extends EventEmitter {
}
/**
- * Handles a call mod message.
+ * Handles a modcall
* @param {Array} args packet arguments
*/
handleZZ(args) {
const oocLog = document.getElementById("client_ooclog");
- oocLog.innerHTML += `$Alert: ${decodeChat(unescapeChat(args[1]))}\r\n`;
+ oocLog.innerHTML += `$Alert: ${prepChat(args[1])}\r\n`;
if (oocLog.scrollTop > oocLog.scrollHeight - 60) {
oocLog.scrollTop = oocLog.scrollHeight;
}
- const sfxname = document.getElementById("client_modcall").value;
viewport.sfxaudio.pause();
const oldvolume = viewport.sfxaudio.volume;
viewport.sfxaudio.volume = 1;
- viewport.sfxaudio.src = AO_HOST + "sounds/general/" + sfxname + ".wav";
+ viewport.sfxaudio.src = AO_HOST + "sounds/general/sfx-gallery.wav";
viewport.sfxaudio.play();
viewport.sfxaudio.volume = oldvolume;
}
@@ -2094,10 +2080,10 @@ window.reloadTheme = reloadTheme;
/**
* Triggered by the modcall sfx dropdown
*/
-export function changeModcall() {
- setCookie("modcall_sfx", document.getElementById("client_modcall").value);
+export function modcall_test() {
+ client.handleZZ("test#test".split("#"));
}
-window.changeModcall = changeModcall;
+window.modcall_test = modcall_test;
/**
* Triggered by the ini button.
diff --git a/webAO/encoding.js b/webAO/encoding.js
index 76e0b6d..3249617 100644
--- a/webAO/encoding.js
+++ b/webAO/encoding.js
@@ -82,4 +82,13 @@ export function decodeChat(estring) {
} else {
return estring;
}
+}
+
+/**
+ * XXX: a nasty hack made by gameboyprinter.
+ * @param {string} msg chat message to prepare for display
+ */
+export function prepChat(msg) {
+ // TODO: make this less awful
+ return unescapeChat(decodeChat(msg));
} \ No newline at end of file