From 07122f6b9c630e1c234096e8747994b2a532db58 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 16 May 2025 22:53:06 -0400 Subject: [PATCH] Fix traitor duration text (#783) ## Description: Fix traitor duration text ## Please complete the following: - [ ] I have added screenshots for all UI updates - [ ] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com> --- src/client/graphics/layers/EventsDisplay.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/client/graphics/layers/EventsDisplay.ts b/src/client/graphics/layers/EventsDisplay.ts index 70630d894..89a2d4d15 100644 --- a/src/client/graphics/layers/EventsDisplay.ts +++ b/src/client/graphics/layers/EventsDisplay.ts @@ -308,14 +308,12 @@ export class EventsDisplay extends LitElement implements Layer { const malusPercent = Math.round( (1 - this.game.config().traitorDefenseDebuff()) * 100, ); - const traitorDurationRaw = - Number(this.game.config().traitorDuration) / 10; - const traitorDurationSeconds = Math.floor(traitorDurationRaw); + const traitorDuration = Math.floor( + this.game.config().traitorDuration() * 0.1, + ); const durationText = - traitorDurationSeconds === 1 - ? "1 second" - : `${traitorDurationSeconds} seconds`; + traitorDuration === 1 ? "1 second" : `${traitorDuration} seconds`; this.addEvent({ description: