Skip to content

Class: cse_abstract

Base abstract logic for any representation of objects on server side.

Source

C++ class cse_abstract : cpure_server_object

Custom Constructor

cse_abstract

Remarks

Server objects are ALife/network objects, not live client game_object wrappers.

Extends

Extended by

Implements

Constructors

Constructor

ts
new cse_abstract(section: string): cse_abstract;

Create a server object for an object section.

Parameters

ParameterTypeDescription
sectionstringSpawn section name.

Returns

cse_abstract

Overrides

EngineBinding.constructor

Methods

clsid()

ts
clsid(): TXR_class_id;

Returns

TXR_class_id

Engine class id.


FillProps()

ts
FillProps(pref: string, items: prop_item_vec): void;

Fill editor property rows for this object.

Parameters

ParameterTypeDescription
prefstringProperty prefix.
itemsprop_item_vecProperty collection to populate.

Returns

void


name()

ts
name<T>(): T;

Type Parameters

Type ParameterDefault type
T extends stringstring

Returns

T

Runtime object name.


section_name()

ts
section_name<T>(): T;

Type Parameters

Type ParameterDefault type
T extends stringstring

Returns

T

Spawn section name.


spawn_ini()

ts
spawn_ini(): Nullable<ini_file>;

Returns

Nullable<ini_file>

Spawn ini attached to this object, if any.


STATE_Read()

ts
STATE_Read(packet: net_packet, size: number): void;

Read a state packet into this object.

Parameters

ParameterTypeDescription
packetnet_packetSource network packet.
sizenumberSerialized state size.

Returns

void

Remarks

Use only with packets written for the same server object class and state format.


STATE_Write()

ts
STATE_Write(packet: net_packet): void;

Write a state packet from this object.

Parameters

ParameterTypeDescription
packetnet_packetTarget network packet.

Returns

void


UPDATE_Read()

ts
UPDATE_Read(packet: net_packet): void;

Read an update packet into this object.

Parameters

ParameterTypeDescription
packetnet_packetSource network packet.

Returns

void

Remarks

Use only with packets written for the same server object class and update format.


UPDATE_Write()

ts
UPDATE_Write(packet: net_packet): void;

Write an update packet from this object.

Parameters

ParameterTypeDescription
packetnet_packetTarget network packet.

Returns

void

Properties

__name

ts
readonly __name: string;

LuaBind instance constructor name.

Inherited from

EngineBinding.__name


angle

ts
angle: vector;

Server-side orientation angles.


id

ts
readonly id: number;

Server object id.


parent_id

ts
readonly parent_id: number;

Parent server object id, or 65535 when there is no parent.


position

ts
position: vector;

Server-side world position.


script_version

ts
readonly script_version: number;

Script data version stored with this object.


__name

ts
readonly static __name: string;

LuaBind class constructor name.

Inherited from

EngineBinding.__name