Documentation

Meta

Namespace

Openplanet meta plugin API.

class Meta::PluginSetting

Information about a plugin's setting.

class Meta::Plugin

Information about an Openplanet plugin.

class Meta::PluginIndex

An index of plugin information that can be sorted by its dependency tree.

class Meta::PluginIndexItem

An item in a PluginIndex.

awaitable@ Meta::StartWithRunContext(RunContext runContext, CoroutineFunc@ func)

Starts a new yieldable coroutine from the given function. Function should be a declaration of 'void Func()'.

Returns awaitable@
awaitable@ Meta::StartWithRunContext(RunContext runContext, CoroutineFuncUserdata@ func, ref userdata)

Starts a new yieldable coroutine from the given function which also provides a userdata handle parameter. Function should be a declaration of 'void Func(ref@)'.

Returns awaitable@
awaitable@ Meta::StartWithRunContext(RunContext runContext, CoroutineFuncUserdataInt64@ func, const int userdata)

Starts a new yieldable coroutine from the given function which also provides a userdata signed integer. Function should be a declaration of 'void Func(int64)'.

Returns awaitable@
awaitable@ Meta::StartWithRunContext(RunContext runContext, CoroutineFuncUserdataInt64@ func, const int64 userdata)

Starts a new yieldable coroutine from the given function which also provides a userdata signed integer. Function should be a declaration of 'void Func(int64)'.

Returns awaitable@
awaitable@ Meta::StartWithRunContext(RunContext runContext, CoroutineFuncUserdataUint64@ func, const uint userdata)

Starts a new yieldable coroutine from the given function which also provides a userdata unsigned integer. Function should be a declaration of 'void Func(uint64)'.

Returns awaitable@
awaitable@ Meta::StartWithRunContext(RunContext runContext, CoroutineFuncUserdataUint64@ func, const uint64 userdata)

Starts a new yieldable coroutine from the given function which also provides a userdata unsigned integer. Function should be a declaration of 'void Func(uint64)'.

Returns awaitable@
awaitable@ Meta::StartWithRunContext(RunContext runContext, CoroutineFuncUserdataDouble@ func, const double userdata)

Starts a new yieldable coroutine from the given function which also provides a userdata floating point number. Function should be a declaration of 'void Func(double)'.

Returns awaitable@
awaitable@ Meta::StartWithRunContext(RunContext runContext, CoroutineFuncUserdataString@ func, const string&in userdata)

Starts a new yieldable coroutine from the given function which also provides a userdata string. Function should be a declaration of 'void Func(const string &in)'.

Returns awaitable@
void Meta::OpenTextEditor(const string&in path, int line = 0)

Opens the preferred text editor with the given path and line number.

Plugin@ Meta::ExecutingPlugin()

Gets the currently executing plugin.

Returns Meta::Plugin@
Plugin@[]@ Meta::AllPlugins()

Gets all plugins that are loaded.

UnloadedPluginInfo[]@ Meta::UnloadedPlugins()

Gets the identifiers of all unloaded plugins. Note that this function may be slow!

Plugin@ Meta::GetPluginFromSiteID(int siteID)

Gets a plugin from its site ID, if set.

Returns Meta::Plugin@
Plugin@ Meta::LoadPlugin(const string&in path, PluginSource source, PluginType type)

Loads a plugin into memory from the given absolute path and returns a handle to the plugin.

Returns Meta::Plugin@
void Meta::UnloadPlugin(Plugin@ plugin)

Queues a plugin to be unloaded from memory completely when it is safe to do so. Note that this will invalidate the plugin object passed in on the next frame! Do not use the Plugin handle after calling this!

void Meta::ReloadPlugin(Plugin@ plugin)

Queues a plugin to be reloaded when it is safe to do so. Note that this will invalidate the plugin object passed in on the next frame! Do not use the Plugin handle after calling this!

void Meta::OpenSettings(Plugin@ plugin = null)

Opens the settings window to the page of the given plugin.

void Meta::SaveSettings()

Forces Openplanet to save its settings immediately. Normally this happens on game shutdown or when the settings window is closed. You should not have to call this function unless you know you really need to!

bool Meta::IsDeveloperMode()

Returns true if developer mode is currently enabled.

Returns bool
bool Meta::IsSchoolModeWhitelisted()

Returns true when the current session is whitelisted by school mode, and school mode is enabled. If you want to check if school mode is enabled, use the SIG_SCHOOL preprocessor define instead.

Returns bool
string Meta::OpenplanetVersion()

Returns the current version of Openplanet.

Returns string
string Meta::OpenplanetVersionDate()

Returns the current date of Openplanet's build.

Returns string
string Meta::OpenplanetVersionGitCommit()

Returns the current git commit short hash of Openplanet's build.

Returns string
string Meta::OpenplanetVersionGitBranch()

Returns the current git branch of Openplanet's build.

Returns string
string Meta::OpenplanetBuildInfo()

Returns the current build info of Openplanet's build.

Returns string
void Meta::Terminate()

Immediately terminates the game process. This is the same as clicking "Exit" in the Openplanet menu.

enum Meta::TextEditorType

Type of text editor.

enum Meta::PluginType

The type of plugin.

enum Meta::PluginSource

Where this plugin is loaded from.

enum Meta::PluginSettingType

The type of this setting variable.

enum Meta::RunContext

Execution context for a coroutine.