Class: MockPropertyEvaluatorConst
Mock of a constant-value AI property evaluator.
Extends
Implements
property_evaluator_const
Constructors
Constructor
ts
new MockPropertyEvaluatorConst(value: boolean): MockPropertyEvaluatorConst;Parameters
| Parameter | Type |
|---|---|
value | boolean |
Returns
MockPropertyEvaluatorConst
Overrides
MockPropertyEvaluator.constructor
Methods
asMock()
ts
asMock(): property_evaluator;Returns
property_evaluator
evaluate()
ts
evaluate(): boolean;Main evaluator lifecycle method. Called every time to get world property up-to-date state.
Returns
boolean
Current evaluator value.
Implementation of
ts
property_evaluator_const.evaluateOverrides
MockPropertyEvaluator.evaluate
setup()
ts
setup(object: game_object, storage: property_storage): void;Handle setup of the evaluator and binding to a specific object.
Parameters
| Parameter | Type | Description |
|---|---|---|
object | game_object | Target client object to work with. |
storage | property_storage | Action instance storage with preconditions and state. |
Returns
void
Remarks
Called by the planner when the evaluator is registered. Call it manually only for standalone evaluator tests.
Implementation of
ts
property_evaluator_const.setupInherited from
create()
ts
static create(valueOrObject?: boolean | game_object | null, _name?: string): MockPropertyEvaluatorConst;Parameters
| Parameter | Type | Default value |
|---|---|---|
valueOrObject | boolean | game_object | null | false |
_name? | string | undefined |
Returns
MockPropertyEvaluatorConst
Overrides
mock()
ts
static mock(valueOrObject?: boolean | game_object | null, _name?: string): property_evaluator_const;Parameters
| Parameter | Type | Default value |
|---|---|---|
valueOrObject | boolean | game_object | null | false |
_name? | string | undefined |
Returns
property_evaluator_const
Overrides
Properties
__name
ts
__name: string;LuaBind instance constructor name.
Implementation of
ts
property_evaluator_const.__nameInherited from
object
ts
object: game_object;Linked game object to work with.
Implementation of
ts
property_evaluator_const.objectInherited from
storage
ts
storage: property_storage;Container reference with state of action preconditions.
Implementation of
ts
property_evaluator_const.storageInherited from
value
ts
readonly value: boolean;