Show / Hide Table of Contents

Class PlayerMachineInfo

Inheritance
Object
PlayerMachineInfo
Namespace: Modding.Blocks
Assembly: Assembly-CSharp.dll
Syntax
public class PlayerMachineInfo

Properties

Blocks

Meta-data of the blocks of this machine.

Declaration
public ReadOnlyCollection<BlockInfo> Blocks { get; }
Property Value
Type Description
ReadOnlyCollection<BlockInfo>

InternalObject

Internal representation of this object.

WARNING: This is not part of the stable API and subject to change!

Declaration
public MachineInfo InternalObject { get; }
Property Value
Type Description
MachineInfo

MachineData

Custom data associated to this machine.

Declaration
public XDataHolder MachineData { get; }
Property Value
Type Description
XDataHolder
Remarks

The keys for the data here are not automatically seperated by mod, a unique prefix for each mod is advisable.

Keep in mind that one can't rely on any data being present here, as machines may have been saved without the mod installed and should still load.

That means always checking for the presence of data before accessing it and having sensible default values in case no data is present.

Name

Name of the machine.

Declaration
public string Name { get; }
Property Value
Type Description
String

Position

Position of this machine.

Declaration
public Vector3 Position { get; }
Property Value
Type Description
UnityEngine.Vector3

Rotation

Rotation of this machine.

Declaration
public Quaternion Rotation { get; }
Property Value
Type Description
UnityEngine.Quaternion

Methods

Equals(PlayerMachineInfo)

Declaration
protected bool Equals(PlayerMachineInfo other)
Parameters
Type Name Description
PlayerMachineInfo other
Returns
Type Description
Boolean

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
Object.Equals(Object)

From(MachineInfo)

Create a MachineInfo from its internal representation.

Declaration
public static PlayerMachineInfo From(MachineInfo info)
Parameters
Type Name Description
MachineInfo info
Returns
Type Description
PlayerMachineInfo

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
Object.GetHashCode()

ToString()

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
Object.ToString()

Operators

Equality(PlayerMachineInfo, PlayerMachineInfo)

Declaration
public static bool operator ==(PlayerMachineInfo left, PlayerMachineInfo right)
Parameters
Type Name Description
PlayerMachineInfo left
PlayerMachineInfo right
Returns
Type Description
Boolean

Inequality(PlayerMachineInfo, PlayerMachineInfo)

Declaration
public static bool operator !=(PlayerMachineInfo left, PlayerMachineInfo right)
Parameters
Type Name Description
PlayerMachineInfo left
PlayerMachineInfo right
Returns
Type Description
Boolean
Back to top Generated by DocFX