isaacscript-common 8.4.3 → 8.4.6
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/dist/callbacks/postCursedTeleport.lua +4 -4
- package/dist/callbacks/postPlayerFatalDamage.lua +7 -7
- package/dist/callbacks/postSacrifice.lua +2 -2
- package/dist/callbacks/postTrinketBreak.lua +2 -2
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.d.ts +2 -2
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +4 -4
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +3 -36
- package/dist/features/extraConsoleCommands/init.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/init.lua +1 -1
- package/dist/functions/collectibleSet.d.ts +0 -6
- package/dist/functions/collectibleSet.d.ts.map +1 -1
- package/dist/functions/collectibleSet.lua +35 -46
- package/dist/functions/collectibles.d.ts +2 -1
- package/dist/functions/collectibles.d.ts.map +1 -1
- package/dist/functions/collectibles.lua +2 -1
- package/dist/functions/flag.d.ts +1 -1
- package/dist/functions/flag.lua +1 -1
- package/dist/functions/revive.d.ts +1 -1
- package/dist/functions/revive.d.ts.map +1 -1
- package/dist/functions/revive.lua +3 -3
- package/dist/functions/trinketSet.d.ts +0 -6
- package/dist/functions/trinketSet.d.ts.map +1 -1
- package/dist/functions/trinketSet.lua +35 -46
- package/dist/index.d.ts +5 -16
- package/package.json +2 -2
- package/src/callbacks/postCursedTeleport.ts +7 -7
- package/src/callbacks/postPlayerFatalDamage.ts +9 -16
- package/src/callbacks/postSacrifice.ts +5 -5
- package/src/callbacks/postTrinketBreak.ts +5 -5
- package/src/callbacks/subscriptions/postPlayerFatalDamage.ts +9 -9
- package/src/features/customGridEntity.ts +0 -55
- package/src/features/extraConsoleCommands/init.ts +8 -1
- package/src/functions/collectibleSet.ts +38 -45
- package/src/functions/collectibles.ts +2 -1
- package/src/functions/flag.ts +1 -1
- package/src/functions/revive.ts +4 -4
- package/src/functions/trinketSet.ts +38 -45
|
@@ -28,17 +28,17 @@ local postCursedTeleportHasSubscriptions = ____postCursedTeleport.postCursedTele
|
|
|
28
28
|
function hasSubscriptions(self)
|
|
29
29
|
return postCursedTeleportHasSubscriptions(nil)
|
|
30
30
|
end
|
|
31
|
-
function entityTakeDmgPlayer(self,
|
|
31
|
+
function entityTakeDmgPlayer(self, entity, _amount, damageFlags, _source, _countdownFrames)
|
|
32
32
|
if not hasSubscriptions(nil) then
|
|
33
33
|
return nil
|
|
34
34
|
end
|
|
35
35
|
incrementNumSacrifices(nil, damageFlags)
|
|
36
|
-
setDamageFrame(nil,
|
|
36
|
+
setDamageFrame(nil, entity, damageFlags)
|
|
37
37
|
return nil
|
|
38
38
|
end
|
|
39
|
-
function setDamageFrame(self,
|
|
39
|
+
function setDamageFrame(self, entity, damageFlags)
|
|
40
40
|
local gameFrameCount = game:GetFrameCount()
|
|
41
|
-
local player =
|
|
41
|
+
local player = entity:ToPlayer()
|
|
42
42
|
if player == nil then
|
|
43
43
|
return
|
|
44
44
|
end
|
|
@@ -29,11 +29,11 @@ local postPlayerFatalDamageHasSubscriptions = ____postPlayerFatalDamage.postPlay
|
|
|
29
29
|
function hasSubscriptions(self)
|
|
30
30
|
return postPlayerFatalDamageHasSubscriptions(nil)
|
|
31
31
|
end
|
|
32
|
-
function entityTakeDmgPlayer(self,
|
|
32
|
+
function entityTakeDmgPlayer(self, entity, amount, damageFlags, source, countdownFrames)
|
|
33
33
|
if not hasSubscriptions(nil) then
|
|
34
34
|
return nil
|
|
35
35
|
end
|
|
36
|
-
local player =
|
|
36
|
+
local player = entity:ToPlayer()
|
|
37
37
|
if player == nil then
|
|
38
38
|
return nil
|
|
39
39
|
end
|
|
@@ -49,8 +49,8 @@ function entityTakeDmgPlayer(self, tookDamage, damageAmount, damageFlags, damage
|
|
|
49
49
|
if not isDamageToPlayerFatal(
|
|
50
50
|
nil,
|
|
51
51
|
player,
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
amount,
|
|
53
|
+
source,
|
|
54
54
|
lastDamageGameFrame
|
|
55
55
|
) then
|
|
56
56
|
return nil
|
|
@@ -58,10 +58,10 @@ function entityTakeDmgPlayer(self, tookDamage, damageAmount, damageFlags, damage
|
|
|
58
58
|
local shouldSustainDeath = postPlayerFatalDamageFire(
|
|
59
59
|
nil,
|
|
60
60
|
player,
|
|
61
|
-
|
|
61
|
+
amount,
|
|
62
62
|
damageFlags,
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
source,
|
|
64
|
+
countdownFrames
|
|
65
65
|
)
|
|
66
66
|
if shouldSustainDeath ~= nil then
|
|
67
67
|
return shouldSustainDeath
|
|
@@ -17,11 +17,11 @@ local postSacrificeHasSubscriptions = ____postSacrifice.postSacrificeHasSubscrip
|
|
|
17
17
|
function hasSubscriptions(self)
|
|
18
18
|
return postSacrificeHasSubscriptions(nil)
|
|
19
19
|
end
|
|
20
|
-
function entityTakeDmgPlayer(self,
|
|
20
|
+
function entityTakeDmgPlayer(self, entity, _amount, damageFlags, _source, _countdownFrames)
|
|
21
21
|
if not hasSubscriptions(nil) then
|
|
22
22
|
return nil
|
|
23
23
|
end
|
|
24
|
-
local player =
|
|
24
|
+
local player = entity:ToPlayer()
|
|
25
25
|
if player == nil then
|
|
26
26
|
return nil
|
|
27
27
|
end
|
|
@@ -22,11 +22,11 @@ local postTrinketBreakHasSubscriptions = ____postTrinketBreak.postTrinketBreakHa
|
|
|
22
22
|
function hasSubscriptions(self)
|
|
23
23
|
return postTrinketBreakHasSubscriptions(nil)
|
|
24
24
|
end
|
|
25
|
-
function entityTakeDmgPlayer(self,
|
|
25
|
+
function entityTakeDmgPlayer(self, entity, _amount, _damageFlags, _source, _countdownFrames)
|
|
26
26
|
if not hasSubscriptions(nil) then
|
|
27
27
|
return nil
|
|
28
28
|
end
|
|
29
|
-
local player =
|
|
29
|
+
local player = entity:ToPlayer()
|
|
30
30
|
if player == nil then
|
|
31
31
|
return nil
|
|
32
32
|
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DamageFlag, PlayerType, PlayerVariant } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PostPlayerFatalDamageRegisterParameters = [
|
|
3
|
-
callback: (player: EntityPlayer,
|
|
3
|
+
callback: (player: EntityPlayer, amount: float, damageFlags: BitFlags<DamageFlag>, source: EntityRef, countdownFrames: int) => boolean | undefined,
|
|
4
4
|
playerVariant?: PlayerVariant,
|
|
5
5
|
character?: PlayerType
|
|
6
6
|
];
|
|
7
7
|
export declare function postPlayerFatalDamageHasSubscriptions(): boolean;
|
|
8
8
|
export declare function postPlayerFatalDamageRegister(...args: PostPlayerFatalDamageRegisterParameters): void;
|
|
9
|
-
export declare function postPlayerFatalDamageFire(player: EntityPlayer,
|
|
9
|
+
export declare function postPlayerFatalDamageFire(player: EntityPlayer, amount: float, damageFlags: BitFlags<DamageFlag>, source: EntityRef, countdownFrames: int): boolean | undefined;
|
|
10
10
|
//# sourceMappingURL=postPlayerFatalDamage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postPlayerFatalDamage.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postPlayerFatalDamage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACd,MAAM,8BAA8B,CAAC;AAEtC,oBAAY,uCAAuC,GAAG;IACpD,QAAQ,EAAE,CACR,MAAM,EAAE,YAAY,EACpB,
|
|
1
|
+
{"version":3,"file":"postPlayerFatalDamage.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postPlayerFatalDamage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACd,MAAM,8BAA8B,CAAC;AAEtC,oBAAY,uCAAuC,GAAG;IACpD,QAAQ,EAAE,CACR,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,KAAK,EACb,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,EACjC,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,GAAG,KACjB,OAAO,GAAG,SAAS;IACxB,aAAa,CAAC,EAAE,aAAa;IAC7B,SAAS,CAAC,EAAE,UAAU;CACvB,CAAC;AAIF,wBAAgB,qCAAqC,IAAI,OAAO,CAE/D;AAED,wBAAgB,6BAA6B,CAC3C,GAAG,IAAI,EAAE,uCAAuC,GAC/C,IAAI,CAEN;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,KAAK,EACb,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,EACjC,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,GAAG,GACnB,OAAO,GAAG,SAAS,CA4BrB"}
|
|
@@ -7,7 +7,7 @@ function ____exports.postPlayerFatalDamageRegister(self, ...)
|
|
|
7
7
|
local args = {...}
|
|
8
8
|
subscriptions[#subscriptions + 1] = args
|
|
9
9
|
end
|
|
10
|
-
function ____exports.postPlayerFatalDamageFire(self, player,
|
|
10
|
+
function ____exports.postPlayerFatalDamageFire(self, player, amount, damageFlags, source, countdownFrames)
|
|
11
11
|
local character = player:GetPlayerType()
|
|
12
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
13
13
|
local callback = ____value[1]
|
|
@@ -23,10 +23,10 @@ function ____exports.postPlayerFatalDamageFire(self, player, damageAmount, damag
|
|
|
23
23
|
local shouldSustainDeath = callback(
|
|
24
24
|
nil,
|
|
25
25
|
player,
|
|
26
|
-
|
|
26
|
+
amount,
|
|
27
27
|
damageFlags,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
source,
|
|
29
|
+
countdownFrames
|
|
30
30
|
)
|
|
31
31
|
if shouldSustainDeath ~= nil then
|
|
32
32
|
return shouldSustainDeath
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customGridEntity.d.ts","sourceRoot":"","sources":["../../src/features/customGridEntity.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"customGridEntity.d.ts","sourceRoot":"","sources":["../../src/features/customGridEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAClB,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAgBtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAyH1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,qBAAqB,CACnC,oBAAoB,EAAE,cAAc,EACpC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,QAAQ,CAAC,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,MAAM,EACzB,kBAAkB,iBAA4B,EAC9C,qBAAqB,SAAI,GACxB,UAAU,CA8CZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,+BAA+B,EAAE,GAAG,GAAG,MAAM,GAAG,UAAU,EAC1D,UAAU,UAAO,GAChB,UAAU,GAAG,SAAS,CAuCxB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,KAAK,CAC5C;IAAC,UAAU,EAAE,UAAU;IAAE,IAAI,EAAE,oBAAoB;CAAC,CACrD,CAqBA;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,cAAc,GAAG,SAAS,CAsB5B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,OAAO,CAOT"}
|
|
@@ -4,16 +4,12 @@ local __TS__New = ____lualib.__TS__New
|
|
|
4
4
|
local Set = ____lualib.Set
|
|
5
5
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
6
6
|
local ____exports = {}
|
|
7
|
-
local
|
|
7
|
+
local preUseItemWeNeedToGoDeeper, postNewRoomReordered, v
|
|
8
8
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
9
9
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
10
|
-
local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
|
|
11
|
-
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
12
10
|
local GridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.GridCollisionClass
|
|
13
11
|
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
14
12
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
15
|
-
local ____postGridEntityCustomBroken = require("callbacks.subscriptions.postGridEntityCustomBroken")
|
|
16
|
-
local postGridEntityCustomBrokenFire = ____postGridEntityCustomBroken.postGridEntityCustomBrokenFire
|
|
17
13
|
local ____DefaultMap = require("classes.DefaultMap")
|
|
18
14
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
19
15
|
local ____cachedClasses = require("core.cachedClasses")
|
|
@@ -23,8 +19,6 @@ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
|
23
19
|
local ____featuresInitialized = require("featuresInitialized")
|
|
24
20
|
local areFeaturesInitialized = ____featuresInitialized.areFeaturesInitialized
|
|
25
21
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
26
|
-
local ____flag = require("functions.flag")
|
|
27
|
-
local hasFlag = ____flag.hasFlag
|
|
28
22
|
local ____gridEntities = require("functions.gridEntities")
|
|
29
23
|
local removeGridEntity = ____gridEntities.removeGridEntity
|
|
30
24
|
local spawnGridEntityWithVariant = ____gridEntities.spawnGridEntityWithVariant
|
|
@@ -38,32 +32,6 @@ local ____runInNFrames = require("features.runInNFrames")
|
|
|
38
32
|
local runNextGameFrame = ____runInNFrames.runNextGameFrame
|
|
39
33
|
local ____exports = require("features.saveDataManager.exports")
|
|
40
34
|
local saveDataManager = ____exports.saveDataManager
|
|
41
|
-
function entityTakeDmgGenericProp(self, tookDamage, _damageAmount, damageFlags, _damageSource, _damageCountdownFrames)
|
|
42
|
-
local ptrHash = GetPtrHash(tookDamage)
|
|
43
|
-
if not v.room.genericPropPtrHashes:has(ptrHash) then
|
|
44
|
-
return nil
|
|
45
|
-
end
|
|
46
|
-
if not hasFlag(nil, damageFlags, DamageFlag.EXPLOSION) then
|
|
47
|
-
return false
|
|
48
|
-
end
|
|
49
|
-
local room = game:GetRoom()
|
|
50
|
-
local roomListIndex = getRoomListIndex(nil)
|
|
51
|
-
local roomCustomGridEntities = v.level.customGridEntities:get(roomListIndex)
|
|
52
|
-
if roomCustomGridEntities == nil then
|
|
53
|
-
return false
|
|
54
|
-
end
|
|
55
|
-
local gridIndex = room:GetGridIndex(tookDamage.Position)
|
|
56
|
-
local data = roomCustomGridEntities:get(gridIndex)
|
|
57
|
-
if data == nil then
|
|
58
|
-
return false
|
|
59
|
-
end
|
|
60
|
-
local gridEntity = room:GetGridEntity(gridIndex)
|
|
61
|
-
if gridEntity == nil then
|
|
62
|
-
error("Failed to get the grid entity for a custom grid entity that broke at grid index: " .. tostring(gridIndex))
|
|
63
|
-
end
|
|
64
|
-
postGridEntityCustomBrokenFire(nil, gridEntity, data.gridEntityTypeCustom)
|
|
65
|
-
return false
|
|
66
|
-
end
|
|
67
35
|
function preUseItemWeNeedToGoDeeper(self, _collectibleType, _rng, player, _useFlags, _activeSlot, _customVarData)
|
|
68
36
|
local room = game:GetRoom()
|
|
69
37
|
local roomListIndex = getRoomListIndex(nil)
|
|
@@ -113,7 +81,7 @@ function postNewRoomReordered(self)
|
|
|
113
81
|
local decoration = room:GetGridEntity(gridIndex)
|
|
114
82
|
if decoration == nil then
|
|
115
83
|
roomCustomGridEntities:delete(gridIndex)
|
|
116
|
-
goto
|
|
84
|
+
goto __continue13
|
|
117
85
|
end
|
|
118
86
|
if data.anm2Path ~= nil then
|
|
119
87
|
local sprite = decoration:GetSprite()
|
|
@@ -122,7 +90,7 @@ function postNewRoomReordered(self)
|
|
|
122
90
|
sprite:Play(animationToPlay, true)
|
|
123
91
|
end
|
|
124
92
|
end
|
|
125
|
-
::
|
|
93
|
+
::__continue13::
|
|
126
94
|
end
|
|
127
95
|
end
|
|
128
96
|
local FEATURE_NAME = "customGridEntity"
|
|
@@ -140,7 +108,6 @@ v = {
|
|
|
140
108
|
-- @internal
|
|
141
109
|
function ____exports.customGridEntityInit(self, mod)
|
|
142
110
|
saveDataManager(nil, FEATURE_NAME, v)
|
|
143
|
-
mod:AddCallback(ModCallback.ENTITY_TAKE_DMG, entityTakeDmgGenericProp, EntityType.GENERIC_PROP)
|
|
144
111
|
mod:AddCallback(ModCallback.PRE_USE_ITEM, preUseItemWeNeedToGoDeeper, CollectibleType.WE_NEED_TO_GO_DEEPER)
|
|
145
112
|
mod:AddCallbackCustom(ModCallbackCustom.POST_NEW_ROOM_REORDERED, postNewRoomReordered)
|
|
146
113
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/init.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAWxD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAK/D"}
|
|
@@ -208,7 +208,7 @@ function evaluateCacheFlying(self, player)
|
|
|
208
208
|
player.CanFly = true
|
|
209
209
|
end
|
|
210
210
|
end
|
|
211
|
-
function entityTakeDmgPlayer(self)
|
|
211
|
+
function entityTakeDmgPlayer(self, _entity, _damageAmount, _damageFlags, _damageSource, _damageCountdownFrames)
|
|
212
212
|
if v.run.spamBloodRights then
|
|
213
213
|
return false
|
|
214
214
|
end
|
|
@@ -45,9 +45,6 @@ export declare function getModdedCollectibleSet(): ReadonlySet<CollectibleType>;
|
|
|
45
45
|
*
|
|
46
46
|
* Use this if you need to iterate over the collectibles in order. If you need to do O(1) lookups,
|
|
47
47
|
* then use the `getVanillaCollectibleSet` helper function instead.
|
|
48
|
-
*
|
|
49
|
-
* This function can only be called if at least one callback has been executed. This is because not
|
|
50
|
-
* all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
51
48
|
*/
|
|
52
49
|
export declare function getVanillaCollectibleArray(): readonly CollectibleType[];
|
|
53
50
|
/**
|
|
@@ -55,9 +52,6 @@ export declare function getVanillaCollectibleArray(): readonly CollectibleType[]
|
|
|
55
52
|
*
|
|
56
53
|
* Use this if you need to do O(1) lookups. If you need to iterate over the collectibles in order,
|
|
57
54
|
* then use the `getVanillaCollectibleArray` helper function instead.
|
|
58
|
-
*
|
|
59
|
-
* This function can only be called if at least one callback has been executed. This is because not
|
|
60
|
-
* all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
61
55
|
*/
|
|
62
56
|
export declare function getVanillaCollectibleSet(): ReadonlySet<CollectibleType>;
|
|
63
57
|
//# sourceMappingURL=collectibleSet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectibleSet.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"collectibleSet.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAwD/D;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,IAAI,SAAS,eAAe,EAAE,CAGhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,IAAI,WAAW,CAAC,eAAe,CAAC,CAGhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,IAAI,SAAS,eAAe,EAAE,CAGtE;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,IAAI,WAAW,CAAC,eAAe,CAAC,CAGtE;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,SAAS,eAAe,EAAE,CAGvE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,WAAW,CAAC,eAAe,CAAC,CAGvE"}
|
|
@@ -1,55 +1,50 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local Set = ____lualib.Set
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
|
-
local __TS__ArraySort = ____lualib.__TS__ArraySort
|
|
5
4
|
local ____exports = {}
|
|
6
5
|
local ____cachedClasses = require("core.cachedClasses")
|
|
7
6
|
local itemConfig = ____cachedClasses.itemConfig
|
|
8
|
-
local ____constantsFirstLast = require("core.constantsFirstLast")
|
|
9
|
-
local FIRST_COLLECTIBLE_TYPE = ____constantsFirstLast.FIRST_COLLECTIBLE_TYPE
|
|
10
|
-
local LAST_VANILLA_COLLECTIBLE_TYPE = ____constantsFirstLast.LAST_VANILLA_COLLECTIBLE_TYPE
|
|
11
7
|
local ____firstLast = require("features.firstLast")
|
|
12
|
-
local
|
|
13
|
-
local
|
|
14
|
-
local
|
|
8
|
+
local getModdedCollectibleTypes = ____firstLast.getModdedCollectibleTypes
|
|
9
|
+
local ____collectibles = require("functions.collectibles")
|
|
10
|
+
local getVanillaCollectibleTypeRange = ____collectibles.getVanillaCollectibleTypeRange
|
|
15
11
|
local ALL_COLLECTIBLES_ARRAY = {}
|
|
16
|
-
local VANILLA_COLLECTIBLES_ARRAY = {}
|
|
17
|
-
local MODDED_COLLECTIBLES_ARRAY = {}
|
|
18
12
|
local ALL_COLLECTIBLES_SET = __TS__New(Set)
|
|
13
|
+
local VANILLA_COLLECTIBLES_ARRAY = {}
|
|
19
14
|
local VANILLA_COLLECTIBLES_SET = __TS__New(Set)
|
|
15
|
+
local MODDED_COLLECTIBLES_ARRAY = {}
|
|
20
16
|
local MODDED_COLLECTIBLES_SET = __TS__New(Set)
|
|
21
|
-
local function
|
|
22
|
-
if #
|
|
17
|
+
local function lazyInitVanillaCollectibles(self)
|
|
18
|
+
if #VANILLA_COLLECTIBLES_ARRAY > 0 then
|
|
23
19
|
return
|
|
24
20
|
end
|
|
25
|
-
local
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
goto __continue4
|
|
32
|
-
end
|
|
33
|
-
ALL_COLLECTIBLES_ARRAY[#ALL_COLLECTIBLES_ARRAY + 1] = collectibleType
|
|
34
|
-
if collectibleType <= LAST_VANILLA_COLLECTIBLE_TYPE then
|
|
35
|
-
VANILLA_COLLECTIBLES_ARRAY[#VANILLA_COLLECTIBLES_ARRAY + 1] = collectibleType
|
|
36
|
-
else
|
|
37
|
-
MODDED_COLLECTIBLES_ARRAY[#MODDED_COLLECTIBLES_ARRAY + 1] = collectibleType
|
|
38
|
-
end
|
|
21
|
+
local vanillaCollectibleTypeRange = getVanillaCollectibleTypeRange(nil)
|
|
22
|
+
for ____, collectibleType in ipairs(vanillaCollectibleTypeRange) do
|
|
23
|
+
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
24
|
+
if itemConfigItem ~= nil then
|
|
25
|
+
VANILLA_COLLECTIBLES_ARRAY[#VANILLA_COLLECTIBLES_ARRAY + 1] = collectibleType
|
|
26
|
+
VANILLA_COLLECTIBLES_SET:add(collectibleType)
|
|
39
27
|
end
|
|
40
|
-
::__continue4::
|
|
41
28
|
end
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
29
|
+
end
|
|
30
|
+
local function lazyInitModdedCollectibles(self)
|
|
31
|
+
if #MODDED_COLLECTIBLES_ARRAY > 0 then
|
|
32
|
+
return
|
|
45
33
|
end
|
|
46
|
-
|
|
34
|
+
lazyInitVanillaCollectibles(nil)
|
|
47
35
|
for ____, collectibleType in ipairs(VANILLA_COLLECTIBLES_ARRAY) do
|
|
48
|
-
|
|
36
|
+
ALL_COLLECTIBLES_ARRAY[#ALL_COLLECTIBLES_ARRAY + 1] = collectibleType
|
|
37
|
+
ALL_COLLECTIBLES_SET:add(collectibleType)
|
|
49
38
|
end
|
|
50
|
-
|
|
51
|
-
for ____, collectibleType in ipairs(
|
|
52
|
-
|
|
39
|
+
local moddedCollectibleTypes = getModdedCollectibleTypes(nil)
|
|
40
|
+
for ____, collectibleType in ipairs(moddedCollectibleTypes) do
|
|
41
|
+
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
42
|
+
if itemConfigItem ~= nil then
|
|
43
|
+
MODDED_COLLECTIBLES_ARRAY[#MODDED_COLLECTIBLES_ARRAY + 1] = collectibleType
|
|
44
|
+
MODDED_COLLECTIBLES_SET:add(collectibleType)
|
|
45
|
+
ALL_COLLECTIBLES_ARRAY[#ALL_COLLECTIBLES_ARRAY + 1] = collectibleType
|
|
46
|
+
ALL_COLLECTIBLES_SET:add(collectibleType)
|
|
47
|
+
end
|
|
53
48
|
end
|
|
54
49
|
end
|
|
55
50
|
--- Returns an array containing every valid collectible type in the game, including modded
|
|
@@ -61,7 +56,7 @@ end
|
|
|
61
56
|
-- This function can only be called if at least one callback has been executed. This is because not
|
|
62
57
|
-- all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
63
58
|
function ____exports.getCollectibleArray(self)
|
|
64
|
-
|
|
59
|
+
lazyInitModdedCollectibles(nil)
|
|
65
60
|
return ALL_COLLECTIBLES_ARRAY
|
|
66
61
|
end
|
|
67
62
|
--- Returns a set containing every valid collectible type in the game, including modded collectibles.
|
|
@@ -72,7 +67,7 @@ end
|
|
|
72
67
|
-- This function can only be called if at least one callback has been executed. This is because not
|
|
73
68
|
-- all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
74
69
|
function ____exports.getCollectibleSet(self)
|
|
75
|
-
|
|
70
|
+
lazyInitModdedCollectibles(nil)
|
|
76
71
|
return ALL_COLLECTIBLES_SET
|
|
77
72
|
end
|
|
78
73
|
--- Returns an array containing every modded collectible type in the game.
|
|
@@ -83,7 +78,7 @@ end
|
|
|
83
78
|
-- This function can only be called if at least one callback has been executed. This is because not
|
|
84
79
|
-- all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
85
80
|
function ____exports.getModdedCollectibleArray(self)
|
|
86
|
-
|
|
81
|
+
lazyInitModdedCollectibles(nil)
|
|
87
82
|
return MODDED_COLLECTIBLES_ARRAY
|
|
88
83
|
end
|
|
89
84
|
--- Returns a set containing every modded collectible type in the game.
|
|
@@ -94,29 +89,23 @@ end
|
|
|
94
89
|
-- This function can only be called if at least one callback has been executed. This is because not
|
|
95
90
|
-- all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
96
91
|
function ____exports.getModdedCollectibleSet(self)
|
|
97
|
-
|
|
92
|
+
lazyInitModdedCollectibles(nil)
|
|
98
93
|
return MODDED_COLLECTIBLES_SET
|
|
99
94
|
end
|
|
100
95
|
--- Returns an array containing every valid vanilla collectible type in the game.
|
|
101
96
|
--
|
|
102
97
|
-- Use this if you need to iterate over the collectibles in order. If you need to do O(1) lookups,
|
|
103
98
|
-- then use the `getVanillaCollectibleSet` helper function instead.
|
|
104
|
-
--
|
|
105
|
-
-- This function can only be called if at least one callback has been executed. This is because not
|
|
106
|
-
-- all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
107
99
|
function ____exports.getVanillaCollectibleArray(self)
|
|
108
|
-
|
|
100
|
+
lazyInitVanillaCollectibles(nil)
|
|
109
101
|
return VANILLA_COLLECTIBLES_ARRAY
|
|
110
102
|
end
|
|
111
103
|
--- Returns a set containing every valid vanilla collectible type in the game.
|
|
112
104
|
--
|
|
113
105
|
-- Use this if you need to do O(1) lookups. If you need to iterate over the collectibles in order,
|
|
114
106
|
-- then use the `getVanillaCollectibleArray` helper function instead.
|
|
115
|
-
--
|
|
116
|
-
-- This function can only be called if at least one callback has been executed. This is because not
|
|
117
|
-
-- all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
118
107
|
function ____exports.getVanillaCollectibleSet(self)
|
|
119
|
-
|
|
108
|
+
lazyInitVanillaCollectibles(nil)
|
|
120
109
|
return VANILLA_COLLECTIBLES_SET
|
|
121
110
|
end
|
|
122
111
|
return ____exports
|
|
@@ -129,7 +129,8 @@ export declare function getCollectibleTags(collectibleType: CollectibleType): Bi
|
|
|
129
129
|
* collectible types.
|
|
130
130
|
*
|
|
131
131
|
* This function is only useful when building collectible type objects. For most purposes, you
|
|
132
|
-
* should use the `getVanillaCollectibleSet` helper
|
|
132
|
+
* should use the `getVanillaCollectibleArray` or `getVanillaCollectibleSet` helper functions
|
|
133
|
+
* instead.
|
|
133
134
|
*/
|
|
134
135
|
export declare function getVanillaCollectibleTypeRange(): CollectibleType[];
|
|
135
136
|
/** Returns true if the item type in the item config is equal to `ItemType.ITEM_ACTIVE`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,eAAe,EAEf,aAAa,EAEb,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AAgBtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAyB7D,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAEtE;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAsBT;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,eAAe,GAC/B,MAAM,CAeR;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,eAAe,EAAE,eAAe,GAC/B,GAAG,CAYL;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,eAAe,EAAE,eAAe,EAChC,MAAM,EAAE,YAAY,GACnB,WAAW,CAyBb;AAED;;;GAGG;A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@ -332,7 +332,8 @@ end
|
|
|
332
332
|
-- collectible types.
|
|
333
333
|
--
|
|
334
334
|
-- This function is only useful when building collectible type objects. For most purposes, you
|
|
335
|
-
-- should use the `getVanillaCollectibleSet` helper
|
|
335
|
+
-- should use the `getVanillaCollectibleArray` or `getVanillaCollectibleSet` helper functions
|
|
336
|
+
-- instead.
|
|
336
337
|
function ____exports.getVanillaCollectibleTypeRange(self)
|
|
337
338
|
return irange(nil, FIRST_COLLECTIBLE_TYPE, LAST_VANILLA_COLLECTIBLE_TYPE)
|
|
338
339
|
end
|
package/dist/functions/flag.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export declare function hasFlag<T extends BitFlag | BitFlag128>(flags: T | BitFl
|
|
|
74
74
|
*/
|
|
75
75
|
export declare function isEmptyFlag<T extends BitFlag | BitFlag128>(flag: T): boolean;
|
|
76
76
|
/**
|
|
77
|
-
* Helper function to determine whether damage to a player in the
|
|
77
|
+
* Helper function to determine whether damage to a player in the `ENTITY_TAKE_DMG` callback was
|
|
78
78
|
* self-inflicted. For example, damage from a Curse Room door, a Razor, or a Blood Donation Machine
|
|
79
79
|
* would count as self-inflicted damage.
|
|
80
80
|
*/
|
package/dist/functions/flag.lua
CHANGED
|
@@ -92,7 +92,7 @@ end
|
|
|
92
92
|
function ____exports.isEmptyFlag(self, flag)
|
|
93
93
|
return flag == 0
|
|
94
94
|
end
|
|
95
|
-
--- Helper function to determine whether damage to a player in the
|
|
95
|
+
--- Helper function to determine whether damage to a player in the `ENTITY_TAKE_DMG` callback was
|
|
96
96
|
-- self-inflicted. For example, damage from a Curse Room door, a Razor, or a Blood Donation Machine
|
|
97
97
|
-- would count as self-inflicted damage.
|
|
98
98
|
function ____exports.isSelfDamage(self, damageFlags)
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Uses the player's current health and other miscellaneous things to determine if incoming damage
|
|
6
6
|
* will be fatal.
|
|
7
7
|
*/
|
|
8
|
-
export declare function isDamageToPlayerFatal(player: EntityPlayer,
|
|
8
|
+
export declare function isDamageToPlayerFatal(player: EntityPlayer, amount: int, source: EntityRef, lastDamageGameFrame: int | undefined): boolean;
|
|
9
9
|
/**
|
|
10
10
|
* Assuming that we are on the frame of fatal damage, this function returns whether or not
|
|
11
11
|
* Mysterious Paper would rotate to Missing Poster on the frame that the "Game Over" screen would
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revive.d.ts","sourceRoot":"","sources":["../../src/functions/revive.ts"],"names":[],"mappings":";;;AAsBA;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,
|
|
1
|
+
{"version":3,"file":"revive.d.ts","sourceRoot":"","sources":["../../src/functions/revive.ts"],"names":[],"mappings":";;;AAsBA;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,GAAG,EACX,MAAM,EAAE,SAAS,EACjB,mBAAmB,EAAE,GAAG,GAAG,SAAS,GACnC,OAAO,CAuFT;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAavE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAa9D;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAYtE;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAe1E"}
|
|
@@ -48,12 +48,12 @@ function ____exports.willReviveFromSpiritShackles(self, player)
|
|
|
48
48
|
end
|
|
49
49
|
--- Uses the player's current health and other miscellaneous things to determine if incoming damage
|
|
50
50
|
-- will be fatal.
|
|
51
|
-
function ____exports.isDamageToPlayerFatal(self, player,
|
|
51
|
+
function ____exports.isDamageToPlayerFatal(self, player, amount, source, lastDamageGameFrame)
|
|
52
52
|
local gameFrameCount = game:GetFrameCount()
|
|
53
53
|
local character = player:GetPlayerType()
|
|
54
54
|
local effects = player:GetEffects()
|
|
55
55
|
local isBerserk = effects:HasCollectibleEffect(CollectibleType.BERSERK)
|
|
56
|
-
if character == PlayerType.JACOB_B and
|
|
56
|
+
if character == PlayerType.JACOB_B and source.Type == EntityType.DARK_ESAU then
|
|
57
57
|
return false
|
|
58
58
|
end
|
|
59
59
|
if isBerserk then
|
|
@@ -73,7 +73,7 @@ function ____exports.isDamageToPlayerFatal(self, player, damageAmount, damageSou
|
|
|
73
73
|
return true
|
|
74
74
|
end
|
|
75
75
|
local playerNumAllHearts = getPlayerNumHitsRemaining(nil, player)
|
|
76
|
-
if
|
|
76
|
+
if amount < playerNumAllHearts then
|
|
77
77
|
return false
|
|
78
78
|
end
|
|
79
79
|
if ____exports.willReviveFromHeartbreak(nil, player) then
|
|
@@ -44,9 +44,6 @@ export declare function getTrinketSet(): ReadonlySet<TrinketType>;
|
|
|
44
44
|
*
|
|
45
45
|
* Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups, then
|
|
46
46
|
* use the `getVanillaTrinketSet` helper function instead.
|
|
47
|
-
*
|
|
48
|
-
* This function can only be called if at least one callback has been executed. This is because not
|
|
49
|
-
* all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
50
47
|
*/
|
|
51
48
|
export declare function getVanillaTrinketArray(): readonly TrinketType[];
|
|
52
49
|
/**
|
|
@@ -54,9 +51,6 @@ export declare function getVanillaTrinketArray(): readonly TrinketType[];
|
|
|
54
51
|
*
|
|
55
52
|
* Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order, then
|
|
56
53
|
* use the `getVanillaTrinketArray` helper function instead.
|
|
57
|
-
*
|
|
58
|
-
* This function can only be called if at least one callback has been executed. This is because not
|
|
59
|
-
* all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
60
54
|
*/
|
|
61
55
|
export declare function getVanillaTrinketSet(): ReadonlySet<TrinketType>;
|
|
62
56
|
//# sourceMappingURL=trinketSet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trinketSet.d.ts","sourceRoot":"","sources":["../../src/functions/trinketSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"trinketSet.d.ts","sourceRoot":"","sources":["../../src/functions/trinketSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAwD3D;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,SAAS,WAAW,EAAE,CAG9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,IAAI,WAAW,CAAC,WAAW,CAAC,CAG9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,IAAI,SAAS,WAAW,EAAE,CAGxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,IAAI,WAAW,CAAC,WAAW,CAAC,CAGxD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,SAAS,WAAW,EAAE,CAG/D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,WAAW,CAAC,WAAW,CAAC,CAG/D"}
|