openplanet Download Openplanet Login with ManiaPlanet

Core group

Classes

Functions

void print(const string&in)

Prints a line to Openplanet's log.

void sleep(uint64 ms)

Yields the current execution for a given period of time. Execution will be resumed after that time.

void yield()

Yields the current execution. Execution will be resumed the next game tick.

void startnew(CoroutineFunc@ func)

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

void ExploreNod(const ?&in)

Opens the Nod Explorer with the given nod.

CGameCtnApp@ GetApp()

Gets the main game app object.

CSystemFidFile@ GetFile(const string&in path)

Gets a fid by its path. DEPRECATED! Please use the new Fids API instead.

CSystemFid@ GetFidFromNod(const ?&in)

Gets the fid of the given nod, if it's set.

string GetLocalLogin()

Gets the logged in user's username.

void RegisterLoadCallback(uint id)

Tells the scripting to invoke the currently executing plugin when nods are loaded with the given class ID.

void UnregisterLoadCallback(uint id)

Tells the scripting to stop invoking the currently executing plugin when nods are loaded with the given class ID.