From dda92bd41f4bee11e2cc5de265ce4fbf5221f1ff Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Wed, 20 Sep 2023 13:10:36 +0200 Subject: autoformat with eslint --- webAO/packets/handlers/handleHP.ts | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'webAO/packets/handlers/handleHP.ts') diff --git a/webAO/packets/handlers/handleHP.ts b/webAO/packets/handlers/handleHP.ts index f365590..81dee64 100644 --- a/webAO/packets/handlers/handleHP.ts +++ b/webAO/packets/handlers/handleHP.ts @@ -1,23 +1,22 @@ import { client } from "../../client"; - - /** - * Handles a change in the health bars' states. - * @param {Array} args packet arguments - */ +/** + * Handles a change in the health bars' states. + * @param {Array} args packet arguments + */ export const handleHP = (args: string[]) => { const percent_hp = Number(args[2]) * 10; let healthbox; if (args[1] === "1") { - // Def hp - client.hp[0] = Number(args[2]); - healthbox = document.getElementById("client_defense_hp"); + // Def hp + client.hp[0] = Number(args[2]); + healthbox = document.getElementById("client_defense_hp"); } else { - // Pro hp - client.hp[1] = Number(args[2]); - healthbox = document.getElementById("client_prosecutor_hp"); + // Pro hp + client.hp[1] = Number(args[2]); + healthbox = document.getElementById("client_prosecutor_hp"); } (( - healthbox.getElementsByClassName("health-bar")[0] + healthbox.getElementsByClassName("health-bar")[0] )).style.width = `${percent_hp}%`; - } \ No newline at end of file +} -- cgit