MapLoader
ThaumielMapEditor.API.Helpers
Overviewā
Methodsā
| Signature | Returns | Description |
|---|---|---|
LoadMap(string) | void | Loads a map by its file name. |
ParseInput(string) | void | Parses an input string and executes map load or unload operations based on the p⦠|
UnloadMap(string) | void | Unloads a currently spawned map by its file name. |
Methodsā
LoadMapā
public void LoadMap(string name)
Loads a map by its file name.
The method performs a case-insensitive search in the loaded maps collection. If the map is not found, a warning is logged.
Parametersā
| Name | Type | Description |
|---|---|---|
name | string | The name of the map file to load. |
ParseInputā
public void ParseInput(string input)
Parses an input string and executes map load or unload operations based on the provided syntax.
Supported syntax: - Load::MapName - Loads a single map. - Load::MapA||MapB - Loads one random map from the list. - Load::MapA&&MapB - Loads all specified maps. - Unload::MapName - Unloads a single map. - Unload::MapA||MapB - Unloads one random map from the list. - Unload::MapA&&MapB - Unloads all specified maps. - LoadIf::MapName::IsLoaded::ConditionMap - Loads a map if the condition map is currently loaded. - LoadIf::MapName::IsNotLoaded::ConditionMap - Loads a map if the condition map is not currently loaded. - UnloadIf::MapName::IsLoaded::ConditionMap - Unloads a map if the condition map is currently loaded. - UnloadIf::MapName::IsNotLoaded::ConditionMap - Unloads a map if the condition map is not currently loaded.
Parametersā
| Name | Type | Description |
|---|---|---|
input | string | The input command string (e.g., "Load::MapA", "Unload::MapA||MapB"). |
UnloadMapā
public void UnloadMap(string name)
Unloads a currently spawned map by its file name.
The method performs a case-insensitive search in the spawned maps collection. If the map is not found, a warning is logged.
Parametersā
| Name | Type | Description |
|---|---|---|
name | string | The name of the map file to unload. |