Skip to content

Class: MockObject ​

Mock of the X-Ray engine object action/state enumeration.

Implements ​

  • XR_object

Constructors ​

Constructor ​

ts
new MockObject(...args: unknown[]): MockObject;

Parameters ​

ParameterType
...argsunknown[]

Returns ​

MockObject

Methods ​

action() ​

ts
action(action: TXR_object_action): void;

Set the object action mode.

Parameters ​

ParameterTypeDescription
actionTXR_object_actionObject action id.

Returns ​

void

Implementation of ​

ts
XR_object.action

completed() ​

ts
completed(): boolean;

Check whether the object action is complete.

Returns ​

boolean

Whether the action is complete.

Implementation of ​

ts
XR_object.completed

object() ​

ts
object(object: string | game_object): void;

Set target object by name.

Parameters ​

ParameterType
objectstring | game_object

Returns ​

void

Implementation of ​

ts
XR_object.object

create() ​

ts
static create(...args: unknown[]): MockObject;

Parameters ​

ParameterType
...argsunknown[]

Returns ​

MockObject


mock() ​

ts
static mock(...args: unknown[]): XR_object;

Parameters ​

ParameterType
...argsunknown[]

Returns ​

XR_object

Properties ​

__name ​

ts
__name: string = "object";

LuaBind instance constructor name.

Implementation of ​

ts
XR_object.__name

args ​

ts
args: unknown[];

isCompleted ​

ts
isCompleted: boolean = false;

objectAction ​

ts
objectAction: TXR_object_action | null = null;

targetObject ​

ts
targetObject: string | game_object | null = null;

activate ​

ts
readonly static activate: 16;

Engine enum value for XR_object.activate.


aim1 ​

ts
readonly static aim1: 4;

Engine enum value for XR_object.aim1.


aim2 ​

ts
readonly static aim2: 5;

Engine enum value for XR_object.aim2.


deactivate ​

ts
readonly static deactivate: 17;

Engine enum value for XR_object.deactivate.


drop ​

ts
readonly static drop: 11;

Engine enum value for XR_object.drop.


dummy ​

ts
readonly static dummy: -1;

Engine enum value for XR_object.dummy.


fire1 ​

ts
readonly static fire1: 6;

Engine enum value for XR_object.fire1.


fire2 ​

ts
readonly static fire2: 8;

Engine enum value for XR_object.fire2.


hide ​

ts
readonly static hide: 22;

Engine enum value for XR_object.hide.


idle ​

ts
readonly static idle: 9;

Engine enum value for XR_object.idle.


reload ​

ts
readonly static reload: 2;

Engine enum value for XR_object.reload.


reload1 ​

ts
readonly static reload1: 2;

Engine enum value for XR_object.reload1.


reload2 ​

ts
readonly static reload2: 3;

Engine enum value for XR_object.reload2.


show ​

ts
readonly static show: 21;

Engine enum value for XR_object.show.


strap ​

ts
readonly static strap: 10;

Engine enum value for XR_object.strap.


switch1 ​

ts
readonly static switch1: 0;

Engine enum value for XR_object.switch1.


switch2 ​

ts
readonly static switch2: 1;

Engine enum value for XR_object.switch2.


take ​

ts
readonly static take: 23;

Engine enum value for XR_object.take.


turn_off ​

ts
readonly static turn_off: 20;

Engine enum value for XR_object.turn_off.


turn_on ​

ts
readonly static turn_on: 19;

Engine enum value for XR_object.turn_on.


use ​

ts
readonly static use: 18;

Engine enum value for XR_object.use.