Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
- Fixed the "CH" translation.
- Fixed the processing of some unique cars.
- Fixed incorrect definition of mods with the same "modio.json" file.
- Standard parameters have been updated.
- Added text descriptions of parameters when hovering over the name.
- Added the center of mass of trailers.
- Added the ability to open files with a third-party editor used by an open auto (in advanced mode).
- Added a return of the list state to what it was before opening the table.
  • Loading branch information
VerZsuT authored Mar 24, 2024
2 parents 10c3823 + bdb7d8f commit 3672f5c
Show file tree
Hide file tree
Showing 119 changed files with 5,645 additions and 5,069 deletions.
27 changes: 27 additions & 0 deletions docs/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,33 @@
SnowRunner XML Editor Desktop
</header>

<div class="release">
<h2 class="title">v1.0.0</h2>
<div class="description">
<ul>
<li>Исправлен 'CH' перевод.</li>
<li>Исправлена обработка некоторых уникальных авто.</li>
<li>Исправлено неправильное определение модов при одинаковом 'modio.json' файле.</li>
<li>Обновлены стандартные параметры.</li>
<li>Добавлены текстовые описания параметров при наведении на название.</li>
<li>Добавлен центр масс прицепов.</li>
<li>Добавлена возможность открытия файлов сторонним редактором, используемых открытым авто (в расширенном режиме).</li>
<li>Добавлен возврат состояния списка к тому что был до открытия таблицы.</li>
</ul>
</div>
Для Windows 10 | 11
<div class="buttons">
<button class='mui-btn mui-btn--raised mui-btn--primary' download source='GitHub' source_type='exe'
version='v1.0.0'>
Скачать [GitHub]
</button>
<button class='mui-btn mui-btn--raised mui-btn--accent' download link='https://disk.yandex.ru/d/FVvLMXhnn1z27A'
source='YandexDisk'>
Скачать [Yandex Disk]
</button>
</div>
</div>

<div class='release'>
<h2 class='title'>v0.8.9</h2>
<div class='description'>
Expand Down
2 changes: 1 addition & 1 deletion inno-setup/installer.config.iss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MyAppName "SnowRunnerXMLEditor"
#define MyAppVersion "0.8.9"
#define MyAppVersion "1.0.0"
#define MyAppPublisher "VerZsuT"
#define MyAppURL "https://snowrunner.mod.io/guides/snowrunner-xml-editor/"
#define MyAppExeName "SnowRunner-XML-Editor.exe"
Expand Down
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "snowrunner-xml-editor-desktop",
"productName": "SnowRunner-XML-Editor",
"version": "0.8.9",
"version": "1.0.0",
"description": "Allows you to visually edit the game's XML files.",
"type": "module",
"repository": {
Expand All @@ -28,32 +28,34 @@
},
"devDependencies": {
"@ant-design/icons-vue": "^7.0.1",
"@electron-forge/cli": "^7.3.0",
"@electron-forge/plugin-vite": "^7.3.0",
"@electron-forge/cli": "^7.3.1",
"@electron-forge/plugin-vite": "^7.3.1",
"@types/memoizee": "^0.4.11",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"@vitejs/plugin-vue": "^5.0.4",
"ant-design-vue": "^4.1.2",
"cheerio": "^1.0.0-rc.12",
"cross-env": "^7.0.3",
"electron": "^29.1.0",
"debounce": "^2.0.0",
"electron": "^29.1.5",
"emr-bridge": "^1.7.1",
"eslint": "^8.57.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-unicorn": "^51.0.1",
"eslint-plugin-vue": "^9.22.0",
"eslint-plugin-vue": "^9.23.0",
"memoizee": "^0.4.15",
"pinia": "^2.1.7",
"sass": "^1.71.1",
"sass": "^1.72.0",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
"vite": "^5.1.4",
"typescript": "^5.4.3",
"vite": "^5.2.4",
"vite-plugin-static-copy": "^1.0.1",
"vue": "^3.4.21",
"vue-eslint-parser": "^9.4.2",
"vue-tsc": "^1.8.27"
"vue-tsc": "^2.0.7",
"xml-formatter": "^3.6.2"
}
}
31 changes: 11 additions & 20 deletions src/build-configs/forge.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ class ForgeConfig {
function archive(source, name) {
execSync(`WinRAR a -ibck -ep1 -m5 "${name}" "${source}"`, { cwd: paths.winrar })
}
function hasArg(name) {
return process.argv.includes(name)
}

info('Clear other files in out dir')
for (const entry of await readdir(paths.out)) {
Expand All @@ -88,23 +85,17 @@ class ForgeConfig {
info('Rename build')
await rename(paths.build, join(_dirname, '../../out/SnowRunnerXMLEditor'))

if (hasArg('--fast')) return

if (!hasArg('--no-installer')) {
info('Create installer')
const configData = String(await readFile(paths.innoSetupConfig))
await writeFile(paths.innoSetupConfig, configData.replaceAll(/#define MyAppVersion .*?\r\n/g, `#define MyAppVersion "${version}"\r\n`))
execSync(paths.innoSetupConfig)
await cp(paths.installer, paths.updateInstaller)
await cp(paths.installer, paths.installerWithVersion)
}

if (!hasArg('--no-archive')) {
info('Archive build')
archive(paths.renamedBuild, paths.buildArchive)
await cp(paths.buildArchive, paths.updateBuildArchive)
archive(paths.installerWithVersion, paths.modioArchive)
}
info('Create installer')
const configData = String(await readFile(paths.innoSetupConfig))
await writeFile(paths.innoSetupConfig, configData.replaceAll(/#define MyAppVersion .*?\r\n/g, `#define MyAppVersion "${version}"\r\n`))
execSync(paths.innoSetupConfig)
await cp(paths.installer, paths.updateInstaller)
await cp(paths.installer, paths.installerWithVersion)

info('Archive build')
archive(paths.renamedBuild, paths.buildArchive)
await cp(paths.buildArchive, paths.updateBuildArchive)
archive(paths.installerWithVersion, paths.modioArchive)
}
},
plugins: [
Expand Down
2 changes: 1 addition & 1 deletion src/consts.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** Название программы */
export const APP_NAME = 'SnowRunner XML Editor'
/** Версия программы */
export const PROGRAM_VERSION = '0.8.9'
export const PROGRAM_VERSION = '1.0.0'

/** В любом случае показать devtools */
export const FORCE_DEVTOOLS = false
Expand Down
6 changes: 3 additions & 3 deletions src/modules/archive/main/texts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { localize } from '/utils/texts/main'

import texts from '../texts'

export default localize(texts)
import { LocalizationObj } from '/utils/texts/main'

export default new LocalizationObj(texts).get()
39 changes: 18 additions & 21 deletions src/modules/archive/texts.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
import { Lang } from '/mods/data/config/enums'
import { BaseLocalization, BaseLocalizationObj } from '/utils/texts/base-localization'

export default {
export default new BaseLocalizationObj({
/** Ошибка сохранения мода */
saveModError: {
[Lang.ru]: 'Не удалось сохранить файлы модификации. Нет доступа к записи файла.',
[Lang.en]: 'The modification files could not be saved. There is no write access to the file.',
[Lang.de]: 'Die Änderungsdateien konnten nicht gespeichert werden. Sie haben keinen Zugriff auf das Schreiben der Datei.',
[Lang.ch]: '修改文件无法保存。没有写入文件的权限。'
},
saveModError: new BaseLocalization()
.ru('Не удалось сохранить файлы модификации. Нет доступа к записи файла.')
.en('The modification files could not be saved. There is no write access to the file.')
.de('Die Änderungsdateien konnten nicht gespeichert werden. Sie haben keinen Zugriff auf das Schreiben der Datei.')
.ch('修改文件无法保存。没有写入文件的权限。'),
/** Ошибка сохранения `initial.pak` */
saveOriginalError: {
[Lang.ru]: 'Не удалось обновить файлы в initial.pak. Нет доступа к записи',
[Lang.en]: 'Failed to update files in initial. pak. There is no access to the record',
[Lang.de]: 'Die Dateien in initial konnten nicht aktualisiert werden.pak. Kein Zugriff auf den Datensatz',
[Lang.ch]: '更新initial.pak中的文件失败。没有写入权限'
},
saveOriginalError: new BaseLocalization()
.ru('Не удалось обновить файлы в initial.pak. Нет доступа к записи')
.en('Failed to update files in initial. pak. There is no access to the record')
.de('Die Dateien in initial konnten nicht aktualisiert werden.pak. Kein Zugriff auf den Datensatz')
.ch('更新initial.pak中的文件失败。没有写入权限'),
/** Распаковка */
unpacking: {
[Lang.ru]: 'Распаковка',
[Lang.en]: 'Unpacking',
[Lang.de]: 'Auspacken',
[Lang.ch]: '打开包装'
}
}
unpacking: new BaseLocalization()
.ru('Распаковка')
.en('Unpacking')
.de('Auspacken')
.ch('打开包装')
})
6 changes: 3 additions & 3 deletions src/modules/backup/main/texts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { localize } from '/utils/texts/main'

import texts from '../texts'

export default localize(texts)
import { LocalizationObj } from '/utils/texts/main'

export default new LocalizationObj(texts).get()
28 changes: 13 additions & 15 deletions src/modules/backup/texts.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import { Lang } from '../data/config/enums'
import { BaseLocalization, BaseLocalizationObj } from '/utils/texts/base-localization'

export default {
export default new BaseLocalizationObj({
/** Бэкап сохранён успешно */
successBackupSave: {
[Lang.ru]: 'Бэкап initial.pak успешно сохранён.',
[Lang.en]: 'The initial.pak backup was saved successfully.',
[Lang.de]: 'Die Initiale.pak backup wurde erfolgreich gespeichert.',
[Lang.ch]: 'initial.pak备份已成功保存。'
},
successBackupSave: new BaseLocalization()
.ru('Бэкап initial.pak успешно сохранён.')
.en('The initial.pak backup was saved successfully.')
.de('Die Initiale.pak backup wurde erfolgreich gespeichert.')
.ch('initial.pak备份已成功保存。'),
/** `initial.pak` восстановлен успешно */
successInitialRestore: {
[Lang.ru]: 'initial.pak был успешно восстановлен.',
[Lang.en]: 'initial.pak was successfully restored.',
[Lang.de]: 'initial.pak wurde erfolgreich restauriert.',
[Lang.ch]: 'initial.pak已被成功恢复。'
}
}
successInitialRestore: new BaseLocalization()
.ru('initial.pak был успешно восстановлен.')
.en('initial.pak was successfully restored.')
.de('initial.pak wurde erfolgreich restauriert.')
.ch('initial.pak已被成功恢复。')
})
4 changes: 2 additions & 2 deletions src/modules/checks/main/texts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import texts from '../texts'

import { localize } from '/utils/texts/main'
import { LocalizationObj } from '/utils/texts/main'

export default localize(texts)
export default new LocalizationObj(texts).get()
61 changes: 28 additions & 33 deletions src/modules/checks/texts.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,34 @@
import { Lang } from '/mods/data/config/enums'
import { BaseLocalization, BaseLocalizationObj } from '/utils/texts/base-localization'

export default {
export default new BaseLocalizationObj({
/** Ошибка прав доступа */
adminRequiredMessage: {
[Lang.ru]: 'Ошибка запуска. Программа должна быть запущена от имени администратора.',
[Lang.en]: 'Startup error. The program must be run as an administrator.',
[Lang.de]: 'Startfehler. Das Programm muss als administrator ausgeführt.',
[Lang.ch]: '启动错误。该程序必须以管理员身份启动。'
},
adminRequiredMessage: new BaseLocalization()
.ru('Ошибка запуска. Программа должна быть запущена от имени администратора.')
.en('Startup error. The program must be run as an administrator.')
.de('Startfehler. Das Programm muss als administrator ausgeführt.')
.ch('启动错误。该程序必须以管理员身份启动。'),
/** Доступна новая версия */
allowNewVersion: {
[Lang.ru]: 'Доступна новая версия программы.',
[Lang.en]: 'A new version of the program is available.',
[Lang.de]: 'Eine neue Version des Programms ist verfügbar.',
[Lang.ch]: '新版本的软件已经问世。'
},
allowNewVersion: new BaseLocalization()
.ru('Доступна новая версия программы.')
.en('A new version of the program is available.')
.de('Eine neue Version des Programms ist verfügbar.')
.ch('新版本的软件已经问世。'),
/** Не найден `initial.pak` */
initialNotFound: {
[Lang.ru]: 'initial.pak не найден.',
[Lang.en]: 'initial.pak not found',
[Lang.de]: 'initial.pak nicht gefunden',
[Lang.ch]: '没有找到initial.pak。'
},
initialNotFound: new BaseLocalization()
.ru('initial.pak не найден.')
.en('initial.pak not found')
.de('initial.pak nicht gefunden')
.ch('没有找到initial.pak。'),
/** Не найдена папка `classes` */
classesNotFound: {
[Lang.ru]: 'Папка classes не найдена.',
[Lang.en]: 'Folder classes not found',
[Lang.de]: 'Klassen nicht gefunden',
[Lang.ch]: '没有找到classes文件夹。'
},
classesNotFound: new BaseLocalization()
.ru('Папка classes не найдена.')
.en('Folder classes not found')
.de('Klassen nicht gefunden')
.ch('没有找到classes文件夹。'),
/** Не найдена папка `_dlc` */
dlcFolderNotFound: {
[Lang.ru]: 'Папка с дополнениями не найдена',
[Lang.en]: 'DLC folder not found',
[Lang.de]: 'DLC-Ordner nicht gefunden',
[Lang.ch]: '未找到增编文件夹'
}
}
dlcFolderNotFound: new BaseLocalization()
.ru('Папка с дополнениями не найдена')
.en('DLC folder not found')
.de('DLC-Ordner nicht gefunden')
.ch('未找到增编文件夹')
})
16 changes: 9 additions & 7 deletions src/modules/data/config/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@ import { PubKeys } from './public'
import type { IConfig } from './types'

import { PROGRAM_VERSION } from '/consts'
import Edited from '/mods/data/edited/main'
import Favorites from '/mods/data/favorites/main'
import Mods from '/mods/data/mods/main'
import Sizes from '/mods/data/sizes/main'
import { ErrorText, ProgramError } from '/mods/errors/main'
import { File, Files } from '/mods/files/main'
import Helpers from '/mods/helpers/main'
import { HasPublic } from '/utils/bridge/main'
import { isNullable } from '/utils/checks/main'

Expand Down Expand Up @@ -101,6 +96,12 @@ class Config extends HasPublic {
* @param noReload - отмена перезагрузки после завершения.
*/
async reset(noReload = false) {
const Edited = (await import('/mods/data/edited/main')).default
const Favorites = (await import('/mods/data/favorites/main')).default
const Mods = (await import('/mods/data/mods/main')).default
const Sizes = (await import('/mods/data/sizes/main')).default
const Helpers = (await import('/mods/helpers/main')).default

this.set(this.default)

await Helpers.clearTemp()
Expand Down Expand Up @@ -151,13 +152,14 @@ class Config extends HasPublic {
private async getFromJSON(defaultConfig: IConfig): Promise<IConfig> {
const data = await Files.config.readFromJSON<{ version: string }>()
const version = this.getVersion(data.version)
const thisVersion = this.getVersion(this.default.version)

let config: IConfig

if (version === this.default.version) {
if (version === thisVersion) {
config = data as IConfig
}
else if (version < this.default.version) {
else if (version < thisVersion) {
config = await this.convertToNewest(data)
}
else {
Expand Down
Loading

0 comments on commit 3672f5c

Please sign in to comment.