mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-03 08:20:45 +00:00
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>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user