diff --git a/CHANGELOG.md b/CHANGELOG.md index 36e6c41..9900d83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.8.7] - 2024-07-30 + +- Fixed native plugins added to plugins.txt file when Starfield.ccc is present + ## [0.8.6] - 2024-07-29 -- Adding fallback to playtime parser +- Adding fallback to playtime parser. ([#16139](https://github.com/Nexus-Mods/Vortex/issues/16139)) ## [0.8.5] - 2024-07-29 @@ -173,6 +177,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Initial release for basic mod support +[0.8.7]: https://github.com/Nexus-Mods/game-starfield/releases/tag/v0.8.7 [0.8.6]: https://github.com/Nexus-Mods/game-starfield/releases/tag/v0.8.6 [0.8.5]: https://github.com/Nexus-Mods/game-starfield/releases/tag/v0.8.5 [0.7.1]: https://github.com/Nexus-Mods/game-starfield/releases/tag/v0.7.1 diff --git a/package.json b/package.json index cf05a11..160a189 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "starfield", - "version": "0.8.6", + "version": "0.8.7", "description": "Vortex Extension for Starfield", "author": "Nexus Mods", "private": true, diff --git a/src/common.ts b/src/common.ts index e4ebad6..03a8918 100644 --- a/src/common.ts +++ b/src/common.ts @@ -1,5 +1,4 @@ import path from 'path'; -import { resolveNativePlugins } from './util'; import { util } from 'vortex-api'; export const DEBUG_ENABLED = false; diff --git a/src/util.ts b/src/util.ts index c686b59..a18a637 100644 --- a/src/util.ts +++ b/src/util.ts @@ -481,13 +481,19 @@ export const resolveNativePlugins = async (api: types.IExtensionApi): Promise plugin !== ''); + const lines = data.split('\r\n').filter(plugin => plugin !== '').map(l => l.toLowerCase()); + for (const native of defaultNatives) { + if (!lines.includes(native)) { + lines.push(native); + } + } return lines; } catch (err) { - return [].concat(NATIVE_PLUGINS, NATIVE_MID_PLUGINS); + return defaultNatives; } } diff --git a/src/views/Saves/utils.ts b/src/views/Saves/utils.ts index 5603513..ee31b05 100644 --- a/src/views/Saves/utils.ts +++ b/src/views/Saves/utils.ts @@ -17,8 +17,11 @@ export const formatPlaytime = (playtime: string): string => { // 0d.0h.4m.0 days.0 hours.4 minutes const regexp = /(\d+)d\.(\d+)h\.(\d+)m\.\d+ days\.\d+ hours\.\d+ minutes/g; const match = playtime.matchAll(regexp); + if (!match || !match?.[0]) { + return playtime; + } const groups = [...match][0]; - if (groups.length < 4) { + if (groups !== undefined || groups.length < 4) { return playtime; } return `${groups[1]}d ${groups[2]}h ${groups[3]}m`;