SchematicLoader
ThaumielMapEditor.API.Helpers
Overviewβ
Propertiesβ
| Name | Type | Access | Description |
|---|---|---|---|
Deserializer | IDeserializer | get | The YAML deserializer used to parse schematic and map files |
MapsById | Dictionary<Guid, MapData> | get set | A dictionary of all spawned ThaumielMapEditor.API.Data.MapData instances, keyed by their System.Guid. |
SchematicsById | Dictionary<UInt32, SchematicData> | get set | A dictionary of all spawned ThaumielMapEditor.API.Data.SchematicData instances, keyed by their ID. |
Serializer | ISerializer | get | The YAML serializer used to write schematic and map files, configured with Pascal case naming and custom type converters. |
SpawnedMaps | IEnumerable<MapData> | get | An enumerable of all currently spawned ThaumielMapEditor.API.Data.MapData instances. |
SpawnedSchematics | IEnumerable<SchematicData> | get | An enumerable of all currently spawned ThaumielMapEditor.API.Data.SchematicData instances. |
Fieldsβ
| Name | Type | Description |
|---|---|---|
LoadedMaps | List<SerializableMap> | This list contains all the maps loaded by `ThaumielMapEditor.API.Helpers.Schemat⦠|
LoadedSchematics | Dictionary<string, SerializableSchematic> | This list contains all the schematics loaded by `ThaumielMapEditor.API.Helpers.S⦠|
SchematicLODZones | Dictionary<LODZone, SchematicData> | dodad2 |
ServerSideTransforms | Dictionary<int, Transform> | No description |
Methodsβ
| Signature | Returns | Description |
|---|---|---|
Cleanup() | void | No description |
DestroyMap(MapData) | void | Destroys a map. |
DestroySchematic(SchematicData) | void | Destroys the specified ThaumielMapEditor.API.Data.SchematicData |
GetId() | UInt32 | Gets a unique id for all ThaumielMapEditor.API.Data.SchematicData |
GetSchematicById(UInt32) | SchematicData | Gets the ThaumielMapEditor.API.Data.SchematicData by its id. |
Init() | void | Initializes the ThaumielMapEditor.API.Helpers.SchematicLoader |
LoadMaps() | void | Loads the maps |
LoadSchematics() | void | Loads the schematics |
LoadSchematicsFromDirectory(string) | void | Loads all schematics from a custom directory into `ThaumielMapEditor.API.Helpers⦠|
ReloadSchematics() | void | Reloads all loaded schematics |
SaveMap(MapData) | SerializableMap | Saves a map |
SetupCulling(SerializableObject, ServerObject, SchematicData) | void | No description |
SetupCulling(SerializableObject, ClientSideObjectBase, SchematicData) | void | No description |
SpawnMap(SerializableMap) | MapData | Spawns a map |
SpawnSchematic(SerializableSchematic, Vector3, Quaternion, Vector3) | SchematicData | Spawns a schematic at the specified position, rotation, and scale. |
SpawnSchematic(SerializableSchematic, Vector3, Quaternion) | SchematicData | Spawns a schematic at the specified position and rotation with default scale. |
SpawnSchematic(SerializableSchematic, Vector3) | SchematicData | Spawns a schematic at the specified position with default rotation and scale. |
SpawnSchematic(string, Vector3) | SchematicData | Spawns a loaded schematic by name at the specified position with default rotatio⦠|
SpawnSchematic(string, Vector3, Quaternion) | SchematicData | Spawns a loaded schematic by name at the specified position and rotation with de⦠|
SpawnSchematic(string, Vector3, Quaternion, Vector3) | SchematicData | Spawns a loaded schematic by name at the specified position, rotation, and scale⦠|
SpawnSchematicFromDirectory(string, string, Vector3) | SchematicData | Spawns a schematic by name from a custom directory at the specified position wit⦠|
SpawnSchematicFromDirectory(string, string, Vector3, Quaternion) | SchematicData | Spawns a schematic by name from a custom directory at the specified position and⦠|
SpawnSchematicFromDirectory(string, string, Vector3, Quaternion, Vector3) | SchematicData | Spawns a schematic by name from a custom directory at the specified position, ro⦠|
SpawnSchematicFromPath(string, Vector3) | SchematicData | Spawns a schematic from a file path at the specified position with default rotat⦠|
SpawnSchematicFromPath(string, Vector3, Quaternion) | SchematicData | Spawns a schematic from a file path at the specified position and rotation with⦠|
SpawnSchematicFromPath(string, Vector3, Quaternion, Vector3) | SchematicData | Spawns a schematic from a file path at the specified position, rotation, and sca⦠|
TryGetSchematicById(UInt32, SchematicData&) | bool | Tries to get the ThaumielMapEditor.API.Data.SchematicData by its Id. |
Propertiesβ
Deserializerβ
Type: IDeserializerβAccess: get
The YAML deserializer used to parse schematic and map files
MapsByIdβ
Type: Dictionary<Guid, MapData>βAccess: get set
A dictionary of all spawned ThaumielMapEditor.API.Data.MapData instances, keyed by their System.Guid.
SchematicsByIdβ
Type: Dictionary<UInt32, SchematicData>βAccess: get set
A dictionary of all spawned ThaumielMapEditor.API.Data.SchematicData instances, keyed by their ID.
Serializerβ
Type: ISerializerβAccess: get
The YAML serializer used to write schematic and map files, configured with Pascal case naming and custom type converters.
SpawnedMapsβ
Type: IEnumerable<MapData>βAccess: get
An enumerable of all currently spawned ThaumielMapEditor.API.Data.MapData instances.
SpawnedSchematicsβ
Type: IEnumerable<SchematicData>βAccess: get
An enumerable of all currently spawned ThaumielMapEditor.API.Data.SchematicData instances.
Fieldsβ
LoadedMapsβ
Type: List<SerializableMap>
This list contains all the maps loaded by ThaumielMapEditor.API.Helpers.SchematicLoader.LoadMaps Use ThaumielMapEditor.API.Helpers.SchematicLoader.SpawnedMaps to get the spawned maps.
LoadedSchematicsβ
Type: Dictionary<string, SerializableSchematic>
This list contains all the schematics loaded by ThaumielMapEditor.API.Helpers.SchematicLoader.LoadSchematics Use ThaumielMapEditor.API.Helpers.SchematicLoader.SpawnedSchematics to get the spawned schematics.
SchematicLODZonesβ
Type: Dictionary<LODZone, SchematicData>
dodad2
ServerSideTransformsβ
Type: Dictionary<int, Transform>
Methodsβ
Cleanupβ
public void Cleanup()
DestroyMapβ
public void DestroyMap(MapData map)
Destroys a map.
Parametersβ
| Name | Type | Description |
|---|---|---|
map | MapData | The ThaumielMapEditor.API.Data.MapData to be destroyed. |
DestroySchematicβ
public void DestroySchematic(SchematicData data)
Destroys the specified ThaumielMapEditor.API.Data.SchematicData
Parametersβ
| Name | Type | Description |
|---|---|---|
data | SchematicData | The schematic to be destroyed |
GetIdβ
public UInt32 GetId()
Gets a unique id for all ThaumielMapEditor.API.Data.SchematicData
Returnsβ
UInt32 β System.UInt32 id
GetSchematicByIdβ
public SchematicData GetSchematicById(UInt32 id)
Gets the ThaumielMapEditor.API.Data.SchematicData by its id.
Parametersβ
| Name | Type | Description |
|---|---|---|
id | UInt32 | The id to get |
Returnsβ
SchematicData β ThaumielMapEditor.API.Data.SchematicData if found else returns null
Initβ
public void Init()
Initializes the ThaumielMapEditor.API.Helpers.SchematicLoader
LoadMapsβ
public void LoadMaps()
Loads the maps
LoadSchematicsβ
public void LoadSchematics()
Loads the schematics
LoadSchematicsFromDirectoryβ
public void LoadSchematicsFromDirectory(string directory)
Loads all schematics from a custom directory into ThaumielMapEditor.API.Helpers.SchematicLoader.LoadedSchematics.
Parametersβ
| Name | Type | Description |
|---|---|---|
directory | string | The full path to the directory to load schematics from. |
ReloadSchematicsβ
public void ReloadSchematics()
Reloads all loaded schematics
This does not automatically respawn schematics
SaveMapβ
public SerializableMap SaveMap(MapData data)
Saves a map
Parametersβ
| Name | Type | Description |
|---|---|---|
data | MapData | The ThaumielMapEditor.API.Data.MapData to save |
Returnsβ
SerializableMap β ThaumielMapEditor.API.Serialization.SerializableMap
SetupCullingβ
public void SetupCulling(
SerializableObject serializable,
ServerObject obj,
SchematicData schematic
)
Parametersβ
| Name | Type | Description |
|---|---|---|
serializable | SerializableObject | |
obj | ServerObject | |
schematic | SchematicData |
SetupCullingβ
public void SetupCulling(
SerializableObject serializable,
ClientSideObjectBase obj,
SchematicData schematic
)
Parametersβ
| Name | Type | Description |
|---|---|---|
serializable | SerializableObject | |
obj | ClientSideObjectBase | |
schematic | SchematicData |
SpawnMapβ
public MapData SpawnMap(SerializableMap map)
Spawns a map
Parametersβ
| Name | Type | Description |
|---|---|---|
map | SerializableMap | The serialized map to spawn |
Returnsβ
MapData β ThaumielMapEditor.API.Data.MapData
SpawnSchematicβ
public SchematicData SpawnSchematic(
SerializableSchematic schematic,
Vector3 position,
Quaternion rotation,
Vector3 scale
)
Spawns a schematic at the specified position, rotation, and scale.
Parametersβ
| Name | Type | Description |
|---|---|---|
schematic | SerializableSchematic | The serialized schematic to spawn. |
position | Vector3 | The world position at which to place the schematic. |
rotation | Quaternion | The rotation to apply to the schematic. |
scale | Vector3 | The scale to apply to the schematic. |
Returnsβ
SchematicData β A ThaumielMapEditor.API.Data.SchematicData instance representing the spawned schematic.
SpawnSchematicβ
public SchematicData SpawnSchematic(
SerializableSchematic schematic,
Vector3 position,
Quaternion rotation
)
Spawns a schematic at the specified position and rotation with default scale.
Parametersβ
| Name | Type | Description |
|---|---|---|
schematic | SerializableSchematic | The serialized schematic to spawn. |
position | Vector3 | The world position at which to place the schematic. |
rotation | Quaternion | The rotation to apply to the schematic. |
Returnsβ
SchematicData β A ThaumielMapEditor.API.Data.SchematicData instance representing the spawned schematic.
SpawnSchematicβ
public SchematicData SpawnSchematic(
SerializableSchematic schematic,
Vector3 position
)
Spawns a schematic at the specified position with default rotation and scale.
Parametersβ
| Name | Type | Description |
|---|---|---|
schematic | SerializableSchematic | The serialized schematic to spawn. |
position | Vector3 | The world position at which to place the schematic. |
Returnsβ
SchematicData β A ThaumielMapEditor.API.Data.SchematicData instance representing the spawned schematic.
SpawnSchematicβ
public SchematicData SpawnSchematic(
string schematicname,
Vector3 position
)
Spawns a loaded schematic by name at the specified position with default rotation and scale.
Parametersβ
| Name | Type | Description |
|---|---|---|
schematicname | string | The file name of the schematic to spawn. Must match a schematic in ThaumielMapEditor.API.Helpers.SchematicLoader.LoadedSchematics. |
position | Vector3 | The world position at which to place the schematic. |
Returnsβ
SchematicData β A ThaumielMapEditor.API.Data.SchematicData instance representing the spawned schematic.
SpawnSchematicβ
public SchematicData SpawnSchematic(
string schematicname,
Vector3 position,
Quaternion rotation
)
Spawns a loaded schematic by name at the specified position and rotation with default scale.
Parametersβ
| Name | Type | Description |
|---|---|---|
schematicname | string | The file name of the schematic to spawn. Must match a schematic in ThaumielMapEditor.API.Helpers.SchematicLoader.LoadedSchematics. |
position | Vector3 | The world position at which to place the schematic. |
rotation | Quaternion | The rotation to apply to the schematic. |
Returnsβ
SchematicData β A ThaumielMapEditor.API.Data.SchematicData instance representing the spawned schematic.
SpawnSchematicβ
public SchematicData SpawnSchematic(
string schematicname,
Vector3 position,
Quaternion rotation,
Vector3 scale
)
Spawns a loaded schematic by name at the specified position, rotation, and scale.
Parametersβ
| Name | Type | Description |
|---|---|---|
schematicname | string | The file name of the schematic to spawn. Must match a schematic in ThaumielMapEditor.API.Helpers.SchematicLoader.LoadedSchematics. |
position | Vector3 | The world position at which to place the schematic. |
rotation | Quaternion | The rotation to apply to the schematic. |
scale | Vector3 | The scale to apply to the schematic. |
Returnsβ
SchematicData β A ThaumielMapEditor.API.Data.SchematicData instance representing the spawned schematic.
SpawnSchematicFromDirectoryβ
public SchematicData SpawnSchematicFromDirectory(
string directory,
string schematicName,
Vector3 position
)
Spawns a schematic by name from a custom directory at the specified position with default rotation and scale.
Parametersβ
| Name | Type | Description |
|---|---|---|
directory | string | The full path to the directory containing the schematic. |
schematicName | string | The file name of the schematic (without extension). |
position | Vector3 | The world position at which to place the schematic. |
Returnsβ
SchematicData β A ThaumielMapEditor.API.Data.SchematicData instance representing the spawned schematic, or null if the schematic could not be loaded.
SpawnSchematicFromDirectoryβ
public SchematicData SpawnSchematicFromDirectory(
string directory,
string schematicName,
Vector3 position,
Quaternion rotation
)
Spawns a schematic by name from a custom directory at the specified position and rotation with default scale.
Parametersβ
| Name | Type | Description |
|---|---|---|
directory | string | The full path to the directory containing the schematic. |
schematicName | string | The file name of the schematic (without extension). |
position | Vector3 | The world position at which to place the schematic. |
rotation | Quaternion | The rotation to apply to the schematic. |
Returnsβ
SchematicData β A ThaumielMapEditor.API.Data.SchematicData instance representing the spawned schematic, or null if the schematic could not be loaded.
SpawnSchematicFromDirectoryβ
public SchematicData SpawnSchematicFromDirectory(
string directory,
string schematicName,
Vector3 position,
Quaternion rotation,
Vector3 scale
)
Spawns a schematic by name from a custom directory at the specified position, rotation, and scale.
Parametersβ
| Name | Type | Description |
|---|---|---|
directory | string | The full path to the directory containing the schematic. |
schematicName | string | The file name of the schematic (without extension). |
position | Vector3 | The world position at which to place the schematic. |
rotation | Quaternion | The rotation to apply to the schematic. |
scale | Vector3 | The scale to apply to the schematic. |
Returnsβ
SchematicData β A ThaumielMapEditor.API.Data.SchematicData instance representing the spawned schematic, or null if the schematic could not be loaded.
SpawnSchematicFromPathβ
public SchematicData SpawnSchematicFromPath(
string path,
Vector3 position
)
Spawns a schematic from a file path at the specified position with default rotation and scale.
Parametersβ
| Name | Type | Description |
|---|---|---|
path | string | The full file path to the schematic YAML file. |
position | Vector3 | The world position at which to place the schematic. |
Returnsβ
SchematicData β A ThaumielMapEditor.API.Data.SchematicData instance representing the spawned schematic, or null if the file could not be loaded.
SpawnSchematicFromPathβ
public SchematicData SpawnSchematicFromPath(
string path,
Vector3 position,
Quaternion rotation
)
Spawns a schematic from a file path at the specified position and rotation with default scale.
Parametersβ
| Name | Type | Description |
|---|---|---|
path | string | The full file path to the schematic YAML file. |
position | Vector3 | The world position at which to place the schematic. |
rotation | Quaternion | The rotation to apply to the schematic. |
Returnsβ
SchematicData β A ThaumielMapEditor.API.Data.SchematicData instance representing the spawned schematic, or null if the file could not be loaded.
SpawnSchematicFromPathβ
public SchematicData SpawnSchematicFromPath(
string path,
Vector3 position,
Quaternion rotation,
Vector3 scale
)
Spawns a schematic from a file path at the specified position, rotation, and scale.
Parametersβ
| Name | Type | Description |
|---|---|---|
path | string | The full file path to the schematic YAML file. |
position | Vector3 | The world position at which to place the schematic. |
rotation | Quaternion | The rotation to apply to the schematic. |
scale | Vector3 | The scale to apply to the schematic. |
Returnsβ
SchematicData β A ThaumielMapEditor.API.Data.SchematicData instance representing the spawned schematic, or null if the file could not be loaded.
TryGetSchematicByIdβ
public bool TryGetSchematicById(
UInt32 id,
SchematicData& schematic
)
Tries to get the ThaumielMapEditor.API.Data.SchematicData by its Id.
Parametersβ
| Name | Type | Description |
|---|---|---|
id | UInt32 | The id to get |
schematic | SchematicData& | The ThaumielMapEditor.API.Data.SchematicData if found |
Returnsβ
bool β true if found else returns false if not