1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Merge pull request #17183 from Broxzier/bugfix/plug-in-crashes

This commit is contained in:
Hielke Morsink
2022-05-10 00:02:07 +02:00
committed by GitHub
4 changed files with 754 additions and 416 deletions

View File

@@ -12,6 +12,7 @@
- Fix: [#16934] Park size displayed incorrectly in Park window.
- Fix: [#16974] Small scenery ghosts can be deleted.
- Fix: [#17005] Unable to set patrol area for first staff member in park.
- Fix: [#17017] [Plugin] Crash when using tile element properties that require a valid ride to be linked.
- Fix: [#17073] Corrupt ride window and random crashes when trains have more than 144 cars.
- Fix: [#17080] “Remove litter” cheat does not empty litter bins.
- Fix: [#17099] Object selection thumbnail box is one pixel too tall.

View File

@@ -915,6 +915,12 @@ DukValue ScriptEngine::ExecutePluginCall(
return DukValue();
}
void ScriptEngine::LogPluginInfo(std::string_view message)
{
auto plugin = _execInfo.GetCurrentPlugin();
LogPluginInfo(plugin, message);
}
void ScriptEngine::LogPluginInfo(const std::shared_ptr<Plugin>& plugin, std::string_view message)
{
if (plugin == nullptr)

View File

@@ -46,7 +46,7 @@ namespace OpenRCT2
namespace OpenRCT2::Scripting
{
static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 52;
static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 53;
// Versions marking breaking changes.
static constexpr int32_t API_VERSION_33_PEEP_DEPRECATION = 33;
@@ -224,6 +224,7 @@ namespace OpenRCT2::Scripting
std::shared_ptr<Plugin> plugin, const DukValue& func, const DukValue& thisValue, const std::vector<DukValue>& args,
bool isGameStateMutable);
void LogPluginInfo(std::string_view message);
void LogPluginInfo(const std::shared_ptr<Plugin>& plugin, std::string_view message);
void SubscribeToPluginStoppedEvent(std::function<void(std::shared_ptr<Plugin>)> callback)

File diff suppressed because it is too large Load Diff