Skip to content

Latest commit

 

History

History
151 lines (97 loc) · 3.19 KB

PickupDockComponent.md

File metadata and controls

151 lines (97 loc) · 3.19 KB

Class: PickupDockComponent

Types

<ComponentProps>

See <ComponentProps>


<PickupDockComponentProps>

A portion of the configuration object to pass to the PickupDockComponent constructor.

type PickupDockComponentPropsV2 = {
  dockedTypeHash?: number | undefined;
  quantity?: number | undefined;
  childIndex?: number | undefined;
};

type PickupDockComponentProps = PickupDockComponentPropsV2;

Since v2

  • dockedTypeHash (optional, default 0) <number>
  • quantity (optional, default 1) <number>
  • childIndex (optional, default 0) <number>

Constructors

new PickupDockComponent(props)

Creates a versioned PickupDock component.

import { PickupDockComponent } from 'att-string-transcoder';

const componentVersion = 2;
const component = new PickupDockComponent({ version: componentVersion });

PickupDockComponent.fromBinary(reader, version)

See Component.fromBinary(reader, version)

Properties

Note that the following properties are sorted in order of appearance when decoding component binary data.

hash

See Component.hash


name

See Component.name


version

See Component.version


dockedTypeHash

  • Since: v2
  • <number>
import { PickupDockComponent } from 'att-string-transcoder';

const componentVersion = 2;
const component = new PickupDockComponent({ version: componentVersion });

const dockedTypeHash = component.dockedTypeHash;
// `dockedTypeHash` is `0`

quantity

  • Since: v2
  • <number>
import { PickupDockComponent } from 'att-string-transcoder';

const componentVersion = 2;
const component = new PickupDockComponent({ version: componentVersion });

const quantity = component.quantity;
// `quantity` is `1`

childIndex

  • Since: v2
  • <number>
import { PickupDockComponent } from 'att-string-transcoder';

const componentVersion = 2;
const component = new PickupDockComponent({ version: componentVersion });

const childIndex = component.childIndex;
// `childIndex` is `0`

Methods

toBinary(version?)

See Component.toBinary(version?)


write(writer, version?)

See Component.write(writer, version?)