TheStarport / FLHook

A Server Improvement for Freelancer.
GNU General Public License v3.0
30 stars 15 forks source link

Plugin load order is alphabetical, creating errors on communicators between plugins #375

Closed josbyte closed 9 months ago

josbyte commented 1 year ago

If a plugin, for example, is called objectSpawn, and it has a pluginCall grabing createSolar from the plugin Solar Control, it will fail as when the ObjectSpawn is loaded, SolarControl still isnt loaded, making the pluginCall resulting in null

Aingar commented 9 months ago

Shouldn't cross-plugin calls be initialized after all plugins are loaded instead? I can see a pair of plugins that'd have cross calls configured between each other, which would just be impossible with the current setup

oliverpechey commented 9 months ago

It might just be that the docs are wrong. Perhaps the definitions import shouldn't be done until the LoadSettings hook. Needs testing

Lazrius commented 9 months ago

Yes that was my bad. Communicators must be done in the LoadSettings hook.