warscript 0.0.1-dev.47f470c → 0.0.1-dev.4f5b9e7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.d.ts +5 -0
- package/attributes.lua +8 -1
- package/binarywriter.lua +12 -0
- package/core/types/effect.d.ts +1 -3
- package/core/types/effect.lua +26 -29
- package/core/types/frame.lua +24 -21
- package/core/types/player.lua +3 -1
- package/core/types/playerCamera.d.ts +2 -0
- package/core/types/playerCamera.lua +123 -5
- package/core/types/sound.d.ts +17 -25
- package/core/types/sound.lua +91 -46
- package/core/types/tileCell.d.ts +9 -0
- package/core/types/tileCell.lua +92 -0
- package/core/types/timer.d.ts +8 -8
- package/core/types/timer.lua +39 -23
- package/core/util.lua +6 -1
- package/decl/native.d.ts +846 -790
- package/engine/behavior.d.ts +5 -0
- package/engine/behavior.lua +106 -27
- package/engine/behaviour/ability/apply-buff.lua +1 -1
- package/engine/behaviour/ability/apply-unit-behavior.lua +1 -0
- package/engine/behaviour/ability/damage.d.ts +9 -3
- package/engine/behaviour/ability/damage.lua +26 -38
- package/engine/behaviour/ability/emulate-impact.d.ts +1 -1
- package/engine/behaviour/ability/emulate-impact.lua +18 -3
- package/engine/behaviour/ability/restore-mana.d.ts +1 -1
- package/engine/behaviour/ability/restore-mana.lua +6 -6
- package/engine/behaviour/ability.d.ts +5 -1
- package/engine/behaviour/ability.lua +26 -21
- package/engine/behaviour/unit/stun-immunity.d.ts +7 -3
- package/engine/behaviour/unit/stun-immunity.lua +52 -27
- package/engine/behaviour/unit.d.ts +34 -0
- package/engine/behaviour/unit.lua +190 -4
- package/engine/buff.d.ts +15 -12
- package/engine/buff.lua +133 -117
- package/engine/internal/ability.d.ts +7 -1
- package/engine/internal/ability.lua +49 -9
- package/engine/internal/item/ability.lua +63 -11
- package/engine/internal/item+owner.lua +12 -6
- package/engine/internal/item.d.ts +18 -17
- package/engine/internal/item.lua +135 -49
- package/engine/internal/mechanics/ability-duration.lua +1 -1
- package/engine/internal/misc/damage-metadata-by-target.d.ts +2 -0
- package/engine/internal/misc/damage-metadata-by-target.lua +5 -0
- package/engine/internal/misc/frame-coordinates.d.ts +2 -0
- package/engine/internal/misc/frame-coordinates.lua +21 -0
- package/engine/internal/misc/get-terrain-z.d.ts +2 -0
- package/engine/internal/misc/get-terrain-z.lua +11 -0
- package/engine/internal/misc/player-local-handle.d.ts +2 -0
- package/engine/internal/misc/player-local-handle.lua +5 -0
- package/engine/internal/unit/ability.d.ts +35 -0
- package/engine/internal/unit/ability.lua +63 -1
- package/engine/internal/unit/allowed-targets.d.ts +1 -1
- package/engine/internal/unit/allowed-targets.lua +9 -1
- package/engine/internal/unit/order.d.ts +20 -0
- package/engine/internal/unit/order.lua +136 -0
- package/engine/internal/unit+ability.lua +10 -1
- package/engine/internal/unit+damage.d.ts +2 -11
- package/engine/internal/unit+damage.lua +10 -14
- package/engine/internal/unit+spellSteal.lua +1 -2
- package/engine/internal/unit-missile-launch.lua +18 -5
- package/engine/internal/unit.d.ts +32 -10
- package/engine/internal/unit.lua +257 -110
- package/engine/object-data/auxiliary/armor-type.d.ts +11 -0
- package/engine/object-data/auxiliary/armor-type.lua +46 -0
- package/engine/object-data/auxiliary/attachment-preset.d.ts +7 -2
- package/engine/object-data/auxiliary/attachment-preset.lua +4 -3
- package/engine/object-data/auxiliary/attack-type.d.ts +7 -8
- package/engine/object-data/auxiliary/attack-type.lua +42 -0
- package/engine/object-data/auxiliary/movement-type.d.ts +7 -7
- package/engine/object-data/auxiliary/movement-type.lua +22 -0
- package/engine/object-data/auxiliary/sound-eax.d.ts +10 -0
- package/engine/object-data/auxiliary/sound-eax.lua +2 -0
- package/engine/object-data/auxiliary/unit-attribute.d.ts +6 -0
- package/engine/object-data/auxiliary/unit-attribute.lua +9 -0
- package/engine/object-data/entry/ability-type/berserk.d.ts +2 -0
- package/engine/object-data/entry/ability-type/berserk.lua +13 -0
- package/engine/object-data/entry/ability-type/blank-configurable.lua +0 -9
- package/engine/object-data/entry/ability-type/carrion-swarm.d.ts +14 -0
- package/engine/object-data/entry/ability-type/carrion-swarm.lua +65 -0
- package/engine/object-data/entry/ability-type/curse.lua +2 -2
- package/engine/object-data/entry/ability-type/ensnare.d.ts +12 -0
- package/engine/object-data/entry/ability-type/ensnare.lua +52 -0
- package/engine/object-data/entry/ability-type/permanent-invisibility.d.ts +8 -0
- package/engine/object-data/entry/ability-type/permanent-invisibility.lua +26 -0
- package/engine/object-data/entry/ability-type/phase-shift.d.ts +10 -0
- package/engine/object-data/entry/ability-type/phase-shift.lua +39 -0
- package/engine/object-data/entry/ability-type/raise-dead.d.ts +17 -0
- package/engine/object-data/entry/ability-type/raise-dead.lua +78 -0
- package/engine/object-data/entry/ability-type/shock-wave.d.ts +4 -0
- package/engine/object-data/entry/ability-type/shock-wave.lua +26 -0
- package/engine/object-data/entry/ability-type/slow-poison.d.ts +10 -0
- package/engine/object-data/entry/ability-type/slow-poison.lua +58 -0
- package/engine/object-data/entry/ability-type/web.d.ts +12 -0
- package/engine/object-data/entry/ability-type/web.lua +52 -0
- package/engine/object-data/entry/ability-type.d.ts +18 -16
- package/engine/object-data/entry/ability-type.lua +77 -16
- package/engine/object-data/entry/buff-type/applicable.lua +9 -4
- package/engine/object-data/entry/buff-type.d.ts +5 -11
- package/engine/object-data/entry/buff-type.lua +11 -27
- package/engine/object-data/entry/sound-preset.d.ts +18 -2
- package/engine/object-data/entry/sound-preset.lua +105 -15
- package/engine/object-data/entry/unit-type.d.ts +13 -4
- package/engine/object-data/entry/unit-type.lua +156 -88
- package/engine/object-data/entry.d.ts +2 -2
- package/engine/object-data/entry.lua +14 -7
- package/engine/object-field/ability.d.ts +4 -4
- package/engine/object-field/ability.lua +7 -6
- package/engine/object-field/unit.d.ts +57 -3
- package/engine/object-field/unit.lua +207 -7
- package/engine/object-field.d.ts +17 -6
- package/engine/object-field.lua +188 -92
- package/engine/random.d.ts +9 -0
- package/engine/random.lua +13 -0
- package/engine/standard/entries/buff-type.d.ts +3 -0
- package/engine/standard/entries/buff-type.lua +3 -0
- package/engine/standard/fields/unit.d.ts +4 -0
- package/engine/standard/fields/unit.lua +7 -0
- package/engine/text-tag.d.ts +36 -2
- package/engine/text-tag.lua +249 -10
- package/engine/unit.d.ts +1 -0
- package/engine/unit.lua +1 -0
- package/objutil/buff.lua +2 -3
- package/objutil/unit.lua +2 -2
- package/package.json +2 -2
- package/patch-lualib.lua +1 -1
- package/utility/arrays.d.ts +2 -0
- package/utility/arrays.lua +11 -0
- package/utility/callback-array.d.ts +13 -0
- package/utility/callback-array.lua +46 -0
- package/utility/functions.d.ts +8 -0
- package/utility/functions.lua +13 -0
- package/utility/linked-set.d.ts +1 -0
- package/utility/linked-set.lua +3 -0
- package/utility/lua-maps.d.ts +15 -2
- package/utility/lua-maps.lua +53 -2
- package/utility/lua-sets.d.ts +2 -0
- package/utility/lua-sets.lua +7 -0
- package/utility/reflection.lua +11 -7
- package/core/types/order.d.ts +0 -25
- package/core/types/order.lua +0 -55
|
@@ -7,6 +7,7 @@ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
|
7
7
|
local __TS__InstanceOf = ____lualib.__TS__InstanceOf
|
|
8
8
|
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
9
9
|
local __TS__SetDescriptor = ____lualib.__TS__SetDescriptor
|
|
10
|
+
local __TS__ObjectDefineProperty = ____lualib.__TS__ObjectDefineProperty
|
|
10
11
|
local __TS__StringSplit = ____lualib.__TS__StringSplit
|
|
11
12
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
12
13
|
local ____exports = {}
|
|
@@ -124,7 +125,7 @@ function ObjectDataEntry.getAllByBaseIds(self, baseIds)
|
|
|
124
125
|
local constructor = self
|
|
125
126
|
for id, object in pairs(constructor:getObjectData(currentMap).all) do
|
|
126
127
|
if dataBaseIds[object.parentId or id] ~= nil then
|
|
127
|
-
local objectDataEntry = self:of(dataToObjectDataEntryId(id, self.
|
|
128
|
+
local objectDataEntry = self:of(dataToObjectDataEntryId(id, self.idType))
|
|
128
129
|
if objectDataEntry ~= nil and not objectDataEntry.isInternal then
|
|
129
130
|
result[#result + 1] = objectDataEntry
|
|
130
131
|
end
|
|
@@ -139,7 +140,7 @@ function ObjectDataEntry.getAll(self)
|
|
|
139
140
|
local constructor = self
|
|
140
141
|
local result = {}
|
|
141
142
|
for id in pairs(constructor:getObjectData(currentMap).all) do
|
|
142
|
-
local objectDataEntry = self:of(dataToObjectDataEntryId(id, self.
|
|
143
|
+
local objectDataEntry = self:of(dataToObjectDataEntryId(id, self.idType))
|
|
143
144
|
if objectDataEntry ~= nil and not objectDataEntry.isInternal then
|
|
144
145
|
result[#result + 1] = objectDataEntry
|
|
145
146
|
end
|
|
@@ -156,9 +157,9 @@ function ObjectDataEntry.of(self, id)
|
|
|
156
157
|
if object == nil then
|
|
157
158
|
return nil
|
|
158
159
|
end
|
|
159
|
-
local objectDataEntry = objectDataEntryByObjectDataEntryId[dataToObjectDataEntryId(object.id, self.
|
|
160
|
+
local objectDataEntry = objectDataEntryByObjectDataEntryId[dataToObjectDataEntryId(object.id, self.idType)]
|
|
160
161
|
if objectDataEntry == nil then
|
|
161
|
-
if not constructor.IS_SYNTHETIC and (self.BASE_ID == 0 or dataToObjectDataEntryId(object.parentId, self.
|
|
162
|
+
if not constructor.IS_SYNTHETIC and (self.BASE_ID == 0 or dataToObjectDataEntryId(object.parentId, self.idType) == self.BASE_ID) then
|
|
162
163
|
local AbstractObjectDataEntryView = __TS__Class()
|
|
163
164
|
AbstractObjectDataEntryView.name = "AbstractObjectDataEntryView"
|
|
164
165
|
__TS__ClassExtends(AbstractObjectDataEntryView, constructor)
|
|
@@ -475,7 +476,6 @@ function ObjectDataEntry.prototype.setLevelField(self, field, supplier, extracto
|
|
|
475
476
|
end
|
|
476
477
|
end
|
|
477
478
|
ObjectDataEntry.BASE_ID = 0
|
|
478
|
-
ObjectDataEntry.ID_TYPE = type(self.BASE_ID) == "number" and "number" or "string"
|
|
479
479
|
ObjectDataEntry.IS_SYNTHETIC = false
|
|
480
480
|
__TS__SetDescriptor(
|
|
481
481
|
ObjectDataEntry.prototype,
|
|
@@ -503,11 +503,18 @@ __TS__SetDescriptor(
|
|
|
503
503
|
},
|
|
504
504
|
true
|
|
505
505
|
)
|
|
506
|
+
__TS__ObjectDefineProperty(
|
|
507
|
+
ObjectDataEntry,
|
|
508
|
+
"idType",
|
|
509
|
+
{get = function(self)
|
|
510
|
+
return type(self.BASE_ID) == "number" and "number" or "string"
|
|
511
|
+
end}
|
|
512
|
+
)
|
|
506
513
|
__TS__SetDescriptor(
|
|
507
514
|
ObjectDataEntry.prototype,
|
|
508
515
|
"id",
|
|
509
516
|
{get = function(self)
|
|
510
|
-
return dataToObjectDataEntryId(self.object.id, self.type.
|
|
517
|
+
return dataToObjectDataEntryId(self.object.id, self.type.idType)
|
|
511
518
|
end},
|
|
512
519
|
true
|
|
513
520
|
)
|
|
@@ -515,7 +522,7 @@ __TS__SetDescriptor(
|
|
|
515
522
|
ObjectDataEntry.prototype,
|
|
516
523
|
"baseId",
|
|
517
524
|
{get = function(self)
|
|
518
|
-
return dataToObjectDataEntryId(self.object.parentId or self.object.id, self.type.
|
|
525
|
+
return dataToObjectDataEntryId(self.object.parentId or self.object.id, self.type.idType)
|
|
519
526
|
end},
|
|
520
527
|
true
|
|
521
528
|
)
|
|
@@ -12,7 +12,7 @@ import { ReadonlyNonEmptyLinkedSet } from "../../utility/linked-set";
|
|
|
12
12
|
export declare abstract class AbilityField<ValueType extends number | string | boolean = number | string | boolean, NativeFieldType extends jabilityfield = jabilityfield> extends ObjectField<AbilityType, Ability, ValueType, NativeFieldType> {
|
|
13
13
|
protected get instanceClass(): typeof Ability;
|
|
14
14
|
protected getObjectDataEntryId(instance: Ability): AbilityTypeId;
|
|
15
|
-
protected hasNativeFieldValue(
|
|
15
|
+
protected hasNativeFieldValue(abilityTypeId: AbilityTypeId): boolean;
|
|
16
16
|
static get valueChangeEvent(): ObjectFieldValueChangeEvent<ReadonlyObjectFieldType<AbilityField>>;
|
|
17
17
|
}
|
|
18
18
|
export declare class AbilityBooleanField extends AbilityField<boolean, jabilitybooleanfield> {
|
|
@@ -48,7 +48,7 @@ export declare class AbilityStringField extends AbilityField<string, jabilitystr
|
|
|
48
48
|
export declare abstract class AbilityArrayField<ValueType extends number | string | boolean = number | string | boolean, NativeFieldType extends jabilityfield = jabilityfield> extends ObjectArrayField<AbilityType, Ability, ValueType, NativeFieldType> {
|
|
49
49
|
protected get instanceClass(): typeof Ability;
|
|
50
50
|
protected getObjectDataEntryId(instance: Ability): AbilityTypeId;
|
|
51
|
-
protected hasNativeFieldValue(
|
|
51
|
+
protected hasNativeFieldValue(abilityTypeId: AbilityTypeId): boolean;
|
|
52
52
|
}
|
|
53
53
|
export declare class AbilityStringArrayField extends AbilityArrayField<string, jabilitystringlevelfield> {
|
|
54
54
|
protected get defaultValue(): string;
|
|
@@ -68,7 +68,7 @@ export declare abstract class AbilityLevelField<ValueType extends number | strin
|
|
|
68
68
|
protected get instanceClass(): typeof Ability;
|
|
69
69
|
protected getLevelCount(entry: AbilityType | Ability): number;
|
|
70
70
|
protected getObjectDataEntryId(instance: Ability): AbilityTypeId;
|
|
71
|
-
protected hasNativeFieldValue(
|
|
71
|
+
protected hasNativeFieldValue(abilityTypeId: AbilityTypeId): boolean;
|
|
72
72
|
static get valueChangeEvent(): ObjectLevelFieldValueChangeEvent<ReadonlyObjectLevelFieldType<AbilityLevelField>>;
|
|
73
73
|
}
|
|
74
74
|
export declare class AbilityBooleanLevelField extends AbilityLevelField<boolean, boolean, jabilityintegerlevelfield> {
|
|
@@ -117,7 +117,7 @@ export declare abstract class AbilityEnumLevelField<T extends number> extends Ab
|
|
|
117
117
|
protected getNativeFieldById(id: number): jabilityintegerlevelfield;
|
|
118
118
|
protected getNativeFieldValue(instance: Ability, level: number): T;
|
|
119
119
|
protected setNativeFieldValue(instance: Ability, level: number, value: T): boolean;
|
|
120
|
-
static get valueChangeEvent(): ObjectLevelFieldValueChangeEvent<
|
|
120
|
+
static get valueChangeEvent(): ObjectLevelFieldValueChangeEvent<AbilityEnumLevelField<number>>;
|
|
121
121
|
}
|
|
122
122
|
export declare class AbilityBuffPolarityLevelField extends AbilityEnumLevelField<BuffPolarity> {
|
|
123
123
|
protected values: ReadonlyNonEmptyLinkedSet<BuffPolarity>;
|
|
@@ -7,6 +7,7 @@ local __TS__InstanceOf = ____lualib.__TS__InstanceOf
|
|
|
7
7
|
local ____exports = {}
|
|
8
8
|
local ____ability = require("engine.internal.ability")
|
|
9
9
|
local Ability = ____ability.Ability
|
|
10
|
+
local abilityTypeHasField = ____ability.abilityTypeHasField
|
|
10
11
|
local ____object_2Dfield = require("engine.object-field")
|
|
11
12
|
local ObjectArrayField = ____object_2Dfield.ObjectArrayField
|
|
12
13
|
local ObjectField = ____object_2Dfield.ObjectField
|
|
@@ -29,8 +30,8 @@ __TS__ClassExtends(AbilityField, ObjectField)
|
|
|
29
30
|
function AbilityField.prototype.getObjectDataEntryId(self, instance)
|
|
30
31
|
return instance.typeId
|
|
31
32
|
end
|
|
32
|
-
function AbilityField.prototype.hasNativeFieldValue(self,
|
|
33
|
-
return
|
|
33
|
+
function AbilityField.prototype.hasNativeFieldValue(self, abilityTypeId)
|
|
34
|
+
return abilityTypeHasField(abilityTypeId, self.nativeField)
|
|
34
35
|
end
|
|
35
36
|
__TS__SetDescriptor(
|
|
36
37
|
AbilityField.prototype,
|
|
@@ -197,8 +198,8 @@ __TS__ClassExtends(AbilityArrayField, ObjectArrayField)
|
|
|
197
198
|
function AbilityArrayField.prototype.getObjectDataEntryId(self, instance)
|
|
198
199
|
return instance.typeId
|
|
199
200
|
end
|
|
200
|
-
function AbilityArrayField.prototype.hasNativeFieldValue(self,
|
|
201
|
-
return
|
|
201
|
+
function AbilityArrayField.prototype.hasNativeFieldValue(self, abilityTypeId)
|
|
202
|
+
return abilityTypeHasField(abilityTypeId, self.nativeField)
|
|
202
203
|
end
|
|
203
204
|
__TS__SetDescriptor(
|
|
204
205
|
AbilityArrayField.prototype,
|
|
@@ -269,8 +270,8 @@ end
|
|
|
269
270
|
function AbilityLevelField.prototype.getObjectDataEntryId(self, instance)
|
|
270
271
|
return instance.typeId
|
|
271
272
|
end
|
|
272
|
-
function AbilityLevelField.prototype.hasNativeFieldValue(self,
|
|
273
|
-
return
|
|
273
|
+
function AbilityLevelField.prototype.hasNativeFieldValue(self, abilityTypeId)
|
|
274
|
+
return abilityTypeHasField(abilityTypeId, self.nativeField)
|
|
274
275
|
end
|
|
275
276
|
__TS__SetDescriptor(
|
|
276
277
|
AbilityLevelField.prototype,
|
|
@@ -1,16 +1,70 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
2
|
import { Unit } from "../internal/unit";
|
|
3
|
-
import { ObjectField } from "../object-field";
|
|
3
|
+
import { ObjectField, ObjectLevelField, ObjectLevelFieldValueChangeEvent, ReadonlyObjectLevelFieldType } from "../object-field";
|
|
4
4
|
import { UnitType, UnitTypeId } from "../object-data/entry/unit-type";
|
|
5
|
+
import { ReadonlyNonEmptyLinkedSet } from "../../utility/linked-set";
|
|
6
|
+
import { AttackType } from "../object-data/auxiliary/attack-type";
|
|
7
|
+
import { UnitClassifications } from "../object-data/auxiliary/unit-classification";
|
|
5
8
|
export declare abstract class UnitField<ValueType extends number | string | boolean = number | string | boolean, NativeFieldType = any> extends ObjectField<UnitType, Unit, ValueType, NativeFieldType> {
|
|
6
9
|
protected get instanceClass(): typeof Unit;
|
|
7
10
|
protected getObjectDataEntryId(instance: Unit): UnitTypeId;
|
|
11
|
+
protected hasNativeFieldValue(): boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class UnitBooleanField extends UnitField<boolean, junitbooleanfield> {
|
|
14
|
+
protected get defaultValue(): boolean;
|
|
15
|
+
protected getNativeFieldById(id: number): junitbooleanfield;
|
|
16
|
+
protected getNativeFieldValue(instance: Unit): boolean;
|
|
17
|
+
protected setNativeFieldValue(instance: Unit, value: boolean): boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare class UnitFloatField extends UnitField<number, junitrealfield> {
|
|
20
|
+
protected get defaultValue(): number;
|
|
21
|
+
protected getNativeFieldById(id: number): junitrealfield;
|
|
22
|
+
protected getNativeFieldValue(instance: Unit): number;
|
|
23
|
+
protected setNativeFieldValue(instance: Unit, value: number): boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare class UnitIntegerField extends UnitField<number, junitintegerfield> {
|
|
26
|
+
protected get defaultValue(): number;
|
|
27
|
+
protected getNativeFieldById(id: number): junitintegerfield;
|
|
28
|
+
protected getNativeFieldValue(instance: Unit): number;
|
|
29
|
+
protected setNativeFieldValue(instance: Unit, value: number): boolean;
|
|
8
30
|
}
|
|
9
31
|
export declare class UnitStringField extends UnitField<string, junitstringfield> {
|
|
10
32
|
protected get defaultValue(): string;
|
|
11
33
|
protected getNativeFieldById(id: number): junitstringfield;
|
|
12
|
-
protected hasNativeFieldValue(): boolean;
|
|
13
34
|
protected getNativeFieldValue(instance: Unit): string;
|
|
14
|
-
protected getObjectDataEntryId(instance: Unit): UnitTypeId;
|
|
15
35
|
protected setNativeFieldValue(instance: Unit, value: string): boolean;
|
|
16
36
|
}
|
|
37
|
+
type junitweaponfield = junitweaponbooleanfield | junitweaponintegerfield | junitweaponrealfield | junitweaponstringfield;
|
|
38
|
+
export declare abstract class UnitWeaponField<ValueType extends number | string | boolean = number | string | boolean, InputValueType extends ValueType = never, NativeFieldType extends junitweaponfield = junitweaponfield> extends ObjectLevelField<UnitType, Unit, ValueType, InputValueType, NativeFieldType> {
|
|
39
|
+
protected get instanceClass(): typeof Unit;
|
|
40
|
+
protected getLevelCount(): number;
|
|
41
|
+
protected getObjectDataEntryId(instance: Unit): UnitTypeId;
|
|
42
|
+
protected hasNativeFieldValue(): boolean;
|
|
43
|
+
static get valueChangeEvent(): ObjectLevelFieldValueChangeEvent<ReadonlyObjectLevelFieldType<UnitWeaponField>>;
|
|
44
|
+
}
|
|
45
|
+
export declare abstract class UnitNumberWeaponField<NativeFieldType extends junitweaponintegerfield | junitweaponrealfield = junitweaponintegerfield | junitweaponrealfield> extends UnitWeaponField<number, number, NativeFieldType> {
|
|
46
|
+
protected get defaultValue(): number;
|
|
47
|
+
static get valueChangeEvent(): ObjectLevelFieldValueChangeEvent<UnitNumberWeaponField>;
|
|
48
|
+
}
|
|
49
|
+
export declare abstract class UnitEnumWeaponField<T extends number> extends UnitWeaponField<T, T, junitweaponintegerfield> {
|
|
50
|
+
protected abstract values: ReadonlyNonEmptyLinkedSet<T>;
|
|
51
|
+
protected get defaultValue(): T;
|
|
52
|
+
protected getNativeFieldById(id: number): junitweaponintegerfield;
|
|
53
|
+
protected getNativeFieldValue(instance: Unit, index: number): T;
|
|
54
|
+
protected setNativeFieldValue(instance: Unit, index: number, value: T): boolean;
|
|
55
|
+
static get valueChangeEvent(): ObjectLevelFieldValueChangeEvent<UnitEnumWeaponField<number>>;
|
|
56
|
+
}
|
|
57
|
+
export declare class UnitAttackTypeWeaponField extends UnitEnumWeaponField<AttackType> {
|
|
58
|
+
protected values: ReadonlyNonEmptyLinkedSet<AttackType>;
|
|
59
|
+
}
|
|
60
|
+
export declare class UnitClassificationsField extends UnitField<UnitClassifications, junitintegerfield> {
|
|
61
|
+
protected get defaultValue(): UnitClassifications;
|
|
62
|
+
protected getNativeFieldById(id: number): junitintegerfield;
|
|
63
|
+
protected getNativeFieldValue(instance: Unit): UnitClassifications;
|
|
64
|
+
protected setNativeFieldValue(instance: Unit, value: UnitClassifications): boolean;
|
|
65
|
+
}
|
|
66
|
+
export declare class UnitPropulsionWindowField extends UnitFloatField {
|
|
67
|
+
protected getNativeFieldValue(instance: Unit): number;
|
|
68
|
+
protected setNativeFieldValue(instance: Unit, value: number): boolean;
|
|
69
|
+
}
|
|
70
|
+
export {};
|
|
@@ -2,11 +2,24 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__Class = ____lualib.__TS__Class
|
|
3
3
|
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
4
|
local __TS__SetDescriptor = ____lualib.__TS__SetDescriptor
|
|
5
|
+
local __TS__ObjectDefineProperty = ____lualib.__TS__ObjectDefineProperty
|
|
5
6
|
local ____exports = {}
|
|
6
7
|
local ____unit = require("engine.internal.unit")
|
|
7
8
|
local Unit = ____unit.Unit
|
|
8
9
|
local ____object_2Dfield = require("engine.object-field")
|
|
9
10
|
local ObjectField = ____object_2Dfield.ObjectField
|
|
11
|
+
local ObjectLevelField = ____object_2Dfield.ObjectLevelField
|
|
12
|
+
local ____linked_2Dset = require("utility.linked-set")
|
|
13
|
+
local nonEmptyLinkedSetOf = ____linked_2Dset.nonEmptyLinkedSetOf
|
|
14
|
+
local convertUnitBooleanField = ConvertUnitBooleanField
|
|
15
|
+
local convertUnitIntegerField = ConvertUnitIntegerField
|
|
16
|
+
local convertUnitRealField = ConvertUnitRealField
|
|
17
|
+
local convertUnitStringField = ConvertUnitStringField
|
|
18
|
+
local convertUnitWeaponIntegerField = ConvertUnitWeaponIntegerField
|
|
19
|
+
local getUnitWeaponIntegerField = BlzGetUnitWeaponIntegerField
|
|
20
|
+
local setUnitWeaponIntegerField = BlzSetUnitWeaponIntegerField
|
|
21
|
+
local getUnitPropulsionWindow = GetUnitPropWindow
|
|
22
|
+
local setUnitPropulsionWindow = SetUnitPropWindow
|
|
10
23
|
____exports.UnitField = __TS__Class()
|
|
11
24
|
local UnitField = ____exports.UnitField
|
|
12
25
|
UnitField.name = "UnitField"
|
|
@@ -14,6 +27,9 @@ __TS__ClassExtends(UnitField, ObjectField)
|
|
|
14
27
|
function UnitField.prototype.getObjectDataEntryId(self, instance)
|
|
15
28
|
return instance.typeId
|
|
16
29
|
end
|
|
30
|
+
function UnitField.prototype.hasNativeFieldValue(self)
|
|
31
|
+
return true
|
|
32
|
+
end
|
|
17
33
|
__TS__SetDescriptor(
|
|
18
34
|
UnitField.prototype,
|
|
19
35
|
"instanceClass",
|
|
@@ -22,22 +38,79 @@ __TS__SetDescriptor(
|
|
|
22
38
|
end},
|
|
23
39
|
true
|
|
24
40
|
)
|
|
41
|
+
____exports.UnitBooleanField = __TS__Class()
|
|
42
|
+
local UnitBooleanField = ____exports.UnitBooleanField
|
|
43
|
+
UnitBooleanField.name = "UnitBooleanField"
|
|
44
|
+
__TS__ClassExtends(UnitBooleanField, ____exports.UnitField)
|
|
45
|
+
function UnitBooleanField.prototype.getNativeFieldById(self, id)
|
|
46
|
+
return convertUnitBooleanField(id)
|
|
47
|
+
end
|
|
48
|
+
function UnitBooleanField.prototype.getNativeFieldValue(self, instance)
|
|
49
|
+
return instance:getField(self.nativeField)
|
|
50
|
+
end
|
|
51
|
+
function UnitBooleanField.prototype.setNativeFieldValue(self, instance, value)
|
|
52
|
+
return instance:setField(self.nativeField, value)
|
|
53
|
+
end
|
|
54
|
+
__TS__SetDescriptor(
|
|
55
|
+
UnitBooleanField.prototype,
|
|
56
|
+
"defaultValue",
|
|
57
|
+
{get = function(self)
|
|
58
|
+
return false
|
|
59
|
+
end},
|
|
60
|
+
true
|
|
61
|
+
)
|
|
62
|
+
____exports.UnitFloatField = __TS__Class()
|
|
63
|
+
local UnitFloatField = ____exports.UnitFloatField
|
|
64
|
+
UnitFloatField.name = "UnitFloatField"
|
|
65
|
+
__TS__ClassExtends(UnitFloatField, ____exports.UnitField)
|
|
66
|
+
function UnitFloatField.prototype.getNativeFieldById(self, id)
|
|
67
|
+
return convertUnitRealField(id)
|
|
68
|
+
end
|
|
69
|
+
function UnitFloatField.prototype.getNativeFieldValue(self, instance)
|
|
70
|
+
return instance:getField(self.nativeField)
|
|
71
|
+
end
|
|
72
|
+
function UnitFloatField.prototype.setNativeFieldValue(self, instance, value)
|
|
73
|
+
return instance:setField(self.nativeField, value)
|
|
74
|
+
end
|
|
75
|
+
__TS__SetDescriptor(
|
|
76
|
+
UnitFloatField.prototype,
|
|
77
|
+
"defaultValue",
|
|
78
|
+
{get = function(self)
|
|
79
|
+
return 0
|
|
80
|
+
end},
|
|
81
|
+
true
|
|
82
|
+
)
|
|
83
|
+
____exports.UnitIntegerField = __TS__Class()
|
|
84
|
+
local UnitIntegerField = ____exports.UnitIntegerField
|
|
85
|
+
UnitIntegerField.name = "UnitIntegerField"
|
|
86
|
+
__TS__ClassExtends(UnitIntegerField, ____exports.UnitField)
|
|
87
|
+
function UnitIntegerField.prototype.getNativeFieldById(self, id)
|
|
88
|
+
return convertUnitIntegerField(id)
|
|
89
|
+
end
|
|
90
|
+
function UnitIntegerField.prototype.getNativeFieldValue(self, instance)
|
|
91
|
+
return instance:getField(self.nativeField)
|
|
92
|
+
end
|
|
93
|
+
function UnitIntegerField.prototype.setNativeFieldValue(self, instance, value)
|
|
94
|
+
return instance:setField(self.nativeField, value)
|
|
95
|
+
end
|
|
96
|
+
__TS__SetDescriptor(
|
|
97
|
+
UnitIntegerField.prototype,
|
|
98
|
+
"defaultValue",
|
|
99
|
+
{get = function(self)
|
|
100
|
+
return 0
|
|
101
|
+
end},
|
|
102
|
+
true
|
|
103
|
+
)
|
|
25
104
|
____exports.UnitStringField = __TS__Class()
|
|
26
105
|
local UnitStringField = ____exports.UnitStringField
|
|
27
106
|
UnitStringField.name = "UnitStringField"
|
|
28
107
|
__TS__ClassExtends(UnitStringField, ____exports.UnitField)
|
|
29
108
|
function UnitStringField.prototype.getNativeFieldById(self, id)
|
|
30
|
-
return
|
|
31
|
-
end
|
|
32
|
-
function UnitStringField.prototype.hasNativeFieldValue(self)
|
|
33
|
-
return true
|
|
109
|
+
return convertUnitStringField(id)
|
|
34
110
|
end
|
|
35
111
|
function UnitStringField.prototype.getNativeFieldValue(self, instance)
|
|
36
112
|
return instance:getField(self.nativeField)
|
|
37
113
|
end
|
|
38
|
-
function UnitStringField.prototype.getObjectDataEntryId(self, instance)
|
|
39
|
-
return instance.typeId
|
|
40
|
-
end
|
|
41
114
|
function UnitStringField.prototype.setNativeFieldValue(self, instance, value)
|
|
42
115
|
return instance:setField(self.nativeField, value)
|
|
43
116
|
end
|
|
@@ -49,4 +122,131 @@ __TS__SetDescriptor(
|
|
|
49
122
|
end},
|
|
50
123
|
true
|
|
51
124
|
)
|
|
125
|
+
____exports.UnitWeaponField = __TS__Class()
|
|
126
|
+
local UnitWeaponField = ____exports.UnitWeaponField
|
|
127
|
+
UnitWeaponField.name = "UnitWeaponField"
|
|
128
|
+
__TS__ClassExtends(UnitWeaponField, ObjectLevelField)
|
|
129
|
+
function UnitWeaponField.prototype.getLevelCount(self)
|
|
130
|
+
return 2
|
|
131
|
+
end
|
|
132
|
+
function UnitWeaponField.prototype.getObjectDataEntryId(self, instance)
|
|
133
|
+
return instance.typeId
|
|
134
|
+
end
|
|
135
|
+
function UnitWeaponField.prototype.hasNativeFieldValue(self)
|
|
136
|
+
return true
|
|
137
|
+
end
|
|
138
|
+
__TS__SetDescriptor(
|
|
139
|
+
UnitWeaponField.prototype,
|
|
140
|
+
"instanceClass",
|
|
141
|
+
{get = function(self)
|
|
142
|
+
return Unit
|
|
143
|
+
end},
|
|
144
|
+
true
|
|
145
|
+
)
|
|
146
|
+
__TS__ObjectDefineProperty(
|
|
147
|
+
UnitWeaponField,
|
|
148
|
+
"valueChangeEvent",
|
|
149
|
+
{get = function(self)
|
|
150
|
+
return self:getOrCreateValueChangeEvent()
|
|
151
|
+
end}
|
|
152
|
+
)
|
|
153
|
+
____exports.UnitNumberWeaponField = __TS__Class()
|
|
154
|
+
local UnitNumberWeaponField = ____exports.UnitNumberWeaponField
|
|
155
|
+
UnitNumberWeaponField.name = "UnitNumberWeaponField"
|
|
156
|
+
__TS__ClassExtends(UnitNumberWeaponField, ____exports.UnitWeaponField)
|
|
157
|
+
__TS__SetDescriptor(
|
|
158
|
+
UnitNumberWeaponField.prototype,
|
|
159
|
+
"defaultValue",
|
|
160
|
+
{get = function(self)
|
|
161
|
+
return 0
|
|
162
|
+
end},
|
|
163
|
+
true
|
|
164
|
+
)
|
|
165
|
+
__TS__ObjectDefineProperty(
|
|
166
|
+
UnitNumberWeaponField,
|
|
167
|
+
"valueChangeEvent",
|
|
168
|
+
{get = function(self)
|
|
169
|
+
return self:getOrCreateValueChangeEvent()
|
|
170
|
+
end}
|
|
171
|
+
)
|
|
172
|
+
____exports.UnitEnumWeaponField = __TS__Class()
|
|
173
|
+
local UnitEnumWeaponField = ____exports.UnitEnumWeaponField
|
|
174
|
+
UnitEnumWeaponField.name = "UnitEnumWeaponField"
|
|
175
|
+
__TS__ClassExtends(UnitEnumWeaponField, ____exports.UnitWeaponField)
|
|
176
|
+
function UnitEnumWeaponField.prototype.getNativeFieldById(self, id)
|
|
177
|
+
return convertUnitWeaponIntegerField(id)
|
|
178
|
+
end
|
|
179
|
+
function UnitEnumWeaponField.prototype.getNativeFieldValue(self, instance, index)
|
|
180
|
+
local value = getUnitWeaponIntegerField(instance.handle, self.nativeField, index)
|
|
181
|
+
if self.values:contains(value) then
|
|
182
|
+
return value
|
|
183
|
+
end
|
|
184
|
+
return self.values:first()
|
|
185
|
+
end
|
|
186
|
+
function UnitEnumWeaponField.prototype.setNativeFieldValue(self, instance, index, value)
|
|
187
|
+
return setUnitWeaponIntegerField(instance.handle, self.nativeField, index, value)
|
|
188
|
+
end
|
|
189
|
+
__TS__SetDescriptor(
|
|
190
|
+
UnitEnumWeaponField.prototype,
|
|
191
|
+
"defaultValue",
|
|
192
|
+
{get = function(self)
|
|
193
|
+
return self.values:first()
|
|
194
|
+
end},
|
|
195
|
+
true
|
|
196
|
+
)
|
|
197
|
+
__TS__ObjectDefineProperty(
|
|
198
|
+
UnitEnumWeaponField,
|
|
199
|
+
"valueChangeEvent",
|
|
200
|
+
{get = function(self)
|
|
201
|
+
return self:getOrCreateValueChangeEvent()
|
|
202
|
+
end}
|
|
203
|
+
)
|
|
204
|
+
____exports.UnitAttackTypeWeaponField = __TS__Class()
|
|
205
|
+
local UnitAttackTypeWeaponField = ____exports.UnitAttackTypeWeaponField
|
|
206
|
+
UnitAttackTypeWeaponField.name = "UnitAttackTypeWeaponField"
|
|
207
|
+
__TS__ClassExtends(UnitAttackTypeWeaponField, ____exports.UnitEnumWeaponField)
|
|
208
|
+
function UnitAttackTypeWeaponField.prototype.____constructor(self, ...)
|
|
209
|
+
UnitAttackTypeWeaponField.____super.prototype.____constructor(self, ...)
|
|
210
|
+
self.values = nonEmptyLinkedSetOf(
|
|
211
|
+
1,
|
|
212
|
+
2,
|
|
213
|
+
3,
|
|
214
|
+
0,
|
|
215
|
+
5,
|
|
216
|
+
4,
|
|
217
|
+
6
|
|
218
|
+
)
|
|
219
|
+
end
|
|
220
|
+
____exports.UnitClassificationsField = __TS__Class()
|
|
221
|
+
local UnitClassificationsField = ____exports.UnitClassificationsField
|
|
222
|
+
UnitClassificationsField.name = "UnitClassificationsField"
|
|
223
|
+
__TS__ClassExtends(UnitClassificationsField, ____exports.UnitField)
|
|
224
|
+
function UnitClassificationsField.prototype.getNativeFieldById(self, id)
|
|
225
|
+
return convertUnitIntegerField(id)
|
|
226
|
+
end
|
|
227
|
+
function UnitClassificationsField.prototype.getNativeFieldValue(self, instance)
|
|
228
|
+
return instance:getField(self.nativeField)
|
|
229
|
+
end
|
|
230
|
+
function UnitClassificationsField.prototype.setNativeFieldValue(self, instance, value)
|
|
231
|
+
return instance:setField(self.nativeField, value)
|
|
232
|
+
end
|
|
233
|
+
__TS__SetDescriptor(
|
|
234
|
+
UnitClassificationsField.prototype,
|
|
235
|
+
"defaultValue",
|
|
236
|
+
{get = function(self)
|
|
237
|
+
return 0
|
|
238
|
+
end},
|
|
239
|
+
true
|
|
240
|
+
)
|
|
241
|
+
____exports.UnitPropulsionWindowField = __TS__Class()
|
|
242
|
+
local UnitPropulsionWindowField = ____exports.UnitPropulsionWindowField
|
|
243
|
+
UnitPropulsionWindowField.name = "UnitPropulsionWindowField"
|
|
244
|
+
__TS__ClassExtends(UnitPropulsionWindowField, ____exports.UnitFloatField)
|
|
245
|
+
function UnitPropulsionWindowField.prototype.getNativeFieldValue(self, instance)
|
|
246
|
+
return getUnitPropulsionWindow(instance.handle)
|
|
247
|
+
end
|
|
248
|
+
function UnitPropulsionWindowField.prototype.setNativeFieldValue(self, instance, value)
|
|
249
|
+
setUnitPropulsionWindow(instance.handle, value)
|
|
250
|
+
return true
|
|
251
|
+
end
|
|
52
252
|
return ____exports
|
package/engine/object-field.d.ts
CHANGED
|
@@ -5,9 +5,10 @@ import { ObjectDataEntry, ObjectDataEntryIdType, ObjectDataEntryLevelFieldValueS
|
|
|
5
5
|
export type ObjectFieldId = number & {
|
|
6
6
|
readonly __objectDataEntryFieldId: unique symbol;
|
|
7
7
|
};
|
|
8
|
-
export type ObjectFieldConstructor<T extends ObjectFieldBase<any, any, any, any>> = OmitConstructor<typeof ObjectFieldBase> & (new (id: number) => T);
|
|
8
|
+
export type ObjectFieldConstructor<T extends ObjectFieldBase<any, any, any, any>> = OmitConstructor<typeof ObjectFieldBase> & (new (id: number, isGlobal?: boolean) => T);
|
|
9
9
|
export type ObjectFieldAbstractConstructor<T extends ObjectFieldBase<any, any, any, any>> = OmitConstructor<typeof ObjectFieldBase> & (abstract new (id: number) => T);
|
|
10
10
|
declare abstract class ObjectFieldBase<ObjectDataEntryType extends ObjectDataEntry, InstanceType extends AnyNotNil, ValueType, NativeFieldType> {
|
|
11
|
+
readonly isGlobal: boolean;
|
|
11
12
|
protected abstract readonly instanceClass: AbstractConstructor<InstanceType> | Function;
|
|
12
13
|
supports(instance: AnyNotNil): instance is InstanceType & {
|
|
13
14
|
readonly __oneSidedTypeGuard: unique symbol;
|
|
@@ -16,10 +17,10 @@ declare abstract class ObjectFieldBase<ObjectDataEntryType extends ObjectDataEnt
|
|
|
16
17
|
readonly id: ObjectFieldId;
|
|
17
18
|
protected abstract getNativeFieldById(id: number): NativeFieldType;
|
|
18
19
|
protected abstract getObjectDataEntryId(instance: InstanceType): ObjectDataEntryIdType<ObjectDataEntryType>;
|
|
19
|
-
protected abstract hasNativeFieldValue(
|
|
20
|
-
hasValue(
|
|
21
|
-
constructor(id: number);
|
|
22
|
-
static create<T extends ObjectFieldBase<any, any, any, any>>(this: ObjectFieldConstructor<T>, id?: number): T & symbol;
|
|
20
|
+
protected abstract hasNativeFieldValue(objectDataEntryId: ObjectDataEntryIdType<ObjectDataEntryType>): boolean;
|
|
21
|
+
hasValue(objectDataEntryId: ObjectDataEntryIdType<ObjectDataEntryType>): boolean;
|
|
22
|
+
constructor(id: number, isGlobal?: boolean);
|
|
23
|
+
static create<T extends ObjectFieldBase<any, any, any, any>>(this: ObjectFieldConstructor<T>, id?: number, isGlobal?: boolean): T & symbol;
|
|
23
24
|
static of<T extends ObjectFieldBase<any, any, any, any>>(this: ObjectFieldAbstractConstructor<T>, id: number): T | undefined;
|
|
24
25
|
}
|
|
25
26
|
export type ObjectFieldValueChangeEvent<T extends ObjectField<any, any, any, any> | ReadonlyObjectFieldType<ObjectField<any, any, any, any>>> = T extends ObjectField<any, infer InstanceType, infer ValueType, any> ? DispatchingEvent<[
|
|
@@ -35,14 +36,22 @@ export type ObjectFieldValueChangeEvent<T extends ObjectField<any, any, any, any
|
|
|
35
36
|
]> : never;
|
|
36
37
|
export type ReadonlyObjectFieldType<T extends ObjectField<any, any, any, any>> = Omit<T, "setValue" | "removeValue" | "trySetValue">;
|
|
37
38
|
type ReadonlyObjectFieldConstructor<T extends ObjectField> = OmitConstructor<typeof ObjectField> & (abstract new (...args: any[]) => ReadonlyObjectFieldType<T>);
|
|
39
|
+
type ObjectFieldModifier<InstanceType extends AnyNotNil, ValueType extends number | string | boolean> = (instance: InstanceType, currentValue: ValueType, originalValue: ValueType) => ValueType;
|
|
38
40
|
export declare abstract class ObjectField<ObjectDataEntryType extends ObjectDataEntry = ObjectDataEntry, InstanceType extends AnyNotNil = AnyNotNil, ValueType extends number | string | boolean = number | string | boolean, NativeFieldType = unknown> extends ObjectFieldBase<ObjectDataEntryType, InstanceType, ValueType, NativeFieldType> {
|
|
39
41
|
protected abstract readonly defaultValue: ValueType;
|
|
40
42
|
protected abstract getNativeFieldValue(instance: InstanceType): ValueType;
|
|
41
43
|
protected abstract setNativeFieldValue(instance: InstanceType, value: ValueType): boolean;
|
|
42
|
-
|
|
44
|
+
private originalValueByInstance?;
|
|
45
|
+
private modifiersByInstance?;
|
|
46
|
+
getValue(entry: ObjectDataEntryType | InstanceType, includeModifiers?: boolean): ValueType;
|
|
43
47
|
setValue(entry: ObjectDataEntryType | InstanceType, value: ValueType): boolean;
|
|
48
|
+
applyModifier(instance: InstanceType, modifier: ObjectFieldModifier<InstanceType, ValueType>): void;
|
|
49
|
+
removeModifier(instance: InstanceType, modifier: ObjectFieldModifier<InstanceType, ValueType>): boolean;
|
|
44
50
|
removeValue(entry: ObjectDataEntryType): boolean;
|
|
45
51
|
trySetValue(entry: ObjectDataEntryType | InstanceType, value: unknown): boolean;
|
|
52
|
+
private getActualValue;
|
|
53
|
+
private setActualValue;
|
|
54
|
+
private calculateActualValue;
|
|
46
55
|
private invokeValueChangeEvent;
|
|
47
56
|
private invokeValueChangeEventRecursive;
|
|
48
57
|
protected static getOrCreateValueChangeEvent<T extends ObjectField, R extends ReadonlyObjectFieldType<T>>(this: ReadonlyObjectFieldConstructor<T>): ObjectFieldValueChangeEvent<R>;
|
|
@@ -71,6 +80,8 @@ export declare abstract class ObjectArrayField<ObjectDataEntryType extends Objec
|
|
|
71
80
|
setValue(entry: ObjectDataEntryType | InstanceType, value: ValueType[]): boolean;
|
|
72
81
|
}
|
|
73
82
|
export declare abstract class ObjectLevelField<ObjectDataEntryType extends ObjectDataEntry = ObjectDataEntry, InstanceType extends AnyNotNil = AnyNotNil, ValueType extends number | string | boolean = number | string | boolean, InputValueType extends ValueType = never, NativeFieldType = unknown> extends ObjectFieldBase<ObjectDataEntryType, InstanceType, ValueType[], NativeFieldType> {
|
|
83
|
+
private originalValueByLevelByInstance?;
|
|
84
|
+
private modifiersByInstance?;
|
|
74
85
|
protected abstract readonly defaultValue: ValueType;
|
|
75
86
|
protected abstract getNativeFieldValue(instance: InstanceType, level: number): ValueType;
|
|
76
87
|
protected abstract setNativeFieldValue(instance: InstanceType, level: number, value: ValueType): boolean;
|