Skip to content

Commit

Permalink
Fix last lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
OmniTroid committed Jan 29, 2024
1 parent 61de17a commit 4e70e8c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 32 deletions.
28 changes: 14 additions & 14 deletions webAO/packets/handlers/handleDONE.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import queryParser from "../../utils/queryParser";
import { client, clientState } from "../../client";
import {client, clientState} from "../../client";

const { mode } = queryParser()
const {mode} = queryParser()
/**
* Handles the handshake completion packet, meaning the player
* is ready to select a character.
*
* @param {Array} args packet arguments
*/
* Handles the handshake completion packet, meaning the player
* is ready to select a character.
*
* @param {Array} args packet arguments
*/
export const handleDONE = (_args: string[]) => {
// DONE packet signals that the handshake is complete
client.state = clientState.Joined;
document.getElementById("client_loading")!.style.display = "none";
if (mode === "watch") {
// Spectators don't need to pick a character
document.getElementById("client_waiting")!.style.display = "none";
}
// DONE packet signals that the handshake is complete
client.state = clientState.Joined;
document.getElementById("client_loading")!.style.display = "none";
if (mode === "watch") {
// Spectators don't need to pick a character
document.getElementById("client_waiting")!.style.display = "none";
}
}
4 changes: 3 additions & 1 deletion webAO/packets/handlers/handleMS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export const handleMS = (args: string[]) => {

try {
msg_blips = client.chars[char_id].blips;
} catch (e) { }
} catch (e) {
console.warn("Failed to get blips");
}

try {
char_chatbox = client.chars[char_id].chat;
Expand Down
39 changes: 22 additions & 17 deletions webAO/viewport/utils/handleICSpeaking.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
import { ChatMsg } from "../interfaces/ChatMsg";
import { client } from "../../client";
import { appendICLog } from "../../client/appendICLog";
import { checkCallword } from "../../client/checkCallword";
import {ChatMsg} from "../interfaces/ChatMsg";
import {client} from "../../client";
import {appendICLog} from "../../client/appendICLog";
import {checkCallword} from "../../client/checkCallword";
import setEmote from "../../client/setEmote";
import { AO_HOST } from "../../client/aoHost";
import { SHOUTS } from "../constants/shouts";
import {AO_HOST} from "../../client/aoHost";
import {SHOUTS} from "../constants/shouts";
import getAnimLength from "../../utils/getAnimLength";
import { setChatbox } from "../../dom/setChatbox";
import { resizeChatbox } from "../../dom/resizeChatbox";
import {setChatbox} from "../../dom/setChatbox";
import {resizeChatbox} from "../../dom/resizeChatbox";
import transparentPng from "../../constants/transparentPng";
import { COLORS } from "../constants/colors";
import {COLORS} from "../constants/colors";
import mlConfig from "../../utils/aoml";

const attorneyMarkdown = mlConfig(AO_HOST);

export let startFirstTickCheck: boolean;
export const setStartFirstTickCheck = (val: boolean) => { startFirstTickCheck = val }
export const setStartFirstTickCheck = (val: boolean) => {
startFirstTickCheck = val
}
export let startSecondTickCheck: boolean;
export const setStartSecondTickCheck = (val: boolean) => { startSecondTickCheck = val }
export const setStartSecondTickCheck = (val: boolean) => {
startSecondTickCheck = val
}
export let startThirdTickCheck: boolean;
export const setStartThirdTickCheck = (val: boolean) => { startThirdTickCheck = val }
export const setStartThirdTickCheck = (val: boolean) => {
startThirdTickCheck = val
}
/**
* Sets a new emote.
* This sets up everything before the tick() loops starts
Expand Down Expand Up @@ -73,7 +79,7 @@ export const handle_ic_speaking = async (playerChatMsg: ChatMsg) => {

const displayname =
(<HTMLInputElement>document.getElementById("showname")).checked &&
client.viewport.getChatmsg().showname !== ""
client.viewport.getChatmsg().showname !== ""
? client.viewport.getChatmsg().showname!
: client.viewport.getChatmsg().nameplate!;

Expand Down Expand Up @@ -248,9 +254,9 @@ export const handle_ic_speaking = async (playerChatMsg: ChatMsg) => {

client.viewport.blipChannels.forEach(
(channel: HTMLAudioElement) =>
(channel.src = `${AO_HOST}sounds/blips/${encodeURI(
client.viewport.getChatmsg().blips.toLowerCase()
)}.opus`)
(channel.src = `${AO_HOST}sounds/blips/${encodeURI(
client.viewport.getChatmsg().blips.toLowerCase()
)}.opus`)
);

// process markup
Expand Down Expand Up @@ -310,7 +316,6 @@ export const handle_ic_speaking = async (playerChatMsg: ChatMsg) => {
client.viewport.getChatmsg().content,

COLORS[client.viewport.getChatmsg().color]

);
} catch (error) {
console.warn("markdown failed");
Expand Down

0 comments on commit 4e70e8c

Please sign in to comment.