@temporary-escape/mod-sdk / SectorData
Class: SectorData
Defined in: schemas.ts:122
Base class for CBOR-serializable documents. The pack/unpack members are usually generated from the field declarations by the SDK AssemblyScript transform (see sdk/transform.js), which is why this is a class with concrete defaults rather than an interface: the IDE sees the inherited members and does not flag a class Foo extends Serializable as missing them.
The defaults abort, so a document whose members were never generated fails loudly at runtime instead of silently serializing nothing.
Extends
Constructors
Constructor
ts
new SectorData(): SectorData;Returns
SectorData
Inherited from
Properties
| Property | Modifier | Type | Default value | Defined in |
|---|---|---|---|---|
category | public | string | "" | schemas.ts:129 |
faction | public | AssetFaction | null | null | schemas.ts:134 |
generated | public | bool | false | schemas.ts:133 |
icon | public | IconType | IconType.Structure | schemas.ts:130 |
name | public | string | "" | schemas.ts:126 |
pos | public | Vector3f | undefined | schemas.ts:127 |
seed | public | number | 0 | schemas.ts:128 |
systemId | public | number | 0 | schemas.ts:125 |
type | public | AssetSectorType | null | null | schemas.ts:132 |
visible | public | bool | false | schemas.ts:131 |
kSchemaName | readonly | string | "Sector" | schemas.ts:123 |
Methods
pack()
ts
pack(_enc: CborEncoder): void;Defined in: cbor.ts:1452
Parameters
| Parameter | Type |
|---|---|
_enc | CborEncoder |
Returns
void
Inherited from
unpack()
ts
unpack(_dec: CborVisitor): void;Defined in: cbor.ts:1456
Parameters
| Parameter | Type |
|---|---|
_dec | CborVisitor |
Returns
void
