Skip to main content

ToolBase

class ThaumielMapEditor.API.Components.Tools

Overview​

Properties​

NameTypeAccessDescription
ObjectServerObjectgetGets the ThaumielMapEditor.API.Blocks.ServerObject for this ThaumielMapEditor.API.Components.Tools.ToolBase instance. Null until ThaumielMapEditor.API.Components.Tools.ToolBase.Init(ThaumielMapEditor.API.Blocks.ServerObject,ThaumielMapEditor.API.Data.SchematicData,System.Collections.Generic.Dictionary{System.String,System.Object}) is called.
SchematicSchematicDatagetGets the ThaumielMapEditor.API.Blocks.ServerObject for this ThaumielMapEditor.API.Components.Tools.ToolBase instance. Null until ThaumielMapEditor.API.Components.Tools.ToolBase.Init(ThaumielMapEditor.API.Blocks.ServerObject,ThaumielMapEditor.API.Data.SchematicData,System.Collections.Generic.Dictionary{System.String,System.Object}) is called.
TypeToolTypegetThe ThaumielMapEditor.API.Enums.ToolType this ThaumielMapEditor.API.Components.Tools.ToolBase instance uses.

Methods​

SignatureReturnsDescription
Init(ServerObject, SchematicData, Dictionary<string, object>)voidInitializes the component.
IsLocalFile(string)boolNo description
MapToObject(object)TNo description

Properties​

Object​

Type: ServerObject Access: get

Gets the ThaumielMapEditor.API.Blocks.ServerObject for this ThaumielMapEditor.API.Components.Tools.ToolBase instance. Null until ThaumielMapEditor.API.Components.Tools.ToolBase.Init(ThaumielMapEditor.API.Blocks.ServerObject,ThaumielMapEditor.API.Data.SchematicData,System.Collections.Generic.Dictionary{System.String,System.Object}) is called.


Schematic​

Type: SchematicData Access: get

Gets the ThaumielMapEditor.API.Blocks.ServerObject for this ThaumielMapEditor.API.Components.Tools.ToolBase instance. Null until ThaumielMapEditor.API.Components.Tools.ToolBase.Init(ThaumielMapEditor.API.Blocks.ServerObject,ThaumielMapEditor.API.Data.SchematicData,System.Collections.Generic.Dictionary{System.String,System.Object}) is called.


Type​

Type: ToolType Access: get

The ThaumielMapEditor.API.Enums.ToolType this ThaumielMapEditor.API.Components.Tools.ToolBase instance uses.


Methods​

Init​

Init
public void Init(
ServerObject obj,
SchematicData schem,
Dictionary<string, object> properties
)

Initializes the component.

Parameters​

NameTypeDescription
objServerObjectThe ThaumielMapEditor.API.Blocks.ServerObject instance this was added to.
schemSchematicDataThe ThaumielMapEditor.API.Data.SchematicData that the ThaumielMapEditor.API.Blocks.ServerObject was spawned from.
propertiesDictionary<string, object>The serialized properties.

IsLocalFile​

IsLocalFile
public bool IsLocalFile(string path)

Parameters​

NameTypeDescription
pathstring

Returns​

bool


MapToObject​

MapToObject
public T MapToObject(object data)

Parameters​

NameTypeDescription
dataobject

Returns​

T