From f3b803f4f01f6b9a95bcb5132231cbeb8d59208a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 15:02:47 +0500 Subject: [PATCH] release(skyrim-platform): version 2.9 (#1962) --- .../dev/sp-add-TESModPlatform-CloseMenu.md | 1 - ...ESModPlatform-CreateReferenceAtLocation.md | 1 - .../dev/sp-added-evaluate-lvl-character.md | 1 - docs/release/dev/sp-block-papyrus-events.md | 1 - docs/release/dev/sp-cmd-fix.md | 1 - docs/release/dev/sp-fix-bow-shot-event.md | 1 - .../sp-fix-cameraStateChanged-event-crash.md | 1 - docs/release/dev/sp-fix-const-enum.md | 1 - .../sp-fix-effectStart-effectFinish-crash.md | 1 - docs/release/dev/sp-fix-event-crash.md | 1 - docs/release/dev/sp-fix-loadgame-headparts.md | 1 - .../dev/sp-fix-magicEffectApply-crash.md | 1 - .../dev/sp-fix-remaining-event-crashes.md | 1 - docs/release/dev/sp-httpclient-callback.md | 1 - docs/release/dev/sp-loadgame.md | 1 - ...sp-no-disable-defaultDisableHavokOnLoad.md | 1 - docs/release/dev/sp-optimize-settings.md | 1 - docs/release/dev/sp-optimize-texts.md | 1 - docs/release/dev/sp-set-inventory-force.md | 1 - docs/release/dev/sp-support-1.6.1170.md | 1 - docs/release/dev/sp-tick.md | 1 - docs/release/sp-2.9.md | 72 +++++++++++++++++++ skymp5-client/src/version.ts | 2 +- skyrim-platform/package.json | 2 +- .../src/platform_se/CMakeLists.txt | 2 +- .../platform_se/skyrim_platform/DevApi.cpp | 2 +- .../tools/plugin-example/package.json | 2 +- 27 files changed, 77 insertions(+), 26 deletions(-) delete mode 100644 docs/release/dev/sp-add-TESModPlatform-CloseMenu.md delete mode 100644 docs/release/dev/sp-add-TESModPlatform-CreateReferenceAtLocation.md delete mode 100644 docs/release/dev/sp-added-evaluate-lvl-character.md delete mode 100644 docs/release/dev/sp-block-papyrus-events.md delete mode 100644 docs/release/dev/sp-cmd-fix.md delete mode 100644 docs/release/dev/sp-fix-bow-shot-event.md delete mode 100644 docs/release/dev/sp-fix-cameraStateChanged-event-crash.md delete mode 100644 docs/release/dev/sp-fix-const-enum.md delete mode 100644 docs/release/dev/sp-fix-effectStart-effectFinish-crash.md delete mode 100644 docs/release/dev/sp-fix-event-crash.md delete mode 100644 docs/release/dev/sp-fix-loadgame-headparts.md delete mode 100644 docs/release/dev/sp-fix-magicEffectApply-crash.md delete mode 100644 docs/release/dev/sp-fix-remaining-event-crashes.md delete mode 100644 docs/release/dev/sp-httpclient-callback.md delete mode 100644 docs/release/dev/sp-loadgame.md delete mode 100644 docs/release/dev/sp-no-disable-defaultDisableHavokOnLoad.md delete mode 100644 docs/release/dev/sp-optimize-settings.md delete mode 100644 docs/release/dev/sp-optimize-texts.md delete mode 100644 docs/release/dev/sp-set-inventory-force.md delete mode 100644 docs/release/dev/sp-support-1.6.1170.md delete mode 100644 docs/release/dev/sp-tick.md create mode 100644 docs/release/sp-2.9.md diff --git a/docs/release/dev/sp-add-TESModPlatform-CloseMenu.md b/docs/release/dev/sp-add-TESModPlatform-CloseMenu.md deleted file mode 100644 index efbb2fd094..0000000000 --- a/docs/release/dev/sp-add-TESModPlatform-CloseMenu.md +++ /dev/null @@ -1 +0,0 @@ -Added `TESModPlatform.CloseMenu` native diff --git a/docs/release/dev/sp-add-TESModPlatform-CreateReferenceAtLocation.md b/docs/release/dev/sp-add-TESModPlatform-CreateReferenceAtLocation.md deleted file mode 100644 index 233cedd5ae..0000000000 --- a/docs/release/dev/sp-add-TESModPlatform-CreateReferenceAtLocation.md +++ /dev/null @@ -1 +0,0 @@ -Added `TESModPlatform.CreateReferenceAtLocation` native diff --git a/docs/release/dev/sp-added-evaluate-lvl-character.md b/docs/release/dev/sp-added-evaluate-lvl-character.md deleted file mode 100644 index 4469b3da68..0000000000 --- a/docs/release/dev/sp-added-evaluate-lvl-character.md +++ /dev/null @@ -1 +0,0 @@ -Added experimental `TESModPlatform.EvaluateLeveledNpc` native. It is unstable and shouldn't be used in user plugins. This native is required for SkyMP. diff --git a/docs/release/dev/sp-block-papyrus-events.md b/docs/release/dev/sp-block-papyrus-events.md deleted file mode 100644 index fb0413f1aa..0000000000 --- a/docs/release/dev/sp-block-papyrus-events.md +++ /dev/null @@ -1 +0,0 @@ -Added `blockPapyrusEvents` method as an alias for `TESModPlatform.blockPapyrusEvents` which is a Papyrus function and requires `on('update')` context to run. diff --git a/docs/release/dev/sp-cmd-fix.md b/docs/release/dev/sp-cmd-fix.md deleted file mode 100644 index 01ff8bb0b6..0000000000 --- a/docs/release/dev/sp-cmd-fix.md +++ /dev/null @@ -1 +0,0 @@ -[Embedded console](https://github.com/skyrim-multiplayer/skymp/blob/592c6527ed91e6c97a38d143f4ae1cdab9c3268e/docs/release/sp-2.8.md?plain=1#L68) now mirrors unhandled exceptions from the game console properly. diff --git a/docs/release/dev/sp-fix-bow-shot-event.md b/docs/release/dev/sp-fix-bow-shot-event.md deleted file mode 100644 index c32b9aae93..0000000000 --- a/docs/release/dev/sp-fix-bow-shot-event.md +++ /dev/null @@ -1 +0,0 @@ -Fixed `playerBowShot` event lacking `isSunGazing` value. diff --git a/docs/release/dev/sp-fix-cameraStateChanged-event-crash.md b/docs/release/dev/sp-fix-cameraStateChanged-event-crash.md deleted file mode 100644 index 1902fbb3f7..0000000000 --- a/docs/release/dev/sp-fix-cameraStateChanged-event-crash.md +++ /dev/null @@ -1 +0,0 @@ -Fixed crash in `CameraStateChanged` event when the player opens world map. diff --git a/docs/release/dev/sp-fix-const-enum.md b/docs/release/dev/sp-fix-const-enum.md deleted file mode 100644 index d12a150138..0000000000 --- a/docs/release/dev/sp-fix-const-enum.md +++ /dev/null @@ -1 +0,0 @@ -Fixed runtime errors when bundlers treat const enums in skyrimPlatform.ts as non-const. diff --git a/docs/release/dev/sp-fix-effectStart-effectFinish-crash.md b/docs/release/dev/sp-fix-effectStart-effectFinish-crash.md deleted file mode 100644 index a0547b3520..0000000000 --- a/docs/release/dev/sp-fix-effectStart-effectFinish-crash.md +++ /dev/null @@ -1 +0,0 @@ -Fixed crash when loading a save with at least one active `effectStart`/`effectFinish` listener. diff --git a/docs/release/dev/sp-fix-event-crash.md b/docs/release/dev/sp-fix-event-crash.md deleted file mode 100644 index 7076597381..0000000000 --- a/docs/release/dev/sp-fix-event-crash.md +++ /dev/null @@ -1 +0,0 @@ -Fixed crash during hot-reload after an attempt to register a non-existent event listener. diff --git a/docs/release/dev/sp-fix-loadgame-headparts.md b/docs/release/dev/sp-fix-loadgame-headparts.md deleted file mode 100644 index 5744652965..0000000000 --- a/docs/release/dev/sp-fix-loadgame-headparts.md +++ /dev/null @@ -1 +0,0 @@ -Taught `loadGame` function to work with non vanilla headparts. diff --git a/docs/release/dev/sp-fix-magicEffectApply-crash.md b/docs/release/dev/sp-fix-magicEffectApply-crash.md deleted file mode 100644 index ff53e0ef9f..0000000000 --- a/docs/release/dev/sp-fix-magicEffectApply-crash.md +++ /dev/null @@ -1 +0,0 @@ -Fixed potential crash when loading a save with at least one active `magicEffectApply` listener. diff --git a/docs/release/dev/sp-fix-remaining-event-crashes.md b/docs/release/dev/sp-fix-remaining-event-crashes.md deleted file mode 100644 index 065bde8841..0000000000 --- a/docs/release/dev/sp-fix-remaining-event-crashes.md +++ /dev/null @@ -1 +0,0 @@ -After a series of individual fixes, all remaining unsafe event handlers have been resolved. **Crashes when loading a save should no longer occur.** diff --git a/docs/release/dev/sp-httpclient-callback.md b/docs/release/dev/sp-httpclient-callback.md deleted file mode 100644 index ff99ddbab8..0000000000 --- a/docs/release/dev/sp-httpclient-callback.md +++ /dev/null @@ -1 +0,0 @@ -HTTP Client API now supports callbacks, not only promises. This is useful since in SkyrimPlatform promises aren't resolving in the main menu. diff --git a/docs/release/dev/sp-loadgame.md b/docs/release/dev/sp-loadgame.md deleted file mode 100644 index 661ef35dc8..0000000000 --- a/docs/release/dev/sp-loadgame.md +++ /dev/null @@ -1 +0,0 @@ -Added `time` and `loadOrder` parameters to `loadGame` function. diff --git a/docs/release/dev/sp-no-disable-defaultDisableHavokOnLoad.md b/docs/release/dev/sp-no-disable-defaultDisableHavokOnLoad.md deleted file mode 100644 index 38d4817aef..0000000000 --- a/docs/release/dev/sp-no-disable-defaultDisableHavokOnLoad.md +++ /dev/null @@ -1 +0,0 @@ -`blockPapyrusEvents` function now will not block events in `defaultDisableHavokOnLoad` script. diff --git a/docs/release/dev/sp-optimize-settings.md b/docs/release/dev/sp-optimize-settings.md deleted file mode 100644 index 1ca0a4d250..0000000000 --- a/docs/release/dev/sp-optimize-settings.md +++ /dev/null @@ -1 +0,0 @@ -Significantly optimized settings API. diff --git a/docs/release/dev/sp-optimize-texts.md b/docs/release/dev/sp-optimize-texts.md deleted file mode 100644 index c32cd6507d..0000000000 --- a/docs/release/dev/sp-optimize-texts.md +++ /dev/null @@ -1 +0,0 @@ -Slightly optimized Texts API. diff --git a/docs/release/dev/sp-set-inventory-force.md b/docs/release/dev/sp-set-inventory-force.md deleted file mode 100644 index b2cf78469a..0000000000 --- a/docs/release/dev/sp-set-inventory-force.md +++ /dev/null @@ -1 +0,0 @@ -`setInventory` now doesn't deny unequipping equipped items by default for the player (still denies for other actors). diff --git a/docs/release/dev/sp-support-1.6.1170.md b/docs/release/dev/sp-support-1.6.1170.md deleted file mode 100644 index 71d4e34d59..0000000000 --- a/docs/release/dev/sp-support-1.6.1170.md +++ /dev/null @@ -1 +0,0 @@ -Added support for Skyrim 1.6.1170.0. diff --git a/docs/release/dev/sp-tick.md b/docs/release/dev/sp-tick.md deleted file mode 100644 index d9262a505e..0000000000 --- a/docs/release/dev/sp-tick.md +++ /dev/null @@ -1 +0,0 @@ -Added initial support for calling script functions in tick context: `Game.getModCount`, `Game.getModName`. diff --git a/docs/release/sp-2.9.md b/docs/release/sp-2.9.md new file mode 100644 index 0000000000..19819ba5bb --- /dev/null +++ b/docs/release/sp-2.9.md @@ -0,0 +1,72 @@ +# SP 2.9.0 Release Notes + +Thank you for using Skyrim Platform! + +This document includes changes made since SP 2.8.0 + +WARNING: New game required. Update on current save at your own risk. Please backup your savegames. + +This document will tell you more about project status: https://github.com/skyrim-multiplayer/skymp/blob/main/skyrim-platform/README.md +## Changes + +- After a series of individual fixes, all remaining unsafe event handlers have been resolved. **Crashes when loading a save should no longer occur** ❤️‍🩹 + + +- Added support for Skyrim 1.6.1170.0 ❤️‍🩹 + + +- Added `TESModPlatform.CreateReferenceAtLocation` native + + +- Fixed crash when loading a save with at least one active `effectStart`/`effectFinish` listener. + + +- Slightly optimized Texts API. + + +- Fixed `playerBowShot` event lacking `isSunGazing` value. + + +- Taught `loadGame` function to work with non vanilla headparts. + + +- `blockPapyrusEvents` function now will not block events in `defaultDisableHavokOnLoad` script. + + +- Significantly optimized settings API. + + +- Added `TESModPlatform.CloseMenu` native + + +- `setInventory` now doesn't deny unequipping equipped items by default for the player (still denies for other actors). + + +- Fixed crash during hot-reload after an attempt to register a non-existent event listener. + + +- Added `blockPapyrusEvents` method as an alias for `TESModPlatform.blockPapyrusEvents` which is a Papyrus function and requires `on('update')` context to run. + + +- [Embedded console](https://github.com/skyrim-multiplayer/skymp/blob/592c6527ed91e6c97a38d143f4ae1cdab9c3268e/docs/release/sp-2.8.md?plain=1#L68) now mirrors unhandled exceptions from the game console properly. + + +- Added `time` and `loadOrder` parameters to `loadGame` function. + + +- Fixed runtime errors when bundlers treat const enums in skyrimPlatform.ts as non-const. + + +- Added initial support for calling script functions in tick context: `Game.getModCount`, `Game.getModName`. + + +- Fixed potential crash when loading a save with at least one active `magicEffectApply` listener. + + +- Added experimental `TESModPlatform.EvaluateLeveledNpc` native. It is unstable and shouldn't be used in user plugins. This native is required for SkyMP. + + +- Fixed crash in `CameraStateChanged` event when the player opens world map. + + +- HTTP Client API now supports callbacks, not only promises. This is useful since in SkyrimPlatform promises aren't resolving in the main menu. diff --git a/skymp5-client/src/version.ts b/skymp5-client/src/version.ts index faf0d9e955..1170c442ea 100644 --- a/skymp5-client/src/version.ts +++ b/skymp5-client/src/version.ts @@ -1,6 +1,6 @@ import { Utility, Debug, getPlatformVersion, on, Game, Ui } from 'skyrimPlatform'; -export const requiredVersion = '2.8.0'; +export const requiredVersion = '2.9.0'; const realVersion = typeof getPlatformVersion === 'function' ? getPlatformVersion() : 'unknown'; diff --git a/skyrim-platform/package.json b/skyrim-platform/package.json index 13708e0572..7678990ae9 100644 --- a/skyrim-platform/package.json +++ b/skyrim-platform/package.json @@ -1,6 +1,6 @@ { "name": "@skymp/skyrim-platform", - "version": "2.8.0", + "version": "2.9.0", "description": "A modding tool for Skyrim allowing writing scripts with JavaScript/TypeScript", "license": "GPL-3.0" } diff --git a/skyrim-platform/src/platform_se/CMakeLists.txt b/skyrim-platform/src/platform_se/CMakeLists.txt index 77ff0c5212..02cb0ec7fe 100644 --- a/skyrim-platform/src/platform_se/CMakeLists.txt +++ b/skyrim-platform/src/platform_se/CMakeLists.txt @@ -1,4 +1,4 @@ -project(platform_se VERSION 2.8.0 LANGUAGES CXX) +project(platform_se VERSION 2.9.0 LANGUAGES CXX) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/Version.h @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY) diff --git a/skyrim-platform/src/platform_se/skyrim_platform/DevApi.cpp b/skyrim-platform/src/platform_se/skyrim_platform/DevApi.cpp index 6b9fc9c0de..c7facfbec6 100644 --- a/skyrim-platform/src/platform_se/skyrim_platform/DevApi.cpp +++ b/skyrim-platform/src/platform_se/skyrim_platform/DevApi.cpp @@ -98,7 +98,7 @@ JsValue DevApi::WritePlugin(const JsFunctionArguments& args) JsValue DevApi::GetPlatformVersion(const JsFunctionArguments& args) { - return "2.8.0"; + return "2.9.0"; } JsValue DevApi::GetJsMemoryUsage(const JsFunctionArguments& args) diff --git a/skyrim-platform/tools/plugin-example/package.json b/skyrim-platform/tools/plugin-example/package.json index 89c93fc68a..88475ce835 100644 --- a/skyrim-platform/tools/plugin-example/package.json +++ b/skyrim-platform/tools/plugin-example/package.json @@ -25,6 +25,6 @@ "skryim platform" ], "dependencies": { - "@skyrim-platform/skyrim-platform": "2.8.0" + "@skyrim-platform/skyrim-platform": "2.9.0" } }