I'm messing around with some plugin dependency things right now, and a bit of an issue came up. The plugin I'm working on currently depends on the ATCP plugin, and when the plugin list changes (i.e. after all plugins are guaranteed to be loaded), I use CallPlugin() to call a function defined in the ATCP plugin.
The issue is that I can't see any unobtrusive way to -only- run the CallPlugin() when it's the ATCP plugin that's just been (re)installed. Right now, it's called whenever any plugin is reinstalled, which isn't exactly something I'd like happening.
Would anyone happen to have any suggestions on how to get around this? In case it's useful, here's the OnPluginListChanged I'm using:
(If you're wondering, PPI is a library script I wrote to encapsulate some inter-plugin communication. It's related to my previous LoadPPI, except it uses CallPlugin() directly, and doesn't have the load-on-demand functionality.)
The issue is that I can't see any unobtrusive way to -only- run the CallPlugin() when it's the ATCP plugin that's just been (re)installed. Right now, it's called whenever any plugin is reinstalled, which isn't exactly something I'd like happening.
Would anyone happen to have any suggestions on how to get around this? In case it's useful, here's the OnPluginListChanged I'm using:
OnPluginListChanged = function()
local atcp = PPI.Load("7c08e2961c5e20e5bdbf7fc5")
if not atcp then
error("ATCP plugin not installed. Please install the ATCP plugin, then reinstall this plugin.")
end
_G["atcp"] = atcp
atcp.EnableModule("room_brief")
end(If you're wondering, PPI is a library script I wrote to encapsulate some inter-plugin communication. It's related to my previous LoadPPI, except it uses CallPlugin() directly, and doesn't have the load-on-demand functionality.)