From 3c82dc68190f006b07a197cd89106bb3b6ce6448 Mon Sep 17 00:00:00 2001 From: mac-tf2 Date: Mon, 8 Apr 2024 17:44:44 +0100 Subject: [PATCH 1/3] feat: added timers for defrag powerups --- images/hud/damageboost.svg | 4 ++++ images/hud/haste.svg | 4 ++++ layout/hud/hud.xml | 1 + layout/hud/powerup-timer.xml | 25 ++++++++++++++++++++ scripts/hud/powerup-timer.ts | 38 ++++++++++++++++++++++++++++++ scripts/util/panel-registration.js | 1 + styles/hud/_index.scss | 1 + styles/hud/powerup-timer.scss | 35 +++++++++++++++++++++++++++ 8 files changed, 109 insertions(+) create mode 100644 images/hud/damageboost.svg create mode 100644 images/hud/haste.svg create mode 100644 layout/hud/powerup-timer.xml create mode 100644 scripts/hud/powerup-timer.ts create mode 100644 styles/hud/powerup-timer.scss diff --git a/images/hud/damageboost.svg b/images/hud/damageboost.svg new file mode 100644 index 00000000..56bf8ddb --- /dev/null +++ b/images/hud/damageboost.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/images/hud/haste.svg b/images/hud/haste.svg new file mode 100644 index 00000000..4b0a66f3 --- /dev/null +++ b/images/hud/haste.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/layout/hud/hud.xml b/layout/hud/hud.xml index 694ce0b2..37601d8a 100644 --- a/layout/hud/hud.xml +++ b/layout/hud/hud.xml @@ -44,6 +44,7 @@ + diff --git a/layout/hud/powerup-timer.xml b/layout/hud/powerup-timer.xml new file mode 100644 index 00000000..88a85f78 --- /dev/null +++ b/layout/hud/powerup-timer.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/hud/powerup-timer.ts b/scripts/hud/powerup-timer.ts new file mode 100644 index 00000000..8b53c7c3 --- /dev/null +++ b/scripts/hud/powerup-timer.ts @@ -0,0 +1,38 @@ +class PowerupTimer { + static panels = { + damageBoost: { + panel: $('#DamageBoostTimer')!, + label: $