warscript 0.0.1-dev.5ca835c → 0.0.1-dev.5d49132
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/core/types/player.d.ts +1 -0
- package/core/types/player.lua +4 -1
- package/destroyable.d.ts +1 -0
- package/destroyable.lua +9 -0
- package/engine/behavior.d.ts +4 -2
- package/engine/behavior.lua +69 -11
- package/engine/behaviour/ability/apply-buff.lua +4 -4
- package/engine/behaviour/ability.d.ts +2 -1
- package/engine/behaviour/ability.lua +2 -1
- package/engine/behaviour/unit/stun-immunity.d.ts +7 -5
- package/engine/behaviour/unit/stun-immunity.lua +6 -5
- package/engine/behaviour/unit.d.ts +7 -3
- package/engine/behaviour/unit.lua +101 -24
- package/engine/buff.d.ts +9 -3
- package/engine/buff.lua +62 -34
- package/engine/internal/mechanics/cast-ability.lua +6 -3
- package/engine/internal/object-data/mana-regeneration-rate-increase-factor.d.ts +2 -0
- package/engine/internal/object-data/mana-regeneration-rate-increase-factor.lua +16 -0
- package/engine/internal/unit/attributes.d.ts +17 -0
- package/engine/internal/unit/attributes.lua +46 -0
- package/engine/internal/unit/bonus.d.ts +2 -0
- package/engine/internal/unit/bonus.lua +10 -0
- package/engine/internal/unit/fly-height.lua +3 -3
- package/engine/internal/unit/interrupts.d.ts +12 -0
- package/engine/internal/unit/interrupts.lua +28 -0
- package/engine/internal/unit/scale.lua +3 -3
- package/engine/internal/unit-missile-launch.lua +12 -5
- package/engine/internal/unit.d.ts +2 -8
- package/engine/internal/unit.lua +79 -97
- package/engine/local-client.d.ts +1 -1
- package/engine/local-client.lua +4 -4
- package/engine/object-data/auxiliary/health-regeneration-type.d.ts +8 -0
- package/engine/object-data/auxiliary/health-regeneration-type.lua +2 -0
- package/engine/object-data/entry/ability-type/mana-regeneration.d.ts +8 -0
- package/engine/object-data/entry/ability-type/mana-regeneration.lua +26 -0
- package/engine/object-data/entry/destructible-type.d.ts +27 -1
- package/engine/object-data/entry/destructible-type.lua +155 -0
- package/engine/object-data/entry/unit-type.d.ts +4 -0
- package/engine/object-data/entry/unit-type.lua +76 -32
- package/engine/object-field/unit.d.ts +7 -4
- package/engine/object-field/unit.lua +4 -0
- package/engine/object-field.d.ts +2 -0
- package/engine/object-field.lua +171 -115
- package/engine/standard/fields/ability.d.ts +2 -2
- package/engine/standard/fields/ability.lua +2 -2
- package/engine/standard/fields/unit.d.ts +11 -5
- package/engine/standard/fields/unit.lua +13 -4
- package/engine/unit.d.ts +2 -0
- package/engine/unit.lua +2 -0
- package/objutil/buff.lua +9 -7
- package/package.json +2 -2
- package/patch-lua.lua +15 -0
- package/utility/linked-map.d.ts +26 -0
- package/utility/linked-map.lua +66 -0
- package/utility/linked-set.lua +4 -0
- package/utility/records.lua +20 -1
package/engine/internal/unit.lua
CHANGED
|
@@ -64,6 +64,8 @@ local ____ability = require("engine.internal.item.ability")
|
|
|
64
64
|
local doUnitAbilityAction = ____ability.doUnitAbilityAction
|
|
65
65
|
local ____synchronization = require("engine.synchronization")
|
|
66
66
|
local synchronizer = ____synchronization.synchronizer
|
|
67
|
+
local ____linked_2Dmap = require("utility.linked-map")
|
|
68
|
+
local LinkedMap = ____linked_2Dmap.LinkedMap
|
|
67
69
|
local match = string.match
|
|
68
70
|
local ____tostring = _G.tostring
|
|
69
71
|
local setUnitAnimation = SetUnitAnimation
|
|
@@ -73,16 +75,12 @@ local getUnitRealField = BlzGetUnitRealField
|
|
|
73
75
|
local getHeroStr = GetHeroStr
|
|
74
76
|
local getHeroAgi = GetHeroAgi
|
|
75
77
|
local getHeroInt = GetHeroInt
|
|
76
|
-
local setHeroStr = SetHeroStr
|
|
77
|
-
local setHeroAgi = SetHeroAgi
|
|
78
|
-
local setHeroInt = SetHeroInt
|
|
79
78
|
local getUnitBooleanField = BlzGetUnitBooleanField
|
|
80
79
|
local getUnitStringField = BlzGetUnitStringField
|
|
81
80
|
local setUnitIntegerField = BlzSetUnitIntegerField
|
|
82
81
|
local setUnitRealField = BlzSetUnitRealField
|
|
83
82
|
local setUnitBooleanField = BlzSetUnitBooleanField
|
|
84
83
|
local setUnitStringField = BlzSetUnitStringField
|
|
85
|
-
local setUnitScale = SetUnitScale
|
|
86
84
|
local setUnitPosition = SetUnitPosition
|
|
87
85
|
local setUnitTimeScale = SetUnitTimeScale
|
|
88
86
|
local getHandleId = GetHandleId
|
|
@@ -110,7 +108,6 @@ local getUnitWeaponStringField = BlzGetUnitWeaponStringField
|
|
|
110
108
|
local setUnitWeaponStringField = BlzSetUnitWeaponStringField
|
|
111
109
|
local getUnitAbilityLevel = GetUnitAbilityLevel
|
|
112
110
|
local unitDisableAbility = BlzUnitDisableAbility
|
|
113
|
-
local unitInterruptAttack = BlzUnitInterruptAttack
|
|
114
111
|
local isUnitInvisible = IsUnitInvisible
|
|
115
112
|
local isUnitVisible = IsUnitVisible
|
|
116
113
|
local getUnitX = GetUnitX
|
|
@@ -386,15 +383,27 @@ local modifiers = {
|
|
|
386
383
|
end,
|
|
387
384
|
armor = function(unit, value)
|
|
388
385
|
if UnitAddAbility(unit, armorBonusAbilityId) then
|
|
389
|
-
assert(
|
|
386
|
+
assert(
|
|
387
|
+
UnitMakeAbilityPermanent(unit, true, armorBonusAbilityId),
|
|
388
|
+
"armor bonus ability must be made permanent",
|
|
389
|
+
unit
|
|
390
|
+
)
|
|
390
391
|
end
|
|
391
|
-
local ability = assert(
|
|
392
|
-
|
|
393
|
-
ability,
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
392
|
+
local ability = assert(
|
|
393
|
+
BlzGetUnitAbility(unit, armorBonusAbilityId),
|
|
394
|
+
"armor bonus ability must be existing",
|
|
395
|
+
unit
|
|
396
|
+
)
|
|
397
|
+
assert(
|
|
398
|
+
BlzSetAbilityRealLevelField(
|
|
399
|
+
ability,
|
|
400
|
+
armorBonusField,
|
|
401
|
+
0,
|
|
402
|
+
BlzGetAbilityRealLevelField(ability, armorBonusField, 0) + value
|
|
403
|
+
),
|
|
404
|
+
"armor bonus ability field must be set",
|
|
405
|
+
unit
|
|
406
|
+
)
|
|
398
407
|
end
|
|
399
408
|
}
|
|
400
409
|
local getters = {
|
|
@@ -648,13 +657,17 @@ local fieldSetters = {
|
|
|
648
657
|
}
|
|
649
658
|
local dummies = {}
|
|
650
659
|
for ____, player in ipairs(Player.all) do
|
|
651
|
-
local dummy = assert(
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
660
|
+
local dummy = assert(
|
|
661
|
+
createUnit(
|
|
662
|
+
player.handle,
|
|
663
|
+
dummyUnitId,
|
|
664
|
+
0,
|
|
665
|
+
0,
|
|
666
|
+
270
|
|
667
|
+
),
|
|
668
|
+
"dummy must be created",
|
|
669
|
+
player
|
|
670
|
+
)
|
|
658
671
|
ShowUnit(dummy, false)
|
|
659
672
|
dummies[player] = dummy
|
|
660
673
|
end
|
|
@@ -697,41 +710,57 @@ function Unit.prototype.____constructor(self, handle)
|
|
|
697
710
|
nextSyncId = ____nextSyncId_1 + 1
|
|
698
711
|
self.syncId = ____nextSyncId_1
|
|
699
712
|
self._owner = Player:of(getOwningPlayer(handle))
|
|
700
|
-
assert(
|
|
701
|
-
|
|
713
|
+
assert(
|
|
714
|
+
unitAddAbility(handle, leaveDetectAbilityId) and UnitMakeAbilityPermanent(handle, true, leaveDetectAbilityId),
|
|
715
|
+
"leave detection ability must be added",
|
|
716
|
+
self
|
|
717
|
+
)
|
|
718
|
+
assert(
|
|
719
|
+
unitAddAbility(handle, morphDetectAbilityId),
|
|
720
|
+
"morph detection ability must be added",
|
|
721
|
+
self
|
|
722
|
+
)
|
|
702
723
|
if unitAddAbility(
|
|
703
724
|
handle,
|
|
704
725
|
fourCC("Amrf")
|
|
705
726
|
) then
|
|
706
|
-
assert(
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
727
|
+
assert(
|
|
728
|
+
unitRemoveAbility(
|
|
729
|
+
handle,
|
|
730
|
+
fourCC("Amrf")
|
|
731
|
+
),
|
|
732
|
+
"fly ability must be removed after addition",
|
|
733
|
+
self
|
|
734
|
+
)
|
|
710
735
|
end
|
|
711
736
|
unitBySyncId[self.syncId] = self
|
|
712
737
|
local ____ = self.abilities
|
|
713
738
|
end
|
|
714
|
-
function Unit.prototype.getEvent(self,
|
|
715
|
-
self.events = self.events or (
|
|
716
|
-
local eventId = GetHandleId(
|
|
717
|
-
|
|
718
|
-
|
|
739
|
+
function Unit.prototype.getEvent(self, jevent, collector)
|
|
740
|
+
self.events = self.events or __TS__New(LinkedMap)
|
|
741
|
+
local eventId = GetHandleId(jevent)
|
|
742
|
+
local event = self.events:get(eventId)
|
|
743
|
+
if event == nil then
|
|
744
|
+
event = __TS__New(
|
|
719
745
|
TriggerEvent,
|
|
720
746
|
function(trigger)
|
|
721
|
-
TriggerRegisterUnitEvent(trigger, self.handle,
|
|
747
|
+
TriggerRegisterUnitEvent(trigger, self.handle, jevent)
|
|
722
748
|
end,
|
|
723
749
|
collector or (function() return {} end)
|
|
724
750
|
)
|
|
751
|
+
self.events:put(eventId, event)
|
|
725
752
|
end
|
|
726
|
-
return
|
|
753
|
+
return event
|
|
754
|
+
end
|
|
755
|
+
function Unit.prototype.saveData(self)
|
|
756
|
+
local handle = self.handle
|
|
757
|
+
self[108] = self[108] or getUnitX(handle)
|
|
758
|
+
self[109] = self[109] or getUnitY(handle)
|
|
759
|
+
self._owner = self._owner or Player:of(getOwningPlayer(handle))
|
|
727
760
|
end
|
|
728
761
|
function Unit.prototype.onDestroy(self)
|
|
729
762
|
local handle = self.handle
|
|
730
|
-
self
|
|
731
|
-
self[109] = getUnitY(handle)
|
|
732
|
-
if not self._owner then
|
|
733
|
-
self._owner = Player:of(getOwningPlayer(handle))
|
|
734
|
-
end
|
|
763
|
+
self:saveData()
|
|
735
764
|
local abilities = self.abilities
|
|
736
765
|
for ____, ability in ipairs(abilities) do
|
|
737
766
|
ability:destroy()
|
|
@@ -767,7 +796,11 @@ function Unit.prototype.addAttackHandler(self, condition, action)
|
|
|
767
796
|
self._attackHandlers = handlers
|
|
768
797
|
if #handlers == 1 then
|
|
769
798
|
local handle = self.handle
|
|
770
|
-
assert(
|
|
799
|
+
assert(
|
|
800
|
+
unitAddAbility(handle, attackHandlerAbilityId) and UnitMakeAbilityPermanent(handle, true, attackHandlerAbilityId),
|
|
801
|
+
"attack handler ability must be added",
|
|
802
|
+
self
|
|
803
|
+
)
|
|
771
804
|
end
|
|
772
805
|
return handler
|
|
773
806
|
end
|
|
@@ -980,24 +1013,6 @@ end
|
|
|
980
1013
|
function Unit.prototype.endAbilityCooldown(self, abilityId)
|
|
981
1014
|
BlzEndUnitAbilityCooldown(self.handle, abilityId)
|
|
982
1015
|
end
|
|
983
|
-
function Unit.prototype.interruptMovement(self)
|
|
984
|
-
local handle = self.handle
|
|
985
|
-
unitDisableAbility(
|
|
986
|
-
handle,
|
|
987
|
-
fourCC("Amov"),
|
|
988
|
-
true,
|
|
989
|
-
false
|
|
990
|
-
)
|
|
991
|
-
unitDisableAbility(
|
|
992
|
-
handle,
|
|
993
|
-
fourCC("Amov"),
|
|
994
|
-
false,
|
|
995
|
-
false
|
|
996
|
-
)
|
|
997
|
-
end
|
|
998
|
-
function Unit.prototype.interruptAttack(self)
|
|
999
|
-
unitInterruptAttack(self.handle)
|
|
1000
|
-
end
|
|
1001
1016
|
function Unit.prototype.interruptCast(self, abilityId)
|
|
1002
1017
|
local handle = self.handle
|
|
1003
1018
|
unitDisableAbility(handle, abilityId, true, false)
|
|
@@ -1392,19 +1407,6 @@ __TS__SetDescriptor(
|
|
|
1392
1407
|
},
|
|
1393
1408
|
true
|
|
1394
1409
|
)
|
|
1395
|
-
__TS__SetDescriptor(
|
|
1396
|
-
Unit.prototype,
|
|
1397
|
-
"strengthBase",
|
|
1398
|
-
{
|
|
1399
|
-
get = function(self)
|
|
1400
|
-
return getHeroStr(self.handle, false)
|
|
1401
|
-
end,
|
|
1402
|
-
set = function(self, strengthBase)
|
|
1403
|
-
setHeroStr(self.handle, strengthBase, true)
|
|
1404
|
-
end
|
|
1405
|
-
},
|
|
1406
|
-
true
|
|
1407
|
-
)
|
|
1408
1410
|
__TS__SetDescriptor(
|
|
1409
1411
|
Unit.prototype,
|
|
1410
1412
|
"strengthBonus",
|
|
@@ -1422,19 +1424,6 @@ __TS__SetDescriptor(
|
|
|
1422
1424
|
end},
|
|
1423
1425
|
true
|
|
1424
1426
|
)
|
|
1425
|
-
__TS__SetDescriptor(
|
|
1426
|
-
Unit.prototype,
|
|
1427
|
-
"agilityBase",
|
|
1428
|
-
{
|
|
1429
|
-
get = function(self)
|
|
1430
|
-
return getHeroAgi(self.handle, false)
|
|
1431
|
-
end,
|
|
1432
|
-
set = function(self, agilityBase)
|
|
1433
|
-
setHeroAgi(self.handle, agilityBase, true)
|
|
1434
|
-
end
|
|
1435
|
-
},
|
|
1436
|
-
true
|
|
1437
|
-
)
|
|
1438
1427
|
__TS__SetDescriptor(
|
|
1439
1428
|
Unit.prototype,
|
|
1440
1429
|
"agilityBonus",
|
|
@@ -1452,19 +1441,6 @@ __TS__SetDescriptor(
|
|
|
1452
1441
|
end},
|
|
1453
1442
|
true
|
|
1454
1443
|
)
|
|
1455
|
-
__TS__SetDescriptor(
|
|
1456
|
-
Unit.prototype,
|
|
1457
|
-
"intelligenceBase",
|
|
1458
|
-
{
|
|
1459
|
-
get = function(self)
|
|
1460
|
-
return getHeroInt(self.handle, false)
|
|
1461
|
-
end,
|
|
1462
|
-
set = function(self, intelligenceBase)
|
|
1463
|
-
setHeroInt(self.handle, intelligenceBase, true)
|
|
1464
|
-
end
|
|
1465
|
-
},
|
|
1466
|
-
true
|
|
1467
|
-
)
|
|
1468
1444
|
__TS__SetDescriptor(
|
|
1469
1445
|
Unit.prototype,
|
|
1470
1446
|
"intelligenceBonus",
|
|
@@ -2172,6 +2148,11 @@ __TS__SetDescriptor(
|
|
|
2172
2148
|
end},
|
|
2173
2149
|
true
|
|
2174
2150
|
)
|
|
2151
|
+
Unit.levelChangedEvent = __TS__New(
|
|
2152
|
+
____exports.UnitTriggerEvent,
|
|
2153
|
+
EVENT_PLAYER_HERO_LEVEL,
|
|
2154
|
+
function() return ____exports.Unit:of(getTriggerUnit()) end
|
|
2155
|
+
)
|
|
2175
2156
|
Unit.deathEvent = __TS__New(
|
|
2176
2157
|
____exports.UnitTriggerEvent,
|
|
2177
2158
|
EVENT_PLAYER_UNIT_DEATH,
|
|
@@ -2830,7 +2811,8 @@ Unit.synchronize = synchronizer(
|
|
|
2830
2811
|
return
|
|
2831
2812
|
end
|
|
2832
2813
|
end
|
|
2833
|
-
unit:
|
|
2814
|
+
unit:saveData()
|
|
2815
|
+
Timer:run(unit, "destroy")
|
|
2834
2816
|
end)
|
|
2835
2817
|
end
|
|
2836
2818
|
end)(Unit)
|
package/engine/local-client.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare class LocalClient {
|
|
|
12
12
|
static get isHD(): boolean;
|
|
13
13
|
static get graphicsMode(): GraphicsMode;
|
|
14
14
|
static get isActive(): boolean;
|
|
15
|
-
static pingMinimap(x: number, y: number, duration: number, ...parameters: [] | [red: number, green: number, blue: number,
|
|
15
|
+
static pingMinimap(x: number, y: number, duration: number, ...parameters: [] | [red: number, green: number, blue: number, flashy?: boolean] | [color: Color, flashy?: boolean]): void;
|
|
16
16
|
static get mouseFocusUnit(): Async<Unit> | undefined;
|
|
17
17
|
static get mainSelectedUnit(): Async<Unit> | undefined;
|
|
18
18
|
static get mainSelectedUnitChangeEvent(): Event<[
|
package/engine/local-client.lua
CHANGED
|
@@ -67,7 +67,7 @@ local LocalClient = ____exports.LocalClient
|
|
|
67
67
|
LocalClient.name = "LocalClient"
|
|
68
68
|
function LocalClient.prototype.____constructor(self)
|
|
69
69
|
end
|
|
70
|
-
function LocalClient.pingMinimap(self, x, y, duration, redOrColor,
|
|
70
|
+
function LocalClient.pingMinimap(self, x, y, duration, redOrColor, greenOrFlashy, blue, flashy)
|
|
71
71
|
if redOrColor == nil then
|
|
72
72
|
pingMinimap(x, y, duration)
|
|
73
73
|
elseif __TS__InstanceOf(redOrColor, Color) then
|
|
@@ -78,7 +78,7 @@ function LocalClient.pingMinimap(self, x, y, duration, redOrColor, greenOrExtraE
|
|
|
78
78
|
redOrColor.r,
|
|
79
79
|
redOrColor.g,
|
|
80
80
|
redOrColor.b,
|
|
81
|
-
|
|
81
|
+
greenOrFlashy or false
|
|
82
82
|
)
|
|
83
83
|
else
|
|
84
84
|
pingMinimapEx(
|
|
@@ -86,9 +86,9 @@ function LocalClient.pingMinimap(self, x, y, duration, redOrColor, greenOrExtraE
|
|
|
86
86
|
y,
|
|
87
87
|
duration,
|
|
88
88
|
redOrColor,
|
|
89
|
-
|
|
89
|
+
greenOrFlashy,
|
|
90
90
|
blue,
|
|
91
|
-
|
|
91
|
+
flashy or false
|
|
92
92
|
)
|
|
93
93
|
end
|
|
94
94
|
end
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
import { AbilityType, AbilityTypeId } from "../ability-type";
|
|
3
|
+
import { ObjectDataEntryLevelFieldValueSupplier } from "../../entry";
|
|
4
|
+
export declare class ManaRegenerationAbilityType extends AbilityType {
|
|
5
|
+
static readonly BASE_ID: AbilityTypeId;
|
|
6
|
+
get manaRegenerationRateIncreaseFactor(): number[];
|
|
7
|
+
set manaRegenerationRateIncreaseFactor(manaRegenerationRateIncreaseFactor: ObjectDataEntryLevelFieldValueSupplier<number>);
|
|
8
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local __TS__SetDescriptor = ____lualib.__TS__SetDescriptor
|
|
5
|
+
local ____exports = {}
|
|
6
|
+
local ____ability_2Dtype = require("engine.object-data.entry.ability-type")
|
|
7
|
+
local AbilityType = ____ability_2Dtype.AbilityType
|
|
8
|
+
____exports.ManaRegenerationAbilityType = __TS__Class()
|
|
9
|
+
local ManaRegenerationAbilityType = ____exports.ManaRegenerationAbilityType
|
|
10
|
+
ManaRegenerationAbilityType.name = "ManaRegenerationAbilityType"
|
|
11
|
+
__TS__ClassExtends(ManaRegenerationAbilityType, AbilityType)
|
|
12
|
+
ManaRegenerationAbilityType.BASE_ID = fourCC("AIrn")
|
|
13
|
+
__TS__SetDescriptor(
|
|
14
|
+
ManaRegenerationAbilityType.prototype,
|
|
15
|
+
"manaRegenerationRateIncreaseFactor",
|
|
16
|
+
{
|
|
17
|
+
get = function(self)
|
|
18
|
+
return self:getNumberLevelField("Imrp")
|
|
19
|
+
end,
|
|
20
|
+
set = function(self, manaRegenerationRateIncreaseFactor)
|
|
21
|
+
self:setNumberLevelField("Imrp", manaRegenerationRateIncreaseFactor)
|
|
22
|
+
end
|
|
23
|
+
},
|
|
24
|
+
true
|
|
25
|
+
)
|
|
26
|
+
return ____exports
|
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
2
|
import { ArmorSoundType } from "../auxiliary/armor-sound-type";
|
|
3
3
|
import { CombatClassifications } from "../auxiliary/combat-classification";
|
|
4
|
-
import { ObjectDataEntry, ObjectDataEntryId } from "../entry";
|
|
4
|
+
import { ObjectDataEntry, ObjectDataEntryConstructor, ObjectDataEntryId } from "../entry";
|
|
5
5
|
export type DestructibleTypeId = ObjectDataEntryId & number & {
|
|
6
6
|
readonly __destructibleTypeId: unique symbol;
|
|
7
7
|
};
|
|
8
|
+
export type StandardDestructibleTypeId = DestructibleTypeId & {
|
|
9
|
+
readonly __standardDestructibleTypeId: unique symbol;
|
|
10
|
+
};
|
|
8
11
|
export declare abstract class DestructibleType extends ObjectDataEntry<DestructibleTypeId> {
|
|
12
|
+
static readonly [id: StandardDestructibleTypeId]: ObjectDataEntryConstructor<DestructibleType>;
|
|
9
13
|
private static readonly idGenerator;
|
|
10
14
|
protected static generateId(): number;
|
|
11
15
|
protected static getObjectData(map: WarMap): WarObjects;
|
|
16
|
+
get fixedFacing(): number;
|
|
17
|
+
set fixedFacing(fixedFacing: number);
|
|
18
|
+
get flyOverHeight(): number;
|
|
19
|
+
set flyOverHeight(flyOverHeight: number);
|
|
20
|
+
get modelPath(): string;
|
|
21
|
+
set modelPath(modelPath: string);
|
|
22
|
+
get modelPathSD(): string;
|
|
23
|
+
set modelPathSD(modelPathSD: string);
|
|
24
|
+
get modelPathHD(): string;
|
|
25
|
+
set modelPathHD(modelPathHD: string);
|
|
26
|
+
get occlusionHeight(): number;
|
|
27
|
+
set occlusionHeight(occlusionHeight: number);
|
|
12
28
|
get armorSoundType(): ArmorSoundType;
|
|
13
29
|
set armorSoundType(armorSoundType: ArmorSoundType);
|
|
14
30
|
get armorSoundTypeSD(): ArmorSoundType;
|
|
@@ -17,4 +33,14 @@ export declare abstract class DestructibleType extends ObjectDataEntry<Destructi
|
|
|
17
33
|
set armorSoundTypeHD(armorSoundTypeHD: ArmorSoundType);
|
|
18
34
|
get combatClassifications(): CombatClassifications;
|
|
19
35
|
set combatClassifications(combatClassifications: CombatClassifications);
|
|
36
|
+
get cliffHeight(): number;
|
|
37
|
+
set cliffHeight(cliffHeight: number);
|
|
38
|
+
get isWalkable(): boolean;
|
|
39
|
+
set isWalkable(isWalkable: boolean);
|
|
40
|
+
get pathingTexturePath(): string;
|
|
41
|
+
set pathingTexturePath(pathingTexturePath: string);
|
|
42
|
+
get deadPathingTexturePath(): string;
|
|
43
|
+
set deadPathingTexturePath(deadPathingTexturePath: string);
|
|
44
|
+
get name(): string;
|
|
45
|
+
set name(name: string);
|
|
20
46
|
}
|
|
@@ -11,6 +11,8 @@ local ____entry = require("engine.object-data.entry")
|
|
|
11
11
|
local ObjectDataEntry = ____entry.ObjectDataEntry
|
|
12
12
|
local ____object_2Ddata_2Dentry_2Did_2Dgenerator = require("engine.object-data.utility.object-data-entry-id-generator")
|
|
13
13
|
local ObjectDataEntryIdGenerator = ____object_2Ddata_2Dentry_2Did_2Dgenerator.ObjectDataEntryIdGenerator
|
|
14
|
+
local ____reflection = require("utility.reflection")
|
|
15
|
+
local implementReadonlyNumberIndexSupplier = ____reflection.implementReadonlyNumberIndexSupplier
|
|
14
16
|
____exports.DestructibleType = __TS__Class()
|
|
15
17
|
local DestructibleType = ____exports.DestructibleType
|
|
16
18
|
DestructibleType.name = "DestructibleType"
|
|
@@ -25,6 +27,84 @@ DestructibleType.idGenerator = __TS__New(
|
|
|
25
27
|
ObjectDataEntryIdGenerator,
|
|
26
28
|
fourCC("D000")
|
|
27
29
|
)
|
|
30
|
+
__TS__SetDescriptor(
|
|
31
|
+
DestructibleType.prototype,
|
|
32
|
+
"fixedFacing",
|
|
33
|
+
{
|
|
34
|
+
get = function(self)
|
|
35
|
+
return self:getNumberField("bfxr")
|
|
36
|
+
end,
|
|
37
|
+
set = function(self, fixedFacing)
|
|
38
|
+
self:setNumberField("bfxr", fixedFacing)
|
|
39
|
+
end
|
|
40
|
+
},
|
|
41
|
+
true
|
|
42
|
+
)
|
|
43
|
+
__TS__SetDescriptor(
|
|
44
|
+
DestructibleType.prototype,
|
|
45
|
+
"flyOverHeight",
|
|
46
|
+
{
|
|
47
|
+
get = function(self)
|
|
48
|
+
return self:getNumberField("bflh")
|
|
49
|
+
end,
|
|
50
|
+
set = function(self, flyOverHeight)
|
|
51
|
+
self:setNumberField("bflh", flyOverHeight)
|
|
52
|
+
end
|
|
53
|
+
},
|
|
54
|
+
true
|
|
55
|
+
)
|
|
56
|
+
__TS__SetDescriptor(
|
|
57
|
+
DestructibleType.prototype,
|
|
58
|
+
"modelPath",
|
|
59
|
+
{
|
|
60
|
+
get = function(self)
|
|
61
|
+
return self:getStringField("bfil")
|
|
62
|
+
end,
|
|
63
|
+
set = function(self, modelPath)
|
|
64
|
+
self:setStringField("bfil", modelPath)
|
|
65
|
+
end
|
|
66
|
+
},
|
|
67
|
+
true
|
|
68
|
+
)
|
|
69
|
+
__TS__SetDescriptor(
|
|
70
|
+
DestructibleType.prototype,
|
|
71
|
+
"modelPathSD",
|
|
72
|
+
{
|
|
73
|
+
get = function(self)
|
|
74
|
+
return self:getStringField("bfil:sd")
|
|
75
|
+
end,
|
|
76
|
+
set = function(self, modelPathSD)
|
|
77
|
+
self:setStringField("bfil:sd", modelPathSD)
|
|
78
|
+
end
|
|
79
|
+
},
|
|
80
|
+
true
|
|
81
|
+
)
|
|
82
|
+
__TS__SetDescriptor(
|
|
83
|
+
DestructibleType.prototype,
|
|
84
|
+
"modelPathHD",
|
|
85
|
+
{
|
|
86
|
+
get = function(self)
|
|
87
|
+
return self:getStringField("bfil:hd")
|
|
88
|
+
end,
|
|
89
|
+
set = function(self, modelPathHD)
|
|
90
|
+
self:setStringField("bfil:hd", modelPathHD)
|
|
91
|
+
end
|
|
92
|
+
},
|
|
93
|
+
true
|
|
94
|
+
)
|
|
95
|
+
__TS__SetDescriptor(
|
|
96
|
+
DestructibleType.prototype,
|
|
97
|
+
"occlusionHeight",
|
|
98
|
+
{
|
|
99
|
+
get = function(self)
|
|
100
|
+
return self:getNumberField("boch")
|
|
101
|
+
end,
|
|
102
|
+
set = function(self, occlusionHeight)
|
|
103
|
+
self:setNumberField("boch", occlusionHeight)
|
|
104
|
+
end
|
|
105
|
+
},
|
|
106
|
+
true
|
|
107
|
+
)
|
|
28
108
|
__TS__SetDescriptor(
|
|
29
109
|
DestructibleType.prototype,
|
|
30
110
|
"armorSoundType",
|
|
@@ -80,4 +160,79 @@ __TS__SetDescriptor(
|
|
|
80
160
|
},
|
|
81
161
|
true
|
|
82
162
|
)
|
|
163
|
+
__TS__SetDescriptor(
|
|
164
|
+
DestructibleType.prototype,
|
|
165
|
+
"cliffHeight",
|
|
166
|
+
{
|
|
167
|
+
get = function(self)
|
|
168
|
+
return self:getNumberField("bclh")
|
|
169
|
+
end,
|
|
170
|
+
set = function(self, cliffHeight)
|
|
171
|
+
self:setNumberField("bclh", cliffHeight)
|
|
172
|
+
end
|
|
173
|
+
},
|
|
174
|
+
true
|
|
175
|
+
)
|
|
176
|
+
__TS__SetDescriptor(
|
|
177
|
+
DestructibleType.prototype,
|
|
178
|
+
"isWalkable",
|
|
179
|
+
{
|
|
180
|
+
get = function(self)
|
|
181
|
+
return self:getBooleanField("bwal")
|
|
182
|
+
end,
|
|
183
|
+
set = function(self, isWalkable)
|
|
184
|
+
self:setBooleanField("bwal", isWalkable)
|
|
185
|
+
end
|
|
186
|
+
},
|
|
187
|
+
true
|
|
188
|
+
)
|
|
189
|
+
__TS__SetDescriptor(
|
|
190
|
+
DestructibleType.prototype,
|
|
191
|
+
"pathingTexturePath",
|
|
192
|
+
{
|
|
193
|
+
get = function(self)
|
|
194
|
+
return self:getStringField("bptx")
|
|
195
|
+
end,
|
|
196
|
+
set = function(self, pathingTexturePath)
|
|
197
|
+
self:setStringField("bptx", pathingTexturePath)
|
|
198
|
+
end
|
|
199
|
+
},
|
|
200
|
+
true
|
|
201
|
+
)
|
|
202
|
+
__TS__SetDescriptor(
|
|
203
|
+
DestructibleType.prototype,
|
|
204
|
+
"deadPathingTexturePath",
|
|
205
|
+
{
|
|
206
|
+
get = function(self)
|
|
207
|
+
return self:getStringField("bptd")
|
|
208
|
+
end,
|
|
209
|
+
set = function(self, deadPathingTexturePath)
|
|
210
|
+
self:setStringField("bptd", deadPathingTexturePath)
|
|
211
|
+
end
|
|
212
|
+
},
|
|
213
|
+
true
|
|
214
|
+
)
|
|
215
|
+
__TS__SetDescriptor(
|
|
216
|
+
DestructibleType.prototype,
|
|
217
|
+
"name",
|
|
218
|
+
{
|
|
219
|
+
get = function(self)
|
|
220
|
+
return self:getStringField("bnam")
|
|
221
|
+
end,
|
|
222
|
+
set = function(self, name)
|
|
223
|
+
self:setStringField("bnam", name)
|
|
224
|
+
end
|
|
225
|
+
},
|
|
226
|
+
true
|
|
227
|
+
)
|
|
228
|
+
implementReadonlyNumberIndexSupplier(
|
|
229
|
+
____exports.DestructibleType,
|
|
230
|
+
function(id)
|
|
231
|
+
local ____class_0 = __TS__Class()
|
|
232
|
+
____class_0.name = ____class_0.name
|
|
233
|
+
__TS__ClassExtends(____class_0, ____exports.DestructibleType)
|
|
234
|
+
____class_0.BASE_ID = id
|
|
235
|
+
return ____class_0
|
|
236
|
+
end
|
|
237
|
+
)
|
|
83
238
|
return ____exports
|
|
@@ -42,6 +42,10 @@ export declare class UnitTypeWeapon {
|
|
|
42
42
|
set impactDelay(impactDelay: number);
|
|
43
43
|
get missileModelPath(): string;
|
|
44
44
|
set missileModelPath(missileModelPath: string);
|
|
45
|
+
get missileModelPathSD(): string;
|
|
46
|
+
set missileModelPathSD(missileModelPathSD: string);
|
|
47
|
+
get missileModelPathHD(): string;
|
|
48
|
+
set missileModelPathHD(missileModelPathHD: string);
|
|
45
49
|
get range(): number;
|
|
46
50
|
set range(range: number);
|
|
47
51
|
get soundType(): WeaponSoundType;
|