Skip to main content

MapLoader

class ThaumielMapEditor.API.Helpers

Overview​

Methods​

SignatureReturnsDescription
LoadMap(string)voidLoads a map by its file name.
ParseInput(string)voidParses an input string and executes map load or unload operations based on the p…
UnloadMap(string)voidUnloads a currently spawned map by its file name.

Methods​

LoadMap​

LoadMap
public void LoadMap(string name)

Loads a map by its file name.

Remarks

The method performs a case-insensitive search in the loaded maps collection. If the map is not found, a warning is logged.

Parameters​

NameTypeDescription
namestringThe name of the map file to load.

ParseInput​

ParseInput
public void ParseInput(string input)

Parses an input string and executes map load or unload operations based on the provided syntax.

Remarks

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​

NameTypeDescription
inputstringThe input command string (e.g., "Load::MapA", "Unload::MapA||MapB").

UnloadMap​

UnloadMap
public void UnloadMap(string name)

Unloads a currently spawned map by its file name.

Remarks

The method performs a case-insensitive search in the spawned maps collection. If the map is not found, a warning is logged.

Parameters​

NameTypeDescription
namestringThe name of the map file to unload.