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

Log messages with new LogPluginInfo function

This commit is contained in:
Hielke Morsink
2022-05-09 21:13:58 +02:00
parent 75caf23b84
commit a67e805e60
3 changed files with 280 additions and 208 deletions

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

@@ -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