diff --git a/CHANGELOG.md b/CHANGELOG.md index 63c57ce2..b0f3db87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [3.24.2] - 2024-02-10 ### Changed - [Issue 474](https://github.com/aza547/wow-recorder/issues/474) - Use CQP/CRF encoder modes rather than VBR. +- Removed support for ffmpeg_nvenc encoder, as jim_nvenc is always preferable. +### Added +- [Issue 475](https://github.com/aza547/wow-recorder/issues/475) - Make overrun times for raid and dungeons configurable. ### Fixed - [Issue 478](https://github.com/aza547/wow-recorder/issues/478) - Fix an issue with config validation sometimes failing when it shouldn't. diff --git a/src/activitys/Activity.ts b/src/activitys/Activity.ts index a33afa86..b1a40b74 100644 --- a/src/activitys/Activity.ts +++ b/src/activitys/Activity.ts @@ -111,6 +111,7 @@ export default abstract class Activity { } set overrun(s) { + console.info('[Activity] Setting overrun to', s); this._overrun = s; } diff --git a/src/activitys/ChallengeModeDungeon.ts b/src/activitys/ChallengeModeDungeon.ts index ee76bf58..ee56e4ad 100644 --- a/src/activitys/ChallengeModeDungeon.ts +++ b/src/activitys/ChallengeModeDungeon.ts @@ -137,10 +137,6 @@ export default class ChallengeModeDungeon extends Activity { this.removeLastTimelineSegment(); } - if (result) { - this.overrun = 5; - } - this.CMDuration = CMDuration; super.end(endDate, result); } diff --git a/src/activitys/RaidEncounter.ts b/src/activitys/RaidEncounter.ts index 4e2898d3..ae7216e6 100644 --- a/src/activitys/RaidEncounter.ts +++ b/src/activitys/RaidEncounter.ts @@ -111,15 +111,6 @@ export default class RaidEncounter extends Activity { return instanceDifficulty[this.difficultyID]; } - end(endDate: Date, result: boolean) { - if (result) { - console.log('[RaidEncounter] Adding overrun as this was a kill'); - this.overrun = 15; - } - - super.end(endDate, result); - } - getMetadata(): Metadata { const rawCombatants = Array.from(this.combatantMap.values()).map( (combatant: Combatant) => combatant.getRaw() diff --git a/src/main/configSchema.ts b/src/main/configSchema.ts index 356398b4..029795f3 100644 --- a/src/main/configSchema.ts +++ b/src/main/configSchema.ts @@ -48,6 +48,8 @@ export type ConfigurationSchema = { pushToTalkMouseButton: number; pushToTalkModifiers: string; obsAudioSuppression: boolean; + raidOverrun: number; + dungeonOverrun: number; }; export type ConfigurationSchemaKey = keyof ConfigurationSchema; @@ -118,7 +120,7 @@ export const configSchema = { }, minEncounterDuration: { description: - 'Minimum raid boss encounter duration, encounters shorter than this will not be recorded. This setting is aimed at avoiding saving boss resets.', + 'Encounters shorter than this duration will not be recorded. This setting is aimed at avoiding saving boss resets.', type: 'integer', default: 15, maximum: 10000, @@ -233,7 +235,7 @@ export const configSchema = { }, minRaidDifficulty: { description: - 'The minimum raid difficulty to record, this setting only applies to retail.', + 'The minimum raid difficulty to record. Only applies to retail.', type: 'string', default: 'LFR', }, @@ -306,12 +308,12 @@ export const configSchema = { }, pushToTalkKey: { description: 'The push to talk hotkey, represented by the key code.', - type: 'number', + type: 'integer', default: -1, }, pushToTalkMouseButton: { description: 'The push to talk mouse button.', - type: 'number', + type: 'integer', default: -1, }, pushToTalkModifiers: { @@ -326,4 +328,19 @@ export const configSchema = { type: 'boolean', default: true, }, + raidOverrun: { + description: 'Number of seconds to record after a boss has been killed.', + type: 'integer', + default: 15, + minimum: 0, + maximum: 60, + }, + dungeonOverrun: { + description: + 'Number of seconds to record after a dungeon has been completed.', + type: 'integer', + default: 5, + minimum: 0, + maximum: 60, + }, }; diff --git a/src/parsing/LogHandler.ts b/src/parsing/LogHandler.ts index 20b5674e..9b4c6ca6 100644 --- a/src/parsing/LogHandler.ts +++ b/src/parsing/LogHandler.ts @@ -125,6 +125,12 @@ export default abstract class LogHandler extends EventEmitter { } const result = Boolean(parseInt(line.arg(5), 10)); + + if (result) { + const overrun = this.cfg.get('raidOverrun'); + this.activity.overrun = overrun; + } + this.activity.end(line.date(), result); await this.endActivity(); } diff --git a/src/parsing/RetailLogHandler.ts b/src/parsing/RetailLogHandler.ts index 939bb022..ecc1cecf 100644 --- a/src/parsing/RetailLogHandler.ts +++ b/src/parsing/RetailLogHandler.ts @@ -248,6 +248,11 @@ export default class RetailLogHandler extends LogHandler { // levels can be calculated. This includes player death penalty. const CMDuration = Math.round(parseInt(line.arg(4), 10) / 1000); + if (result) { + const overrun = this.cfg.get('dungeonOverrun'); + challengeModeActivity.overrun = overrun; + } + challengeModeActivity.endChallengeMode(endDate, CMDuration, result); await this.endActivity(); } diff --git a/src/renderer/PVESettings.tsx b/src/renderer/PVESettings.tsx index 03460f9d..efadc963 100644 --- a/src/renderer/PVESettings.tsx +++ b/src/renderer/PVESettings.tsx @@ -13,10 +13,11 @@ import { ConfigurationSchema } from 'main/configSchema'; import React from 'react'; import { setConfigValues, useSettings } from './useSettings'; -const formControlStyle = { m: 1, width: '200px' }; +const formControlStyle = { width: '100%' }; const style = { - width: '300px', + m: 1, + width: '100%', color: 'white', '& .MuiOutlinedInput-notchedOutline': { borderColor: 'white', @@ -77,11 +78,15 @@ const PVESettings: React.FC = () => { minRaidDifficulty: config.minRaidDifficulty, recordDungeons: config.recordDungeons, minKeystoneLevel: config.minKeystoneLevel, + raidOverrun: config.raidOverrun, + dungeonOverrun: config.dungeonOverrun, }); }, [ + config.dungeonOverrun, config.minEncounterDuration, config.minKeystoneLevel, config.minRaidDifficulty, + config.raidOverrun, config.recordDungeons, config.recordRaids, ]); @@ -143,7 +148,7 @@ const PVESettings: React.FC = () => { variant="outlined" type="number" InputLabelProps={{ shrink: true, style: { color: 'white' } }} - sx={style} + sx={{ ...style, maxWidth: '250px' }} inputProps={{ min: 0, style: { color: 'white' } }} /> ); @@ -168,15 +173,17 @@ const PVESettings: React.FC = () => { } return ( - - Minimum Raid Difficulty + + + Minimum Raid Difficulty + = (props: IProps) => { } return ( - + Quality = (props: IProps) => { display: 'flex', justifyContent: 'center', alignItems: 'center', + width: '100%', }} > {getFPSToggle()} diff --git a/src/renderer/useSettings.ts b/src/renderer/useSettings.ts index 57ba5200..e4b5368a 100644 --- a/src/renderer/useSettings.ts +++ b/src/renderer/useSettings.ts @@ -67,6 +67,8 @@ export const getSettings = (): ConfigurationSchema => { pushToTalkMouseButton: getConfigValue('pushToTalkMouseButton'), pushToTalkModifiers: getConfigValue('pushToTalkModifiers'), obsAudioSuppression: getConfigValue('obsAudioSuppression'), + raidOverrun: getConfigValue('raidOverrun'), + dungeonOverrun: getConfigValue('dungeonOverrun'), }; return configValues;