mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-02 03:35:09 +01:00
Clear plugin storage when converting save game for scenario (#24069)
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
- Fix: [#22634] Asset packs with sound effect overrides are not loaded correctly at startup.
|
||||
- Fix: [#23108] Missing pieces on Hypercoaster and Hyper-Twister, even with the ‘all drawable track pieces’ cheat enabled.
|
||||
- Fix: [#24013] Failure to load a scenario preview image (minimap) could lead to an uncaught exception error message.
|
||||
- Fix: [#24045] [Plugin] Data storage is not cleared when converting save game to scenario.
|
||||
- Fix: [#24121] Checkbox labels run beyond the edge of the window if they’re too long to fit.
|
||||
- Fix: [#24142] [Plugin] Track origin is miscalculated on downward slopes.
|
||||
- Fix: [#24220] Narrow station platforms have missing sides on certain rotations.
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <openrct2/audio/Audio.h>
|
||||
#include <openrct2/entity/EntityList.h>
|
||||
#include <openrct2/management/Research.h>
|
||||
#include <openrct2/scripting/ScriptEngine.h>
|
||||
#include <openrct2/ui/WindowManager.h>
|
||||
#include <openrct2/windows/Intent.h>
|
||||
#include <openrct2/world/Park.h>
|
||||
@@ -296,6 +297,12 @@ namespace OpenRCT2::Ui::Windows
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
// Clear the plugin storage before saving
|
||||
auto& scriptEngine = GetContext()->GetScriptEngine();
|
||||
scriptEngine.ClearParkStorage();
|
||||
#endif
|
||||
|
||||
auto* windowMgr = Ui::GetWindowManager();
|
||||
windowMgr->CloseAll();
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "object/ObjectRepository.h"
|
||||
#include "peep/PeepAnimations.h"
|
||||
#include "rct1/RCT1.h"
|
||||
#include "scripting/ScriptEngine.h"
|
||||
#include "ui/WindowManager.h"
|
||||
#include "windows/Intent.h"
|
||||
#include "world/Climate.h"
|
||||
@@ -160,6 +161,12 @@ namespace OpenRCT2::Editor
|
||||
|
||||
GameLoadScripts();
|
||||
GameNotifyMapChanged();
|
||||
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
// Clear the plugin storage before saving
|
||||
auto& scriptEngine = GetContext()->GetScriptEngine();
|
||||
scriptEngine.ClearParkStorage();
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -279,7 +286,6 @@ namespace OpenRCT2::Editor
|
||||
|
||||
RideInitAll();
|
||||
|
||||
//
|
||||
for (auto* guest : EntityList<Guest>())
|
||||
{
|
||||
guest->SetName({});
|
||||
|
||||
Reference in New Issue
Block a user