Class Mannequin
Base bindings for mods from Lua
Inheritance
System.Object
Mannequin
Namespace: Mannequin.Bindings
Assembly: Collapse.dll
Syntax
public class Mannequin : object
Constructors
Mannequin(Mod)
Initiate a copy of Mannequin for a Mod.
Declaration
public Mannequin(Mod parent)
Parameters
| Type | Name | Description |
|---|---|---|
| Mannequin.Mod | parent | The Mod to instantiate this Mannequin for |
Methods
GetMod(String)
Look up an IMannequinMod by ID. If the provided mod is not installed, returns null. If Steamworks is enabled and ready, it will also return Workshop mods.
Declaration
public IMannequinMod GetMod(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | The ID of the mod to look up |
Returns
| Type | Description |
|---|---|
| IMannequinMod | The IMannequinMod, or |
Import(String)
Import a library. Its methods and properties will be dumped into your mod's global scope.
Declaration
public void Import(string library)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | library | The library to import |
Examples
Mannequin:Import("Event")
Require(String)
Load another lua file into your environment.
Declaration
public object Require(string loc)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | loc | The name of the lua file, without the .lua |
Returns
| Type | Description |
|---|---|
| System.Object | The result of execution. |