Skip to content

Class: MockCArtefact ​

Mock of the X-Ray engine artefact object.

Extends ​

  • MockCGameObject

Implements ​

  • CArtefact

Constructors ​

Constructor ​

ts
new MockCArtefact(): MockCArtefact;

Returns ​

MockCArtefact

Inherited from ​

ts
MockCGameObject.constructor

Methods ​

create() ​

ts
static create(): MockCArtefact;

Returns ​

MockCArtefact

Overrides ​

ts
MockCGameObject.create

mock() ​

ts
static mock(): CArtefact;

Returns ​

CArtefact

Overrides ​

ts
MockCGameObject.mock

Properties ​

__name ​

ts
__name: string = "CGameObject";

LuaBind instance constructor name.

Implementation of ​

ts
CArtefact.__name

Inherited from ​

ts
MockCGameObject.__name

_construct ​

ts
_construct: MockedFunction<() => DLL_Pure>;

Construct engine-side object state.

Remarks ​

Lifecycle hook used by the engine. Calling it from gameplay scripts can reinitialize native state unexpectedly.

Returns ​

Constructed base object.

Implementation of ​

ts
CArtefact._construct

Inherited from ​

ts
MockCGameObject._construct

FollowByPath ​

ts
FollowByPath: Mock<UnknownFunction>;

Move the artefact detector helper along a patrol path.

Remarks ​

Native code delegates to detector support when it exists. Missing detector support makes this a no-op. The vector parameter is stored as movement force, not as an initial world position.

Param ​

path_name

Patrol path name.

Param ​

point_index

Starting path point index.

Param ​

position

Movement force used by detector support.

Implementation of ​

ts
CArtefact.FollowByPath

GetAfRank ​

ts
GetAfRank: Mock<() => number>;

Returns ​

Artefact rank used by detectors and inventory UI.

Implementation of ​

ts
CArtefact.GetAfRank

getEnabled ​

ts
getEnabled: MockedFunction<() => boolean>;

Returns ​

Whether the object is enabled in the client object loop.

Implementation of ​

ts
CArtefact.getEnabled

Inherited from ​

ts
MockCGameObject.getEnabled

getVisible ​

ts
getVisible: MockedFunction<() => boolean>;

Returns ​

Whether the object is visible.

Implementation of ​

ts
CArtefact.getVisible

Inherited from ​

ts
MockCGameObject.getVisible

net_Export ​

ts
net_Export: MockedFunction<(net_packet: net_packet) => void>;

Export network state to a packet.

Param ​

net_packet

Destination network packet.

Implementation of ​

ts
CArtefact.net_Export

Inherited from ​

ts
MockCGameObject.net_Export

net_Import ​

ts
net_Import: MockedFunction<(net_packet: net_packet) => void>;

Import network state from a packet.

Param ​

net_packet

Source network packet.

Implementation of ​

ts
CArtefact.net_Import

Inherited from ​

ts
MockCGameObject.net_Import

net_Spawn ​

ts
net_Spawn: MockedFunction<(cse_abstract: cse_abstract) => boolean>;

Spawn the client object from its server object.

Remarks ​

Lifecycle hook used during network spawn. Return false to reject spawn in custom subclasses.

Param ​

cse_abstract

Server object used for spawn data.

Returns ​

Whether spawn succeeded.

Implementation of ​

ts
CArtefact.net_Spawn

Inherited from ​

ts
MockCGameObject.net_Spawn

SwitchVisibility ​

ts
SwitchVisibility: Mock<UnknownFunction>;

Show or hide the artefact detector helper.

Remarks ​

Native code delegates to detector support when it exists. Missing detector support makes this a no-op; it does not spawn or destroy the artefact object.

Param ​

is_visible

New visibility state.

Implementation of ​

ts
CArtefact.SwitchVisibility

use ​

ts
use: MockedFunction<(object: CGameObject) => boolean>;

Use another object through the engine interaction path.

Param ​

object

Object being used.

Returns ​

Whether the use action was handled.

Implementation of ​

ts
CArtefact.use

Inherited from ​

ts
MockCGameObject.use

Visual ​

ts
Visual: MockedFunction<() => IXR_IRender_Visual>;

Returns ​

Render visual assigned to the object.

Implementation of ​

ts
CArtefact.Visual

Inherited from ​

ts
MockCGameObject.Visual