Skip to content

Class: MockZoneVisual

Mock visual zone server object.

Extends

Implements

  • cse_zone_visual

Accessors

__name

Get Signature

ts
get __name(): string;
Returns

string

Implementation of

ts
cse_zone_visual.__name

Inherited from

MockAnomalousZone.__name


__name

Get Signature

ts
get static __name(): string;
Returns

string

Inherited from

MockAnomalousZone.__name

Constructors

Constructor

ts
new MockZoneVisual(config?: 
  | string
  | IMockAlifeObjectConfig): MockZoneVisual;

Parameters

ParameterType
config| string | IMockAlifeObjectConfig

Returns

MockZoneVisual

Inherited from

MockAnomalousZone.constructor

Methods

can_save()

ts
can_save(): boolean;

Returns

boolean

Whether this object should be saved.

Implementation of

ts
cse_zone_visual.can_save

Inherited from

MockAnomalousZone.can_save


can_switch_offline()

Call Signature

ts
can_switch_offline(): boolean;
Returns

boolean

Whether this object may switch offline.

Implementation of
ts
cse_zone_visual.can_switch_offline
Inherited from

MockAnomalousZone.can_switch_offline

Call Signature

ts
can_switch_offline(value: boolean): void;

Allow or block switching offline.

Parameters
ParameterTypeDescription
valuebooleanWhether offline switching is allowed.
Returns

void

Remarks

Sets the object's switch-offline flag; it does not switch the object immediately.

Implementation of
ts
cse_zone_visual.can_switch_offline
Inherited from

MockAnomalousZone.can_switch_offline


can_switch_online()

Call Signature

ts
can_switch_online(): boolean;
Returns

boolean

Whether this object may switch online.

Implementation of
ts
cse_zone_visual.can_switch_online
Inherited from

MockAnomalousZone.can_switch_online

Call Signature

ts
can_switch_online(value: boolean): void;

Allow or block switching online.

Parameters
ParameterTypeDescription
valuebooleanWhether online switching is allowed.
Returns

void

Remarks

Sets the object's switch-online flag; it does not switch the object immediately.

Implementation of
ts
cse_zone_visual.can_switch_online
Inherited from

MockAnomalousZone.can_switch_online


clsid()

ts
clsid(): TXR_class_id;

Returns

TXR_class_id

Engine class id.

Implementation of

ts
cse_zone_visual.clsid

Inherited from

MockAnomalousZone.clsid


FillProps()

ts
FillProps(_pref: string, _items: prop_item_vec): void;

Fill editor property rows for this object.

Parameters

ParameterType
_prefstring
_itemsprop_item_vec

Returns

void

Implementation of

ts
cse_zone_visual.FillProps

Inherited from

MockAnomalousZone.FillProps


init()

ts
init(): cse_alife_object;

Initialize the ALife object and return its abstract base.

Returns

cse_alife_object

Initialized abstract entity.

Implementation of

ts
cse_zone_visual.init

Inherited from

MockAnomalousZone.init


interactive()

ts
interactive(): boolean;

Returns

boolean

Whether the object is interactive.

Implementation of

ts
cse_zone_visual.interactive

Inherited from

MockAnomalousZone.interactive


keep_saved_data_anyway()

ts
keep_saved_data_anyway(): boolean;

Returns

boolean

Implementation of

ts
cse_zone_visual.keep_saved_data_anyway

Inherited from

MockAnomalousZone.keep_saved_data_anyway


move_offline()

Call Signature

ts
move_offline(): boolean;
Returns

boolean

Whether the object should move while offline.

Implementation of
ts
cse_zone_visual.move_offline
Inherited from

MockAnomalousZone.move_offline

Call Signature

ts
move_offline(value: boolean): void;

Set whether the object should move while offline.

Parameters
ParameterTypeDescription
valuebooleanWhether offline movement is enabled.
Returns

void

Implementation of
ts
cse_zone_visual.move_offline
Inherited from

MockAnomalousZone.move_offline


name()

ts
name<T>(): T;

Type Parameters

Type Parameter
T extends string

Returns

T

Runtime object name.

Implementation of

ts
cse_zone_visual.name

Inherited from

MockAnomalousZone.name


on_before_register()

ts
on_before_register(): void;

Returns

void

Implementation of

ts
cse_zone_visual.on_before_register

Inherited from

MockAnomalousZone.on_before_register


on_register()

ts
on_register(): void;

Returns

void

Implementation of

ts
cse_zone_visual.on_register

Inherited from

MockAnomalousZone.on_register


on_spawn()

ts
on_spawn(): void;

Returns

void

Implementation of

ts
cse_zone_visual.on_spawn

Inherited from

MockAnomalousZone.on_spawn


on_unregister()

ts
on_unregister(): void;

Returns

void

Implementation of

ts
cse_zone_visual.on_unregister

Inherited from

MockAnomalousZone.on_unregister


section_name()

ts
section_name<T>(): T;

Type Parameters

Type Parameter
T extends string

Returns

T

Spawn section name.

Implementation of

ts
cse_zone_visual.section_name

Inherited from

MockAnomalousZone.section_name


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.

Implementation of

ts
cse_zone_visual.STATE_Read

Inherited from

MockAnomalousZone.STATE_Read


STATE_Write()

ts
STATE_Write(packet: net_packet): void;

Write a state packet from this object.

Parameters

ParameterTypeDescription
packetnet_packetTarget network packet.

Returns

void

Implementation of

ts
cse_zone_visual.STATE_Write

Inherited from

MockAnomalousZone.STATE_Write


switch_offline()

ts
switch_offline(): void;

Mark the server object offline.

Returns

void

Source

src/xrGame/alife_dynamic_object.cpp, CSE_ALifeDynamicObject::switch_offline.

Remarks

Requires the object to be online. The base implementation marks it offline, removes it from the online ALife set, and clears client data unless keep_saved_data_anyway() returns true.

Implementation of

ts
cse_zone_visual.switch_offline

Inherited from

MockAnomalousZone.switch_offline


switch_online()

ts
switch_online(): void;

Mark the server object online.

Returns

void

Source

src/xrGame/alife_dynamic_object.cpp, CSE_ALifeDynamicObject::switch_online.

Remarks

Requires the object to be offline. The base implementation marks it online and adds it to the online ALife set. Use the simulator switch manager for normal distance-based switching.

Implementation of

ts
cse_zone_visual.switch_online

Inherited from

MockAnomalousZone.switch_online


update()

ts
update(): void;

Declared on the prototype rather than as an own jest.fn() field.

Returns

void

Remarks

Server objects override update and call super.update(). An own instance field is installed by this constructor before the subclass body runs, so it would shadow the subclass override entirely and leave super.update undefined. Spy on it with jest.spyOn(object, "update") when call assertions are needed.

Implementation of

ts
cse_zone_visual.update

Inherited from

MockAnomalousZone.update


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.

Implementation of

ts
cse_zone_visual.UPDATE_Read

Inherited from

MockAnomalousZone.UPDATE_Read


UPDATE_Write()

ts
UPDATE_Write(packet: net_packet): void;

Write an update packet from this object.

Parameters

ParameterTypeDescription
packetnet_packetTarget network packet.

Returns

void

Implementation of

ts
cse_zone_visual.UPDATE_Write

Inherited from

MockAnomalousZone.UPDATE_Write


use_ai_locations()

ts
use_ai_locations(value: boolean): void;

Enable or disable AI location graph use.

Parameters

ParameterTypeDescription
valuebooleanWhether AI locations should be used.

Returns

void

Implementation of

ts
cse_zone_visual.use_ai_locations

Inherited from

MockAnomalousZone.use_ai_locations


used_ai_locations()

ts
used_ai_locations(): boolean;

Returns

boolean

Whether the object uses AI location graph data.

Implementation of

ts
cse_zone_visual.used_ai_locations

Inherited from

MockAnomalousZone.used_ai_locations


visible_for_map()

Call Signature

ts
visible_for_map(): boolean;
Returns

boolean

Whether the object is visible on the map.

Implementation of
ts
cse_zone_visual.visible_for_map
Inherited from

MockAnomalousZone.visible_for_map

Call Signature

ts
visible_for_map(value: boolean): void;

Set whether the object is visible on the map.

Parameters
ParameterTypeDescription
valuebooleanWhether the object should be shown on the map.
Returns

void

Implementation of
ts
cse_zone_visual.visible_for_map
Inherited from

MockAnomalousZone.visible_for_map


create()

ts
static create(config?: IMockAlifeObjectConfig): MockZoneVisual;

Parameters

ParameterType
configIMockAlifeObjectConfig

Returns

MockZoneVisual

Overrides

MockAnomalousZone.create


mock()

ts
static mock(config?: IMockAlifeObjectConfig): cse_zone_visual;

Parameters

ParameterType
configIMockAlifeObjectConfig

Returns

cse_zone_visual

Overrides

MockAnomalousZone.mock


mockWithClassId()

ts
static mockWithClassId(classId: number): cse_alife_object;

Parameters

ParameterType
classIdnumber

Returns

cse_alife_object

Inherited from

MockAnomalousZone.mockWithClassId


toMock()

ts
static toMock(object: cse_alife_object): MockAlifeObject;

Parameters

ParameterType
objectcse_alife_object

Returns

MockAlifeObject

Inherited from

MockAnomalousZone.toMock

Properties

alive

ts
alive: Mock<() => boolean>;

Inherited from

MockAnomalousZone.alive


angle

ts
angle: vector;

Server-side orientation angles.

Implementation of

ts
cse_zone_visual.angle

Inherited from

MockAnomalousZone.angle


canSave

ts
canSave: boolean;

Inherited from

MockAnomalousZone.canSave


canSwitchOffline

ts
canSwitchOffline: boolean;

Inherited from

MockAnomalousZone.canSwitchOffline


canSwitchOnline

ts
canSwitchOnline: boolean;

Inherited from

MockAnomalousZone.canSwitchOnline


classId

ts
classId: TXR_class_id;

Inherited from

MockAnomalousZone.classId


clear_smart_terrain

ts
clear_smart_terrain: Mock<UnknownFunction>;

Inherited from

MockAnomalousZone.clear_smart_terrain


community

ts
community: <T>() => T;

Type Parameters

Type ParameterDefault type
T extends stringstring

Returns

T

Inherited from

MockAnomalousZone.community


id

ts
id: number;

Server object id.

Implementation of

ts
cse_zone_visual.id

Inherited from

MockAnomalousZone.id


isInteractive

ts
isInteractive: boolean;

Inherited from

MockAnomalousZone.isInteractive


isVisibleForMap

ts
isVisibleForMap: boolean;

Inherited from

MockAnomalousZone.isVisibleForMap


m_game_vertex_id

ts
m_game_vertex_id: number;

Game graph vertex used by ALife simulation.

Implementation of

ts
cse_zone_visual.m_game_vertex_id

Inherited from

MockAnomalousZone.m_game_vertex_id


m_level_vertex_id

ts
m_level_vertex_id: number;

Level graph vertex used by ALife simulation.

Implementation of

ts
cse_zone_visual.m_level_vertex_id

Inherited from

MockAnomalousZone.m_level_vertex_id


m_story_id

ts
m_story_id: number;

Always numeric value. Returns maximal u32 (4294967295) value if object has no story id.

Implementation of

ts
cse_zone_visual.m_story_id

Inherited from

MockAnomalousZone.m_story_id


objectAlive

ts
objectAlive: boolean;

Inherited from

MockAnomalousZone.objectAlive


objectCommunity

ts
objectCommunity: string;

Inherited from

MockAnomalousZone.objectCommunity


objectName

ts
objectName: string;

Inherited from

MockAnomalousZone.objectName


online

ts
online: boolean;

Whether server object has client representation and is in online mode.

Implementation of

ts
cse_zone_visual.online

Inherited from

MockAnomalousZone.online


parent_id

ts
parent_id: number;

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

Implementation of

ts
cse_zone_visual.parent_id

Inherited from

MockAnomalousZone.parent_id


position

ts
position: vector;

Server-side world position.

Implementation of

ts
cse_zone_visual.position

Inherited from

MockAnomalousZone.position


script_version

ts
script_version: number;

Script data version stored with this object.

Implementation of

ts
cse_zone_visual.script_version

Inherited from

MockAnomalousZone.script_version


section

ts
section: string;

Inherited from

MockAnomalousZone.section


shouldMoveOffline

ts
shouldMoveOffline: boolean;

Inherited from

MockAnomalousZone.shouldMoveOffline


spawn_ini

ts
spawn_ini: Mock<() => ini_file | null>;

Returns

Spawn ini attached to this object, if any.

Implementation of

ts
cse_zone_visual.spawn_ini

Inherited from

MockAnomalousZone.spawn_ini


spawnIni

ts
spawnIni: ini_file | null;

Inherited from

MockAnomalousZone.spawnIni


usesAiLocations

ts
usesAiLocations: boolean;

Inherited from

MockAnomalousZone.usesAiLocations