Home

LuaRemote

Registry of interfaces between scripts. An interface is simply a dictionary mapping names to functions. A script or mod can then register an interface with LuaRemote, after that any script can call the registered functions, provided it knows the interface name and the desired function name. An instance of LuaRemote is available through the global object named remote.

Attributes

object_name

The class name of this object. Available even when valid is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.

interfaces

List of all registered interfaces. For each interface name, remote.interfaces[name] is a dictionary mapping the interface's registered functions to true.

Methods

add_interface

LuaRemote.add_interface(name: string, functions: Dict<string, function()>)

Call As

remote.add_interface(name, functions)

Call Convention

Add a remote interface.

Parameters

remove_interface

LuaRemote.remove_interface(name: string) -> boolean

Call As

remote.remove_interface(name)

Call Convention

Removes an interface with the given name.

Parameters

Returns

call

LuaRemote.call(interface: string, function: string) -> Any?

Call As

remote.call(interface, function)

Call Convention

Call a function of an interface.

Providing an unknown interface or function name will result in a script error.

Parameters

Returns