OpenCDS PluginGuidelines

From OpenFrag

Jump to: navigation, search

Contents

Plugin guidelines

There are some things you must think about when creating plugins. If your plugin does not follow these guidelines, it will not be added to the official plugin repository.

Neverending loops

These are not allowed in plugins. Those will not be accepted when you would submit them.

The accepted way is to check if the plugin is allowed to run or not:

  1. while (m_IsRunning)
  2. {
  3.   //
  4. }

m_IsRunning is a member of Plugin.

This will allow OpenCDS to stop the plugin when such is necessary.

Use of correct classes

You are expected to use the classes that are written for the plugin system, not the global implementation of some of them. For example, plugins should not use the global Logger, they should, instead, use PluginLogger. Same goes for localisation, plugin's have their own classes for this.

Starting on construction

In your plugins constructor, you should NOT start loops, or sequences. You should move all this to the initialize() method. The constructor is meant for initialization of variables, in plugins.

Personal tools
OpenFrag