godarklight/DarkMultiPlayer — pull request #132 by TheMalkavien (2014-06-22 12:26:08+00:00)
Title: Script Manager PoC

Hi,

You will find an example of a simple "ScriptManager" i'v used many times in my projects.
You can put .cs files in the "Scripts" directory, and it will be compiled on server start (or anytime you want). The compiled assembly is added in a list, and then you can search for your attributes if needed.
I included a very simple example where the script want juste to register an event.

It may be easier for your advanced users to develop new modules, as they dont need to recompile their dlls each time, juste change the script. The DMP console will show if there are any errors into the scripts.

You can also add commands directly into the scripts if you want, but you have to add a new attribute for the commands. It may be interesting, so modules can easily add commands too :)