ClassiCubeMonoPlugin is a plugin for ClassiCube that allows for scripting functionality with mono.
How to use
Feedback
Developer info
API
Example plugins
Compiling
Plugins DLLs are loaded from the monoplugins directory.
ClassiCubeMonoPlugin is by no means complete. Please open an issue to report bugs and provide feedback.
Plugins must be compiled in reference to MonoPluginLoader.dll.
mcs -target:library -r:path/to/MonoPluginLoader.dll path/to/file.cs
Plugins may not contain anything that calls System.IO.FileSystem.FileExists, or it will crash ClassiCube.
The API is similar to the API found here, except for the following differences:
bool Camera.IsSmoothbool World.PhysicsEnabledint World.GetSeed()- Returns
0most of the time.
- Returns
PlatformmodulePlatform.Process_Exit(int code)Platform.Process_StartOpen(string url)Platform.Directory_Create(string path)Platform.File_Exists(string path)
- Events except
Events.FreeEvents.ResetEvents.NewMapEvents.MapLoaded
Server.SendDataWindow.GetHandle
Example plugins can be found in here
IMPORTANT: Header files that have been included from ClassiCube have a hardcoded path. Before compiling, please replace all instances of ../ClassiCube-src/src/ in Api.h and MonoPlugin.c with the path to the ClassiCube src directory.
gcc -o MonoPlugin.so MonoPlugin.c -shared -fPIC -rdynamic `pkg-config --cflags --libs mono-2`
mcs -target:library -out:MonoPluginLoader.dll MonoPluginLoader*.cs
TODO: Add documentation
TODO: Add documentation