ModCommands
A static class in Root.Township, Alta.Console.Commands.
Console module mods: manages the game's built-in C# script mods (the .cs files DemoLoadScripts loads from the mods folder). Needs the server_owner permission.
- Listed in Console, logging and analytics
- Attributes
WithPermissionOnly,Module
Fields
1 private and internal field
Methods
| Member | What it is |
|---|---|
static void AddMod(string name, string content, bool isOverride) | mods add: writes the given source text to name.cs in the mods folder and loads it; refuses an existing name unless overriding. |
static string GetPath() | mods path: returns the mods folder path. |
static IEnumerable<ModInfo> ListMods() | mods list: returns each loaded mod's name and whether it is active. |
static void ReloadMods() | mods refresh: rescans the mods folder for new mods. |
static void RemoveMod(string name) | mods remove: stops the matching mods, deletes their files and drops them from the loaded list. |
static void RestartMod(string name) | mods restart: stops the matching mods' instances and creates new ones. |
static void StartMod(string name) | mods start: creates new instances of the matching mods. |
static void StopMod(string name) | mods stop: stops the matching mods' instances. |