The calls
This is the full list of what the API gives you. A modId is your mod’s id, the same one your mod uses for its settings. See Owner in the glossary.
These are the three classes.
CraftingSpeed how fast a kind of station works
Call SetSpeedFactor with your mod id and a station kind, or AllStations for every kind, and Clear to undo it.
public static class CraftingSpeed
{
public const string AllStations = "*";
public static bool SpeedFactorsAvailable { get; }
public static bool SetSpeedFactor(string modId, string stationKind, float speed);
public static bool Clear(string modId);
}
| Method | Returns | What it does |
|---|---|---|
SetSpeedFactor(modId, stationKind, speed) | bool | Sets how fast one kind of station works for your mod. The speed is from 0.01 to 4. Returns true when it was set. |
Clear(modId) | bool | Removes all of this mod’s speed changes. |
| Property | Type | What it means |
|---|---|---|
AllStations | string | Pass this as the station kind to cover every kind of station. It is "*". |
SpeedFactorsAvailable | bool | false when the speed setup failed. |
CraftingQuality how good what stations make is
Call SetQualityFactor with your mod id to change how good everything a station makes is, and Clear to undo it.
public static class CraftingQuality
{
public static bool QualityFactorAvailable { get; }
public static bool SetQualityFactor(string modId, float factor);
public static bool Clear(string modId);
}
| Method | Returns | What it does |
|---|---|---|
SetQualityFactor(modId, factor) | bool | Sets how good everything a station makes is, for your mod. The factor is from 0 to 4. Returns true when it was set. |
Clear(modId) | bool | Removes this mod’s quality change. |
| Property | Type | What it means |
|---|---|---|
QualityFactorAvailable | bool | false when the quality setup failed. |
CraftingStations start, stop, pause and resume a station
Call Start, Stop, Pause and Resume with your mod id and the station’s id to control a craft.
public static class CraftingStations
{
public static bool Start(string modId, string stationId);
public static bool Stop(string modId, string stationId);
public static bool Pause(string modId, string stationId);
public static bool Resume(string modId, string stationId);
}
| Method | Returns | What it does |
|---|---|---|
Start(modId, stationId) | bool | Starts a craft. Returns true when the station started. |
Stop(modId, stationId) | bool | Ends a liquid batch early. Returns true when it stopped. |
Pause(modId, stationId) | bool | Freezes a running batch. Returns true when it froze. |
Resume(modId, stationId) | bool | Unfreezes a batch. Returns true when it carried on. |