the imod interface - ParkitectNexus/ParkitectNexusClient GitHub Wiki
The IMod interface can be found in(Game Directory)/Parkitect_Data/Managed/Assembly-CSharp.dll
and looks roughly like this:
/// <summary>
/// An interface for user made mods.
/// </summary>
public interface IMod
{
/// <summary>
/// Called to indicate this instance should load its logic.
/// This method is called during the loading routine of a savegame or a fresh game.
/// </summary>
void onEnabled();
/// <summary>
/// Called to indicate this instance should unload its logic.
/// This method is called before the game quits.
/// </summary>
void onDisabled();
/// <summary>
/// Gets the name of this instance.
/// </summary>
string Name { get; }
/// <summary>
/// Gets the description of this instance.
/// </summary>
string Description { get; }
/// <summary>
/// Gets an unique identifier of this mod.
/// <summary>
string Identifier{ get; }
}
In addition to the IMod
interface, you can add a few properties which will automatically be filled by the ParkitectNexus mod loader. These properties are optional.
public class MyExampleMod : IMod
{
// ...
/// <summary>
/// Gets the path to the installation directory of this mod.
/// <summary>
/// <remarks>If a setter is implemented, this property is automatically set by the ParkitectNexus Client.</remarks>
public string Path { get; set; }
/// <summary>
/// Gets an unique identifier of this mod.
/// <summary>
/// <remarks>If a setter is implemented, this property is automatically set by the ParkitectNexus Client.</remarks>
public string Identifier { get; set; }
}